0

I have a Python script I have set to run on boot on my Pi (Raspian Jessie).

Running the screen command sudo screen -r wixel prints the running output of this script. Everything looks good.

Hitting Ctrl+c stops the output. But running sudo screen -r wixel produces the following...

There is no screen to be resumed matching wixel.

Now, I'm new to Linux, and perhaps it's by design. But I thought this would take me back into the view of the running script.

It appears as though I'm actually terminating the script altogether.

How is this different to the Tail command? How can I toggle the view on and off without terminating the script.

1

Yes, you are terminating it.

To disconnect from the screen session press Ctrl+a followed by d.

To reconnect to screen session - you need to first get screen session id.

screen -list

followed by

screen -r sessionid
  • Ctrl-a then d worked, and I can get back with sudo screen -r wixel but screen -list presents No Sockets found in /var/run/screen/S-pi. – square_eyes Nov 6 '16 at 9:20
  • Not that it matters. I'm happy doing that. – square_eyes Nov 6 '16 at 9:24
  • Then in your case sudo screen -list. Screen creates socket files under /var/run/screen/S-userid directory. So if your original screen session was created from under root (sudo), then you should be using sudo when trying to list sessions. – Dmitry Zayats Nov 6 '16 at 18:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.