Linked Questions

0 votes
2 answers

Pause a process and bring it back to foreground in a separate screen in Ubuntu [duplicate]

A process put to sleep by issuing ^Z can be brought back to the foreground by listing the running jobs $ jobs and giving the job id to fg %id. But when I tried to list the jobs in a separate screen ...
0 votes
0 answers

Bring back process after closing terminal [duplicate]

Is there a way to "reopen" a process that is running? I accidentally closed my terminal window and it was running a openvpn. Is there a way to bring that process back to the focus of the ...
  • 99
187 votes
9 answers

How can I disown a running process and associate it to a new screen shell?

I have a running program on a SSH shell. I want to pause it and be able to unpause its execution when I come back. One way I thought of doing that was to transfer its ownership to a screen shell, ...
  • 3,595
28 votes
4 answers

What happens to the output of a process that has been disowned and lost its terminal?

If I close the virtual terminal, where some process was started, does the output just go straight to /dev/null, or can it pollute memory somehow? Can I anyhow grab the output to continue reading it at ...
9 votes
3 answers

How to pipe commands to a process running in the background?

This is my loop program, running in the background and waiting for a command. #include <iostream> using namespace std; char buffer[256]; int main(int argc, char *argv[]) { while(true){ ...
  • 93
9 votes
1 answer

Bring process to 'foreground'? [duplicate]

I am using an SSH client to connect to a Solaris server. I had a process running but my connection disconnected. I reconnected and can see the process running when I do ps -al. How can I bring this ...
  • 779
5 votes
1 answer

What does it mean to attach a process to a terminal? [closed]

I'm learning Linux. Came upon the idea that a process can be attached to a terminal. What does it mean to attach a process to a terminal (TTY) and why would I want to do it?
  • 531
1 vote
1 answer

How to exit nano from a different terminal?

I was ssh'ing into a Raspberry Pi running Raspbian, editing a file with nano, when I lost my internet connection (by leaving the WiFi zone). After reconnecting an hour later, I found that the pi had ...
  • 131
5 votes
2 answers

Save scratch emacs file without access to terminal

I'm trying to save the contents of an Emacs scratch buffer, which I can't access any more due to an inaccessible terminal. On my Linux box I've ssh'ed to a server, and started Emacs. My Linux box has ...
  • 183
1 vote
1 answer

Shell scripts: How to copy past outputs of terminal emulator?

I want to make a shell script which copies the past outputs of the GUI terminal emulator (for example, last 20 lines). The motivation is as following: When I execute a procedure which requires long ...