views:

192

answers:

5

I've got a program running in a GNOME Terminal, but the screensaver is acting up and won't let me back in with my password. While waiting for a fix for the gnome-screensaver bug, is there some way to see the output (or even take over the process) in a virtual console (Ctrl-Alt-F1) without being able to interact with the GNOME Terminal?

Clarification: The original issue was the screensaver, but the question I'd like answered is how to see the output from a process running in another terminal, after starting the process without any logging to file. I'm guessing it should be possible to set the output device of a process from a different shell? Or is it possible to put a process in another shell into background mode, and get it into the foreground in the current shell? Or even ask GNOME Terminal to redirect or copy the output?

+1  A: 

Usual way is to pipe the output to a file, like program > program.log Do tail -f program.log in another tab of Gnome console, and the same in the non-X console.

Alternatively, use tee to duplicate the output in the same console: program | tee program.log

Victor Sergienko
+1  A: 

I've had luck in the past killing the screensaver from a virtual console, unlocking X session.

# Get the pid (xscreensaver, gnome-screensaver, etc.)
ps -f -u $(whoami) | grep screensaver

kill -9 12345 # Replace 12345 with the real pid

EDIT: Seems like this has been thought of, and you should use one of these commands, depending on which screensaver program you use:

xscreensaver-command -exit
gnome-screensaver-comand --exit

See the man page for those commands for more details.

Harold L
+1  A: 

ssh in to the box. kill the screensaver. su to become root and kill -9 if it's really acting up.

nos
A: 

Usually Gnome-Terminal displays the output of one vty out of /dev. So just connect your console to that vty.

BeowulfOF
How do I figure out which device it's connected to?
l0b0
dunno exactly, but with "ps -x" you can see "pts/X" in the second column, this should give you the hint, I'll take a research for this, too
BeowulfOF
A: 

Launch program with screen.

Open another terminal, launch screen -x and you have two terminals acting like one. Try it, it's fun :)

lorenzog

related questions