Guest User

Untitled

a guest
Mar 24th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. [Desktop Entry]
  2. Version=1.0
  3. Name=Run_both
  4. Comment=Will run two nice scripts
  5. Exec=lxterminal --command="/opt/script/run_both.sh"
  6. Path=/opt/script/
  7. Terminal=True
  8. Type=Application
  9. Categories=Utility;Application;
  10.  
  11. from gpiozero import Button
  12. from signal import pause
  13. import subprocess
  14. def runboth():
  15.  
  16. subprocess.call(["sudo", "lxterminal", "--command=/opt/script/run_both.sh"])
  17.  
  18. runboth_btn = Button(17, hold_time=2)
  19. runboth_btn.when_held = runboth
  20.  
  21.  
  22. pause()
  23.  
  24. Mar 23 13:09:47 raspberrypi systemd[1]: Started Get run_both service running at boot.
  25. Mar 23 13:10:16 raspberrypi sudo[1228]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/lxterminal --command=/opt/script/run_both.sh
  26. Mar 23 13:10:16 raspberrypi sudo[1228]: pam_unix(sudo:session): session opened for user root by (uid=0)
  27. Mar 23 13:10:16 raspberrypi lxterminal[1235]: cannot open display:
  28. Mar 23 13:10:16 raspberrypi sudo[1228]: pam_unix(sudo:session): session closed for user root
  29. Mar 23 13:10:53 raspberrypi sudo[1247]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/lxterminal --command=/opt/script/run_both.sh
  30. Mar 23 13:10:53 raspberrypi sudo[1247]: pam_unix(sudo:session): session opened for user root by (uid=0)
  31. Mar 23 13:10:54 raspberrypi lxterminal[1256]: cannot open display:
  32. 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