I want vncserver to run Xfce

I want vncserver to run Xfce

Postby hviaene » Oct 15th, '18, 15:03

Situation:
Desktop PC running Plasma most of the time, but Xfce is also installed. This PC runs vncserver. /etc/sysconfig/vncservers has line:
Code: Select all
VNCSERVERS="1:<user>"
/home/<user>/.vnc has config file all defaults.
When vncserver is started, I get in the /home/<user>/.vnc/ log file:
KCrash: Attempting to start /usr/bin/plasmashell from kdeinit
KCrash: Application 'plasmashell' crashing...

Subsequently running tigervncviewer from laptop, I can connect to the desktop, but in the viewer window I get the message that plasma cannot connect/use Opengl2 - which seems a known issue.
Anyway, what I really want is in the vnc window to run Xfce, not plasma.
Trying to get there I have my /home/<user>/.vnc/xstartup file:
Code: Select all
#!/bin/sh

unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
exec /etc/X11/xinit/xinitrc
xfce-session &


but that has no effect, i just keep getting a black screen on the laptop tigervncviewer. I guess putting the xfce call in the xstartup file is too little too late, since the call and crash of plasma happens already at the start of the vncserver.
What am I missing ????
hviaene
 
Posts: 78
Joined: Oct 11th, '13, 10:41

Re: I want vncserver to run Xfce

Postby wintpe » Oct 15th, '18, 23:49

not looked into what you are doing to much so please excuse me if ive got the wrong end of the stick.

but i think when you start xfce , which is a window manager it needs to have a display device to start on.

but if you are using the display with your plasma session X11 wont start for xfce to display on.

instead change the config of the x11 start up so it uses the non device based xdisplay.

to do this lookup about x11-server-xvfb

this allows a background non device based X11 session to start, you can then display any window manager on that that works for you.

and then setup vnc to connect to it, so that you can have multiple rdp like sessions on one machine

theres more about this here

https://en.wikipedia.org/wiki/Xvfb

regards peter
Redhat 6 Certified Engineer (RHCE)
Sometimes my posts will sound short, or snappy, however its realy not my intention to offend, so accept my apologies in advance.
wintpe
 
Posts: 1188
Joined: May 22nd, '11, 17:08
Location: Rayleigh,, Essex , UK

Re: I want vncserver to run Xfce

Postby hviaene » Oct 16th, '18, 16:23

More info:
I rebooted and choose Xfce as desktop, but I still get following errors in the vnc log at the start of vncserver.
Code: Select all
startkde: Starting up...
2018-10-16T16:02:58 Checking update-file '/usr/share/kconf_update/akregator.upd' for new updates
2018-10-16T16:02:58 Checking update-file '/usr/share/kconf_update/disable_kmix.upd' for new updates
2018-10-16T16:02:58 Checking update-file '/usr/share/kconf_update/fonts_akregator.upd' for new updates
2018-10-16T16:02:58 Checking update-file '/usr/share/kconf_update/fonts_global.upd' for new updates
2018-10-16T16:02:58 Checking update-file '/usr/share/kconf_update/fonts_global_toolbar.upd' for new updates
2018-10-16T16:02:58 Checking update-file '/usr/share/kconf_update/fonts_kate.upd' for new updates
2018-10-16T16:02:58 Checking update-file '/usr/share/kconf_update/gtkbreeze5.5.upd' for new updates
2018-10-16T16:02:58 gtkbreeze5.5.upd: Found new update 'GTKBreeze5.5'
2018-10-16T16:02:58 gtkbreeze5.5.upd:3:'Script=gtkbreeze5.5': Script 'gtkbreeze5.5' not found
2018-10-16T16:02:58 Checking update-file '/usr/share/kconf_update/importwizard.upd' for new updates
2018-10-16T16:02:58 Checking update-file '/usr/share/kconf_update/kaddressbook.upd' for new updates
2018-10-16T16:02:58 Checking update-file '/usr/share/kconf_update/kalarm.upd' for new updates
2018-10-16T16:02:58 Checking update-file '/usr/share/kconf_update/kcalcrc.upd' for new updates
2018-10-16T16:02:58 Checking update-file '/usr/share/kconf_update/kde4breeze.upd' for new updates
2018-10-16T16:02:58 kde4breeze.upd: Found new update '5.0KDE4Breeze_2'
2018-10-16T16:02:58 kde4breeze.upd:3:'Script=kde4breeze': Script 'kde4breeze' not found
2018-10-16T16:02:58 Checking update-file '/usr/share/kconf_update/kgthemeprovider-migration.upd' for new updates
2018-10-16T16:02:58 Checking update-file '/usr/share/kconf_update/kleopatra.upd' for new updates
2018-10-16T16:02:58 Checking update-file '/usr/share/kconf_update/kmail.upd' for new updates
2018-10-16T16:02:58 Checking update-file '/usr/share/kconf_update/kmail2.upd' for new updates
2018-10-16T16:02:58 Checking update-file '/usr/share/kconf_update/knotes.upd' for new updates
2018-10-16T16:02:58 Checking update-file '/usr/share/kconf_update/kontact.upd' for new updates
2018-10-16T16:02:58 Checking update-file '/usr/share/kconf_update/konversation.upd' for new updates
2018-10-16T16:02:58 Checking update-file '/usr/share/kconf_update/korganizer.upd' for new updates
2018-10-16T16:02:58 Checking update-file '/usr/share/kconf_update/krdb_libpathwipe.upd' for new updates
2018-10-16T16:02:58 krdb_libpathwipe.upd: Found new update 'LibraryPathWipeOut'
2018-10-16T16:02:58 krdb_libpathwipe.upd:3:'Script=krdb_clearlibrarypath': Script 'krdb_clearlibrarypath' not found
2018-10-16T16:02:58 Checking update-file '/usr/share/kconf_update/krunnerplugins.upd' for new updates
2018-10-16T16:02:58 krunnerplugins.upd: Found new update '5.9KRunnerPlugins'
2018-10-16T16:02:58 krunnerplugins.upd:3:'Script=krunnerplugins': Script 'krunnerplugins' not found
2018-10-16T16:02:58 Checking update-file '/usr/share/kconf_update/kscreenlocker.upd' for new updates
2018-10-16T16:02:58 Checking update-file '/usr/share/kconf_update/messageviewer.upd' for new updates
2018-10-16T16:02:58 Checking update-file '/usr/share/kconf_update/okular.upd' for new updates
2018-10-16T16:02:58 Checking update-file '/usr/share/kconf_update/pimsettingexporter.upd' for new updates
2018-10-16T16:02:58 Checking update-file '/usr/share/kconf_update/webengineurlinterceptoradblock.upd' for new updates
Cannot find 'org.kde.KSplash.setStage' in object /KSplash at org.kde.KSplash


Why the "startkde" ????
I checked further as an example
2018-10-16T16:02:58 krdb_libpathwipe.upd:3:'Script=krdb_clearlibrarypath': Script 'krdb_clearlibrarypath' not found
and surely the script is there in /usr/lib64/kconf_update_bin. So what is going on here???
Last edited by isadora on Oct 16th, '18, 16:29, edited 1 time in total.
Reason: Placed command-output in between [CODE]-tags for better readability ;)
hviaene
 
Posts: 78
Joined: Oct 11th, '13, 10:41

Re: I want vncserver to run Xfce

Postby magfan » Jul 12th, '19, 09:12

On my system the following xstartup file works:
#!/bin/sh

# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -nowin &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
startxfce4 &
magfan
 
Posts: 285
Joined: Apr 3rd, '12, 12:33

Re: I want vncserver to run Xfce

Postby hviaene » Jul 12th, '19, 16:49

Tx, I tried that, but I sill get a black screen.
I see in the log on the vncsrever every 2 seconds:
Code: Select all
XKEYBOARD: number of keysyms per keycode 7 is greater
12/07/2019 16:43:02   than 4 and 52 keysyms are mapped above 4.
12/07/2019 16:43:02   Automatically switching to -xkb mode.
12/07/2019 16:43:02   If this makes the key mapping worse you can
12/07/2019 16:43:02   disable it with the "-noxkb" option.
12/07/2019 16:43:02   Also, remember "-remap DEAD" for accenting characters.
12/07/2019 16:43:02
12/07/2019 16:43:02 X FBPM extension not supported.
12/07/2019 16:43:02 X display is not capable of DPMS.
12/07/2019 16:43:02 --------------------------------------------------------
12/07/2019 16:43:02
12/07/2019 16:43:02 Default visual ID: 0x21
12/07/2019 16:43:02 Read initial data from X display into framebuffer.
12/07/2019 16:43:02 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/4048
12/07/2019 16:43:02
12/07/2019 16:43:02 X display :2 is 32bpp depth=24 true color
12/07/2019 16:43:02
12/07/2019 16:43:02 Unable to establish connection with systemd socket
12/07/2019 16:43:02 ListenOnTCPPort: Address already in use
12/07/2019 16:43:02 listen6: bind: Address already in use
12/07/2019 16:43:02 Not listening on IPv6 interface.
12/07/2019 16:43:02 fb read rate: 1024 MB/sec
12/07/2019 16:43:02 fast read: reset -wait  ms to: 10
12/07/2019 16:43:02 fast read: reset -defer ms to: 10
12/07/2019 16:43:02 The X server says there are 10 mouse buttons.
12/07/2019 16:43:02 Error: could not obtain listening port.
12/07/2019 16:43:02 deleted 32 tile_row polling images.


Does this mean something to you??
Last edited by isadora on Jul 12th, '19, 17:07, edited 1 time in total.
Reason: Placed command-output in between [CODE]-tags for better readability ;)
hviaene
 
Posts: 78
Joined: Oct 11th, '13, 10:41

Re: I want vncserver to run Xfce

Postby doktor5000 » Jul 14th, '19, 03:16

hviaene wrote:12/07/2019 16:43:02 Unable to establish connection with systemd socket
12/07/2019 16:43:02 ListenOnTCPPort: Address already in use
12/07/2019 16:43:02 listen6: bind: Address already in use
12/07/2019 16:43:02 Not listening on IPv6 interface.

12/07/2019 16:43:02 Error: could not obtain listening port.

Seems something is already listening on that port. As root try

Code: Select all
lsof -Pni|grep -i vnc
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 14921
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: I want vncserver to run Xfce

Postby hviaene » Jul 14th, '19, 09:25

Code: Select all
#  lsof -Pni|grep -i vnc
Xvnc      10147          herman    6u  IPv4  34548      0t0  TCP *:5902 (LISTEN)
Xvnc      10147          herman    7u  IPv6  34549      0t0  TCP *:5902 (LISTEN)
x11vnc    25504          herman    8u  IPv4  43097      0t0  TCP *:5900 (LISTEN)
x11vnc    25504          herman    9u  IPv6  43098      0t0  TCP *:5900 (LISTEN)
Last edited by isadora on Jul 14th, '19, 09:43, edited 1 time in total.
Reason: Placed command-output in between [CODE]-tags for better readability ;)
hviaene
 
Posts: 78
Joined: Oct 11th, '13, 10:41

Re: I want vncserver to run Xfce

Postby isadora » Jul 14th, '19, 09:45

hviaene. it's greatly appreciated you place command-output between [CODE][/CODE]-tags.
This makes reading messages more pleasant.
How to:
ftp://ftp5.gwdg.de/pub/linux/mandriva/m ... e_tags.ogv
..........bird from paradise..........

Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
—Antoine de Saint-Exupéry
User avatar
isadora
 
Posts: 2494
Joined: Mar 25th, '11, 16:03
Location: Amsterdam, the Netherlands

Re: I want vncserver to run Xfce

Postby magfan » Jul 15th, '19, 08:26

I have three lines added to my vncservers file:

Code: Select all
VNCSERVERS="2:mer 3:spm"
VNCSERVERARGS[2]="-geometry 1600x1200"
VNCSERVERARGS[3]="-geometry 1600x1200"


On my system the output is:
Code: Select all
# lsof -Pni|grep -i vnc
Xvnc      27643             mer    6u  IPv4  9706001      0t0  TCP *:5902 (LISTEN)
Xvnc      27643             mer    7u  IPv6  9706002      0t0  TCP *:5902 (LISTEN)
Xvnc      27643             mer    8u  IPv4  9706005      0t0  TCP *:5802 (LISTEN)
Xvnc      27643             mer    9u  IPv6  9706006      0t0  TCP *:5802 (LISTEN)
Xvnc      29949             spm    6u  IPv4  9700302      0t0  TCP *:5903 (LISTEN)
Xvnc      29949             spm    7u  IPv6  9700303      0t0  TCP *:5903 (LISTEN)
Xvnc      29949             spm    8u  IPv4  9700306      0t0  TCP *:5803 (LISTEN)
Xvnc      29949             spm    9u  IPv6  9700307      0t0  TCP *:5803 (LISTEN)
#


You can see that Xnvc is listening on port 5902 and 5802 for user mer and on port 5903 and 5803 for user spm. When I want to login as user mer I would call

Code: Select all
vncviewer [host]:2


This usually works without problem. But I can see three things in your output of lsof -Pni|grep -i vnc:
    1. On your system there are running Xvnc and x11vnc. Why?
    2. No vnc process is listening on port 580*. Are these ports blocked?
    3. No vnc process is listening on 5901/5801 what I would expect from your /etc/sysconfig/vncservers file
    VNCSERVERS="1:<user>"
magfan
 
Posts: 285
Joined: Apr 3rd, '12, 12:33

Re: I want vncserver to run Xfce

Postby hviaene » Jul 15th, '19, 09:32

@maglan:
1.I have been struggling with this vnc problem for some time on all sorts, and finally got realvnc to work correctly, that's why probably I got both Xvnc and x11vnc running.
2. ports 580* are blocked indeed. I didn't find anything that mentioned those are needed.
3. My server setting: VNCSERVERS="2:herman"
hviaene
 
Posts: 78
Joined: Oct 11th, '13, 10:41


Return to Networking

Who is online

Users browsing this forum: No registered users and 1 guest