Reboot difference - command line v GUI

Jul 20, 2018 11 Replies

I have my R Pi 3 B+ on my LAN, with latest NOOBS, setup to download weather via USB from my weather station and present it as a webpage. During the early hours, I have the Pi configured to do a reboot and reload the software for the weather - that works fine.



What I have found, is that if I also reboot via the GUI reboot option, it also loads the weather interface software and it carries on as normal



If instead, I type at the command line 'reboot', it doesn't reload the weather software. I have to manually load it all in.


I assume you initialy manualy started the App

Gui's are often configured to remember their current state at shutdown & restore it on power up the cli reboot command is more aggressive & I suspect this prevents the GUI from performing this task the correct way to fix this issue is to correctly configure your app to auto-run

suggestions on how to achieve this can be fount here :-

formatting link
at-startup/

Hlade's Law: If you have a difficult task, give it to a lazy person -- they will find an easier way to do it.

On a sunny day (Fri, 20 Jul 2018 10:21:23 +0100) it happened Harry Bloomfield wrote in :

Where did you specify the starting of your weather software? In /etc/rc.local or in ~/.xinitrc

For it to start when no GUI is present use /etc/rc.local

Thanks, I'll look into that.

pi-

actually that link may not be the best in your case try

formatting link
which is more suitable if you are using a gui

Sorry. Nice try.

Since systemd reared its ugly head, I've found rc.local unreliable. For "stuff" that I want to start at boot I now use a crontab file in /etc/cron.d using @reboot as the time to run.

Chris Elvidge, England

You need to reboot via your window manager restart command.

For example on XFCE it's:-

xfce4-session-logout --reboot

---druck

Hello all,

A> suggestions on how to achieve this can be fount here :- A>

formatting link
A> pi-at-startup/

I do it this way:

sudo nano /home/pi/.config/lxsession/LXDE-pi/autostart At the end of that text file add your app, in my case it is this: @/usr/local/bin/opencpn

OpenCPN is ECDIS for sailing chart navigation on all kind of see/inland waters. It can also display AIS signals from the VHF-marine band if connected to an AIS receiver or transponder. Even RTL-SDR can be used as an AIS receiver. But then you need a USB-GPS mouse for the position information. In the EU at ships larger than 20 meters long Class A AIS+ECDIS in Inland ERI Mode (NOT SOLAS Mode) is mandatory at the river Rhine and on almost all the inland waters of Germany. The RPi 2B/3B/3B+ with Raspbian Linux + OpenCPN 4.6.x or higher toghether whitch all the S57 digital chartmaps from the EU governmental RIS organizations is the cheapest way to have an official accorded ECDIS when used with a monitor of at least 1000 x 1000 pixels in Information Modus. See: Source: ECDIS-909-2013-EU. Website: DownLoad: I'll support recreational skippers in this matter. There is also a certified Navigational Mode with coupled radar, but that is more complicated and until now not doable with a Pi as host computer ;-(.

Note: the Raspbian Linux directorymap .config is normally hidden. Turn on "show hidden" in the viewer to see such directortmaps. Good luck.

That (simpliest) way is not always the correct (legal) one.

Henri.

Hello Harry,

HB> I have my R Pi 3 B+ on my LAN, with latest NOOBS, setup to download HB> weather via USB from my weather station and present it as a webpage.

NOOBS is only interesting to get and to test the first feeling of an OS. For daily use it is to small configured and many things missing. So use the OS of your choice, and download that image to install. NOOBS can be used to look at different OSes, but it is incomplete compaired to the officiel release of each OS in a production environment. So do not use NOOBS for a serious task or server.

HB> During the early hours, I have the Pi configured to do a reboot and

How did you configure that? Because also I want to learn from it for later use.

HB> reload the software for the weather - that works fine.

HB> What I have found, is that if I also reboot via the GUI reboot option, HB> it also loads the weather interface software and it carries on as HB> normal

That seems normal.

HB> If instead, I type at the command line 'reboot', it doesn't reload the HB> weather software. I have to manually load it all in.

May be you have to logout first, and then do a SUDO reboot?

You know the difference of a warm boot and a cold boot? Another solution could be using a timeclock witch cuts the 230 Vac~ for only one minute a day at a choosen time at night. Just before that time clock reset cuts the power down, do a shutdown. Cutting power without shutting down can give problems later. When you configure you app starting at boot, it will start again normally when the time clock reset is ready and normal power given back again. I had to do this with my then unstable DOS BBSystem machine once a day. Good luck.

Henri.

Henri Derksen laid this down on his screen :

Not my method, it was suggested by another as a way to do it and it works fine. CumulusMX is the software I run, to connect to the weather station, provide a weather web page and upload the data to various sites....

crontab ?e

# Start Cumulus as background task 30s after reboot (delay to allow WiFi to startup) @reboot (sleep 30;cd /home/pi/CumulusMX;sudo mono CumulusMX.exe) &

# Reboot each day at 0258

58 02 * * * sudo reboot

I am very new to all of this and I am finding the whole thing very confusing indeed, especially so the multiple commands and multiple ways to do the same things. Last time I touched anything at such a low level, it was MSDOS and DRDOS :D

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required