Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

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

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

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

Launch program with screen.

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top