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 [email protected]
$ screen -r
(C-a d)
2

2 Answers 2

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~

2
  • Note that you have to restart screen after removing or renaming the file.
    – Johann
    Aug 14, 2014 at 18:12
  • Also note that this file reappeared when I ran the cygwin setup again.
    – Johann
    Aug 14, 2014 at 18:54
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

1
  • Sounds reasonable, upvoted :-)
    – ryenus
    Apr 9, 2019 at 5:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .