3

I'm using (Screen) in terminal to leave my twitter bot running. However I am having trouble accessing these instances again. It's simply saying "Command not found" despite it clearly saying it's detached.

Anyone got any ideas what might be wrong?

UPDATE: To get rid of all unresponsive or dead sockets use screen -wipe

enter image description here

Ghanima
  • 15,855
  • 15
  • 61
  • 119
  • 1
    do not post pictures of text - paste text – Milliways Dec 30 '19 at 04:06
  • Hello Milliways, why is that? It's the same thing. – Daniel Finch Jan 01 '20 at 02:43
  • 2
    You can not copy code from a picture! It is also difficult to read (at least for those of us with vision problems), – Milliways Jan 01 '20 at 02:48
  • 1
    You are on Unix now and unix guys communicate their programming issues on the internet from the beginning. So they like to quote and copy and paste parts of messages. This all cannot be done with images. Text inserts are the message itself and do not use external sources with links. That's also better for handling the message (forward, copy, backup etc.). Not using images if not necessary is a part of learning Unix ;-) – Ingo Jan 01 '20 at 20:20
  • @MarkClifford There is nothing unfriendly/unkind in Milliway's remark, this is a very normal consideration, although in this case (where no code is involved) it doesn't matter much. WRT "difficult to read" you should be able to zoom that image with the browser. The ones that are really bad are literally photographs taken of a screen. – goldilocks Jan 02 '20 at 16:49
  • Right, yes ok got the message... is anyone aurally going to help? I've still got screens open that aren't doing anything.

    There is a screen on: 10431.pts-0.raspberrypi (01/02/2020 12:40:05 PM) (Attached) There is no screen to be resumed matching 10431.pts-0.raspberrypi. and yet it's still listed when I do screen -list

    – Daniel Finch Jan 03 '20 at 14:05

2 Answers2

2

You have to use the full command as instructed on the line starting with 'Type', not just the session ID

E.g.

screen -r 1652.pts-0.raspberrypi
Dirk
  • 3,541
  • 3
  • 18
  • 25
1

This is happening because you have started screen several times, and it doesn't know which of the two sessions you want to resume. If you need several virtual consoles, you can create multiple consoles inside one screen session. This is done by hitting Ctrl+A then c to create a new console, and Ctrl+A then n/p to switch to next/previous one. A console can be closed by typing exit in it as usual.

Also note that you only need to specify the session ID when reattaching to one of multiple sessions, e.g.

screen -r 1706

would be sufficient.

Dmitry Grigoryev
  • 27,928
  • 6
  • 53
  • 144