I was trying to attach to a screen session on a remote computer, with screen -r, but my terminal got killed (I was trying to attach and see what it is, because I did not remember creating it). Now attaching to any kind of screen on the remote computer or on my local computer results in the same thing.

I have the following symptoms in detail. On the remote computer:

$ screen --version
Screen version 4.01.00devel (GNU) 2-May-06

Executing an empty screen command results in the terminal closing. Executing a screen -ls command sometimes results in the closing of the terminal, sometimes I get a meaningful output:

$ screen -ls
There are screens on:
    26539.pts-8.atlasz  (03/31/2015 02:08:46 PM)    (Detached)
    26410.pts-8.atlasz  (03/31/2015 02:07:40 PM)    (Detached)
    26276.pts-8.atlasz  (03/31/2015 02:06:25 PM)    (Detached)
    4227.pts-8.atlasz   (03/03/2015 10:06:44 PM)    (Detached)
    23448.munka (02/17/2015 12:44:03 PM)    (Detached)
5 Sockets in /var/run/screen/S-fbence.

The three newest are very likely the ones that the empty screen command created before the terminal got killed.

On my local machine:

$ screen -version
Screen version 4.02.01 (GNUbb1ef15) 28-Apr-14
$ screen
bind (/tmp/screens/S-fbence/17815.pts-1.medusa): Írásvédett fájlrendszer

"Írásvédett fájlrendszer" would be something like write-protected filesystem (sidepoint: I really like that I can use Linux in my language, but translating errors certainly doesn't help googling for help!).

Now, it might be totally unrelated, but my work computer doesn't have much memory in it, but I like to listen to Youtube on chrome, so I sometimes have to clear swap. Which I did, but I did it again in a few minutes (don't know why really), and ended up with this:

$ sudo swapoff -a && sudo swapon -a
[sudo] password for fbence: 
sudo: unable to open /var/lib/sudo/fbence/1: Írásvédett fájlrendszer
[sudo] password for fbence: 
sudo: unable to open /var/lib/sudo/fbence/1: Írásvédett fájlrendszer

Again, "write-protected filesystem". And again, trying to attach to a screen ends up in the terminal being killed.

I think (probably) rebooting would solve the issue, but I'm actually intrigued about what happened here.

I use the gnome terminal 3.6.2 on an ubuntu 14.04.02 LTS, my .screenrc is this:

hardstatus alwayslastline "%{= G}%{g}[ %{G}%H %{g}][ %?%-Lw%?%{R} %n*%f %t %{g}%?%+Lw%? %{g}]%=%{g}[ %{W}%c:%s %{g}]"
caption splitonly "%{= g}[%n %t]"
startup_message off
autodetach on
defscrollback 10000
termcapinfo xterm ti@:te@
altscreen on

Any idea on what I messed up and how and how to fix it?

  • I'd say you have a write-protected filesystem somewhere at or above /var/lib/sudo. Please could you add the output of mount to your Question? – roaima Mar 31 '15 at 12:48
  • mount also kills the terminal. But I just realized I was totally stupid :) I started a sysrq reisub, but I pressed the wrong key somewhere, so I stopped, and there was no reboot, and forgot about it. I did a reboot and can totally reproduce the same effect. Although interesting, just sysrq+u was not enough for the screen to be actually quiting, I had to go through reisu to get the absolute same effect. – fbence Mar 31 '15 at 16:11
  • 1
    The phrase that you are looking for is "read-only filesystem". – JdeBP Mar 31 '15 at 19:39
  • 1
    Run export LC_MESSAGES=C; unset LANGUAGE to switch error messages to English for the next commands executed in a terminal. – Gilles 'SO- stop being evil' Mar 31 '15 at 22:42

Your Answer

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

Browse other questions tagged or ask your own question.