LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How do I sneak into a Gnome console session? (https://www.linuxquestions.org/questions/linux-software-2/how-do-i-sneak-into-a-gnome-console-session-284649/)

longblock454 01-31-2005 06:19 PM

How do I sneak into a Gnome console session?
 
While I was at work a support guy (super hard core Linux guy) sneaked into my Gnome console session and left me a text message, he already had root access. How does one do this? This was on a Red Hat 7.2 machine running Gnome.

Thanks,

Brian1 01-31-2005 06:29 PM

Did it come up in box and your only option was to click okay to close it?
If so then check out xmessage. Read up on it in your man pages. Use it alot in scripts to display info that the scripts return.
Otherwise more details on it looks.

Brian1
" Google the Linux way @ http://www.google.com/linux "

longblock454 01-31-2005 06:39 PM

Fellow Hoosier!

No sir, this was a standard console window! Although I will still read up on xmessage, sounds like the Windoze "Net send" equivelent?

Brian1 01-31-2005 06:47 PM

Did a quick play and it might be xconsole instead. xmessage sends to gui. Not messed with it before. I have seen it before but thats been 5 or 6 years ago. Look around for something called text messaging on console or something of that type.

Brian1
" Google the Linux way @ http://www.google.com/linux "

ps Right back at you there Hoosier.

Brian1 01-31-2005 06:55 PM

Did some googleing and found this it might help. http://www.tldp.org/HOWTO/Text-Termi...6.html#ss16.16 from http://www.tldp.org/HOWTO/Text-Terminal-HOWTO.html

Brian1
" Google the Linux way @ http://www.google.com/linux "

bulliver 01-31-2005 06:55 PM

He may have been using talk. (man talk) or,
he may have been using write. (man write) or,

since he's root he may have simply echo'ed a message to your console. After all, the consoles exist as plain files in dev right? You can find the console by running "pstree -p". Look for the instance of /bin/bash connected to the gnome console. Note the pid. Now run:
Code:

# ps aux | grep <pid> | grep -v grep
In the seventh column of output is the TTY, you should see something like "pts/0" or "pts/1". Now all you need to do is:
Code:

# echo "I've hacked your console" > /dev/pts/1
or,
# cat message.txt > /dev/pts/1

And your message is printed to the console...

Brian1 01-31-2005 06:59 PM

Talk was the one I was trying to remember. Thanks there bulliver. Even still there on the lastest distros. Sometimes the simpliest is the best.

Brian1
" Google the Linux way @ http://www.google.com/linux "

longblock454 01-31-2005 07:06 PM

That is it, thanks for the quick help!


All times are GMT -5. The time now is 05:14 PM.