2

The little things are what makes you happy.

It was really annoying that screen doesn't work after an su. It makes sense, but typing "script /dev/null" everytime (and remember to write "exit" after it so bash history works again) is annoying.
So a little script to "/bin/scrn" with the following content made my life better:

#!/bin/sh
command="screen $@"
script /dev/null -c "$command"

Never worry about screen after su again! Tech life is great, isn't it?

Comments
  • 0
    how is that possible
  • 1
    @stop What do you mean?
  • 0
    @Benedikt su should just work.
  • 1
    @stop Well, not exactly. If you su from an user to another (which is not root), the second user has no permissions to write to the pseudo-terminal of the first user. So you will get an error like "Cannot open your terminal '/dev/pts/x' - please check." if you try to use screen without previously creating a new pseudo-terminal (which "script /dev/null" does).
Add Comment