Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Desktop Entry]
- Version=1.0
- Name=Run_both
- Comment=Will run two nice scripts
- Exec=lxterminal --command="/opt/script/run_both.sh"
- Path=/opt/script/
- Terminal=True
- Type=Application
- Categories=Utility;Application;
- from gpiozero import Button
- from signal import pause
- import subprocess
- def runboth():
- subprocess.call(["sudo", "lxterminal", "--command=/opt/script/run_both.sh"])
- runboth_btn = Button(17, hold_time=2)
- runboth_btn.when_held = runboth
- pause()
- Mar 23 13:09:47 raspberrypi systemd[1]: Started Get run_both service running at boot.
- Mar 23 13:10:16 raspberrypi sudo[1228]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/lxterminal --command=/opt/script/run_both.sh
- Mar 23 13:10:16 raspberrypi sudo[1228]: pam_unix(sudo:session): session opened for user root by (uid=0)
- Mar 23 13:10:16 raspberrypi lxterminal[1235]: cannot open display:
- Mar 23 13:10:16 raspberrypi sudo[1228]: pam_unix(sudo:session): session closed for user root
- Mar 23 13:10:53 raspberrypi sudo[1247]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/lxterminal --command=/opt/script/run_both.sh
- Mar 23 13:10:53 raspberrypi sudo[1247]: pam_unix(sudo:session): session opened for user root by (uid=0)
- Mar 23 13:10:54 raspberrypi lxterminal[1256]: cannot open display:
- Mar 23 13:10:54 raspberrypi sudo[1247]: pam_unix(sudo:session): session closed for user root
Add Comment
Please, Sign In to add comment