| View previous topic :: View next topic |
| Author |
Message |
hackerError Guru


Joined: 14 Mar 2003 Posts: 342 Location: Reston, VA, USA
|
Posted: Wed Dec 15, 2010 3:54 pm Post subject: VNC is not setting the correct DISPLAY= value |
|
|
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 |
|
 |
hackerError Guru


Joined: 14 Mar 2003 Posts: 342 Location: Reston, VA, USA
|
Posted: Sat Dec 18, 2010 3:11 pm Post subject: |
|
|
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 |
|
 |
hackerError Guru


Joined: 14 Mar 2003 Posts: 342 Location: Reston, VA, USA
|
Posted: Mon Dec 20, 2010 3:20 pm Post subject: :?: |
|
|
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 |
|
 |
bendagr8 Tux's lil' helper


Joined: 04 Sep 2003 Posts: 135 Location: OR
|
Posted: Sun Jan 02, 2011 7:35 pm Post subject: |
|
|
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 |
|
 |
Gusar Advocate

Joined: 09 Apr 2005 Posts: 2665 Location: Slovenia
|
Posted: Sun Jan 02, 2011 7:37 pm Post subject: |
|
|
| No guarantee that it will fix things... but have you tried tigervnc? |
|
| Back to top |
|
 |
bendagr8 Tux's lil' helper


Joined: 04 Sep 2003 Posts: 135 Location: OR
|
Posted: Sun Jan 02, 2011 7:47 pm Post subject: |
|
|
| The bug I linked was against tigervnc. |
|
| Back to top |
|
 |
Edweirdo Guru


Joined: 28 Jan 2003 Posts: 353 Location: Boston, Mass, USA
|
Posted: Tue Jan 04, 2011 2:39 am Post subject: |
|
|
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 |
|
 |
hitman_bond007 n00b


Joined: 07 May 2004 Posts: 15 Location: NC
|
Posted: Tue Jan 04, 2011 11:40 pm Post subject: |
|
|
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 |
|
 |
bendagr8 Tux's lil' helper


Joined: 04 Sep 2003 Posts: 135 Location: OR
|
Posted: Thu Jan 06, 2011 12:54 am Post subject: |
|
|
| hitman_bond007 wrote: |
| Code: | | DISPLAY=$DISPLAY.0 dbus-launch startfluxbox & |
|
Doesn't work for me  |
|
| Back to top |
|
 |
hackerError Guru


Joined: 14 Mar 2003 Posts: 342 Location: Reston, VA, USA
|
Posted: Thu Jan 06, 2011 3:50 pm Post subject: |
|
|
| 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 |
|
 |
Edweirdo Guru


Joined: 28 Jan 2003 Posts: 353 Location: Boston, Mass, USA
|
Posted: Thu Jan 06, 2011 7:54 pm Post subject: |
|
|
I originally had:
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 |
|
 |
hackerError Guru


Joined: 14 Mar 2003 Posts: 342 Location: Reston, VA, USA
|
Posted: Fri Jan 07, 2011 4:38 pm Post subject: |
|
|
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 |
|
 |
hanj Veteran


Joined: 19 Aug 2003 Posts: 1496
|
Posted: Fri Jan 07, 2011 7:58 pm Post subject: |
|
|
| 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 |
|
 |
bendagr8 Tux's lil' helper


Joined: 04 Sep 2003 Posts: 135 Location: OR
|
Posted: Sat Jan 15, 2011 5:29 am Post subject: |
|
|
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 |
|
 |
hitman_bond007 n00b


Joined: 07 May 2004 Posts: 15 Location: NC
|
|
| Back to top |
|
 |
|