Solved

How to install VNC on debian 5.0.7

Posted on 2013-01-13
8
702 Views
Last Modified: 2013-01-30
Hi Linux Experts,

Can someone help me on how to configure VNC Server on Debian 5.0.7?
0
Comment
Question by:d34dp00l13
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 16

Assisted Solution

by:grahamnonweiler
grahamnonweiler earned 167 total points
ID: 38771481
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
 
LVL 5

Assisted Solution

by:Rinil
Rinil earned 167 total points
ID: 38771482
hi,

this link guides you through, hope this helps

http://www.debianhelp.co.uk/vnc.htm
0
 

Assisted Solution

by:d34dp00l13
d34dp00l13 earned 0 total points
ID: 38776922
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
Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

 

Author Comment

by:d34dp00l13
ID: 38776995
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
 
LVL 16

Expert Comment

by:grahamnonweiler
ID: 38777035
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
 
LVL 62

Assisted Solution

by:gheist
gheist earned 166 total points
ID: 38785255
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
 

Accepted Solution

by:
d34dp00l13 earned 0 total points
ID: 38821324
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
 

Author Closing Comment

by:d34dp00l13
ID: 38834587
.
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In order for businesses to be compliant with certain information security laws in some countries, you need to be able to prove that a user (which user it was becomes important to the business to take action against the user after an event has occurr…
After running Ubuntu some time, you will be asked to download updates for fixing bugs and security updates. All the packages you download replace the previous ones, except for the kernel, also called "linux-image". This is due to the fact that w…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Suggested Courses

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question