LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 04-29-2010, 11:20 PM   #1
amp_man
Member
 
Registered: Feb 2005
Location: Maine
Distribution: Ubuntu
Posts: 59

Rep: Reputation: 16
Second X session for VNC access


Alright, here's what I've got going on. I have a home computer/file server/gaming rig running ubuntu 10.04 that I want to use with a physical keyboard/mouse/monitor, via VNC from inside the network (using the same X session), and also from outside the network (what I need help with)

Currently, the system automatically logs in and starts vino-server with my standard user account, which is fine for local use and inside the network. For outside the network, I want to start a second X session, auto login a second (non-sudoers/wheel) user, and start Gnome (or XFCE4 would be awesome) at a lower resolution/color depth. That's mainly what I need help with, I've found guides on starting multiple sessions (even multiseat), but nothing about having two different users auto-login.

That session would start tight vnc server on a different port then the default (something like 5950). That port would then be the only port forwarded through the firewall.

Before anyone mentions VNC over SSH, restrictions in place on the windows client make that impossible. I have set up source IP filtering in my modem, but I'm not 100% confident that my crappy little westell 327w is going to outsmart a script kiddie. The reason I want to do this is to increase security and get rid of the annoyance of having to switch from 1680x1050 to 800x600 every time I log in, not to mention that it would be nice to have a background and be able to play with compiz.

Can anyone help me out?
 
Old 04-30-2010, 07:53 AM   #2
scheidel21
Senior Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian 6+, CentOS 5+
Posts: 1,323

Rep: Reputation: 100Reputation: 100
You could add an entry to your rc.local to start a vnc session on boot, like

Code:
su username -c "vncserver -depth 8 -geometry 1024x768 :5"
not sure if that's the right syntax, but you get the idea, this would create a vnc session for user "username" with 1024x768 desktop and color depth of 8 bits on port 5905 or vnc screen 5. Then in your .vnc/xstartup file for vnc settings in your home folder edit it to start up the lightweight WM you want instead of your normal Gnome/KDE or whatever. Like below, this one from mine starts a gnome session.

Code:
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
gnome-session &
#x-window-manager &
I do this with an internal server that runs only CLI on the console, but occasionally I want to do little admin tasks in GUI, so I have it set automatically I don't need to create it every time.
 
Old 04-30-2010, 07:58 AM   #3
scheidel21
Senior Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian 6+, CentOS 5+
Posts: 1,323

Rep: Reputation: 100Reputation: 100
P.S. if using port forwarding just port forward your weird port number to the actual VNC port on your internal server, then you don't have to deal with modifying the connection port on the vnc server. If someone ran a port scan against you when they found port 5950 open they could get that the service running on it was VNC anyways, protection through obscurity isn't really all that possible. btw what restriction are in place on the windows client to prevent SSH, closed port? you could run ssh over a different port, no SSH client or download allowed? put putty on a USB key or CD. No admin rights, putty will run without them and should still be able to setup tunneling, at least it does on XP, as I have used it on a non-admin user account before. I can't speak for Vista or 7 though.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Killing a VNC session? Mark_667 Linux - Server 3 03-20-2009 08:07 AM
gnome2 session and VNC metallica1973 Linux - Software 2 07-16-2006 10:50 AM
VNC Session mindjet SUSE / openSUSE 4 02-11-2006 09:49 AM
vnc into session 0 fraz Linux - Networking 5 11-21-2005 07:36 AM
see the vnc session on vnserver cabo Linux - General 5 09-13-2004 04:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 06:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration