TigerVNC on RHEL 7: how to set for non-root?

2,444 views
Skip to first unread message

Serban Tanasa

unread,
Jul 25, 2014, 12:36:20 PM7/25/14
to tigervn...@googlegroups.com
Hi everyone, 

I'm trying to setup TigerVNC to connect from Windows 7 machines to a brand new RHEL 7 server. I've been able to 
1) install tigervnc on server and clients w/ no problem
2) get "vncservice :1" to start from root w/ no problem
3) connect to GUI from the windows client, no problem

Now, I'm trying to set up access for non-root users. I'm running into the following problems
1) "systemctl start vncservice@:2" does not work. This is the path suggested on the RHEL 7 website
2) vncservice :2 from logged in as the non-root user starts the service, but when i try to connect from the client all i get is a blank screen

here is my xstartup file for the user, in /home/<user>/.vnc

unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
exec /etc/X11/xinit/xinitrc
#/usr/bin/xterm &  #  -- could not get even the terminal to start
exec gnome-session &

#vncserver

Now it might be an issue of me being unfamiliar with rhel 7 and its new paths and commands. 

localhost log:

Xvnc TigerVNC 1.2.80 - built Mar 10 2014 12:18:30
Copyright (C) 1999-2011 TigerVNC Team and many others (see README.txt)
See http://www.tigervnc.org for information on TigerVNC.
Underlying X server release 11500000, The X.Org Foundation

Initializing built-in extension Generic Event Extension
Initializing built-in extension SHAPE
Initializing built-in extension MIT-SHM
Initializing built-in extension XInputExtension
Initializing built-in extension XTEST
Initializing built-in extension BIG-REQUESTS
Initializing built-in extension SYNC
Initializing built-in extension XKEYBOARD
Initializing built-in extension XC-MISC
Initializing built-in extension XFIXES
Initializing built-in extension RENDER
Initializing built-in extension RANDR
Initializing built-in extension COMPOSITE
Initializing built-in extension DAMAGE
Initializing built-in extension MIT-SCREEN-SAVER
Initializing built-in extension DOUBLE-BUFFER
Initializing built-in extension RECORD
Initializing built-in extension DPMS
Initializing built-in extension X-Resource
Initializing built-in extension XVideo
Initializing built-in extension XVideo-MotionCompensation
Initializing built-in extension VNC-EXTENSION
Initializing built-in extension GLX

Fri Jul 25 12:13:07 2014
 vncext:      VNC extension running!
 vncext:      Listening for VNC connections on all interface(s), port 5902
 vncext:      created VNC server for screen 0

Fri Jul 25 12:13:13 2014
 Connections: accepted: 192.168.3.132::57313
 SConnection: Client needs protocol version 3.8
 SConnection: Client requests security type VncAuth(2)

Fri Jul 25 12:13:16 2014
 VNCSConnST:  Server default pixel format depth 24 (32bpp) little-endian rgb888
 VNCSConnST:  Client pixel format depth 24 (32bpp) little-endian rgb888

Fri Jul 25 12:14:09 2014
 Connections: closed: 192.168.3.132::57313 (Clean disconnection)
 SMsgWriter:  framebuffer updates 2
 SMsgWriter:    Tight rects 8, bytes 1137
 SMsgWriter:    raw bytes equivalent 9216096, compression ratio 8105.625330

Fri Jul 25 12:33:43 2014
 Connections: accepted: 192.168.3.132::57798
 SConnection: Client needs protocol version 3.8
 SConnection: Client requests security type VncAuth(2)

Fri Jul 25 12:33:46 2014
 VNCSConnST:  Server default pixel format depth 24 (32bpp) little-endian rgb888
 VNCSConnST:  Client pixel format depth 24 (32bpp) little-endian rgb888

Fri Jul 25 12:33:53 2014
 Connections: closed: 192.168.3.132::57798 (Clean disconnection)
 SMsgWriter:  framebuffer updates 2
 SMsgWriter:    Tight rects 8, bytes 1137
 SMsgWriter:    raw bytes equivalent 9216096, compression ratio 8105.625330


Thanks,
Serban

lunasil...@gmail.com

unread,
Jul 26, 2014, 12:15:56 AM7/26/14
to tigervn...@googlegroups.com
I don't remember because its been a while I do not know if this applies to Tiger VNC. I remember in x11vnc if I got blank screen(I had a terminal screen at least). I had to have the xauthority file created. I don't know tigervnc has the ability to create or even have the option. I hope it helps in your search finding your answer.

lunasil...@gmail.com

unread,
Jul 27, 2014, 12:32:19 PM7/27/14
to tigervn...@googlegroups.com
Why does your xstartup have this

unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
exec /etc/X11/xinit/xinitrc
#/usr/bin/xterm & # -- could not get even the terminal to start

exec gnome-session & # Was this part of it original file?

My Centos 7 does not have that line.

Serban Tanasa

unread,
Aug 1, 2014, 6:31:26 AM8/1/14
to tigervn...@googlegroups.com
Oh, that was meant to replace the exec /etc/X11/xinit/xinitrc since it didn't seem to start with the regular command. obviously, there should be a comment sign before it.

Pierre Ossman

unread,
Aug 18, 2014, 9:00:14 AM8/18/14
to Serban Tanasa, tigervn...@googlegroups.com
On Fri, 25 Jul 2014 09:36:20 -0700 (PDT),
Serban Tanasa wrote:

> Hi everyone,
>
> I'm trying to setup TigerVNC to connect from Windows 7 machines to a brand
> new RHEL 7 server. I've been able to
> 1) install tigervnc on server and clients w/ no problem
> 2) get "vncservice :1" to start from root w/ no problem
> 3) connect to GUI from the windows client, no problem
>

Is this with the TigerVNC that is included with RHEL, or have you built
it yourself?

I haven't tested RHEL 7 yet, but it could be worth bug reporting it to
Red Hat first if it doesn't even work with the packaging they do.
Modern desktop environments are a bit annoying to get started, so it
might require some changes to the vncserver script.

Rgds
--
Pierre Ossman Software Development
Cendio AB http://cendio.com
Teknikringen 8 http://twitter.com/ThinLinc
583 30 Linköping http://facebook.com/ThinLinc
Phone: +46-13-214600 http://plus.google.com/+CendioThinLinc

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
signature.asc

DRC

unread,
Aug 18, 2014, 10:11:44 AM8/18/14
to tigervn...@googlegroups.com
On 8/18/14 8:00 AM, Pierre Ossman wrote:
> Is this with the TigerVNC that is included with RHEL, or have you built
> it yourself?
>
> I haven't tested RHEL 7 yet, but it could be worth bug reporting it to
> Red Hat first if it doesn't even work with the packaging they do.
> Modern desktop environments are a bit annoying to get started, so it
> might require some changes to the vncserver script.

Note that RHEL 7 is shipping an alpha build of TigerVNC 1.3, so it
probably doesn't contain the latest fixes. It doesn't even pretend to
work with Gnome, because Gnome 3 now requires hardware-accelerated
OpenGL. You can add DESKTOP="KDE" to /etc/sysconfig/desktop to make the
VNC server use KDE Plasma instead, and that should work, or you can edit
~/.vnc/xstartup to start a different window manager. This is probably
unrelated to the issue at hand, but I thought I should at least mention
it, so you can make sure you're not trying to solve two problems at once.

Pierre Ossman

unread,
Aug 19, 2014, 7:40:34 AM8/19/14
to DRC, tigervn...@googlegroups.com
On Mon, 18 Aug 2014 09:11:41 -0500,
DRC wrote:

> It doesn't even pretend to work with Gnome, because Gnome 3 now
> requires hardware-accelerated OpenGL.

Gnome 3 has worked well without acceleration for some time. It's not
terribly snappy on llvmpipe, but it works.

A different DE is probably recommended, but it shouldn't be the cause
here. I would rather suspect something to do with requirements on logind
or such...
signature.asc

DRC

unread,
Aug 19, 2014, 9:06:31 AM8/19/14
to Pierre Ossman, tigervn...@googlegroups.com
On 8/19/14 6:40 AM, Pierre Ossman wrote:
> Gnome 3 has worked well without acceleration for some time. It's not
> terribly snappy on llvmpipe, but it works.

Try it on RHEL 7. You will discover that it does not in fact work with
the version of TigerVNC they are shipping, and the log complains about
lack of 3D acceleration.

Serban Tanasa

unread,
Aug 20, 2014, 8:46:13 AM8/20/14
to tigervn...@googlegroups.com, serban...@gmail.com
Got the TigerVNC from a package, we got the RHEL 7 installed on the server a month or so ago. I've been able to start it up manually with vncserver :1 and such, but ideally, I'd like the config files to assign X-sessions (or KDE sessions) to specific usernames at startup. This is where attempting to use systemctl and the config files such as  /lib/systemd/system/vncserver@:1.service to autoload fails.


Hope that helps. 

Pierre Ossman

unread,
Sep 11, 2014, 9:53:31 AM9/11/14
to Serban Tanasa, tigervn...@googlegroups.com
On Wed, 20 Aug 2014 05:46:13 -0700 (PDT),
Serban Tanasa wrote:

> Got the TigerVNC from a package, we got the RHEL 7 installed on the server
> a month or so ago. I've been able to start it up manually with vncserver :1
> and such, but ideally, I'd like the config files to assign X-sessions (or
> KDE sessions) to specific usernames at startup. This is where attempting to
> use systemctl and the config files such as
> /lib/systemd/system/vncserver@:1.service to autoload fails.
>

Have you followed the instructions here:

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/ch-TigerVNC.html

I tried that and it worked right away for me. I got a fully functional
Gnome classic desktop as a non-root user.
signature.asc

DRC

unread,
Sep 14, 2014, 12:30:14 PM9/14/14
to tigervn...@googlegroups.com
On 9/11/14, 8:53 AM, Pierre Ossman wrote:
> Have you followed the instructions here:
>
> https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/ch-TigerVNC.html
>
> I tried that and it worked right away for me. I got a fully functional
> Gnome classic desktop as a non-root user.

Really? I would love to know what we're doing differently, then,
because from Day 1, I have never been able to make TigerVNC work in RHEL
7 using the default window manager (Gnome.) It generates the attached
error screen, regardless of whether I follow Red Hat's procedure above
to the letter or whether I do it the old-fashioned way (launching
vncserver under my user account.) The log says the following:

gnome-session-check-accelerated: Helper exited with code 15
** (process:4175): WARNING **: software acceleration check failed:
Child process exited with code 1

I have to switch to KDE to make it work. The gnome-classic session is
installed on my machine. Attempting to invoke it directly using
'gnome-session --session=gnome-classic' produces the same error.
Screen Shot 2014-09-14 at 11.22.18 AM.png

DRC

unread,
Sep 14, 2014, 12:48:01 PM9/14/14
to tigervn...@googlegroups.com
On 9/14/14, 11:30 AM, DRC wrote:
> Really? I would love to know what we're doing differently, then,
> because from Day 1, I have never been able to make TigerVNC work in RHEL
> 7 using the default window manager (Gnome.) It generates the attached
> error screen, regardless of whether I follow Red Hat's procedure above
> to the letter or whether I do it the old-fashioned way (launching
> vncserver under my user account.) The log says the following:
>
> gnome-session-check-accelerated: Helper exited with code 15
> ** (process:4175): WARNING **: software acceleration check failed:
> Child process exited with code 1
>
> I have to switch to KDE to make it work. The gnome-classic session is
> installed on my machine. Attempting to invoke it directly using
> 'gnome-session --session=gnome-classic' produces the same error.

The issue I'm seeing is identical to this one:

https://bugzilla.redhat.com/show_bug.cgi?id=896648

except that, in the case of RHEL 7, there is no gnome-fallback session
available, and hence there is no workaround. There is only
gnome-classic, which seems to have the same 3D acceleration requirements.

Pierre Ossman

unread,
Sep 15, 2014, 2:43:13 AM9/15/14
to DRC, tigervn...@googlegroups.com
On Sun, 14 Sep 2014 11:30:10 -0500,
DRC wrote:

>
> Really? I would love to know what we're doing differently, then,
> because from Day 1, I have never been able to make TigerVNC work in RHEL
> 7 using the default window manager (Gnome.) It generates the attached
> error screen, regardless of whether I follow Red Hat's procedure above
> to the letter or whether I do it the old-fashioned way (launching
> vncserver under my user account.) The log says the following:
>
> gnome-session-check-accelerated: Helper exited with code 15
> ** (process:4175): WARNING **: software acceleration check failed:
> Child process exited with code 1
>

Nvidia driver installed perhaps? I don't think its (or AMD's) software
GL implementation can handle Gnome 3.
signature.asc

DRC

unread,
Sep 15, 2014, 11:31:49 AM9/15/14
to Pierre Ossman, tigervn...@googlegroups.com
On 9/15/14, 1:43 AM, Pierre Ossman wrote:
>> Really? I would love to know what we're doing differently, then,
>> because from Day 1, I have never been able to make TigerVNC work in RHEL
>> 7 using the default window manager (Gnome.) It generates the attached
>> error screen, regardless of whether I follow Red Hat's procedure above
>> to the letter or whether I do it the old-fashioned way (launching
>> vncserver under my user account.) The log says the following:
>>
>> gnome-session-check-accelerated: Helper exited with code 15
>> ** (process:4175): WARNING **: software acceleration check failed:
>> Child process exited with code 1
>>
>
> Nvidia driver installed perhaps? I don't think its (or AMD's) software
> GL implementation can handle Gnome 3.

Huh? I don't follow you. When the nVidia or AMD driver is installed,
then you aren't using a software GL implementation. But I've
experienced this same issue in standalone workstations, both with nVidia
and AMD drivers installed, and in machines that were running Mesa. I
don't follow how the graphics driver would affect this, since compiz
should be using the GLX extension in TigerVNC, which is all software.
Reply all
Reply to author
Forward
0 new messages