1

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?

Kenny Rasschaert
  • 9,045
  • 3
  • 42
  • 58
Shaike Katz
  • 111
  • 3

1 Answers1

1

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)
natxo asenjo
  • 5,739
  • 2
  • 26
  • 27