PDA

View Full Version : Linux question



Jack
14-08-09, 08:18 AM
I've googled and can't find an answer to this, so does anyone on here know?

RHEL5.1, with gnome desktop. From the command line, how can you see if anyone is logged into gnome from the console? I've got a load of gnome processes on one of my servers which indicate someone has logged in at the console but want to check fo' sure.

All google throws up is results for command line users with variations on who

Tidy Max
14-08-09, 08:34 AM
arghhh i knew this! ill go and look through my notes (i had to make notes as there were too many to remember!)

Tidy Max
14-08-09, 08:39 AM
have you tried the WHO command?

Jack
14-08-09, 02:12 PM
All google throws up is results for command line users with variations on who
^ yeas :p

who only shows up users logged into the command line, not Gnome

kevw
14-08-09, 02:19 PM
press F1 for help lol

Tidy Max
14-08-09, 02:23 PM
lol sorry, thread reading fails ftl!

Lee
14-08-09, 06:09 PM
New career time. You fail at Linux. lol

Jack
14-08-09, 06:14 PM
lol, no really there doesn't seem to be any way to do it.

I do love how the Linux fanbois slate windows til the cows come home, but when you try to do something incredibly simple like this (in windows you'd use terminal services to see active sessions on each machine; thats about 3 clicks) it has some excessively long convoluted resolution (i.e. a bodge) or you get the "why would you want to do that, its a stupid idea" answers lol

Meh, I want a job at GCHQ as well. "Hmm, terrorists are hacking the governments system. [google] terrorists ....+attacking...+system ....+help" :d

Iain
14-08-09, 06:19 PM
Find a process that runs when you log in to Gnome, then list all processes, filter by that process, and get the users from that?

Edit: UID of the process should tell you who's running it?

Jack
14-08-09, 06:25 PM
Tried that, but I had to switch user to the one that was logged in to get the right processes, as doing a ps -ef | grep -i gnome as root didn't seem to pick them up for some odd reason; yet when I did it as the user that was logged in it did. GHEY

Ben
14-08-09, 11:27 PM
****ing gibberish the lot of it!