In tumbleweed vncserver is a service (/usr/lib/systemd/system/vncserver@.service) and /usr/lib/vncserver doesn’t more exist.
Regards
Philippe
In tumbleweed vncserver is a service (/usr/lib/systemd/system/vncserver@.service) and /usr/lib/vncserver doesn’t more exist.
Regards
Philippe
Looks like that in tumbleweed vncserver
resides in /usr/libexec/vncserver
, at least here. Installed by package xorg-x11-Xvnc-1.13.1-4.2.x86_64
.
A “man vncserver” describes vncsession which is started via vncsession-start in the /usr/lib/systemd/system/vncserver@.service
DESCRIPTION
vncsession is used to start a VNC (Virtual Network Computing) desktop. vncsession performs all the necessary steps to create a new user session, run Xvnc with appropriate options and starts a window manager on the VNC desktop.
vncsession is rarely called directly and is normally started by the system service manager.
Regards
Philippe
Thank you all!
I’m not near the server, and it is power off, right now.
I’ll try it and let you know what happens.
I set xdm as Display Manager, but I get a black screen when connecting with TigerVNC Viewer. The same thing.
Thank you very much!
Hello,
I suggest to see what there is in journalctl on the server side via “journalctl -b --grep vnc”.
and “systemctl status vncserver@:1” . The status muts be “running” not “dead”. If it is dead try a “systemctl start vncserver@:1”.
If still dead thereafter see the log in journalctl. Verify that the service is enabled via root and not via “sudo” with localuser and maybe reboot the server if status is still dead.
Verify that nothing (script, program) starts vncserver directly.
On my server when the service is running if have these processes (No connection active frrom client side)
rasp:~ # ps -ef | grep vnc
root 22827 1 0 10:22 ? 00:00:00 /usr/sbin/vncsession philippe :18
philippe 22828 22827 0 10:22 ? 00:00:00 xinit /usr/etc/X11/xdm/Xsession /usr/bin/startplasma-x11 -- /usr/bin/Xvnc :18 -geometry 1920x1080 -securitytypes vncauth,tlsvnc -auth /home/philippe/.Xauthority -desktop rasp.samdom.pce23.net:18 (philippe) -fp /usr/share/fonts/misc,/usr/share/fonts/75dpi,/usr/share/fonts/100dpi,/usr/share/fonts/Type1 -pn -rfbauth /home/philippe/.vnc/passwd -rfbport 5918
philippe 22833 22828 20 10:22 ? 00:00:01 /usr/bin/Xvnc :18 -geometry 1920x1080 -securitytypes vncauth,tlsvnc -auth /home/philippe/.Xauthority -desktop rasp.samdom.pce23.net:18 (philippe) -fp /usr/share/fonts/misc,/usr/share/fonts/75dpi,/usr/share/fonts/100dpi,/usr/share/fonts/Type1 -pn -rfbauth /home/philippe/.vnc/passwd -rfbport 5918
If running try to to log in and verify with journalctl what happen.
Regards
Philippe.
I will try.
Thank you!
Now, I show you how I check the vncserver@:1 status, then I try to start the service, and check the service status again (Nothing change):
adrian@faraday:~> sudo systemctl status vncserver@:1
○ vncserver@:1.service - Remote desktop service (VNC)
Loaded: loaded (/usr/lib/systemd/system/vncserver@.service; enabled; preset: disabled)
Active: inactive (dead) since Thu 2024-02-22 20:28:49 -03; 1min 10s ago
Duration: 62ms
Process: 2050 ExecStart=/usr/libexec/vncsession-start :1 (code=exited, status=0/SUCCESS)
Main PID: 2057 (code=exited, status=0/SUCCESS)
CPU: 48ms
Feb 22 20:28:49 faraday systemd[1]: Starting Remote desktop service (VNC)...
Feb 22 20:28:49 faraday systemd[1]: Started Remote desktop service (VNC).
Feb 22 20:28:49 faraday systemd[1]: vncserver@:1.service: Deactivated successfully.
adrian@faraday:~>
adrian@faraday:~>
adrian@faraday:~>
adrian@faraday:~>
adrian@faraday:~> sudo systemctl start vncserver@:1
adrian@faraday:~> sudo systemctl status vncserver@:1
○ vncserver@:1.service - Remote desktop service (VNC)
Loaded: loaded (/usr/lib/systemd/system/vncserver@.service; enabled; preset: disabled)
Active: inactive (dead) since Thu 2024-02-22 20:30:23 -03; 4s ago
Duration: 66ms
Process: 2086 ExecStart=/usr/libexec/vncsession-start :1 (code=exited, status=0/SUCCESS)
Main PID: 2093 (code=exited, status=0/SUCCESS)
CPU: 48ms
Feb 22 20:30:23 faraday systemd[1]: Starting Remote desktop service (VNC)...
Feb 22 20:30:23 faraday systemd[1]: Started Remote desktop service (VNC).
Feb 22 20:30:23 faraday systemd[1]: vncserver@:1.service: Deactivated successfully.
adrian@faraday:~>
Now I show you the journalctrl:
Feb 22 20:30:00 faraday sudo[2071]: adrian : TTY=pts/1 ; PWD=/home/adrian ; USER=root ; COMMAND=/usr/bin/systemctl status vncserver@:1
Feb 22 20:30:23 faraday sudo[2078]: adrian : TTY=pts/1 ; PWD=/home/adrian ; USER=root ; COMMAND=/usr/bin/systemctl start vncserver@:1
Feb 22 20:30:23 faraday systemd[1]: Starting Remote desktop service (VNC)...
Feb 22 20:30:23 faraday vncsession[2093]: pam_unix(tigervnc:session): session opened for user adrian(uid=1000) by adrian(uid=0)
Feb 22 20:30:23 faraday systemd[1]: Started Remote desktop service (VNC).
Feb 22 20:30:23 faraday vncsession[2093]: vncsession: vncserver exited with status=98
Feb 22 20:30:23 faraday vncsession[2093]: pam_unix(tigervnc:session): session closed for user adrian
Feb 22 20:30:23 faraday systemd[1]: vncserver@:1.service: Deactivated successfully.
Feb 22 20:30:28 faraday sudo[2098]: adrian : TTY=pts/1 ; PWD=/home/adrian ; USER=root ; COMMAND=/usr/bin/systemctl status vncserver@:1
Feb 22 20:31:04 faraday sudo[2104]: adrian : TTY=pts/1 ; PWD=/home/adrian ; USER=root ; COMMAND=/usr/bin/journalctl -b --grep vnc
Feb 22 20:33:44 faraday sudo[2123]: adrian : TTY=pts/1 ; PWD=/home/adrian ; USER=root ; COMMAND=/usr/bin/journalctl -b --grep vnc
Later, I disable and enable the service as root, reboot the system, and try to start the service:
adrian@faraday:~> su
Password:
faraday:/home/adrian # systemctl disable vncserver@:1
Removed "/etc/systemd/system/multi-user.target.wants/vncserver@:1.service".
faraday:/home/adrian # systemctl enable vncserver@:1
Created symlink /etc/systemd/system/multi-user.target.wants/vncserver@:1.service → /usr/lib/systemd/system/vncserver@.service.
faraday:/home/adrian # shutdown -r now
faraday:/home/adrian # Connection to faraday closed by remote host.
but everything remains the same.
I will reinstall openSuse Tumbleweed and start again the procedure.
I’ll keep you posted if I make any progress.
Thank you very much!
What we need to see, beginning to end, are the commands you issue and the output that shows up, including the
adrian@faraday:~>
not just for the startup of the vncserver, but for the startup of tigervnc that gets you to the black screen. Leave nothing out. Paste it in between the </> button’s code tags. We need your latest results to see if we can spot something.
I have a hunch, but I need to see, first.
If I compare with my system :
You have
I have
Feb 22 10:22:34 rasp.samdom.pce23.net systemd[1]: Started Remote desktop service (VNC).
Feb 22 10:22:44 rasp.samdom.pce23.net systemd[22729]: Starting VNC Configuration...
Feb 22 10:22:44 rasp.samdom.pce23.net systemd[22729]: Started VNC Configuration.
Feb 22 10:22:45 rasp.samdom.pce23.net vncmanager-controller[23263]: VNC not managed by vncmanager, quitting.
Feb 22 10:22:45 rasp.samdom.pce23.net systemd[22729]: app-vncmanager\x2dcontroller@autostart.service: Main process exited, code=exited, status=1/FAILURE
Feb 22 10:22:45 rasp.samdom.pce23.net systemd[22729]: app-vncmanager\x2dcontroller@autostart.service: Failed with result 'exit-code'.
AFAICS on my server it starts a configuration (Starting VNC Configuration…) and on your server there is an error 98. Seems that a configuration file is missing or not available.
In /etc
rasp:/etc # find ./ -name "vnc*" -print
./systemd/system/multi-user.target.wants/vncserver@:18.service
./vnc
./tigervnc/vncserver-config-defaults
./tigervnc/vncserver-config-mandatory
./tigervnc/vncserver.users
./alternatives/vncviewer
./alternatives/vncviewer.1.gz
The 3 files in /etc/tigervnc are mandatory
in the user home directory the .vnc directory must exist and contains
rasp:/home/philippe/.vnc # ls -l
total 20
-rw-r--r-- 1 philippe users 537 Dec 7 2022 config
-rw------- 1 philippe users 8 Dec 5 2022 passwd
-rw-r--r-- 1 philippe users 3941 Feb 22 10:22 rasp.samdom.pce23.net:18.log
-rw-r--r-- 1 philippe users 470 Oct 21 2022 vncserver-config-mandatory
The rasp.samdom.pce23.net:18.log (name server + display number) is a file filled when the service start.
the config and passwd file must exist.
AFAICS the service use the /etc/tigervnc/vncserver.users to find the local user
Verify also that the lock in /tmp (.X1-lock) doesn’t exist when vncserver is not running.
Also are you using apparmor or selinux? if yes try to stop it or set in permissive mode.
Regards
Philippe
I’m sorry Philippe.
Those files you point out are in place.
I’ll make a fresh installation of openSuse Tumbleweed or Leap 15.5. Then, I will follow the procedure.
Thank you very much.
Check also in Yast → Network service > Remote Adminstration (VNC)
I have
┌Remote Administration Settings─────────────────────────────────┐
│( ) Allow Remote Administration With Session Management │
│(x) Allow Remote Administration Without Session Management │
│( ) Do Not Allow Remote Administration │
│ │
│[ ] Enable access using a web browser │
└───────────────────────────────────────────────────────────────┘
Regards
Philippe
Finally, I got my remote desktop working!
Here is what I made:
1- I made a fresh install of openSuse Tumbleweed 20240223.
2- I installed tigervnc and xorg-x11-Xvnc packages.
3- I’ve modified /etc/tigervnc/vncserver.users file. Here is its content:
adrian@faraday:/etc/tigervnc> more vncserver.users
# TigerVNC User assignment
#
# This file assigns users to specific VNC display numbers.
# The syntax is <display>=<username>. E.g.:
#
# :2=andrew
# :3=lisa
:1=adrian
adrian@faraday:/etc/tigervnc>
4- I’ve modified /etc/tigervnc/vncserver-config-defaults file. Here is its content:
adrian@faraday:/etc/tigervnc> more vncserver-config-defaults
## 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=plasma5
securitytypes=vncauth,tlsvnc
geometry=1360x768
# localhost
alwaysshared
adrian@faraday:/etc/tigervnc>
(I commented localhost because otherwise I was getting ‘Connection refused’.)
5- I used the following command fron my home directory:
vncpasswd
and I followed its instructions.
5- I opened the vnc-server service port for the ethernet connection in the firewall.
Note: Ididn’t change Remote Administration Settings. It is set to Do Not Allow Remote Administration.
6- Finally, I started the service:
adrian@faraday:~> sudo systemctl start vncserver@:1
[sudo] password for adrian:
adrian@faraday:~> sudo systemctl status vncserver@:1
● vncserver@:1.service - Remote desktop service (VNC)
Loaded: loaded (/usr/lib/systemd/system/vncserver@.service; disabled; preset: disabled)
Active: active (running) since Sat 2024-02-24 17:45:01 -03; 15s ago
Process: 1608 ExecStart=/usr/libexec/vncsession-start :1 (code=exited, status=0/SUCCESS)
Main PID: 1615 (vncsession)
Tasks: 0 (limit: 4915)
CPU: 39ms
CGroup: /system.slice/system-vncserver.slice/vncserver@:1.service
‣ 1615 /usr/sbin/vncsession adrian :1
Feb 24 17:45:01 faraday systemd[1]: Starting Remote desktop service (VNC)...
Feb 24 17:45:01 faraday systemd[1]: Started Remote desktop service (VNC).
adrian@faraday:~>
Now the service is active (running).
That’s all!
Now I can connect to that system from remote machines by mean Remmina and TigerVNC Viewer.
Note: I’m using SDDM as Display Manager in the server.
Thank you, so much!
Congratulations,
One thing that seems interesting to me is the use of SDDM on the server: in many reports on the net they say that it does not work. To be checked.
Regards
Philippe
This seems normal On tigervnc site
−localhost
Only allow connections from the same machine. Useful if you use SSH and want to stop non-SSH connections from any other hosts.
Regards
Philippe
I’m not sure if that means the server or on the client. To tell the truth, I have never tested either, since I don’t use SDDM anywhere on my machines. Nothing against SDDM, just that I don’t have it anywhere so far.
Both, SDDM in server and client.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.