Trouble within screen

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Tue Feb 6 18:23:02 UTC 2007


On Tue, Feb 06, 2007 at 10:34:59AM -0500, William O'Higgins Witteman wrote:
> I'm running a multi-headed screen session on my home machine.  I am
> logged into my home machine via ssh, and I have attached to my screen
> session.  So far so good.
> 
> I launch the screen session automatically from a terminal which I launch
> via .xinitrc.  I'm trying to give all the relevant info here.
> 
> Everything seems to be fine, until I launch vim (not gvim - this is for
> things like email composition in mutt).  Once I do that, I see the
> following errors:
> 
> Xlib: connection to ":0.0" refused by server
> Xlib: Invalid MIT-MAGIC-COOKIE-1 key
> 
> X is running on my home machine, but I am not logged in - another user
> is the one running X on the physical box.  I'm just running off my
> screen session.

Did you start screen while running X, then detach, and come back later
and attach to screen without X running?  In that case you would still
have the DISPLAY variable set inside screen since it was present when
you created the screen session.  vim likes to set xterm title bars to
useful information, which may need X access, so perhaps when it sees a
DISPLAY variable set, it tries to access X and fails since it is no
longer a valid DISPLAY to talk to.

> Is there a way to a) make this error go away or b) is it that screen
> thinks it should be in a terminal emulator, and I should launch my
> screen session from the console?
> 
> Any tips would be appreciated.  Thanks.

Are you using su to change to another user inside X?  If so try using su
- username instead, so that you don't carry over the original users
environment, since most of it isn't valid for the other user anyhow.  If
DISPLAY isn't set in the environment, then nothing will try to use it.

--
Len Sorensen
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list