I got tired of restarting my GS every time I wanted to make a change to the launcher; So i figured out a way to reload the launcher, from the launcher.
Please note, this is very hacky!! I hope to find a better way of doing this, but for now, it works
The below steps assume you have ssh access to the console, so get logged in, and lets get to work…
- Install xdotool
sudo apt-get update && sudo apt-get -y install xdotool
- Install the script
echo "/usr/bin/xdotool keydown ctrl keydown alt BackSpace keyup alt keyup ctrl && sleep 2 && startx -- -nocursor > /dev/null 2>&1" > /home/cpi/apps/launcher/Menu/GameShell/Refresh.sh && chmod 755 /home/cpi/apps/launcher/Menu/GameShell/Refresh.sh
- Reboot, 1, last, time…
Once you’re back up, you’ll have a new Icon for “Refresh”, selecting it will…
Send the key sequence ctrl-alt-backspace (which will in-turn kill X); sleep 2 seconds; then run “startx” again, with the same flags that it was originally designed to run with.
(for the nerds)
ctrl-alt-backspace is an old X11 trick (before Xorg), and was great for when the GUI locked up, and couldn’t be killed any other way.
I should also note that when the GS is booted, the user “cpi” is logged in automagically, then “startx” is run from .bashrc. This is not how most systems startup, and is specific to GS. Because of this, we’re not running any kind of graphical login manager, like GDM, or LightDM or anything. If we were, we could just restart those services, and that would restart X- Thus the ctrl-alt-backspace trick.
The whole process takes maybe 10sec, way faster than a reboot!
I’ve also verified if you make changes to the Launcher, this process will “activate” those changes.
Hope this helps some folks!