You are not logged in.

#1 2010-01-01 04:51:57

salous
Member
Registered: 2009-03-09
Posts: 25

$DISPLAY variable become blank and I'm unable to start any application

hi, guys,
I recently did a fresh install of Arch,
everything went fine, except this:

I always leave my computer turning on while I'm sleeping,
and somehow, after this fresh install,
everytime I wake up,
I cannot start any applications,
I find out it is due to my $DISPLAY variable is set to blank somehow, instead of normal thing like: ':0.0',
if I reboot my machine,
the $DISPLAY is set back to ':0.0' and everything is fine.
I dig the hell out of the logs and can't find out what causes it.

any thoughts would be grateful, thank you!
this shit is bugging the hell outta me.

Last edited by salous (2010-01-01 04:54:01)

Offline

#2 2010-01-01 05:36:42

chpln
Member
From: Australia
Registered: 2009-09-17
Posts: 361

Re: $DISPLAY variable become blank and I'm unable to start any application

This sounds like it could be a pain to debug.  If you could provide some more information, it may be handy.

How are you starting X: are you logging in via a tty or using a login manager; which DE/WM?
If using a login manager, are you able to logout and access it after the problem occurs?
If so, is DISPLAY correct when logging in again?
Is DISPLAY correct after restarting the login manager?
Does the problem occur only overnight, when idle for long periods of time, or intermittently?
While idle, does anything notable change (screensaver, power management, etc.)?

I've not came across this before, though I'd be tending to suspect a problem relating to a login or session manager.  If this could be the case, it might be worth testing with something else running overnight.

Offline

#3 2010-01-01 05:52:32

salous
Member
Registered: 2009-03-09
Posts: 25

Re: $DISPLAY variable become blank and I'm unable to start any application

thank you for replying,
I start X via GDM(I start gdm by inittab method), I use gnome,
I'm not sure if logout fix it, I'll try it.
this problem only occur after a long period of idle time,
and I do use the gnome screensaver and gnome power management,
I set it to turn off my monitor after 30 minutes.
every package I use is up to date.
At the beginning I thought it was related to the new xorg server, I never has this issue before this install,
but downgrading does not help.

Last edited by salous (2010-01-01 06:03:13)

Offline

#4 2010-01-01 08:57:12

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

Re: $DISPLAY variable become blank and I'm unable to start any application

This has happened to me twice several days ago, inside tmux. I thought it might be a bug in tmux or so.
Anyway, my suggestion for a workaround: just set the DISPLAY variable with

export DISPLAY=:0.0

instead of rebooting.
The real problem I can't see, since it happened like very randomly and only twice to me. No way to reproduce here.

Last edited by lolilolicon (2010-01-01 08:59:02)


This silver ladybug at line 28...

Offline

#5 2010-01-02 14:07:02

salous
Member
Registered: 2009-03-09
Posts: 25

Re: $DISPLAY variable become blank and I'm unable to start any application

lolilolicon wrote:

This has happened to me twice several days ago, inside tmux. I thought it might be a bug in tmux or so.
Anyway, my suggestion for a workaround: just set the DISPLAY variable with

export DISPLAY=:0.0

instead of rebooting.
The real problem I can't see, since it happened like very randomly and only twice to me. No way to reproduce here.

thanks for the workaround,
but it can't help me,
since I can't open any terminal windows to set it!

I suspect this might have something to do with the sshd daemon,
I'll test it tonight, man this totally sucks.

thank you again for help anyway!

Offline

#6 2010-01-02 17:05:23

jjohnson0000
Member
Registered: 2010-01-02
Posts: 2

Re: $DISPLAY variable become blank and I'm unable to start any application

What file do you set the $DISPLAY variable in? I am having an issue with the display variable not set myself and I do not know where I need to set it.

Offline

#7 2010-01-02 17:28:26

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: $DISPLAY variable become blank and I'm unable to start any application

You can have a look at what processes have the DISPLAY variable set:

for file in /proc/[0-9]*; do grep -ao 'DISPLAY=[^[:cntrl:]]*' $file/environ 2>/dev/null && grep -ao '(.*)' $file/stat; done | sed 'N;s/\n/\t/'

Any launcher-type program needs it, of course, like xbindkeys or bash.

You can edit the environment of running programs with gdb:
http://bbs.archlinux.org/viewtopic.php? … 63#p622463

Offline

#8 2010-01-02 18:09:15

salous
Member
Registered: 2009-03-09
Posts: 25

Re: $DISPLAY variable become blank and I'm unable to start any application

Procyon wrote:

You can have a look at what processes have the DISPLAY variable set:

for file in /proc/[0-9]*; do grep -ao 'DISPLAY=[^[:cntrl:]]*' $file/environ 2>/dev/null && grep -ao '(.*)' $file/stat; done | sed 'N;s/\n/\t/'

Any launcher-type program needs it, of course, like xbindkeys or bash.

You can edit the environment of running programs with gdb:
http://bbs.archlinux.org/viewtopic.php? … 63#p622463

Thank you so much for this neat trick!
I didn't even know I could use proc like that.
I will test it tonight.

Offline

Board footer

Powered by FluxBB