# vncserver serves just a "twm" and not the current one  (wmaker and GNOME)



## aurora (Oct 7, 2009)

Hello,

I 'm not sure if this problem fits into this section, but it's likely to be about X.Org, so I post it here.

I've been trying to establish vnc (RealVNC) connections between various operating systems (MAC OS X, XP, Linux and FreeBSD) and so far I've been successfully able to connect to all of them. 

But in the connections where the vncserver runs on Linux and FreeBSD there's a slight problem: 

When I connect to them using any vnc viewer (Real VNC, Chicken of the VNC or UltraVNC viewers), what I get is just a "twm" screen and not the currently active window manager (wmaker for the FreeBSD machine, GNOME for the Linux machine). 

Consequently, the cursor or keyboards are also not in sync motion. Such a problem is not present between MAC OS X and XP.

How to get it working? Thanks.


----------



## SirDice (Oct 7, 2009)

You need to create a ~/.vnc/xstartup like so:


```
/usr/local/bin/gnome-session &
```

This will start a GNOME session in VNC.


----------



## aurora (Oct 7, 2009)

Thank you for the suggestion.

~/.vnc/xstartup file was already present and it is:


```
#!/bin/sh
[color="Red"][B]unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
[ -x /root/.vnc/xstartup ] && exec /root/.vnc/xstartup[/B][/color]
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &
[color="Blue"][B]/usr/local/bin/gnome-session &[/B][/color]
```

(red sections: I've added later by myself, blue section: added upon your note)

and the result is the same: A vnc screen with twm...


----------



## DutchDaemon (Oct 7, 2009)

Shouldn't this one go then?


```
twm &
```


----------



## aurora (Oct 7, 2009)

I've cleared the line containing *twm &* and just to be sure, restarted the OS, and the result is the same: vnc screen with twm.


----------



## DutchDaemon (Oct 7, 2009)

Could it be that one of the preceding commands loads twm on the fly? Could you try the gnome line all by itself (as suggested)? If that works, work your way back up and add what you need.


----------



## aurora (Oct 7, 2009)

I've commented out every line but /usr/local/bin/gnome-session & 
(the first line #!/bin/sh was already commented out) and restarted the vnc server. Still no change.


----------



## adamk (Oct 7, 2009)

Well, you also shouldn't be ending the gnome-session line with &

Just:

/usr/local/bin/gnome-session

If this continues, take a look in the log file that is generated in ~/.vnc


----------



## aurora (Oct 7, 2009)

Sorry, it wasn't working because I have confused the path & filenames.

After I changed the gnome-session with *wmaker* it finally started to work with wmaker and that's very fine. Sorry for that confusion.

But there's still one more step to go and it is about the 
"current" wmaker session i.e. when I start a vnc connection and get the wmaker screen, it's a total new wmaker screen and it's not the wmaker screen I see on the display of my server. Therefore the cursor is not in sync with the cursor in vnc viewer

I'm searching for the ways to do that...


----------



## aurora (Oct 7, 2009)

At this page I found the following information:



> You want to be able to connect to your Linux workstation remotely, and you want to attach to your existing X session instead of starting a new independent one. You want to be able to roam about and log in from other locations, picking up where you left off. Or, you want to use this as a helpdesk tool so you can take control of user's Linux PCs remotely and fix problems yourself, instead of spending way too much time trying to talk users through a diagnosis and repair over the telephone.
> 
> 8.21.2. Solution
> 
> Easy as pie with *x11vnc*. You need x11vnc on the remote server, and a VNC viewer on your local Linux workstation. After installing x11vnc, create a login password. In this example, it is stored in /home/carla/x11vnc/passwd...



So it seems that in order to have a real X display I'd better install this thing called *x11vnc*, right? 

Is it such that conventional RealVNC server is unable to provide real Desktop display, whether it be wmaker, GNOME or KDE?


----------



## SirDice (Oct 7, 2009)

For Gnome there's net/vino.


----------



## Lego (Oct 8, 2009)

Would i have to follow a similar structure to get my kde or gnome working??? http://forums.freebsd.org/showthread.php?t=7472  ..... I also installed fluxbox, and it boots fine....NOT a single Web Browser works though..


----------



## aurora (Oct 8, 2009)

SirDice said:
			
		

> For Gnome there's net/vino.



I've installed vino and it works the way I wanted (finally! 

It looks like, the makers of RealVNC should leave a message in their website saying that their vnc server's got limited functionality compared to the other vnc servers like vino... 

Thanks...


----------



## adamk (Oct 8, 2009)

That's funny.  I considered VNC on windows broken the first time I tried to use it and realized that it was just controlling the session on my monitor, and that it doesn't spawn a separate session for vnc.  Of course, I later found out that's because Windows is too stupid, apparently, to support multiple graphical logins on one box at the same time.

Adam


----------

