Reload Launcher... From Launcher

tinkering

#1

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…

  1. Install xdotool
sudo apt-get update && sudo apt-get -y install xdotool
  1. 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
  1. 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!

Cheers!


#2

Nice! I was looking for a decent reboot method
Though, you can load and quit retroarch for the same effect typically…


#3

The easiest way is to create an Empty script which is called “Refresh.sh”…


#4

yeah, I was just running a simple script I wrote to reload it too


#5

Launcher resets for me if I open something and close it.


#6

Yes, this is exactly what I do: namely I open RetroArch, and then Quit it once it’s open; its the quickest loading app that allows me to access the quit function quickest.

I’m going to give the script a try, though, myself, may make things a little more convenient for me.


#7

okay so I installed the xdotool and installed the script, and I even installed a nice little icon for Refresh.sh. And it works just lovely. It refreshes the GameShell, albeit a little slower than you describe. But that’s cool.

Unfortunately I had to delete it because subsequently, anything I launched after that would immediately quit to the menu. To see if it was the script that was responsible, I deleted it, and everything works fine again.


#8

Odd, all the script does is ctrl-alt-backspace to kill X, then relaunch X via startx. No reason it should cause anything else not to work.
If you can find your Xorg.log I’d be interested to see what it says. Sounds like something unrelated to me though.


#9

Okay no problem, where might I find Xorg.log? I’ll bring it up and pop it in here.

installing the script is the only change I’ve made today, and it worked fine previous. I’m not saying it was definitely the script, but there’s nothing else that Ive done to it before the problem occured.


#10

I found Xorg.log… well, several, actually, in ~/.local/share/xorg

in this dir:

Xorg.0.log Xorg.0.log.old Xorg.1.log Xorg.1.log.old

do I need all of these? which one do you need to look in? and do I need to have the Refresh.sh installed again?


#11

Here’s some screens of all th Xorg.logs found, this is after I removed the Refresh.sh


#12

if you just want to restart launcher

just put a bash script ,like Restart.sh

with content

#!/bin/bash

exit 0

into Menu/GameShell

and it’s done