need assistance in configuring vnc server

Issues related to applications and software problems
Post Reply
knzzz
Posts: 157
Joined: 2017/02/25 12:41:42

need assistance in configuring vnc server

Post by knzzz » 2017/09/21 11:23:59

Hi Team,

Am new to handle the VNC could someone please share the link and provide the step by step configuration of vnc server.

Regards
Kanna

scottro
Forum Moderator
Posts: 2556
Joined: 2007/09/03 21:18:09
Location: NYC
Contact:

Re: need assistance in configuring vnc server

Post by scottro » 2017/09/21 11:42:28

I have an old article from Fedora 17, when they first began using systemd with it. It's for tigervnc server, and I haven't tested it in a couple of years, but it may give you a starting point.

http://srobb.net/rhvnc.html
New users should check the FAQ and Read Me First pages

scottro
Forum Moderator
Posts: 2556
Joined: 2007/09/03 21:18:09
Location: NYC
Contact:

Re: need assistance in configuring vnc server

Post by scottro » 2017/09/21 11:47:48

By the way, one reason I've hardly used it in a few years is because I've found x2go to be much faster.

http://srobb.net/nxreplace.html
New users should check the FAQ and Read Me First pages

anderson_thomas
Posts: 96
Joined: 2011/11/21 10:19:41

Re: need assistance in configuring vnc server

Post by anderson_thomas » 2017/09/21 11:51:00

Hi,

yes x2Go is great, BUT it works only with older KDE or GNOME Versions!

OR you use MATE https://mate-desktop.org --> There x2Go are fully supported (because of its based on GNOME-2).

Thomas.

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: need assistance in configuring vnc server

Post by hunter86_bg » 2017/09/21 14:13:53

Have you tried the following guide?

mcajina274
Posts: 1
Joined: 2017/10/03 16:04:51

Re: need assistance in configuring vnc server

Post by mcajina274 » 2017/10/03 17:36:50

hunter86_bg wrote:Have you tried the following guide?
@hunter86_bg: I think there have been some changes in the way that the .service file is configured since that guide was first published. I'm also a little confused setting up the latest tigervnc-server (1.8.0-1.el7) on CentOS 7.3 (and 7.4 now).

Even though I've followed the guide (and my notes from a previous installation), I keep getting an error when I run the command:
systemctl start vncserver@:1.service

I'm not sure what I'm doing wrong based on the output of the error:

Code: Select all

[root@testlab ~]# systemctl status vncserver@:1.service -l
● vncserver@:1.service - Remote desktop service (VNC)
   Loaded: loaded (/etc/systemd/system/vncserver@:1.service; enabled; vendor preset: disabled)
   Active: failed (Result: timeout) since Tue 2017-10-03 10:52:19 CDT; 1h 17min ago
  Process: 1365 ExecStart=/usr/bin/vncserver %i -geometry 1920x1080 (code=exited, status=0/SUCCESS)
  Process: 1336 ExecStartPre=/usr/bin/vncserver -kill %i (code=exited, status=0/SUCCESS)

Oct 03 10:52:16 testlab systemd[1]: vncserver@:1.service start operation timed out. Terminating.
Oct 03 10:52:16 testlab gnome-settings-[2133]: gnome-settings-daemon: Fatal IO error 11 (Resource temporarily unavailable) on X server :1.
Oct 03 10:52:16 testlab tracker-miner-fs.desktop[2209]: Received signal:15->'Terminated'
Oct 03 10:52:16 testlab tracker-extract.desktop[2200]: Received signal:15->'Terminated'
Oct 03 10:52:16 testlab tracker-miner-apps.desktop[2208]: Received signal:15->'Terminated'
Oct 03 10:52:16 testlab tracker-miner-apps.desktop[2208]: OK
Oct 03 10:52:16 testlab tracker-miner-fs.desktop[2209]: OK
Oct 03 10:52:19 testlab systemd[1]: Failed to start Remote desktop service (VNC).
Oct 03 10:52:19 testlab systemd[1]: Unit vncserver@:1.service entered failed state.
Oct 03 10:52:19 testlab systemd[1]: vncserver@:1.service failed.
You have new mail in /var/spool/mail/root
[root@testlab ~]# 
I ended up just doing the very minor editing of the "vncserver@:1.service" file as shown in the "Quick HowTo" section in the file itself. It seems to be running if I just run the "vncserver" command, but I can't get it to load automatically at boot.

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: need assistance in configuring vnc server

Post by hunter86_bg » 2017/10/04 11:27:19

I've just followed the guide and it seems to be working.
1.Create the systemd.service:

Code: Select all

cp /usr/lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@.service
2.Edit to match your needs(replace the user on 2 places):

Code: Select all

vim /etc/systemd/system/vncserver@.service
This is my version:
[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target
[Service]
Type=forking
User=real_linux_user
ExecStartPre=-/usr/bin/vncserver -kill %i
ExecStart=/usr/bin/vncserver %i -localhost -geometry 1280x1024
PIDFile=/home/real_linux_user/.vnc/%H%i.pid
ExecStop=-/usr/bin/vncserver -kill %i
[Install]
WantedBy=multi-user.target
Note: I'm using "-localhost" as I'm using ssh for tunnelling the connection.

3.Create password for the user (use "su - username" prior that)
# su - USER
~]$ vncpasswd
4.Enable and start the service:

Code: Select all

systemctl daemon-reload && systemctl enable -now  vncserver@\:1.service
5.Use ssh tunnel to establish the connection.

Edit: Fixed a typo.It seems that I have some issues with gnome (missing menus ,etc) and tigervnc... I just assume it's a bug.

ahitch
Posts: 13
Joined: 2017/10/01 18:09:10

Re: need assistance in configuring vnc server

Post by ahitch » 2017/10/08 19:37:38

Out of curiosity, I'm wondering how many people set up VNC for multi-user, and how many set it up just for single person administrative access (as I do)....

The reason I ask is this: With all the changes that happen in X11, gdm, kdm, sddm, god-knows-what-else-m, there never seems to be a consistent reliable way to get VNC server going....

I've resorted to a simple bash script running the command line for password and configuration files, etc, for whatever flavor of VNC fits the bill (admittedly, usually x11vnc), attaching to display:0, then, every 5 minutes or so, the script is re-run through a cron job as root to test for the daemon running, and if not, start the service on display:0 again....

I know it ain't pretty..... but I don't have to worry about the timing of displays being available, or X11 taking a little longer and VNCServer locking up... (and it even shows the graphical logon screen....)

Basically.... if all one is looking for is a way in for administration, what's a good reason NOT to do it this way?

Thanks!

Post Reply