Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am a user of screen on terminal, but i tried to mount a screen on my Macbook and results in this warning:

$ screen
LoginName too long - sorry.

I read on web and the suggestion is change the username of my computer, but I am the only user and the administrator of the computer, and I have a lot of information in my session.

Can I do something?

share|improve this question

migrated from Mar 15 '13 at 21:11

This question came from our site for professional and enthusiast programmers.

There's a bug report for this. It also chokes if $HOME is longer than 25 characters. – Keith Thompson Mar 15 '13 at 15:20
@NPE: Since one solution does involve modifying the source code, I suggest that it's topical here. – Keith Thompson Mar 15 '13 at 15:42
@NPE: But if it's a better fit for superuser, that's fine with me. – Keith Thompson Mar 15 '13 at 18:51
@KeithThompson: To be honest, when I voted, I wasn't expecting the answer to deal with the source code. I now think both sites are equally suited for the question and your answer. I'll let the community decide. – NPE Mar 15 '13 at 18:54
up vote 6 down vote accepted

This is a known bug, reported here. It also chokes if $HOME is longer than 25 characters.

I was able to work around this by applying a patch (which increases the limit from 20 to 50) and rebuilding from source.

The patch is in this message. It doesn't apply to the screen-4.0.3 sources downloaded from; apparently it depends on some unreleased changes added after that.

(Note: When I downloaded the patch, it named it bin4fE4KxGNNI.bin; I manually renamed it to gnuscreen-21653.patch.)

So I grabbed the latest screen sources from git:

git clone git://

applied the patch:

patch -p 1 < gnuscreen-21653.patch

then built from source:

cd src
./configure --prefix=/where/you/want/to/install
make install

This gave me a screen executable that I can run from /home/accountwithaverylongusername on my Linux system. It should work the same way on OSX.

If your user name is longer than 50 characters, you can probably just update the constant after applying the patch.

I hope this patch, or something like it, will appear in the next release of GNU screen.

share|improve this answer
Thank you so much, I was kind of uncomfortable with installing from source, but these instructions were great. Just one thing: the file was in src in my checkout. That probably changed after you answered this question, but perhaps you could include it in your answer. – 11684 Oct 3 '13 at 14:42

I worked around the same bug by using tmux instead of screen.

share|improve this answer

Screen-4.3.1 has solved this bug. Just do the following:

1-Download Screen-4.3.1



tar -zxvf screen-4.3.1.tar.gz

3-Go to directory

cd screen-4.3.1

4-Run configure to create Makefile


5-Make and install

make install

6-It will probably ask you to do the following copy manually:

sudo cp etc/etcscreenrc /etc/
share|improve this answer
Installed 4.03.01 via brew install screen and still have the same LoginName too long - sorry. error. – cevaris Jun 24 at 16:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.