F18: ~/.vnc/xstartup example

Fernando Gozalo fgozalo0 at alumno.uned.es
Thu Jan 31 19:40:33 UTC 2013


Hi,

> do us a favor for archive sake, post what you had/used for the F17
> version.


First time I used this info
(http://www.oracle-base.com/articles/linux/configuring-vnc-server-on-linux.php)
to correlate the old and the new config.

To use the display number 10 this is the recipe:

1. Install tigervnc-server:

yum install tigervnc-server

2. Create the .service file:

cp /lib/systemd/system/vncserver at .service \
   /lib/systemd/system/vncserver@:10.service

3. In the new file are instruccions to customize vncserver@:10.service.
You need to change the "username" that will use this access. In a command:

sed -i -e 's/<USER>/username/g' /usr/lib/systemd/system/vncserver@:10.service

   or, like me, customize the start line with "-geometry 800x600 -nolisten
tcp -localhost". In a command:

sed -i -e 's/<USER>/username/g' \
    -e 's/ExecStart\(.*\)"/ExecStart\1 -geometry 800x600 -nolisten tcp
-localhost"/g' \
   /usr/lib/systemd/system/vncserver@:10.service

4. Reload systemd config files:

systemctl daemon-reload

5. Enable the new service:

systemctl enable vncserver@:10.service

6. Before start the new service set a VNC password for "username":

su - username
vncpasswd
exit

7. Start the new service:

systemctl start vncserver@:10.service




When you want to access your VNC server you must open a SSH connection
redirecting the port 5910 and then connect to localhost:10:

ssh -l username -L 5910:localhost:5910  your-vnc-server
vncviewer localhost:10



Regards,
Fernando.






More information about the users mailing list