Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is there a way to see if (and which) a user has logged on to an (Ubuntu) Linux machine via NoMachine - similar to when a Windows machine shows which user is remotely using it?

share|improve this question
add comment

1 Answer

when logging in from a nx client, in fact you get a remote display so you see something like this when using 'w';

nxserver:~# w
13:20:33 up 186 days,  5:42,  6 users,  load average: 3,97, 4,09, 4,11
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
user1    :1000    172.18.22.251    09:17   ?xdm?   6days  0.00s /bin/bash /usr/
user2    :1001    172.17.7.250     09:20   ?xdm?   6days  0.00s /bin/bash /usr/
user3    :1002    172.18.19.252    11:44   ?xdm?   6days  0.00s /bin/bash /usr/
user4    :1003    172.18.19.251    10:35   ?xdm?   6days  0.00s /bin/bash /usr/
user5    :1004    172.19.11.250    10:44   ?xdm?   6days  0.00s /bin/bash /usr/
root     pts/5    172.20.199.30    13:20    0.00s  0.02s  0.02s w

As you see, root is logged in from tty pts/5 (from a remote location through a text ssh client) en the rest from :number. When you see these ttys, then you know those are graphical sessions.

You can also use 'who' (which has an easier format to parse if you need to do that):

nxserver:~# who
user1   :1000        2012-01-29 09:17 (172.18.22.251)
user2   :1001        2012-01-29 09:20 (172.17.7.250)
user3   :1002        2012-01-29 11:44 (172.18.19.252)
user4   :1003        2012-01-29 10:35 (172.18.19.251)
user5   :1004        2012-01-29 10:44 (172.19.11.250)
root    pts/5        2012-01-29 13:20 (172.20.199.30)
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.