<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="nl">
	<id>https://wiki.durkotheek.nl/index.php?action=history&amp;feed=atom&amp;title=Vnc</id>
	<title>Vnc - Bewerkingsoverzicht</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.durkotheek.nl/index.php?action=history&amp;feed=atom&amp;title=Vnc"/>
	<link rel="alternate" type="text/html" href="https://wiki.durkotheek.nl/index.php?title=Vnc&amp;action=history"/>
	<updated>2026-11-20T03:17:06Z</updated>
	<subtitle>Bewerkingsoverzicht voor deze pagina op de wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://wiki.durkotheek.nl/index.php?title=Vnc&amp;diff=155&amp;oldid=prev</id>
		<title>Dirkmeister: Nieuwe pagina aangemaakt met &#039;Step 1: Installing required packages&lt;br/&gt; &lt;br/&gt; There are a just a couple of packages to be dealt with. Those packages can be installed with a single command. Before you run the command, you must first “su” to root. This is done by entering the command su and then typing your root user password. Once you have root access, run the command:&lt;br/&gt; &lt;br/&gt; yum install vnc vnc-server&lt;br/&gt; &lt;br/&gt; Once the above command completes, you are ready to begin the configura…&#039;</title>
		<link rel="alternate" type="text/html" href="https://wiki.durkotheek.nl/index.php?title=Vnc&amp;diff=155&amp;oldid=prev"/>
		<updated>2026-01-10T23:20:35Z</updated>

		<summary type="html">&lt;p&gt;Nieuwe pagina aangemaakt met &amp;#039;Step 1: Installing required packages&amp;lt;br/&amp;gt; &amp;lt;br/&amp;gt; There are a just a couple of packages to be dealt with. Those packages can be installed with a single command. Before you run the command, you must first “su” to root. This is done by entering the command su and then typing your root user password. Once you have root access, run the command:&amp;lt;br/&amp;gt; &amp;lt;br/&amp;gt; yum install vnc vnc-server&amp;lt;br/&amp;gt; &amp;lt;br/&amp;gt; Once the above command completes, you are ready to begin the configura…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nieuwe pagina&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Step 1: Installing required packages&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
There are a just a couple of packages to be dealt with. Those packages can be installed with a single command. Before you run the command, you must first “su” to root. This is done by entering the command su and then typing your root user password. Once you have root access, run the command:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
yum install vnc vnc-server&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Once the above command completes, you are ready to begin the configuration.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Step 2: Configure the users&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
I will assume you already have either the users that will be allowed to VNC into the machine, or you only have one user that will be gaining access to the machine. Either way, the users will already have accounts on the server and will have logged in to confirm their passwords/accounts.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
For each user that needs to gain access to the VNC server, you must set a VNC password for them. Let’s say you’ve set up a user account called vncuser and intend on logging in with only that user. To set the VNC password for the user, you must first su to that user account. Issue the command:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
su vncuser&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Now issue the command:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
vncpasswd&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
You will then be prompted to enter (and confirm) the new password for the user. Once you’ve completed that action, you are done with user configuration.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Step 3: Configure VNC&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Now for the important pieces.The first phase of this step is to edit the /etc/sysconfig/vncservers file. At the end of that file, enter the following:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
VNCSERVERS=&amp;quot;1:vncuser&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
VNCSERVERARGS[1]=&amp;quot;-geometry 1600x1200&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
NOTE: You can set the geometry to whatever resolution you require.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
In the above section, you can set up multiple users for connection. Say you had three users that needed access using different resolutions. To accomplish this, you could enter something like:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
VNCSERVERS=&amp;quot;1:vncuser1 2:vncuser2 3:vncuser3&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
VNCSERVERARGS[1]=&amp;quot;-geometry 640x480&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
VNCSERVERARGS[2]=&amp;quot;-geometry 800x600&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
VNCSERVERARGS[3]=&amp;quot;-geometry 1600x1200&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Step 4: Check VNC server startup&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Before you go any further, make sure the VNC server will start and stop cleanly. As the root user, issue the commands:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
service vncserver start&amp;lt;br/&amp;gt;&lt;br /&gt;
service vncserver stop&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
If the VNC server started and stopped cleanly, set VNC up to start at boot with the command:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
chkconfig vncserver on&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Step 5: Create xstartup scripts&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
You now need to go into each user that will be logging in with VNC and editing their ~/.vnc/xstartup script. Within that script, you should find the following:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
#!/bin/sh&amp;lt;br/&amp;gt;&lt;br /&gt;
# Uncomment the following two lines for normal desktop:&amp;lt;br/&amp;gt;&lt;br /&gt;
# unset SESSION_MANAGER&amp;lt;br/&amp;gt;&lt;br /&gt;
# exec /etc/X11/xinit/xinitrc&amp;lt;br/&amp;gt;&lt;br /&gt;
[ -x /etc/vnc/xstartup ] &amp;amp;&amp;amp; exec /etc/vnc/xstartup&amp;lt;br/&amp;gt;&lt;br /&gt;
[ -r $HOME/.Xresources ] &amp;amp;&amp;amp; xrdb $HOME/.Xresources&amp;lt;br/&amp;gt;&lt;br /&gt;
xsetroot -solid grey&amp;lt;br/&amp;gt;&lt;br /&gt;
vncconfig -iconic &amp;amp;&amp;lt;br/&amp;gt;&lt;br /&gt;
xterm -geometry 80x24+10+10 -ls -title &amp;quot;$VNCDESKTOP Desktop&amp;quot; &amp;amp;&amp;lt;br/&amp;gt;&lt;br /&gt;
twm &amp;amp;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Uncomment the following two lines (remove the “#” characters):&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
    unset SESSION_MANAGER&amp;lt;br/&amp;gt;&lt;br /&gt;
    exec /etc/X11/xinit/xinitrc&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Save that file and you’re ready to move on.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Step 6: Edit iptables&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
In order for the VNC connections to get through, you must allow them with iptables. To do this, open up the file /etc/sysconfig/iptables and add the line:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
-A INPUT -m state --state NEW -m tcp -p tcp -m multiport --dports 5901:5903,6001:6003 -j ACCEPT&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Save the file and restart iptables with the command:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
service iptables restart&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Step 7: Start the VNC server&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Issue the command:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
service vncserver start&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
And the VNC server should start up nice and cleanly.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Step 8: Test the connection&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Move over to a machine that can display graphics (if your server does, you can test from there) and fire up your VNC client of choice and attempt to log in with the IP address of the server and port 5801. You can actually test this with a browser (if Java is installed on the machine). To do this, open up the browser and go to http://ADDRESS_OF_VNC_SERVER:5801. That address should open up a VNC session in your browser. If, on the off chance, it does not… try the address http://ADDRESS_OF_VNC_SERVER:1.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
There you go! You should now have a working VNC server on your Linux box.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Informatie afkomstig van Technet: [http://www.techrepublic.com/blog/opensource/linux-101-easy-vnc-server-setup/4238 VNC server setup]&lt;/div&gt;</summary>
		<author><name>Dirkmeister</name></author>
	</entry>
</feed>