Guest User

Untitled

a guest
Apr 26th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. $ sudo fgconsole
  2. 7
  3.  
  4. $ pgrep -t tty7
  5. 650
  6.  
  7. $ grep -z '^:[0-9]+$' /proc/650/cmdline
  8. :0
  9.  
  10. $ sudo grep -zl '^DISPLAY=:0$' /proc/*/environ
  11. /proc/9908/environ
  12. ...
  13.  
  14. $ sudo grep -zl '^DISPLAY=:0$' /proc/*/environ | xargs stat -c '%U' 2>/dev/null | grep -v root | head -n 1
  15. user
Add Comment
Please, Sign In to add comment