6

When I use screen on my computer and detach, I am taken back to the command prompt and everything is fine. However, if I SSH into my computer remotely and use screen, when I try to detach I get the error Utmp slot not found -> not removed.

It then hangs and I cannot even ctrl-c, ctrl-d and have to close the Cygwin window. Why is this occuring and how can I fix it?

Note to recreate error by SSH-ing out of your computer then back in:

$ screen
(C-a d)
$ ssh -R12345:localhost:22 username@someServer
$ ssh -p12345 username@127.0.0.1
$ screen -r
(C-a d)
rwolst
  • 161
  • 5

2 Answers2

3

It looks the culprit is the file /var/run/utmp, which in my case is just an empty file, and the only one in the /var/run/ directory.

For me I just removed it, via rm /var/run/utmp,

Or you can rename it, e.g. mv /var/run/utmp /var/run/utmp~

ryenus
  • 151
  • 1
  • 6
3

The answer by ryenus did not work for me. I tried renaming it, removing it, even tried touching /var/run/utmp and chmod'ing it to 0777. However I did find an answer on another forums that did work.

Simply edit your .screenrc file and add this line:

deflogin off

PyTis
  • 131
  • 2