View previous topic :: View next topic |
Author |
Message |
uberDoward n00b
Joined: 09 Jun 2011 Posts: 46
|
Posted: Sun May 07, 2023 2:45 pm Post subject: TigerVNC is making me lose my mind. |
|
|
Did an umerge-->emerge of TigerVNC, and I can't seem to get the stupid thing to actually startxfce4 for me. Trying to start up VNC on :1, following the guide here (multiple server configuration): https://wiki.gentoo.org/wiki/TigerVNC#Multiple_Server_Configuration
For the VNC user (doward in this case)
/home/doward/.vnc/config:
Code: | ## Default settings for VNC servers started by the vncserver service
#
# Any settings given here will override the builtin defaults, but can
# also be overriden by ~/.vnc/config and vncserver-config-mandatory.
#
# See HOWTO.md and the following manpages for more details:
# vncsession(8) Xvnc(1)
#
# Several common settings are shown below. Uncomment and modify to your
# liking.
session=xfce
# securitytypes=vncauth,tlsvnc
# geometry=2000x1200
# localhost
# alwaysshared |
/home/doward/.vnc/xstartup:
Code: | #!/bin/sh
startxfce4 & |
/etc/tigervnc/vncserver.users:
Code: | # TigerVNC User assignment
#
# This file assigns users to specific VNC display numbers.
# The syntax is <display>=<username>. E.g.:
#
# :2=andrew
# :3=lisa
:1=doward |
/etc/conf.d/tigervnc:
Code: | # Config file for /etc/init.d/tigervnc
# Specify the user(s) Xvnc(1) should be run for. The syntax is: "username:display".
# example: "DISPLAYS="foo:1 bar:2" You can specify more users separated by space.
DISPLAYS="doward:1"
# Do not forget to add them to /etc/tigervnc/vncserver.users too
# Optionally override the default Xsession file
# TIGERVNC_XSESSION_FILE="/usr/share/sddm/scripts/Xsession"
# TIGERVNC_XSESSION_FILE="/etc/gdm/Xsession"
# TIGERVNC_XSESSION_FILE="/etc/lightdm/Xsession"
# TIGERVNC_XSESSION_FILE="/usr/share/slim/Xsession"
# vncsession no longer supports VNC_OPTS
# Use /etc/tigervnc/vncserver-config-defaults or $HOME/.vnc/config instead |
Then, as root, I run:
Code: | rc-service tigervnc start |
I can connect from remote to server-ip:5901, it asks for and accepts the vncpasswd I set up for my 'doward' user, but just loads up xsm, rather than xfce4.
I can't seem to find any logs, either. If I launch vncserver :1 as user 'doward', I do see the expected server:1.log file, but when I have tigervnc service in charge, I can't seem to locate any logs.
Any pointers are appreciated
*edit* - More info!
Ok, so now apparently I AM getting server:1.log under /home/doward/.vnc?
On an rc-service tigervnc stop --> start, now I see this:
Code: | Using desktop session xfce
New 'server:1 (doward)' desktop is server:1
Starting desktop session xfce
Xvnc TigerVNC 1.13.1 - built May 6 2023 23:32:31
Copyright (C) 1999-2022 TigerVNC Team and many others (see README.rst)
See https://www.tigervnc.org for information on TigerVNC.
Underlying X server release 12101001
Sun May 7 10:03:05 2023
vncext: VNC extension running!
vncext: Listening for VNC connections on all interface(s), port 5901
vncext: created VNC server for screen 0
[mi] mieq: warning: overriding existing handler (nil) with 0x55ce42184ce0 for event 2
[mi] mieq: warning: overriding existing handler (nil) with 0x55ce42184ce0 for event 3
xinit: XFree86_VT property unexpectedly has 0 items instead of 1
|
Ok, try to connect to server-ip:1 from remote system...
Still shows me xsm, log is now:
Code: | Using desktop session xfce
New 'server:1 (doward)' desktop is server:1
Starting desktop session xfce
Xvnc TigerVNC 1.13.1 - built May 6 2023 23:32:31
Copyright (C) 1999-2022 TigerVNC Team and many others (see README.rst)
See https://www.tigervnc.org for information on TigerVNC.
Underlying X server release 12101001
Sun May 7 10:03:05 2023
vncext: VNC extension running!
vncext: Listening for VNC connections on all interface(s), port 5901
vncext: created VNC server for screen 0
[mi] mieq: warning: overriding existing handler (nil) with 0x55ce42184ce0 for event 2
[mi] mieq: warning: overriding existing handler (nil) with 0x55ce42184ce0 for event 3
xinit: XFree86_VT property unexpectedly has 0 items instead of 1
Sun May 7 10:04:23 2023
Connections: accepted: 192.168.2.141::56913
SConnection: Client needs protocol version 3.3
Sun May 7 10:04:25 2023
VNCSConnST: closing 192.168.2.141::56913: Clean disconnection
EncodeManager: Framebuffer updates: 0
EncodeManager: Total: 0 rects, 0 pixels
EncodeManager: 0 B (1:-nan ratio)
Connections: closed: 192.168.2.141::56913
ComparingUpdateTracker: 0 pixels in / 0 pixels out
ComparingUpdateTracker: (1:-nan ratio)
Connections: accepted: 192.168.2.141::56914
SConnection: Client needs protocol version 3.3
VNCSConnST: Server default pixel format depth 24 (32bpp) little-endian rgb888
VNCSConnST: Client pixel format depth 32 (32bpp) little-endian rgb max
255,255,255 shift 16,8,0
Sun May 7 10:04:29 2023
VNCSConnST: closing 192.168.2.141::56914: Clean disconnection
EncodeManager: Framebuffer updates: 39
EncodeManager: ZRLE:
EncodeManager: Solid: 33 rects, 682.312 kpixels
EncodeManager: 803 B (1:3399.31 ratio)
EncodeManager: Bitmap RLE: 82 rects, 610.175 kpixels
EncodeManager: 4.00879 KiB (1:594.807 ratio)
EncodeManager: Indexed RLE: 2 rects, 80.166 kpixels
EncodeManager: 1004 B (1:319.41 ratio)
EncodeManager: Total: 117 rects, 1.37265 Mpixels
EncodeManager: 5.77344 KiB (1:928.961 ratio)
Connections: closed: 192.168.2.141::56914
ComparingUpdateTracker: 734.346 kpixels in / 587.247 kpixels out
ComparingUpdateTracker: (1:1.25049 ratio) |
|
|
Back to top |
|
|
Viorel Developer
Joined: 13 Feb 2012 Posts: 16
|
Posted: Fri Jun 02, 2023 7:21 am Post subject: |
|
|
The information in the wiki was quite outdated, I updated it now. In particular, ~/.vnc/xstartup is no longer used. Everything should be configured from /etc/tigervnc or ~/.vnc/config.
And since you have session=xfce in your config, it should work.
Also from what I see in your log, it does try to start xfce:
Quote: |
Using desktop session xfce
New 'server:1 (doward)' desktop is server:1
Starting desktop session xfce
|
But I don't see any subsequent xfce messages there, so maybe it crashes? Can you look with pstree what is below vncsession? |
|
Back to top |
|
|
pmarks.net n00b
Joined: 03 Dec 2012 Posts: 2
|
Posted: Tue Aug 22, 2023 5:31 pm Post subject: |
|
|
After a recent tigervnc update broke my xfce session, I fixed it by adding this line to /etc/conf.d/tigervnc:
Code: | TIGERVNC_XSESSION_FILE="/etc/X11/Sessions/Xfce" |
|
|
Back to top |
|
|
jlpoole Guru
Joined: 01 Nov 2005 Posts: 483 Location: Salem, OR
|
Posted: Fri Feb 16, 2024 6:04 pm Post subject: |
|
|
Viorel wrote: | The information in the wiki was quite outdated, I updated it now. In particular, ~/.vnc/xstartup is no longer used. Everything should be configured from /etc/tigervnc or ~/.vnc/config.
And since you have session=xfce in your config, it should work.
Also from what I see in your log, it does try to start xfce:
Quote: |
Using desktop session xfce
New 'server:1 (doward)' desktop is server:1
Starting desktop session xfce
|
But I don't see any subsequent xfce messages there, so maybe it crashes? Can you look with pstree what is below vncsession? |
I am having the same frustration as expressed in the initial post to this topic. I'm running xfce4, yet when I successfully connect (successfully completing the password challenge) I am shown a screen presumably run by some window manager "xsm". So I followed the suggestion above aboue the process tree and here's what I am finding:
Code: | ryzwork /home/jlpoole # date; ps -efww |grep vnc
Fri Feb 16 09:57:41 AM PST 2024
root 4721 1 0 Feb15 ? 00:00:00 /usr/sbin/vncsession root :1
root 4722 4721 0 Feb15 ? 00:00:00 xinit /etc/X11/Sessions/Xsession startxfce4 -- /usr/bin/Xvnc :1 -auth /root/.Xauthority -desktop ryzwork:1 (root) -fp /usr/share/fonts/75dpi -pn -rfbauth /root/.vnc/passwd -rfbport 5901
root 4744 4722 0 Feb15 ? 00:00:00 /usr/bin/Xvnc :1 -auth /root/.Xauthority -desktop ryzwork:1 (root) -fp /usr/share/fonts/75dpi -pn -rfbauth /root/.vnc/passwd -rfbport 5901
root 6473 1 0 Feb15 ? 00:00:00 vncsession jlpoole :2
jlpoole 6474 6473 0 Feb15 ? 00:00:00 xinit /etc/X11/Sessions/Xsession startxfce4 -- /usr/bin/Xvnc :2 -alwaysshared -auth /home/jlpoole/.Xauthority -desktop ryzwork:2 (jlpoole) -fp /usr/share/fonts/75dpi -pn -rfbauth /home/jlpoole/.vnc/passwd -rfbport 5902
jlpoole 6478 6474 0 Feb15 ? 00:00:00 /usr/bin/Xvnc :2 -alwaysshared -auth /home/jlpoole/.Xauthority -desktop ryzwork:2 (jlpoole) -fp /usr/share/fonts/75dpi -pn -rfbauth /home/jlpoole/.vnc/passwd -rfbport 5902
root 17717 17026 0 09:57 pts/6 00:00:00 grep --colour=auto vnc
ryzwork /home/jlpoole # |
I'm interested in accessing the "jlpoole" session designated as ":2", so
Code: | ryzwork /home/jlpoole # date; pstree -p 6473
Fri Feb 16 09:59:05 AM PST 2024
vncsession(6473)───xinit(6474)─┬─Xvnc(6478)
└─xsm(6480)
ryzwork /home/jlpoole # |
So process 6480 is the culprit. The problem is, I don't seem to grasp from the Gentoo TigerVNC Wiki documentation what the cause is and how to prevent xsm from being called. Just call me "helpless." Please let me know what configuration files you'd like and I'll provide them so that there is documented here in this topic a roadmap for others to follow to fix the problem of an intervening "xsm" session when there is an existing Xfce4 running. Maybe the TigerVNC Wiki will be updated and improved as a result of this discussion and ensuing help?
Thank you,
John Poole |
|
Back to top |
|
|
jlpoole Guru
Joined: 01 Nov 2005 Posts: 483 Location: Salem, OR
|
Posted: Fri Feb 16, 2024 6:28 pm Post subject: |
|
|
Impatient am I, I decided to try experimenting and I killed the parent process above for "jlpoole:2". I found my /etc/init.d/tigervnc.2 "stopped", so I restarted it and then I saw what looked to be evidence of an Xfce4 session. Here's the console:
Code: | ryzwork /home/jlpoole # kill -HUP 6480
ryzwork /home/jlpoole # date; pstree -p 6473
Fri Feb 16 10:05:12 AM PST 2024
ryzwork /home/jlpoole # date; ps -efww |grep vnc
Fri Feb 16 10:05:28 AM PST 2024
root 4721 1 0 Feb15 ? 00:00:00 /usr/sbin/vncsession root :1
root 4722 4721 0 Feb15 ? 00:00:00 xinit /etc/X11/Sessions/Xsession startxfce4 -- /usr/bin/Xvnc :1 -auth /root/.Xauthority -desktop ryzwork:1 (root) -fp /usr/share/fonts/75dpi -pn -rfbauth /root/.vnc/passwd -rfbport 5901
root 4744 4722 0 Feb15 ? 00:00:00 /usr/bin/Xvnc :1 -auth /root/.Xauthority -desktop ryzwork:1 (root) -fp /usr/share/fonts/75dpi -pn -rfbauth /root/.vnc/passwd -rfbport 5901
root 17822 17026 0 10:05 pts/6 00:00:00 grep --colour=auto vnc
ryzwork /home/jlpoole # /etc/init.d/tigervnc.2 status
* status: stopped
ryzwork /home/jlpoole # /etc/init.d/tigervnc.2 start
* Caching service dependencies ... [ ok ]
* Starting TigerVNC server :2 ... [ ok ]
ryzwork /home/jlpoole # date; ps -efww |grep vnc
Fri Feb 16 10:06:21 AM PST 2024
root 4721 1 0 Feb15 ? 00:00:00 /usr/sbin/vncsession root :1
root 4722 4721 0 Feb15 ? 00:00:00 xinit /etc/X11/Sessions/Xsession startxfce4 -- /usr/bin/Xvnc :1 -auth /root/.Xauthority -desktop ryzwork:1 (root) -fp /usr/share/fonts/75dpi -pn -rfbauth /root/.vnc/passwd -rfbport 5901
root 4744 4722 0 Feb15 ? 00:00:00 /usr/bin/Xvnc :1 -auth /root/.Xauthority -desktop ryzwork:1 (root) -fp /usr/share/fonts/75dpi -pn -rfbauth /root/.vnc/passwd -rfbport 5901
root 18115 1 0 10:06 ? 00:00:00 /usr/sbin/vncsession jlpoole :2
jlpoole 18116 18115 0 10:06 ? 00:00:00 xinit /etc/X11/Sessions/Xfce4 startxfce4 -- /usr/bin/Xvnc :2 -alwaysshared -auth /home/jlpoole/.Xauthority -desktop ryzwork:2 (jlpoole) -fp /usr/share/fonts/75dpi -pn -rfbauth /home/jlpoole/.vnc/passwd -rfbport 5902
jlpoole 18127 18116 4 10:06 ? 00:00:00 /usr/bin/Xvnc :2 -alwaysshared -auth /home/jlpoole/.Xauthority -desktop ryzwork:2 (jlpoole) -fp /usr/share/fonts/75dpi -pn -rfbauth /home/jlpoole/.vnc/passwd -rfbport 5902
root 18484 17026 0 10:06 pts/6 00:00:00 grep --colour=auto vnc
ryzwork /home/jlpoole # date; pstree -p 18115
Fri Feb 16 10:06:37 AM PST 2024
vncsession(18115)───xinit(18116)─┬─Xvnc(18127)
└─sh(18129)───xfce4-session(18130)─┬─Thunar(18261)─┬─{Thunar}(18262)
│ ├─{Thunar}(18263)
│ └─{Thunar}(18264)
├─xfce4-panel(18256)─┬─panel-14-action(18431)─┬─{panel-14-action}(18432)
│ │ ├─{panel-14-action}(18433)
│ │ └─{panel-14-action}(18434)
│ ├─panel-6-systray(18379)─┬─{panel-6-systray}(18391)
│ │ ├─{panel-6-systray}(18392)
│ │ └─{panel-6-systray}(18393)
│ ├─panel-9-power-m(18380)─┬─{panel-9-power-m}(18397)
│ │ ├─{panel-9-power-m}(18398)
│ │ └─{panel-9-power-m}(18399)
│ ├─{xfce4-panel}(18257)
│ ├─{xfce4-panel}(18258)
│ └─{xfce4-panel}(18260)
├─xfce4-power-man(18279)─┬─{xfce4-power-man}(18292)
│ ├─{xfce4-power-man}(18293)
│ └─{xfce4-power-man}(18294)
├─xfce4-screensav(18280)─┬─{xfce4-screensav}(18299)
│ ├─{xfce4-screensav}(18300)
│ └─{xfce4-screensav}(18303)
├─xfdesktop(18267)─┬─{xfdesktop}(18268)
│ ├─{xfdesktop}(18269)
│ └─{xfdesktop}(18270)
├─xfsettingsd(18252)─┬─{xfsettingsd}(18253)
│ ├─{xfsettingsd}(18254)
│ └─{xfsettingsd}(18255)
├─xfwm4(18172)─┬─{xfwm4}(18173)
│ ├─{xfwm4}(18174)
│ ├─{xfwm4}(18175)
│ ├─{xfwm4}(18187)
│ ├─{xfwm4}(18188)
│ ├─{xfwm4}(18189)
│ ├─{xfwm4}(18190)
│ ├─{xfwm4}(18191)
│ ├─{xfwm4}(18192)
│ ├─{xfwm4}(18193)
│ ├─{xfwm4}(18194)
│ ├─{xfwm4}(18195)
│ ├─{xfwm4}(18196)
│ ├─{xfwm4}(18197)
│ ├─{xfwm4}(18198)
│ ├─{xfwm4}(18199)
│ ├─{xfwm4}(18200)
│ ├─{xfwm4}(18201)
│ ├─{xfwm4}(18202)
│ ├─{xfwm4}(18203)
│ ├─{xfwm4}(18204)
│ ├─{xfwm4}(18205)
│ ├─{xfwm4}(18206)
│ ├─{xfwm4}(18207)
│ ├─{xfwm4}(18208)
│ ├─{xfwm4}(18209)
│ ├─{xfwm4}(18210)
│ ├─{xfwm4}(18211)
│ ├─{xfwm4}(18212)
│ ├─{xfwm4}(18213)
│ ├─{xfwm4}(18214)
│ ├─{xfwm4}(18215)
│ ├─{xfwm4}(18216)
│ ├─{xfwm4}(18217)
│ ├─{xfwm4}(18218)
│ ├─{xfwm4}(18219)
│ ├─{xfwm4}(18220)
│ ├─{xfwm4}(18221)
│ ├─{xfwm4}(18222)
│ ├─{xfwm4}(18223)
│ ├─{xfwm4}(18224)
│ ├─{xfwm4}(18225)
│ ├─{xfwm4}(18226)
│ ├─{xfwm4}(18227)
│ ├─{xfwm4}(18228)
│ ├─{xfwm4}(18229)
│ ├─{xfwm4}(18230)
│ ├─{xfwm4}(18231)
│ ├─{xfwm4}(18232)
│ ├─{xfwm4}(18233)
│ ├─{xfwm4}(18234)
│ ├─{xfwm4}(18235)
│ ├─{xfwm4}(18236)
│ ├─{xfwm4}(18237)
│ ├─{xfwm4}(18238)
│ ├─{xfwm4}(18239)
│ ├─{xfwm4}(18240)
│ ├─{xfwm4}(18241)
│ ├─{xfwm4}(18242)
│ ├─{xfwm4}(18243)
│ ├─{xfwm4}(18244)
│ ├─{xfwm4}(18245)
│ ├─{xfwm4}(18246)
│ ├─{xfwm4}(18247)
│ ├─{xfwm4}(18248)
│ ├─{xfwm4}(18249)
│ ├─{xfwm4}(18250)
│ └─{xfwm4}(18251)
├─{xfce4-session}(18148)
├─{xfce4-session}(18149)
└─{xfce4-session}(18150)
ryzwork /home/jlpoole #
|
I tried connecting and successfully entered a "new" Xfce4 session. Yet, my Xfce4 session of "jlpoole" on the ryzwork machine remains, unscathed, and operative. So it looks like I have two Xfce4 sessions running for jlpoole:
Code: | ryzwork /home/jlpoole # date; ps -efww |grep vnc
Fri Feb 16 10:11:29 AM PST 2024
root 4721 1 0 Feb15 ? 00:00:00 /usr/sbin/vncsession root :1
root 4722 4721 0 Feb15 ? 00:00:00 xinit /etc/X11/Sessions/Xsession startxfce4 -- /usr/bin/Xvnc :1 -auth /root/.Xauthority -desktop ryzwork:1 (root) -fp /usr/share/fonts/75dpi -pn -rfbauth /root/.vnc/passwd -rfbport 5901
root 4744 4722 0 Feb15 ? 00:00:00 /usr/bin/Xvnc :1 -auth /root/.Xauthority -desktop ryzwork:1 (root) -fp /usr/share/fonts/75dpi -pn -rfbauth /root/.vnc/passwd -rfbport 5901
root 18115 1 0 10:06 ? 00:00:00 /usr/sbin/vncsession jlpoole :2
jlpoole 18116 18115 0 10:06 ? 00:00:00 xinit /etc/X11/Sessions/Xfce4 startxfce4 -- /usr/bin/Xvnc :2 -alwaysshared -auth /home/jlpoole/.Xauthority -desktop ryzwork:2 (jlpoole) -fp /usr/share/fonts/75dpi -pn -rfbauth /home/jlpoole/.vnc/passwd -rfbport 5902
jlpoole 18127 18116 0 10:06 ? 00:00:00 /usr/bin/Xvnc :2 -alwaysshared -auth /home/jlpoole/.Xauthority -desktop ryzwork:2 (jlpoole) -fp /usr/share/fonts/75dpi -pn -rfbauth /home/jlpoole/.vnc/passwd -rfbport 5902
root 18574 17026 0 10:11 pts/6 00:00:00 grep --colour=auto vnc
ryzwork /home/jlpoole # |
This is really curious, the desktop showing in my remote connection (from Windows 7) has a default Xfce2 background and appears to be a fresh session. Yet, the active Xfce session appearing in the console of ryzwork has my customizations and currently running progrsm, e.g. Firefox and Konsole. It looks like PID 18115 is associated with my earlier started Xfce4 session and PID 18116 represents a newly started Xfce session as a result of my trying to connect with VNC?? So, now I am faced with how do I configure TigerVNC and/or Xfce so I have only one desktop which is "shared" when I attempt to connect to server ryzwork with VNC?
Screenshot of xsm managed desktop (not desired).
Screenshot of Xfce on ryzwork console.
Screenshot of Xfce desktop created by connecting with VNC. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|