Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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    09:17   ?xdm?   6days  0.00s /bin/bash /usr/
user2    :1001     09:20   ?xdm?   6days  0.00s /bin/bash /usr/
user3    :1002    11:44   ?xdm?   6days  0.00s /bin/bash /usr/
user4    :1003    10:35   ?xdm?   6days  0.00s /bin/bash /usr/
user5    :1004    10:44   ?xdm?   6days  0.00s /bin/bash /usr/
root     pts/5    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 (
user2   :1001        2012-01-29 09:20 (
user3   :1002        2012-01-29 11:44 (
user4   :1003        2012-01-29 10:35 (
user5   :1004        2012-01-29 10:44 (
root    pts/5        2012-01-29 13:20 (
share|improve this answer

Your Answer


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.