Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ sudo fgconsole
- 7
- $ pgrep -t tty7
- 650
- $ grep -z '^:[0-9]+$' /proc/650/cmdline
- :0
- $ sudo grep -zl '^DISPLAY=:0$' /proc/*/environ
- /proc/9908/environ
- ...
- $ sudo grep -zl '^DISPLAY=:0$' /proc/*/environ | xargs stat -c '%U' 2>/dev/null | grep -v root | head -n 1
- user
Add Comment
Please, Sign In to add comment