Guest User

Untitled

a guest
Jun 19th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. # adduser newuser
  2.  
  3. #!/bin/bash
  4.  
  5. xdotool mousemove 31 61 click 1
  6.  
  7. $ su newuser
  8.  
  9. newuser@myPC:~$ /home/myregularuser/macro.bash
  10. No protocol specified
  11. Error: Can't open display: (null)
  12. Failed creating new xdo instance
  13.  
  14. if xhost >& /dev/null; then
  15. echo "export DISPLAY="$DISPLAY"" > $HOME/.display
  16. fi
  17.  
  18. #!/bin/bash
  19.  
  20. source $HOME/.display
  21.  
  22. xdotool mousemove 31 61 click 1
  23.  
  24. newuser@myPC:~$ /home/myregularuser/macro.bash
  25.  
  26. regularuser@myPC:~$ source /home/newuser/.display # Setting $DISPLAY as the newuser $DISPLAY value
  27. regularuser@myPC:~$ su newuser -c "xauth extract /home/newuser/.Xauthority $DISPLAY" | xauth merge
  28. xauth: (argv):1: bad "merge" command line
  29. Password:
  30. xauth: timeout in locking authority file /run/user/1000/gdm/Xauthority
  31.  
  32. su newuser -c "xauth extract /home/newuser/.Xauthority $newuserDISPLAY" | xauth merge
Add Comment
Please, Sign In to add comment