Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 717
  • Last Modified:

How to install VNC on debian 5.0.7

Hi Linux Experts,

Can someone help me on how to configure VNC Server on Debian 5.0.7?
0
SandMan
Asked:
SandMan
5 Solutions
 
grahamnonweilerCommented:
Logon to Debian using the logon you wish to access via VNC

Edit -->     /etc/sysconfig/vncservers and add these lines

VNCSERVERS="3:$username" (***change $username to your logon name***)
VNCSERVERARGS[3]="-geometry 1024x768 -depth 16"

If you wish to give more users the ability to connect via VNC add them like this

VNCSERVERS="2:$username 3:$username3 4:$username4"
VNCSERVERARGS[2]="-geometry 1024x768 -depth 16"
VNCSERVERARGS[3]="-geometry 800x600 -depth 8"
VNCSERVERARGS[4]="-geometry 1024x768 -depth 16"

As you may have noticed you can adjust screen resolution per connection here.

Note: the number assigned to the desktop is relative to the connection port on the server so if you where $username3 you would set VNC client to connect on port 5903

Now open terminal under the users logon type
# vncpasswd
and then enter required password twice

Note: This password this is different to the Debian password

Then goto the users home directory

/home/*username*/.vnc and edit the xstartup script and uncomment these lines (remove hashes infront of the line)

unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc

Then set the vncserver status to start service at boot by this command

# chkconfig vncserver on

then restart vncserver with this command

# service vncserver restart

Make sure that your required ports are open and then you should be able to connect.

Note: dont forget your port number when connecting with vnc client
0
 
RinilCommented:
hi,

this link guides you through, hope this helps

http://www.debianhelp.co.uk/vnc.htm
0
 
SandManAuthor Commented:
Hi grahamnonweiler,

Thanks for the instruction. But I tried to follow your instruction, but there is no directory /etc/sysconfig on debian 5.0.7.

I'm looking for intruction specific to 5.0.7
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
SandManAuthor Commented:
Hi Rinil,

I tried to follow you link, but when I try the following commands it shows an error "E: Couldn't find package vnc4server".

I tried the following

apt-get update
apt-get install vnc4server
0
 
grahamnonweilerCommented:
Debian 5.x specific instructions for installing VNC:

            #apt-get install vnc4server

Run as the logged in user,  enter the password and confirmation (performance testing):

             #vnc4server

Add service to autorun:

             #gedit /etc/rc.local

Adding before the command "exit 0" the following line:
 
             #su – server -c "vnc4server :1"

Check that its running in rc.local:

             #sudo /etc/rc.local start

Next you must configure a wrapper for connecting a user to VNC, open the file:

            #gedit /home/server/.vnc/xstartup

Get contents of the file and edit accordingly:
#!/bin/sh 

# Uncomment the following two lines for normal desktop:

 unset SESSION_MANAGER #uncomment the first line
 # exec /etc/X11/xinit/xinitrc
 gnome-session & #launch Gnome 

[ -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" & x-window-manager &

Open in new window

0
 
gheistCommented:
Install Xming on your windows computer, and a SSH client like putty.
spend some time finding SSH X11 forwarding option for your connection


and run xterm or startgnome, or whatever you like over secure connection
0
 
SandManAuthor Commented:
Hi guys, I already figured out the issue. Since debian 5.0.7 is already end of life. The package repository was moved to the archive link, so after i've updated the apt repo. was able to configure my debian box.

Thanks for all the help
0
 
SandManAuthor Commented:
.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now