Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
VNC is not setting the correct DISPLAY= value
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
hackerError
Guru
Guru


Joined: 14 Mar 2003
Posts: 342
Location: Reston, VA, USA

PostPosted: Wed Dec 15, 2010 3:54 pm    Post subject: VNC is not setting the correct DISPLAY= value Reply with quote

I am running tightvnc on display :1

The window manager that I am using is fluxbox.

When I attempt to launch anything via the fluxbox menu, such as xterm, the program appears on display :0 rather than :1. If I manually run a program like this:
Code:

DISPLAY=":1" <command>


it appears in the VNC session.

I believe this is because my DISPLAY variable is defaulting to the incorrect value, but this issue persists through reboots.

I have also tried starting multiple vnc sessions (:2 :3 etc.) and the same issue occurs, so this is not limited to my :1 session(s)[/code]
_________________
Before you insult someone, it is often best to walk a mile in their shoes.

That way when you insult them you're already a mile away and have their shoes.
Back to top
View user's profile Send private message
hackerError
Guru
Guru


Joined: 14 Mar 2003
Posts: 342
Location: Reston, VA, USA

PostPosted: Sat Dec 18, 2010 3:11 pm    Post subject: Reply with quote

I created a test user, and the new user also has the same issue. This leads me to believe that there is a global config setting somewehre doing this. Where does VNC get it's initial DISPLAY variable set when launching?
_________________
Before you insult someone, it is often best to walk a mile in their shoes.

That way when you insult them you're already a mile away and have their shoes.
Back to top
View user's profile Send private message
hackerError
Guru
Guru


Joined: 14 Mar 2003
Posts: 342
Location: Reston, VA, USA

PostPosted: Mon Dec 20, 2010 3:20 pm    Post subject: :?: Reply with quote

Is there somewhere that tightvnc stores DISPLAY variable by default? They charge $100 per incident tech support, and I'm not at that point... yet.
_________________
Before you insult someone, it is often best to walk a mile in their shoes.

That way when you insult them you're already a mile away and have their shoes.
Back to top
View user's profile Send private message
bendagr8
Tux's lil' helper
Tux's lil' helper


Joined: 04 Sep 2003
Posts: 135
Location: OR

PostPosted: Sun Jan 02, 2011 7:35 pm    Post subject: Reply with quote

I am having the exact same problem. Perhaps this is you? https://bugs.gentoo.org/show_bug.cgi?id=349272

I've been really stumped on trying to figure out what's going wrong. I too feel it's some variable not being set properly, but I don't think it's the DISPLAY variable. Like the bug suggests, I think the problem is either in X, or fluxbox.

The only things I will add are: TWM works fine, and using the -display option for fluxbox doesn't seem to make the problem go away. I'm completely stumped.

Here's my current workaround, which is good enough for me since I usually run these sessions for a long period of time.
Change xstartup to launch twm.
Start the vnc server, and connect.
Within twm create a new xterm.
In that new xterm kill twm, and other stuff you don't want.
From that xterm start fluxbox.
Back to top
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2665
Location: Slovenia

PostPosted: Sun Jan 02, 2011 7:37 pm    Post subject: Reply with quote

No guarantee that it will fix things... but have you tried tigervnc?
Back to top
View user's profile Send private message
bendagr8
Tux's lil' helper
Tux's lil' helper


Joined: 04 Sep 2003
Posts: 135
Location: OR

PostPosted: Sun Jan 02, 2011 7:47 pm    Post subject: Reply with quote

The bug I linked was against tigervnc.
Back to top
View user's profile Send private message
Edweirdo
Guru
Guru


Joined: 28 Jan 2003
Posts: 353
Location: Boston, Mass, USA

PostPosted: Tue Jan 04, 2011 2:39 am    Post subject: Reply with quote

I have this problem, but not only with VNC. I also have it with multiple monitors. If run anything in display :0 everything is fine, but when I try it in :1 nothing happens. I don't think it is VNC related.
_________________
Life is too short and too important to { take seriously | use Windows }.
Back to top
View user's profile Send private message
hitman_bond007
n00b
n00b


Joined: 07 May 2004
Posts: 15
Location: NC

PostPosted: Tue Jan 04, 2011 11:40 pm    Post subject: Reply with quote

Changing $DISPLAY from :1 to :1.0 before launching fluxbox seems to make it work for me.

I made the following change in my ~/.vnc/xstartup.

From:

Code:
dbus-launch startfluxbox &


To:

Code:
DISPLAY=$DISPLAY.0 dbus-launch startfluxbox &


Just don't ask me why this works, because I have no idea.
Back to top
View user's profile Send private message
bendagr8
Tux's lil' helper
Tux's lil' helper


Joined: 04 Sep 2003
Posts: 135
Location: OR

PostPosted: Thu Jan 06, 2011 12:54 am    Post subject: Reply with quote

hitman_bond007 wrote:

Code:
DISPLAY=$DISPLAY.0 dbus-launch startfluxbox &



Doesn't work for me :(
Back to top
View user's profile Send private message
hackerError
Guru
Guru


Joined: 14 Mar 2003
Posts: 342
Location: Reston, VA, USA

PostPosted: Thu Jan 06, 2011 3:50 pm    Post subject: Reply with quote

Edweirdo wrote:
I have this problem, but not only with VNC. I also have it with multiple monitors. If run anything in display :0 everything is fine, but when I try it in :1 nothing happens. I don't think it is VNC related.


I just noticed this as well in my multiple monitor setup. So this is looking like a Fluxbox issue, rather than a VNC issue.
_________________
Before you insult someone, it is often best to walk a mile in their shoes.

That way when you insult them you're already a mile away and have their shoes.
Back to top
View user's profile Send private message
Edweirdo
Guru
Guru


Joined: 28 Jan 2003
Posts: 353
Location: Boston, Mass, USA

PostPosted: Thu Jan 06, 2011 7:54 pm    Post subject: Reply with quote

I originally had:
Code:

fluxbox

in my .xinitrc. Putting the display line worked for me.
Code:

DISPLAY=$DISPLAY.0 fluxbox

Thanks!
_________________
Life is too short and too important to { take seriously | use Windows }.
Back to top
View user's profile Send private message
hackerError
Guru
Guru


Joined: 14 Mar 2003
Posts: 342
Location: Reston, VA, USA

PostPosted: Fri Jan 07, 2011 4:38 pm    Post subject: Reply with quote

I'll try that when I get home, however I wonder if it might cause issues on my local session.

My setup is dual monitors, with 0.0 being the right monitor, and 0.1 being the left, do you think adding the explicit .0 to the xinitrc will affect the 0.1 display?
_________________
Before you insult someone, it is often best to walk a mile in their shoes.

That way when you insult them you're already a mile away and have their shoes.
Back to top
View user's profile Send private message
hanj
Veteran
Veteran


Joined: 19 Aug 2003
Posts: 1496

PostPosted: Fri Jan 07, 2011 7:58 pm    Post subject: Reply with quote

hitman_bond007 wrote:
Changing $DISPLAY from :1 to :1.0 before launching fluxbox seems to make it work for me.

I made the following change in my ~/.vnc/xstartup.

From:

Code:
dbus-launch startfluxbox &


To:

Code:
DISPLAY=$DISPLAY.0 dbus-launch startfluxbox &


Just don't ask me why this works, because I have no idea.


Wow.. thanks for this. Worked great for me.

Thanks!
hanji
_________________
Server Admin Blog - Uno-Code.com
Back to top
View user's profile Send private message
bendagr8
Tux's lil' helper
Tux's lil' helper


Joined: 04 Sep 2003
Posts: 135
Location: OR

PostPosted: Sat Jan 15, 2011 5:29 am    Post subject: Reply with quote

I ended up having to do an emerge -e system; emerge -e world as a result of a botched upgrade from ext3->ext4.

After this, everything is back to normal. So now unfortunately I don't know what fixed the problem.
Back to top
View user's profile Send private message
hitman_bond007
n00b
n00b


Joined: 07 May 2004
Posts: 15
Location: NC

PostPosted: Sun Jan 16, 2011 12:23 am    Post subject: Reply with quote

bendagr8 wrote:
I ended up having to do an emerge -e system; emerge -e world as a result of a botched upgrade from ext3->ext4.

After this, everything is back to normal. So now unfortunately I don't know what fixed the problem.


I'm guessing you're using the git ebuild.

Based on your post, I checked upstream git and found this commit: http://git.fluxbox.org/?p=fluxbox.git;a=commit;h=e8ce9ed3a38e1b4a3e5727d408d0fac0e2ff1ada.

I backported the commit and attached it to https://bugs.gentoo.org/show_bug.cgi?id=349272.

This fixes it for me and explains why my workaround I posted earlier worked for most people.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum