tigervnc - behavior weird

General support questions
steven.foo@idt.com
Posts: 5
Joined: 2017/11/10 07:39:58

tigervnc - behavior weird

Post by steven.foo@idt.com » 2017/11/10 07:48:20

Hi,

We have just install tiger vncserver on our centos 7 server.

When we start the vncserver session using the user "admin" and use vnc viewer to access it, the VNC GUI screen comes out nicely.

However when we configure to start with systemctl the VNC GUI is missing the top menu and background is blank.

I am attaching here the VNC GUI screen capture that have the issue.

My setting for /etc/systemd/system/vncserver@:1.service

Any ideas?

[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target

[Service]
Type=forking
User=admin

# Clean any existing files in /tmp/.X11-unix environment
ExecStartPre=-/usr/bin/vncserver -kill %i
ExecStart=/usr/bin/vncserver %i
PIDFile=/home/admin/.vnc/%H%i.pid
ExecStop=-/usr/bin/vncserver -kill %i

[Install]
WantedBy=multi-user.target
Attachments
vncgui.jpg
vncgui.jpg (72.57 KiB) Viewed 6333 times

briansrls
Posts: 5
Joined: 2017/11/07 17:13:11

Re: tigervnc - behavior weird

Post by briansrls » 2017/11/10 16:38:13

Hey, I just wanted to show you that I had the same issue here: viewtopic.php?f=47&t=64949&p=273150#p273150

Could you please list what versions of Centos (7.3, 7.X) you are trying to use, and also what version of tigervnc you are using? To find the tigervnc version you may want to use yum list and grep for installed packages.

Also, let me know what vncviewer you are using. I used a few (tigervnc vncviewer, tightvnc viewer) and had the same results. I'm sure this is an issue with the server configuration.

I have issues using centos 7.4 and tigervnc 1.8. I'm wondering what we have in common that's causing the issue.

steven.foo@idt.com
Posts: 5
Joined: 2017/11/10 07:39:58

Re: tigervnc - behavior weird

Post by steven.foo@idt.com » 2017/11/11 00:53:23

Hi,

Below are the information.

[root@PENLNXTEST2 ~]# rpm -qa | grep tiger
tigervnc-license-1.8.0-1.el7.noarch
tigervnc-server-minimal-1.8.0-1.el7.x86_64
tigervnc-server-1.8.0-1.el7.x86_64

[root@PENLNXTEST2 ~]# more /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)

Using TigerVnc viewer.

lutongwang
Posts: 1
Joined: 2017/11/13 10:05:52

Re: tigervnc - behavior weird

Post by lutongwang » 2017/11/13 10:15:51

I have the same problem.

My configuration is nfs home directory and NIS (yp) enabled. Proper SELinux Boolean (use_nfs_home_dirs) are set to allow nfs home dirs.

The problem exists for both local and remote (vncserver).
For local display, gdm goes black and bounces back to login screen for all NIS users, only root can go into the desktop.
For remote desktop through vncserver, only systemctl start vncserver@:1.service will work, and results in black background with no menu bar, and no status bar. A direct start of vncserver from user account will result in vnc with all black screen with a mouse cursor.

The problem can be reproduced on multiple fresh installed centos 7.4 machines right after nfs and nis are setup.

I have tried that
local user + nfs home is normal
nis user + local home is normal

So only NIS user with nfs home dir cause the problem. Could someone help me get through this issue?

Thank you.

briansrls
Posts: 5
Joined: 2017/11/07 17:13:11

Re: tigervnc - behavior weird

Post by briansrls » 2017/11/14 18:04:37

I was able to mess around with this a bit today, and my hunch is that something is not being initialized correctly. I found this post https://askubuntu.com/questions/453490/ ... tion-error and added mutter --replace to my ~/.vnc/xstartup file. I found that I still don't have the top start bar, but I can start gnome-terminal by right clicking and selecting "open terminal". Using mutter my windows behave more normally and I can actually close out and put them in the foreground/background. This is not a fix but may give a clue as to what is going wrong.

Here is my complete ~/.vnc/xstartup file.

Code: Select all

#!/bin/sh

unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
exec mutter --replace &
exec /etc/X11/xinit/xinitrc

briansrls
Posts: 5
Joined: 2017/11/07 17:13:11

Re: tigervnc - behavior weird

Post by briansrls » 2017/12/05 03:57:01

For anyone still searching, I recommend installing XRDP to access your desktop remotely. Follow this guide to install:http://www.itzgeek.com/how-tos/linux/ce ... hel-7.html

Rudy
Posts: 5
Joined: 2013/03/05 09:05:06

Re: tigervnc - behavior weird

Post by Rudy » 2018/01/20 11:54:08

The error is related to an incorrect template file. The instructions in RHEL Administrator's Guide tell to copy /usr/lib/systemd/system/vncserver@.service as a starting point for the server configuration. This file does not set the right user for running the server, however.

Simply replace the lines

Code: Select all

ExecStartPre=-/usr/bin/vncserver -kill %i
ExecStart=/usr/bin/vncserver %i
PIDFile=/home/<USER>/.vnc/%H%i.pid
ExecStop=-/usr/bin/vncserver -kill %i
with

Code: Select all

ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/usr/sbin/runuser -l <USER> -c "/usr/bin/vncserver %i -geometry 1920x1080"
PIDFile=/home/<USER>/.vnc/%H%i.pid
ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
And all should be well. As a bonus, the modified config file sets the default resolution when starting a session.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: tigervnc - behavior weird

Post by TrevorH » 2018/01/20 14:15:26

Or just add PAMName=login to the existing file just below the line that currently says User=
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Gabsy
Posts: 3
Joined: 2018/02/15 16:02:49

Re: tigervnc - behavior weird

Post by Gabsy » 2018/02/15 17:51:47

Mostly new at Linux, new at Centos 7. I have the same problem as the OP. I tried these suggestions but it didn't worked.

When using this modification to the service file

ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/usr/sbin/runuser -l <USER> -c "/usr/bin/vncserver %i -geometry 1920x1080"
PIDFile=/home/<USER>/.vnc/%H%i.pid
ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'

I get this error runuser: may not be used by non-root users.


Instead, using this

PAMName=login - I get an SELinux error.


After searching and reading, I can't find any way to fix the problems. Help is appreciated.

I am curious, has either of these modifications fixed the issue for the original OP?

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: tigervnc - behavior weird

Post by TrevorH » 2018/02/15 18:08:02

PAMName=login - I get an SELinux error.
Where? What error?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply