I love screen – it allows you to detach you console and still have the program running.

For more info:
man screen

Recently I experienced following error:
$ screen -r
Cannot open your terminal '/dev/pts/0' - please check.

After searching for solution I found several instructing to change permissions etc.

But different solution, almost “hack” is the one I like.
Before starting screen type:
script /dev/null
And after that you can type:
screen -r
Only drawback is that you need to type one additional exit for script to terminate.

Credits for this to Harry Jackson. Unfortunately the resource was not available so i did to put a link to the site.


3 Responses to “screen -r : Cannot open your terminal ‘/dev/pts/0’ – please check.”

  1. ScreenIsAwesome on September 23rd, 2011 8:59 am

    You could just say something like “script /dev/null && exit”, then “screen -r && exit”, then you don’t have to type extra exit commands.

  2. Nicolai on September 26th, 2011 11:19 am

    Thank you! I can’t seem to figure why this would work, but it indeed does.

    Makes life a bit easier when teaching other users Linux 🙂

  3. Jarwain on January 9th, 2012 2:30 pm

    Logically, /dev/null nullifies anything inside the folder /dev/
    Since it can’t open it (due to a permissions issue), you’re telling it not to open it in the first place.
    Thats just my assumption though. And I’m not THAT good with linux either.

Leave a Reply

You must be logged in to post a comment.