Gnome screen sharing doesn't work through xinetd

Go to yast → network services → remote administration (vnc) and enable 'Allow Remote Administration’
then reboot your machine.

Normally now, xinetd should use 5801 (for browser) and 5901 (for vncviewer)


linux-6rmg:~ # lsof -i:5801
COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
xinetd  1678 root    6u  IPv4  20892      0t0  TCP *:5801 (LISTEN)

linux-6rmg:~ # lsof -i:5901
COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
xinetd  1678 root    5u  IPv4  20891      0t0  TCP *:5901 (LISTEN)


indeed it seems to be working. So perform the following tests:

Scenario 1: Try with firefox
---------------------------------

Open Firefox, go to localhost:5801
A Java application will start loading and then I usually end up with an error saying : TigerVNC Viewer Error - No matching security types

I think this is a bug.

**
Second scenario: Try with vncviewer
--------------------------------------------**
open a terminal and type:

vncviewer localhost:5901

a new window opens with gdm and everything seems to be ok. But, as soon as I login, the screen (of the window – not my main screen) turns blank, but I see the cursor. So, the X server is running, but gnome desktop fails.

this seems like another bug.

Third Scenario: Enable screen sharing in Gnome
--------------------------------------------------------

When I am trying to enable the screen-sharing for gnome

gnome-control-center sharing

There you will see three options:

  • Personal FIle Sharing : OFF
  • Screen Sharing: OFF
  • Remote Login: ON

No matter what, I cannot switch the Screen Sharing into ‘ON’. Why is that?
I also tried to do it via the dconf-editor way through: org.gnome.desktop.remote-access but nothing changed.

Are you also affected by these problems?

Digging a bit deeper with the Scenario 1 using Firefox:

From the systemctl logs:


xinetd.service - Xinetd A Powerful Replacement For Inetd
   Loaded: loaded (/usr/lib/systemd/system/xinetd.service; enabled)
   Active: active (running) since Sun 2016-02-14 00:07:47 CET; 22min ago
 Main PID: 6436 (xinetd)
   CGroup: /system.slice/xinetd.service
           ├─6436 /usr/sbin/xinetd -stayalive -dontfork
           └─7738 Xvnc -noreset -inetd -once -query localhost -geometry 1024x768 -x509key /etc/vnc/tls.key -x509cert /etc/vnc/tls.cert -log *:syslog:30** -securitytypes** none

and


Feb 14 00:53:50 linux-6rmg xinetd[6436]: EXIT: vnchttpd1 status=0 duration=0(sec)
Feb 14 00:53:52 linux-6rmg xinetd[6436]: START: vnc1 from=127.0.0.1
Feb 14 00:53:52 linux-6rmg Xvnc[9496]: vncext: VNC extension running!
Feb 14 00:53:52 linux-6rmg Xvnc[9496]: vncext: created VNC server for screen 0
Feb 14 00:53:52 linux-6rmg Xvnc[9496]: Connections: accepted: 127.0.0.1::44187
Feb 14 00:53:52 linux-6rmg Xvnc[9496]: vncext: added inetd sock
Feb 14 00:53:52 linux-6rmg Xvnc[9496]: SConnection: Client needs protocol version 3.8

Checking what’s going on at TCP 44187 port


# lsof -i:44187
COMMAND  PID  USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
java    9285 panos   33u  IPv6  61645      0t0  TCP localhost:44187->localhost:5901 (ESTABLISHED)
Xvnc    9496   vnc    3u  IPv4  61648      0t0  TCP localhost:5901->localhost:44187 (ESTABLISHED)

Checking the strace of Xnvc:


linux-6rmg:/etc/xinetd.d # strace -p 9496
Process 9496 attached
select(256, [0 1 3 4 5 6 7 9 10 11 12 13 14 15 16], NULL, NULL, {77, 972017}

) = 1 (in [15], left {69, 385191})
setitimer(ITIMER_REAL, {it_interval={0, 5000}, it_value={0, 5000}}, NULL) = 0
recvmsg(15, {msg_name(0)=NULL, msg_iov(1)={"H\2\217\21\16\0\340\0\21\0\340\0C\0C\0Q\1L\1\0\30\0\0\0\0\0\377\0\0\0\377"..., 78648}], msg_controllen=0, msg_flags=0}, 0) = 17980
**recvmsg(15, 0x7fffabb19d80, 0)          = -1 EAGAIN (Resource temporarily unavailable)**
setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0
select(256, [0 1 3 4 5 6 7 9 10 11 12 13 14 15 16], NULL, NULL, {69, 385000}) = 1 (in [12], left {59, 2289})
setitimer(ITIMER_REAL, {it_interval={0, 5000}, it_value={0, 5000}}, NULL) = 0
recvmsg(12, {msg_name(0)=NULL, msg_iov(1)={"l\0\1\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 4
writev(12, {"\1\0\343\0\0\0\0\0\0\0\0\0\1\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 32}], 1) = 32
**recvmsg(12, 0x7fffabb19d80, 0)          = -1 EAGAIN (Resource temporarily unavailable)**
setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0
select(256, [0 1 3 4 5 6 7 9 10 11 12 13 14 15 16], NULL, NULL, {59, 2000}) = 1 (in [15], left {53, 265023})
setitimer(ITIMER_REAL, {it_interval={0, 5000}, it_value={0, 5000}}, NULL) = 0
recvmsg(15, {msg_name(0)=NULL, msg_iov(1)={"H\2\206L\16\0\340\0\21\0\340\0\20\1H\0w\1:\1\0\30\0\0\0\0\0\377\0\0\0\377"..., 78648}], msg_controllen=0, msg_flags=0}, 0) = 78360
**recvmsg(15, 0x7fffabb19d80, 0)          = -1 EAGAIN (Resource temporarily unavailable)**
setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0
select(256, [0 1 3 4 5 6 7 9 10 11 12 13 14 15 16], NULL, NULL, {53, 264000}^CProcess 9496 detached
 <detached ...>

Notice the ‘Resource temporarily unavailable’. Dunno if this is related though …

and the journalctl says:


Feb 14 01:03:10 linux-6rmg org.gnome.ControlCenter.SearchProvider[1909]: ** (process:10695): WARNING **: Ignoring broken panel ca.desrt.dconf-editor (missing desktop file)
Feb 14 01:03:10 linux-6rmg org.gnome.ControlCenter.SearchProvider[1909]: ** (process:10695): WARNING **: Ignoring broken panel gpk-prefs (missing desktop file)
Feb 14 01:03:10 linux-6rmg org.gnome.ControlCenter.SearchProvider[1909]: ** (process:10695): WARNING **: Ignoring broken panel tracker-preferences (missing desktop file)
Feb 14 01:03:10 linux-6rmg org.gnome.ControlCenter.SearchProvider[1909]: ** (process:10695): WARNING **: Ignoring broken panel itweb-settings (missing desktop file)
Feb 14 01:03:10 linux-6rmg org.gnome.ControlCenter.SearchProvider[1909]: ** (process:10695): WARNING **: Ignoring broken panel gnome-tweak-tool (missing desktop file)
Feb 14 01:03:10 linux-6rmg org.gnome.ControlCenter.SearchProvider[1909]: ** (process:10695): WARNING **: Ignoring broken panel YaST (missing desktop file)
Feb 14 01:03:10 linux-6rmg org.gnome.Bijiben.SearchProvider[1909]: (bijiben-shell-search-provider:10707): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Feb 14 01:03:10 linux-6rmg org.gnome.Documents[1909]: Gjs-Message: JS LOG: Can't find a valid getting started PDF document
Feb 14 01:03:10 linux-6rmg dbus[912]: [system] Activating via systemd: service name='org.freedesktop.PackageKit' unit='packagekit.service'
Feb 14 01:03:10 linux-6rmg PackageKit[10778]: daemon start
Feb 14 01:03:10 linux-6rmg dbus[912]: [system] Successfully activated service 'org.freedesktop.PackageKit'
Feb 14 01:03:11 linux-6rmg PackageKit[10778]: resolve transaction /1_cbeceaca from uid 1000 finished with success after 376ms
Feb 14 01:03:11 linux-6rmg PackageKit[10778]: get-details transaction /2_aacabeaa from uid 1000 finished with success after 2ms
Feb 14 01:03:11 linux-6rmg PackageKit[10778]: get-details transaction /3_eaebbadc from uid 1000 finished with success after 3ms
Feb 14 01:03:13 linux-6rmg dbus[912]: [system] Activating service name='org.opensuse.Snapper' (using servicehelper)
Feb 14 01:03:13 linux-6rmg dbus[912]: [system] Successfully activated service 'org.opensuse.Snapper'
Feb 14 01:03:13 linux-6rmg **YaST2-messages.desktop[10788]: No permissions.**
Feb 14 01:03:13 linux-6rmg YaST2-messages.desktop[10788]: pci id for fd 18: 80ee:beef, driver (null)
Feb 14 01:03:13 linux-6rmg **YaST2-messages.desktop[10788]: libGL error: core dri or dri2 extension not foun**d
Feb 14 01:03:13 linux-6rmg **YaST2-messages.desktop[10788]: libGL error: failed to load driver: vboxvideo**
Feb 14 01:03:27 linux-6rmg** YaST2-messages.desktop[10788]: Invalid snapshot ''.**
Feb 14 01:03:31 linux-6rmg PackageKit[10778]: daemon quit
Feb 14 01:03:31 linux-6rmg packagekitd[10778]: (packagekitd:10778): GLib-CRITICAL **: Source ID 6 was not found when attempting to remove it

I would like to mention here that this is an openSUSE Leap installation inside of virtualbox.

also from the configuration, everything seems to be normal:



service vnchttpd1
{
        socket_type     = stream
        protocol        = tcp
        wait            = no
        user            = vnc
        server          = /usr/bin/vnc_inetd_httpd
        server_args     = 1024 768 5901 -securitytypes none
        type            = UNLISTED
        port            = 5801
}



Notice that systemctl start xinetd starts with the option ‘-secuitytypes none’. Also, checking the audit**.log** at the same time:


type=USER_AUTH msg=audit(1455407341.622:412): pid=9351 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:authentication acct="gdm" exe="/usr/lib/gdm/gdm-session-worker" hostname=::1 addr=::1 terminal=? res=success'
type=USER_ACCT msg=audit(1455407341.622:413): pid=9351 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:accounting acct="gdm" exe="/usr/lib/gdm/gdm-session-worker" hostname=::1 addr=::1 terminal=? res=success'
type=CRED_ACQ msg=audit(1455407341.622:414): pid=9351 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:setcred acct="gdm" exe="/usr/lib/gdm/gdm-session-worker" hostname=::1 addr=::1 terminal=? res=success'
type=USER_START msg=audit(1455407341.642:415): pid=9351 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:session_open acct="gdm" exe="/usr/lib/gdm/gdm-session-worker" hostname=::1 addr=::1 terminal=::1:1 res=success'

The java plugin version that I am using is the openjdk 1.8

/usr/lib64/firefox/plugin-container /usr/lib64/java-1_8_0-openjdk-plugin/lib/IcedTeaPlugin.so -greomni /usr/lib64/firefox/omni.ja -appomni /usr/lib64/firefox/browser/omni.ja -appdir /usr/lib64/firefox/browser

Sorry for posting third post in a row but:

  • I can’t edit my first post at all
  • I can’t edit my second post because there’s a deadline about 10 minutes.

So, here some finding about the Scenario 2. I tried again using vncviewer but this time I replaced the windowmanager from ‘gnome’ to ‘icewm’ and it worked like a charm

http://i.imgur.com/miGpjic.png

So I guess I have to file a bug a against gnome. But before I do, can somebody re-confirm this problem?
Also, if you have any ideas about how to provide even more helpful information about this bug, it would be great. Gnome is not my thing … I am more of a terminal guy who hates windowmanagers :stuck_out_tongue:
Scenario 1 and 3, are still not resolved… :frowning:

Ha, I found the the problem with Scenario 1

If you browser with firefox at localhost:5801 and then open the Web Inspector you will something like this:

http://i.imgur.com/z7OWfEs.png

Notice the line:


<embed type="application/x-java-applet;version=1.6" code="com.tigervnc.vncviewer.VncViewer" archive="VncViewer.jar" port="5901" embed="true" alwaysshowserverdialog="false" **securitytypes="X509None"** x509autoaccept="1E:DF:34:55:50:F1:B3:A1:AA:61:09:B9:D7:C7:6F:09:5F:C7:E1:C7" width="1024" height="768">

but from /etc/xinetd.d/vnc we have:


service vnchttpd1
{
        socket_type     = stream
        protocol        = tcp
        wait            = no
        user            = vnc
        server          = /usr/bin/vnc_inetd_httpd
        server_args     = 1024 768 5901 **-securitytypes none**
        type            = UNLISTED
        port            = 5801
}


So the error that I am getting is correct because we have the following scenario:

Server sends: none
Client accepts: X509None

Becuae I have no idea how to change the client settings, I’ve just changed the servers into that:

# default: off
# description: This serves out a VNC connection which starts at a KDM login \
#       prompt. This VNC connection has a resolution of 1024x768, 16bit depth.
service vnc1
{
        socket_type     = stream
        protocol        = tcp
        wait            = no
        user            = vnc
        server          = /usr/bin/Xvnc
        server_args     = -noreset -inetd -once -query localhost -geometry 1024x768 -x509key /etc/vnc/tls.key -x509cert /etc/vnc/tls.cert -log *:syslog:30 **-securitytypes X509None**
        type            = UNLISTED
        port            = 5901
}


Then it works :slight_smile:

http://i.imgur.com/UFNQR3b.png

I’ve tested it both with ‘xdm’ and ‘gdm’ displaymanagers. However, when I loggin into gnome windowmanager, it crashes. I have to check the logs and see why this is happening…

It’s kind funny of talking myself, but I cannot edit the previous posts…

well there’s some logs about the Gnome crash:


Feb 14 03:39:07 linux-6rmg gnome-session[2576]: g_dbus_connection_real_closed: Remote peer vanished with error: Underlying GIOStream returned 0 bytes on an async read (g-io-error-quark, 0). Exiting.
Feb 14 03:39:07 linux-6rmg gnome-session[2576]: WARNING: Lost name on bus: org.gnome.SessionManager
Feb 14 03:39:07 linux-6rmg gnome-session[2576]: gnome-session[2576]: WARNING: Lost name on bus: org.gnome.SessionManager
Feb 14 03:39:07 linux-6rmg gnome-session[2709]: gnome-keyring-daemon: insufficient process capabilities, unsecure memory might get used
Feb 14 03:39:07 linux-6rmg gnome-session[2709]: gnome-keyring-daemon: insufficient process capabilities, unsecure memory might get used
Feb 14 03:39:07 linux-6rmg gnome-session[2709]: gnome-keyring-daemon: insufficient process capabilities, unsecure memory might get used
Feb 14 03:39:07 linux-6rmg gnome-session[2709]: gnome-keyring-daemon: insufficient process capabilities, unsecure memory might get used
Feb 14 03:39:07 linux-6rmg gnome-session[2709]: CRITICAL: gsm_manager_set_phase: assertion 'GSM_IS_MANAGER (manager)' failed
Feb 14 03:39:07 linux-6rmg gnome-session[2709]: gnome-session[2709]: CRITICAL: gsm_manager_set_phase: assertion 'GSM_IS_MANAGER (manager)' failed


Feb 14 03:42:13 linux-6rmg gnome-session[2939]: gnome-session-is-accelerated: llvmpipe detected.
Feb 14 03:42:13 linux-6rmg gnome-session[2939]: (gnome-settings-daemon:2979): media-keys-plugin-WARNING **: Unable to inhibit keypresses: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Permission denied
Feb 14 03:42:14 linux-6rmg gnome-session[2939]: Gjs-Message: JS LOG: Failed to launch ibus-daemon: Failed to execute child process "ibus-daemon" (No such file or directory)
Feb 14 03:42:14 linux-6rmg gnome-session[2939]: (gnome-settings-daemon:2979): color-plugin-WARNING **: failed to get edid: unable to get EDID for output
Feb 14 03:42:14 linux-6rmg gnome-session[2939]: (gnome-settings-daemon:2979): color-plugin-WARNING **: failed to create device: failed to obtain org.freedesktop.color-manager.create-device auth
Feb 14 03:42:21 linux-6rmg gnome-session[2939]: (gnome-settings-daemon:2979): GLib-GIO-WARNING **: Error releasing name org.gnome.SettingsDaemon: The connection is closed
Feb 14 03:42:21 linux-6rmg gnome-session[2939]: (gnome-settings-daemon:2979): GLib-GIO-WARNING **: Invalid id 4 passed to g_bus_unown_name()
Feb 14 03:42:21 linux-6rmg gnome-session[2939]: WARNING: Lost name on bus: org.gnome.SessionManager
Feb 14 03:42:21 linux-6rmg gnome-session[2939]: gnome-session[2939]: WARNING: Lost name on bus: org.gnome.SessionManager
Feb 14 03:42:21 linux-6rmg gnome-session[3075]: No protocol specified
Feb 14 03:42:21 linux-6rmg gnome-session[3075]: ** (gnome-session-check-accelerated:3164): WARNING **: Could not open X display
Feb 14 03:42:21 linux-6rmg gnome-session[3075]: No protocol specified
Feb 14 03:42:21 linux-6rmg gnome-session[3075]: Unable to init server: Could not connect: Connection refused
Feb 14 03:42:21 linux-6rmg gnome-session[3075]: (gnome-session-check-accelerated:3164): Gtk-WARNING **: cannot open display: ::1:1
Feb 14 03:42:21 linux-6rmg gnome-session[3075]: No protocol specified
Feb 14 03:42:21 linux-6rmg gnome-session[3075]: ** (gnome-session-check-accelerated:3165): WARNING **: Could not open X display
Feb 14 03:42:21 linux-6rmg gnome-session[3075]: No protocol specified
Feb 14 03:42:21 linux-6rmg gnome-session[3075]: Unable to init server: Could not connect: Connection refused
Feb 14 03:42:21 linux-6rmg gnome-session[3075]: (gnome-session-check-accelerated:3165): Gtk-WARNING **: cannot open display: ::1:1
Feb 14 03:42:21 linux-6rmg gnome-session[3075]: WARNING: software acceleration check failed: Child process exited with code 1
Feb 14 03:42:21 linux-6rmg gnome-session[3075]: gnome-session[3075]: WARNING: software acceleration check failed: Child process exited with code 1
Feb 14 03:42:21 linux-6rmg gnome-session[3075]: No protocol specified


See you tomorrow, I am quite sleepy atm :confused: I don’t know if this is a regression from https://bugzilla.opensuse.org/show_bug.cgi?id=931314
I have to remove the patch and try again.

For enable a Screen Sharing you need to switch to the network manager in yast2-network module. As a result of this the Screen Sharing switch becomes available and you can choice connections which you need use for VNC. Vino server will be used for remote screen sharing, and this worked fine, but it is available only if you have locally logged to the X session, not worked on login screen. I could not find a way to remotely log in through the VNC. Inetd vnc services gave me a black screen…