diff --git a/launchES.sh b/launchES.sh index 4cb86e9..26da116 100755 --- a/launchES.sh +++ b/launchES.sh @@ -1,3 +1,4 @@ #!/bin/bash sudo pkill Xorg & -emulationstation \ No newline at end of file +emulationstation +su pi ; DISPLAY=:0.0 startx & \ No newline at end of file diff --git a/menu.py b/menu.py index d211a17..3838311 100755 --- a/menu.py +++ b/menu.py @@ -39,9 +39,9 @@ def launchRetroPie(): print("Launching RetroPie") #os.system("nohup sudo su -c \"systemctl stop lightdm ; ttyecho -n /dev/tty1 \"emulationstation ; sudo systemctl start lightdm\"\"") #os.system("nohup sudo pkill Xorg ; emulationstation") - #os.system("nohup /home/pi/menu/launchES.sh") - msgbox() - #quit() + os.system("nohup /home/pi/menu/launchES.sh") + #msgbox() + quit() def launchSteam(): print("Launching Steam Link") os.system("/usr/bin/steamlink &") @@ -50,6 +50,10 @@ def launchKodi(): print("Launching Kodi") os.system("/usr/bin/kodi &") quit() +def launchCLI(): + print("Launching CLI") + os.system("sudo pkill Xorg") + quit() # Variables appName = "Raspberry Pi OS Menu" @@ -82,17 +86,19 @@ varCopyright.set("(C) Copyright 2020, Andrew Lee. Licensed with GPL-3.0\nhttps:/ # Buttons btnDesktop = Button(app, text = 'Desktop', width=btnSizeW, height=btnSizeH, font=btnFont, bg=btnBG, activebackground=btnABG, bd=btnBD, relief=btnRelief, command = launchDesktop) btnDashboard = Button(app, text = 'Dashboard + Mycroft AI', width=btnSizeW, height=btnSizeH, font=btnFont, bg=btnBG, activebackground=btnABG, bd=btnBD, relief=btnRelief, command = launchDashboard) -btnRetroPie = Button(app, text = 'RetroPie', width=btnSizeW, height=btnSizeH, font=btnFont, bg=btnBG, activebackground=btnABG, bd=btnBD, relief=btnRelief, command = launchRetroPie) +#btnRetroPie = Button(app, text = 'RetroPie', width=btnSizeW, height=btnSizeH, font=btnFont, bg=btnBG, activebackground=btnABG, bd=btnBD, relief=btnRelief, command = launchRetroPie) btnSteamLink = Button(app, text = 'Steam Link', width=btnSizeW, height=btnSizeH, font=btnFont, bg=btnBG, activebackground=btnABG, bd=btnBD, relief=btnRelief, command = launchSteam) btnKodi = Button(app, text = 'Kodi', width=btnSizeW, height=btnSizeH, font=btnFont, bg=btnBG, activebackground=btnABG, relief=btnRelief, bd=btnBD, command = launchKodi) +btnCLI = Button(app, text = 'Command Line', width=btnSizeW, height=btnSizeH, font=btnFont, bg=btnBG, activebackground=btnABG, relief=btnRelief, bd=btnBD, command = launchCLI) # Add the components labelWelcome.pack() btnDesktop.pack() btnDashboard.pack() -btnRetroPie.pack() +#btnRetroPie.pack() btnSteamLink.pack() btnKodi.pack() +btnCLI.pack() labelCopyright.pack() # Run the app