up vote 3 down vote favorite
3
share [g+] share [fb]

I've got one monitor (the family TV) attached to my Ubuntu 8.04 system, and when I need to work on it I usually VPN into it from another PC. However I'd like to be able to VPN in even when it's in use as the media center.

Is there a way to create a second virtual monitor/workspace that I could VNC into? I know I could telnet in, but I want the GUI desktop. The graphics card supports multiple screens - should I configure it for another monitor even though there is no other physical monitor?

link|improve this question

feedback

2 Answers

up vote 1 down vote accepted

If you are using FreeVNC:

If say your computer name is comp-user-01. You can VNC into a different session by using: comp-user-01:1

I believe you can set how many simultaneous users within the VNC server settings.

Edit: You can replace the last 1 with the number of the session you want to log into.

link|improve this answer
How do I start and configure the second session? I assume it should be running before I VNC into it (adding ":1" to my computer name doesn't automatically start a new session...does it?) – Fred Hamilton Aug 31 '09 at 23:41
Actually I think it does. I think by specifying it, you create it. Not too sure. – Sakamoto Kazuma Sep 1 '09 at 1:03
Or you can start the server for the session by entering: "vncserver :2" on the host machine. – Sakamoto Kazuma Sep 1 '09 at 1:05
Thanks for the support. OK, I installed tightvncserver and I'm able to start a new "desktop" just as you said. However when I VNC into it it's just a terminal window, although it is in a resizeable GUI window. But I don't have access to any of other Desktop features (menus to launch programs from, etc.). It also looks like a different window manager on the second screen. Is there a way I can make it become a "full" desktop? I'm initially booting with xfce - it would be cool if I could run Gnome or KDE in the second instance - is that possible? – Fred Hamilton Sep 13 '09 at 23:01
eek ... That I'm not sure of. – Sakamoto Kazuma Sep 16 '09 at 13:49
show 1 more comment
feedback

Connect as discussed in Sakamoto Kazuma's answer.

You'll need an xstartup script in ~/.vnc/xstartup. It may already be there. If not, the standard one looks like:

#!/bin/sh

# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &

Now, uncomment the two lines starting with "# unset " and "# exec " (yeah-- those two just below the comment that says "Uncomment the following two lines for normal desktop"

That should give you your normal, Gnome desktop.

link|improve this answer
Thanks, that did it! (Sorry it took me so long to try it out!) – Fred Hamilton Oct 6 '09 at 5:58
Hmmm...the mouse works great, but whatever I type is getting scrambled: "drat" shows up as "fvan". So I went back to edit ~/.vnc/xstartup (which originally didn't exist so I created it and pasted in your example) and it's been radically changed: #!/bin/sh xrdb $HOME/.Xresources xsetroot -solid grey #x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & #x-window-manager & /etc/X11/Xsession Any idea what happened? – Fred Hamilton Oct 6 '09 at 6:25
OK, the file I created per your instructions was ~/.vnc/xstartup. The "radically changed" file I showed was from ~/vnc/xstartup. Am I supposed to have both .vnc and vnc directories? Which is the real one (I assume .vnc). I'll figure this out eventually... – Fred Hamilton Oct 6 '09 at 6:45
Discovered the answer to the keyboard mapping problem by adding 'export XKL_XMODMAP_DISABLE=1' in $HOME/.vnc/xstartup before the last line (/etc/X11/Xsession). Discovered here: bugs.launchpad.net/ubuntu/+source/vino/+bug/112955/comments/55 – Fred Hamilton Oct 7 '09 at 5:25
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.