Forums | Aggregator | Books | Industry News | Firefox Plugins | Social | Links

Comments

Configuring VNC Server on Linux - This article describes how to configure VNC Server on a Linux using both the init and systemd methods.



Valentine said...

Thanks for this tutorial however I am not able to follow it successfully. I am getting the following error when I try to run "systemctl enable vncserver@:3.service"

Error: "Failed to issue method call: Bad Message"

Tim... said...

Hi.

Open a thread on the forum. Post the contents of your config file and the command line output of the enable command.

Cheers

Tim...

Sverik said...

Instead of running "systemctl enable ..." do this:
"ln -s /lib/systemd/system/vncserver@:3.service /etc/systemd/system/multi-user.target.wants/vncserver@:3.service"
This is specific to vncserver and possibly to Fedora, "systemctl enable" should still be used, when possible.

ted said...

Thanks - this works well on Fedora 16. Issuing systemctl enable ... resulted in the ln -s command shown by Svenik.

Tim... said...

Yes. The the enable command is the preferred method, since it abstracts the symbolic link, allowing the implementation to change if need be.

Cheers

Tim...

Andy Blueman said...

Just for those that are a bit noob like myself..

I got confused and edditted to my username in the ExecStart= bit. This broke vncserver@:1.service and meant that it didnt work it should appear as ...

[Service]
Type=forking
User=ablueman
ExecStart=/sbin/runuser -l -c "/usr/bin/vncserver %i -geometry 1024x768"
ExecStop=/sbin/runuser -l -c "/usr/bin/vncserver -kill %i"

Tim... said...

Hi.

I've tried to make that part a little more explicit, so others wouldn't fall into that trap. :)

Cheers

Tim...

Jura said...

Why the user must be specified? What shall I input when multiple user will connect to the VNC server?

Jura

Tim... said...

Hi.

The user is the OS user on the server you are connecting too, not the user who is attempting to make a connection. So if multiple people want to connect to the "oracle" user, there is only one entry for the user "oracle".

Cheers

Tim...

Jura said...

Well, but when there are more users with their own accounts on the server how the [Service] section would look like?

Something like this?

ExecStart=/sbin/runuser -l john -c "/usr
ExecStop=/sbin/runuser -l john -c "/usr/bin/vncserver -kill %i"

ExecStart=/sbin/runuser -l george -c "/usr/bin/vncserver %i -geometry 1600x900"
ExecStop=/sbin/runuser -l george -c "/usr/bin/vncserver -kill %i"

Thanks

Tim... said...

Hi.

No. A new service (display number) is configured for each user. So each user gets a different service associated with a different display number.

Cheers

Tim...

PS. If you have any more questions, please ask them in the forum. It is much easier for me that way.

Tyler said...

Thanks for the great documentation! It's really helpful, that I don't have to learn all that IT stuff, of systemctl

cstent said...

This is the best way I have seen to connect through vnc. Works great and with more speed, but how can I connect from windows to linux this way? Through tightvnc on client windows I cannot.

Tim... said...

Hi.

Any VNC client installed on Windows should be able to connect to the VNC server on the Linux box.

Cheers

Tim...

Emmanuel said...

Worked! THANKS A LOT!!!

Pranav D said...

Hats of to you.
Great article. Fedora16 has indeed a lot of changes.

DO NOT ask technical questions here! They will be deleted!

These comments should relate to the contents of a specific article. Constructive criticism is good. Advertising and offensive comments are bad and will be deleted!

Add your comments here.
Name
Comment
(max 400 chars - plain text)