Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
1
votes
1
answers
65
views
Using VNC to connect to the Oracle Linux server without DE
On my VM I have installed Oracle Linux 9.6 without any desktop environment, so everything I have there is accessible through CLI. I would like to run Oracle Database GUI installer on that server by executing `/uo1/app/oracle/product/19.0.0/dbhome_1/runInstaller` and to do that I would like to use Ti...
On my VM I have installed Oracle Linux 9.6 without any desktop environment, so everything I have there is accessible through CLI. I would like to run Oracle Database GUI installer on that server by executing
/uo1/app/oracle/product/19.0.0/dbhome_1/runInstaller
and to do that I would like to use TigerVNC alongside with xterm. To do so on the server I have installed the packages:
dnf install tigervnc-server xterm
Then I can run VNC session in old-fashioned way by executing this command:
vncserver -geometry 1024x768
I can connect to the VNC session on port 5901 using Remmina and quick VNC connection. However, the command vncserver
seems to be obsolete and will be removed in next versions of Oracle Linux. In the message shown after executing the vncserver
command there is an information to use more modern approach with systemd.
My goal is to switch to this more modern method, but I've got a trouble there, because I don't know how the session should be properly configured when on my VM I don't have any desktop environment. In the config file /etc/tigervnc/vncserver-config-defaults
there is really important setting called session
and by default it is set to gnome
:
session=gnome
When I leave it as it is and try to run the VNC using command sudo systemctl start vncserver@:1
I receive an error indicating that GNOME desktop session hasn't been configured on my server (which is obvious and intended).
Could not find session desktop file /usr/share/xsessions/gnome.desktop at /usr/libexec/vncserver line 322.
Could not load configured desktop session gnome
Could not find a desktop session to run
I will be thankful for tips how to configure TigerVNC on my Oracle Linux 9.6 using systemd to run GUI Oracle Database installer from there assuming, that there isn't any desktop environment.
dtm_
(11 rep)
Jul 7, 2025, 05:37 PM
• Last activity: Jul 8, 2025, 05:46 PM
0
votes
1
answers
4462
views
WSL Win-Kex problem att VNCServer, X DISPLAY not found, any Help :D
**Hello, to day i tried to install kali Linux in my windows 10** i need any help please ┌──(root💀DESKTOP-KN54U4A)-[~] └─# kex -start ***output:*** Error connecting to the KeX server. Please try "kex start" to start the service. If the server fails to start, please try "kex kill" or restart y...
**Hello, to day i tried to install kali Linux in my windows 10**
i need any help please
┌──(root💀DESKTOP-KN54U4A)-[~]
└─# kex -start
***output:***
Error connecting to the KeX server.
Please try "kex start" to start the service.
If the server fails to start, please try "kex kill" or restart your WSL2 session and try again.
┌──(leader㉿DESKTOP-KN54U4A)-[~]
└─$ kex -s
***Output***
Error connecting to the KeX server.
Please try "kex start" to start the service.
If the server fails to start, please try "kex kill" or restart your WSL2 session and try again.
and i get message Sayes: TigerVNC Viewr: Unable to connect to socket: connection refused (10061)
┌──(leader㉿DESKTOP-KN54U4A)-[~]
└─$ kex kill
***Output***
tigervncserver: No matching VNC server running for this user!
tigervncserver: No matching VNC server running for this user!
tigervncserver: No matching VNC server running for this user!
tigervncserver: No matching VNC server running for this user
!
┌──(root💀DESKTOP-KN54U4A)-[~]
└─# vncserver
***output:***
Killing Xtigervnc process ID 13260... success!
=================== tail /root/.vnc/DESKTOP-KN54U4A.localdomain:5901.log ===================
Xvnc TigerVNC 1.11.0 - built 2021-03-22 21:21
Copyright (C) 1999-2020 TigerVNC Team and many others (see README.rst)
See https://www.tigervnc.org for information on TigerVNC.
Underlying X server release 12010000, The X.Org Foundation
Mon Jul 12 18:37:40 2021
vncext: VNC extension running!
vncext: Listening for VNC connections on local interface(s), port 5901
vncext: created VNC server for screen 0
Mon Jul 12 18:38:11 2021
ComparingUpdateTracker: 0 pixels in / 0 pixels out
ComparingUpdateTracker: (1:-nan ratio)
============================================================================================
vncserver: /usr/bin/Xtigervnc did not start up, please look into '/root/.vnc/DESKTOP-KN54U4A.localdomain:5901.log' to determine the reason! -1
┌──(root💀DESKTOP-KN54U4A)-[~]
└─# tail /root/.vnc/DESKTOP-KN54U4A.localdomain:5901.log
***output:***
Mon Jul 12 18:37:40 2021
vncext: VNC extension running!
vncext: Listening for VNC connections on local interface(s), port 5901
vncext: created VNC server for screen 0
Mon Jul 12 18:38:11 2021
ComparingUpdateTracker: 0 pixels in / 0 pixels out
ComparingUpdateTracker: (1:-nan ratio)
┌──(root💀DESKTOP-KN54U4A)-[~]
└─# vncserver --list
***Output:***
TigerVNC server sessions:
X DISPLAY # RFB PORT # PROCESS ID SERVER
**i need some help to that please :D and sorry 4 bad English :)
all what i need is open kex -sl in my machine**
LeaDer E
(1 rep)
Jul 12, 2021, 07:55 PM
• Last activity: Jun 30, 2025, 12:04 PM
3
votes
1
answers
3902
views
TigerVNC Xfce startup failing on new Debian 12 bookworm install. "Another session manager is already running" Worked on Debian 10
I've set up a temporary Debian 12 instance on a laptop to test with prior to migrating a desktop from Debian 10 to 12. The only thing not working so far is the tigervnc instance, but that's critical. (Yes, this post is long, but I wanted to make sure that anyone viewing it had enough information to...
I've set up a temporary Debian 12 instance on a laptop to test with prior to migrating a desktop from Debian 10 to 12. The only thing not working so far is the tigervnc instance, but that's critical.
(Yes, this post is long, but I wanted to make sure that anyone viewing it had enough information to go off of, and to minimize the number of follow-up questions)
Several years ago I set up tigervnc-standalone-server on a Debian 10 amd64 system with Xfce4 desktop, and it's worked like a champ ever since. Extremely stable, very responsive, etc. However, it's time to move to Debian 12, and for the life of me, I can't get tigervnc to work on the Debian 12 test system that I've set up (installed using debian-12.2.0-amd64-DVD-1.iso)
***The existing Debian 10 configuration, which works fine (see further below for what isn't working):***
------
**Package version:**
Tigervnc-standalone-server 1.9.0+dfsg-3+deb10u3
**Config files:**
testuser@system:~$ cat ~/.vnc/xstartup
#!/bin/bash
xrdb $HOME/.Xresources
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
startxfce4
(the Xresources below is an empty file, so the xrdb line above probably doesn't do anything)
testuser@system:~$ cat ~/.Xresources
testuser@system:~$
(the geometry in the config file below is specified in the startup command, so the file below may not matter either)
testuser@system:~$ cat ~/.vnc/config
geometry=1920x1080
dpi=96
**Successful launch:**
testuser@system:~$ vncserver :1 -geometry 1920x1080 -localhost no
New 'system.org:1 (testuser)' desktop at :1 on machine system.org
Starting applications specified in /home/testuser/.vnc/xstartup
Log file is /home/testuser/.vnc/system.org:1.log
Use xtigervncviewer -SecurityTypes VncAuth,TLSVnc -passwd /home/testuser/.vnc/passwd system.org:1 to connect to the VNC server.
testuser@system:~$
**Usage notes:**
If the Debian system is rebooted, I'll login to the testuser account using the kvm, open a terminal, and enter the command above. I'll then logout of the KVM, and from that point on use VNC Viewer (RealVNC) on a Windows machine to connect to the Debian box. After the initial Debian login, I can disconnect and re-connect the VNC client at will without having to logout of the Debian user's desktop (home environment, no port-forwarding, minimal security issues in doing so). Works perfectly. And yes, I know I could configure it to auto-start on boot, but I'd rather leave that part manual.
***The new Debian 12 configuration attempts, none of which work work:***
--------
**Package version:**
tigervnc-standalone-server 1.12.0+dfsg-8
$ vncpasswd has been executed, and a password created for the same user which is issues the launch command. When using VNC to start only /usr/bin/xterm, this password is accepted by the remote VNC viewer.
**Config files:**
~/.Xresources file: not present (wasn't needed before)
~/.vnc/config file: same as the Debian 10 file (defining geometry and dpi, but geometry is being overridden with the vncserver command)
~/.vnc/xstartup file: have tried multiple versions, none of which correctly start up an Xfce4 desktop on VNC. See below for details.
Below are the different versions of ~/.vnc/xstartup which I've tried, with the corresponding output when attempting to startup the server:
1 Original, duplicating the Debian 10 file: #!/bin/bash unset SESSION_MANAGER unset DBUS_SESSION_BUS_ADDRESS startxfce4 Tailed log output from $ vncserver command: =================== tail /home/sysuser/.vnc/testcase.nodomain.org:1.log =================== /usr/bin/startxfce4: X server already running on display :1 (process:2353): xfce4-session-CRITICAL **: 02:42:27.394: dbus-launch not found, the desktop will not work properly! xfce4-session-Message: 02:42:27.515: SSH authentication agent is already running gpg-agent: a gpg-agent is already running - not starting a new one =========================================================================================== Session startup via '/home/sysuser/.vnc/xstartup' cleanly exited too early (< 3 seconds)! 2 Without DBUS unset: #!/bin/bash unset SESSION_MANAGER startxfce4 Tailed log output from $ vncserver command: =================== tail /home/sysuser/.vnc/testcase.nodomain.org:1.log =================== /usr/bin/startxfce4: X server already running on display :1 xfce4-session-Message: 01:46:16.716: SSH authentication agent is already running gpg-agent: a gpg-agent is already running - not starting a new one =========================================================================================== Session startup via '/home/sysuser/.vnc/xstartup' cleanly exited too early (< 3 seconds)! 3 Without any unsets: #!/bin/bash startxfce4 Tailed log output from $ vncserver command: =================== tail /home/sysuser/.vnc/testcase.nodomain.org:1.log =================== /usr/bin/startxfce4: X server already running on display :1 xfce4-session: Another session manager is already running =========================================================================================== Session startup via '/home/sysuser/.vnc/xstartup' exited with status 1! **Commonalities:** In all cases, the outputs above are followed by this: Maybe try something simple first, e.g., tigervncserver -xstartup /usr/bin/xterm The X session exited with status 1! Killing Xtigervnc process ID xxxx... success! and when I do a $ vncserver -list command, it comes back with no instances running (header with nothing below). **VNC's core is working:** I know the VNC server is working at a base level, since if I reduce the xstartup file to nothing but: #!/bin/bash /usr/bin/xterm then, the $ vncserver -list command will show an X instance, I can connect to it from the Windows viewer, and a terminal window (but nothing else) is presented. So it's just a matter of the Xfce4 not starting correctly. Any ideas??
~/.vnc/config file: same as the Debian 10 file (defining geometry and dpi, but geometry is being overridden with the vncserver command)
~/.vnc/xstartup file: have tried multiple versions, none of which correctly start up an Xfce4 desktop on VNC. See below for details.
Below are the different versions of ~/.vnc/xstartup which I've tried, with the corresponding output when attempting to startup the server:
1 Original, duplicating the Debian 10 file: #!/bin/bash unset SESSION_MANAGER unset DBUS_SESSION_BUS_ADDRESS startxfce4 Tailed log output from $ vncserver command: =================== tail /home/sysuser/.vnc/testcase.nodomain.org:1.log =================== /usr/bin/startxfce4: X server already running on display :1 (process:2353): xfce4-session-CRITICAL **: 02:42:27.394: dbus-launch not found, the desktop will not work properly! xfce4-session-Message: 02:42:27.515: SSH authentication agent is already running gpg-agent: a gpg-agent is already running - not starting a new one =========================================================================================== Session startup via '/home/sysuser/.vnc/xstartup' cleanly exited too early (< 3 seconds)! 2 Without DBUS unset: #!/bin/bash unset SESSION_MANAGER startxfce4 Tailed log output from $ vncserver command: =================== tail /home/sysuser/.vnc/testcase.nodomain.org:1.log =================== /usr/bin/startxfce4: X server already running on display :1 xfce4-session-Message: 01:46:16.716: SSH authentication agent is already running gpg-agent: a gpg-agent is already running - not starting a new one =========================================================================================== Session startup via '/home/sysuser/.vnc/xstartup' cleanly exited too early (< 3 seconds)! 3 Without any unsets: #!/bin/bash startxfce4 Tailed log output from $ vncserver command: =================== tail /home/sysuser/.vnc/testcase.nodomain.org:1.log =================== /usr/bin/startxfce4: X server already running on display :1 xfce4-session: Another session manager is already running =========================================================================================== Session startup via '/home/sysuser/.vnc/xstartup' exited with status 1! **Commonalities:** In all cases, the outputs above are followed by this: Maybe try something simple first, e.g., tigervncserver -xstartup /usr/bin/xterm The X session exited with status 1! Killing Xtigervnc process ID xxxx... success! and when I do a $ vncserver -list command, it comes back with no instances running (header with nothing below). **VNC's core is working:** I know the VNC server is working at a base level, since if I reduce the xstartup file to nothing but: #!/bin/bash /usr/bin/xterm then, the $ vncserver -list command will show an X instance, I can connect to it from the Windows viewer, and a terminal window (but nothing else) is presented. So it's just a matter of the Xfce4 not starting correctly. Any ideas??
DebiDowner
(31 rep)
Nov 27, 2023, 11:00 PM
• Last activity: Apr 27, 2025, 01:02 AM
3
votes
3
answers
4262
views
Win-Kex Screen Resolution
I've started using the Win-Kex package in order to create a GUI for WSL2 Kali Linux. It runs okay, however the tigerVNC viewer appears blurry & hard to read. [![enter image description here][1]][1] After investigating, I discovered that it is caused by Windows scaling and layout setting (which is se...
I've started using the Win-Kex package in order to create a GUI for WSL2 Kali Linux. It runs okay, however the tigerVNC viewer appears blurry & hard to read.
After investigating, I discovered that it is caused by Windows scaling and layout setting (which is set to the default of 150%). If I change this to 100% Kali Linux appears fine, however then Windows icons and text is too small.
I knew there used to be a trick to change the high DPI settings for individual apps (however, as the exe is hosted in WSL I am unable to use this setting)
Any idea's on how to fix this?
Thanks, Jack


Jack
(31 rep)
Sep 9, 2020, 06:25 PM
• Last activity: Apr 18, 2025, 11:07 PM
0
votes
1
answers
70
views
TigerVNC configuration on Fedora Linux
On Windows, I can configure the VNC server module, so that when a user is logged in on Windows, I can connect and see the same screen that user sees. On Linux, it appears that the serverr always creates a new virtual screen, and only one instance can be running for each user. I.e., if I am logged in...
On Windows, I can configure the VNC server module, so that when a user is logged in on Windows, I can connect and see the same screen that user sees.
On Linux, it appears that the serverr always creates a new virtual screen, and only one instance can be running for each user. I.e., if I am logged in on the console, I cannot log in remotely as the same user.
How can I get around this and get to the console frame buffer remotely?
Lars Poulsen
(357 rep)
Apr 10, 2025, 12:01 AM
• Last activity: Apr 11, 2025, 08:20 AM
1
votes
0
answers
34
views
Issue with TigerVNC for Yocto-Based Linux with SELinux: PAM and SELinux Context Errors
I am running TigerVNC version 1.14.1 on a Yocto-based Linux system with SELinux enabled. The issue I’m facing is related to starting the VNC server service when SELinux policies are in place. Below is the configuration and steps I’ve followed: 1. User Configuration: I have configured the vncserver.c...
I am running TigerVNC version 1.14.1 on a Yocto-based Linux system with SELinux enabled. The issue I’m facing is related to starting the VNC server service when SELinux policies are in place. Below is the configuration and steps I’ve followed:
1. User Configuration: I have configured the vncserver.conf file as follows:
1:user1
2. SELinux Policy: I am using the default vncsession SELinux policy module that I compiled successfully. Since I am not using GNOME, I removed GNOME-related lines from the .te file.
3. Systemd and PAM Configuration: I am using the default tigervnc systemd service file and PAM configuration file provided by the TigerVNC package. No modifications were made to these files initially.
4. Error Encountered: When I start the VNC server service using systemctl start vncserver@:1, I observe the following errors in the logs:
root@Test:/etc/pam.d# systemctl status vncserver@:1 -l
● vncserver@:1.service - Remote desktop service (VNC)
Loaded: loaded (/usr/lib/systemd/system/vncserver@.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2025-01-17 16:53:37 UTC; 3s ago
Process: 48507 ExecStart=/usr/libexec/vncsession-start :1 (code=exited, status=0/SUCCESS)
Main PID: 48514 (vncsession)
Tasks: 0 (limit: 4637)
Memory: 468.0K
CGroup: /system.slice/system-vncserver.slice/vncserver@:1.service
‣ 48514 /usr/sbin/vncsession user1 :1
Jan 17 16:53:37 Test systemd: Starting Remote desktop service (VNC)...
Jan 17 16:53:37 Test vncsession: pam_selinux(tigervnc:session): Unable to get valid context for user1
Jan 17 16:53:37 Test vncsession: pam_selinux(tigervnc:session): conversation failed
Jan 17 16:53:37 Test vncsession: pam_unix(tigervnc:session): session opened for user user1(uid=1001) by (uid=0)
Jan 17 16:53:37 Test systemd: Started Remote desktop service (VNC).
The critical lines in the log are:
pam_selinux(tigervnc:session): Unable to get valid context for user1
pam_selinux(tigervnc:session): conversation failed
Despite these errors, the VNC server service starts, but there seems to be an issue with the SELinux context assignment during the PAM authentication process.
5. Temporary Workaround: When I comment out the pam_systemd.so line in /etc/pam.d/tigervnc, the error is no longer observed, and the service starts cleanly without issues.
6. Additional Information:
- user1 is mapped to the SELinux context user_u.
- The issue appears to be specific to the interaction between SELinux, PAM, and TigerVNC during the session initialization process.
Below is Default tigervnc.pam file,
#%PAM-1.0
# THIS IS AN EXAMPLE CONFIGURATION
# MODIFY AS NEEDED FOR YOUR DISTRIBUTION
# pam_selinux.so close should be the first session rule
-session required pam_selinux.so close
session required pam_loginuid.so
-session required pam_selinux.so open
session required pam_namespace.so
session optional pam_keyinit.so force revoke
session required pam_limits.so
-session optional pam_systemd.so
session required pam_unix.so
-session optional pam_reauthorize.so prepare
Systemd service file:
[Unit]
Description=Remote desktop service (VNC)
After=network.target systemd-user-sessions.service
[Service]
Type=forking
ExecStart=@CMAKE_INSTALL_FULL_LIBEXECDIR@/vncsession-start %i
PIDFile=/run/vncsession-%i.pid
SELinuxContext=system_u:system_r:vnc_session_t:s0
[Install]
WantedBy=multi-user.target
Could I be overlooking any steps in this process? Any guidance would be greatly appreciated.
Jay ganatra
(11 rep)
Jan 17, 2025, 01:19 PM
2
votes
1
answers
69
views
How to upgrade TigerVNC to 1.12 on Debian 11?
I have a development machine running Debian 11, which is currently our standard environement for equipment hosts. I use VNC (TigerVNC server) to access it remotely from my work computer. The problem is that TigerVNC that comes with Debian 11 has a [very annoying bug][1], that interferes with my work...
I have a development machine running Debian 11, which is currently our standard environement for equipment hosts. I use VNC (TigerVNC server) to access it remotely from my work computer.
The problem is that TigerVNC that comes with Debian 11 has a very annoying bug , that interferes with my work.
The bug has been long fixed, but there is no official backport and backports for Debian 11 are EOLed to my knowledge.
So the only way to get the fix is to backport TigerVNC manually.
I tried to follow the backporting guide by Faheem Mitha , because it appears to be the most suitable method for this case, which requires Debian-specific configuration and build. I manage to get up to Step 4:
debuild -uc -us
dpkg-buildpackage -us -uc -ui
dpkg-buildpackage: info: source package tigervnc
dpkg-buildpackage: info: source version 1.12.0+dfsg-8~bpo11+1
dpkg-buildpackage: info: source distribution bullseye-backports
dpkg-buildpackage: info: source changed by
dpkg-source --before-build .
dpkg-buildpackage: info: host architecture amd64
dpkg-source: info: using options from tigervnc-1.12.0+dfsg/debian/source/options: --single-debian-patch --create-empty-orig
dpkg-checkbuilddeps: error: Unmet build dependencies: libxft-dev libxcursor-dev libxrandr-dev libxdamage-dev libwrap0-dev xorg-server-source (>= 2:21) xserver-xorg-dev appstream quilt bison flex x11proto-dev (>= 2021.5) libxcvt-dev libxfont-dev (>= 1:2.0.1) libxkbfile-dev (>= 1:0.99.1) libpciaccess-dev (>= 0.12.901) libgcrypt-dev libudev-dev (>= 151-3) libselinux1-dev (>= 2.0.80) libaudit-dev libdrm-dev (>= 2.4.107-5~) mesa-common-dev libunwind-dev libxmuu-dev (>= 1:0.99.1) libxrender-dev (>= 1:0.9.0) libxi-dev (>= 2:1.8) libxpm-dev (>= 1:3.5.3) libxaw7-dev (>= 1:0.99.1) libxmu-dev (>= 1:0.99.1) libxtst-dev (>= 1:0.99.1) libxres-dev (>= 1:0.99.1) libxfixes-dev (>= 1:3.0.0) libxv-dev libxinerama-dev libxshmfence-dev (>= 1.1) libepoxy-dev libegl-dev (>= 1.3.2) libgbm-dev (>= 10.2) libbsd-dev libdbus-1-dev (>= 1.0) libsystemd-dev
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
dpkg-buildpackage: warning: (Use -d flag to override.)
debuild: fatal error at line 1182:
dpkg-buildpackage -us -uc -ui failed
sudo apt-get build-dep tigervnc-standalone-server=1.12.0+dfsg-8
Reading package lists... Done
Picking 'tigervnc' as source package instead of 'tigervnc-standalone-server'
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
builddeps:tigervnc : Depends: xorg-server-source (>= 2:21) but 2:1.20.11-1+deb11u14 is to be installed
Depends: x11proto-dev (>= 2021.5) but 2020.1-1 is to be installed
Depends: libxcvt-dev but it is not installable
Depends: libdrm-dev (>= 2.4.107-5~) but 2.4.104-1 is to be installed
Depends: libxi-dev (>= 2:1.8) but 2:1.7.10-1 is to be installed
E: Unable to correct problems, you have held broken packages.
However, I don't understand from the guide what exactly I am supposed to do about unmet dependencies. Am I supposed to lower the required version in debian/control?
And in particular, how do I handle libxcvt-dev that is marked uninstallable?
Andrey Pro
(179 rep)
Nov 30, 2024, 02:11 PM
• Last activity: Dec 2, 2024, 01:19 PM
0
votes
1
answers
1584
views
VNC Server Fails to Start Desktop Environment – “Session cleanly exited too early”
I’m having trouble launching the desktop environment for noVNC. After setting up and trying to run the VNC server, I receive the following error root@localhost:~# vncserver :2 New Xtigervnc server 'localhost:2 (root)' on port 5902 for display:2. Use xtigervncviewer -SecurityTypes VncAuth -passwd /tm...
I’m having trouble launching the desktop environment for noVNC. After setting up and trying to run the VNC server, I receive the following error
root@localhost:~# vncserver :2
New Xtigervnc server 'localhost:2 (root)' on port 5902 for display:2.
Use xtigervncviewer -SecurityTypes VncAuth -passwd /tmp/tigervnc.okGWtL/passwd :2 to connect to the VNC server.
=================== tail /root/.vnc/localhost:2.log ===================
Session startup via '/root/.vnc/xstartup' cleanly exited too early (< 3 seconds)!
Maybe try something simple first, e.g., tigervncserver -xstartup /usr/bin/xterm
The X session cleanly exited!
Killing Xtigervnc process ID 16190... success!
root@localhost:~#
Only the default tigervncserver works. I’ve tried different desktop environments, including XFCE, GNOME, and others, but nothing seems to work. The session always exits too early.
Noob python coder
(1 rep)
Oct 22, 2024, 11:12 PM
• Last activity: Oct 23, 2024, 09:17 AM
0
votes
0
answers
81
views
Vnc server/viewer - everything is to small
Using Ubuntu 20.04.2 LTS both on laptop and on kvm guest. Also using tigervnc server, and tigervnc vncviewer. When I use vncviewer to go into my kvm guest, everything is smaller. In the screen shot below, the left is my vncviewer session. On the right is my native linux laptop. I start the vncserver...
Using Ubuntu 20.04.2 LTS both on laptop and on kvm guest. Also using tigervnc server, and tigervnc vncviewer.
When I use vncviewer to go into my kvm guest, everything is smaller. In the screen shot below, the left is my vncviewer session. On the right is my native linux laptop.
I start the vncserver session with
vncserver -localhost -fg -autokill -rfbport xxxx
.
I have tried using randr to change the resolution and dpi, but it does not make a difference. Also, changing the geometry of the viewer window does not make a difference.
This is only a issue on my laptop. This is not a issue when I use the viewer on my linux desktop PC.
I would rather not have to mess with the xterm font settings and chrome setting individually. How can I change the viewer or vnc server to where everything is bigger?

dman
(569 rep)
Aug 31, 2024, 07:44 PM
0
votes
0
answers
791
views
TigerVNC on Debian 12
I'm trying to use TigerVNC to remote to a small thinkcenter running Debian 12 on my local network. I ran ```sudo apt install tigervnc-standalone-server tigervnc-xorg-extension tigervnc-viewer``` ```vncpasswd``` I put the following into my ~/.vnc/xstartup: ```#!/bin/sh``` ```exec cinnamon-session-cin...
I'm trying to use TigerVNC to remote to a small thinkcenter running Debian 12 on my local network.
I ran
apt install tigervnc-standalone-server tigervnc-xorg-extension tigervnc-viewer
I put the following into my ~/.vnc/xstartup:
#!/bin/sh
cinnamon-session-cinnamon &
Then I ran
New Xtigervnc server 'debianbox:2 (xander)' on port 5902 for display :2.
Use xtigervncviewer -SecurityTypes VncAuth -passwd /tmp/tigervnc.F1VqZJ/passwd :2 to connect to the VNC server.
=================== tail /home/xander/.vnc/debianbox:2.log ===================
==================================================================================
Session startup via '/home/xander/.vnc/xstartup' cleanly exited too early (< 3 seconds)!
Maybe try something simple first, e.g.,
tigervncserver -xstartup /usr/bin/xterm
The X session cleanly exited!
Killing Xtigervnc process ID 2639... success!
I ran the -xstartup /usr/bin/xterm
suggestion but get the following when running status vncserver
:
systemctl status tigervncserver@:2.service
○ tigervncserver@:2.service - Remote desktop service (VNC)
Loaded: loaded (/lib/systemd/system/tigervncserver@.service; enabled; preset: enabled)
Active: inactive (dead) since Fri 2024-08-30 08:41:12 PDT; 46min ago
Duration: 328ms
Process: 808 ExecStart=/usr/libexec/tigervncsession-start :2 (code=exited, status=0/SUCCESS)
Main PID: 829 (code=exited, status=0/SUCCESS)
CPU: 10ms
Aug 30 08:41:11 debianbox systemd: Starting tigervncserver@:2.service - Remote desktop service (VNC)...
Aug 30 08:41:11 debianbox tigervncsession: pam_unix(tigervnc:session): session opened for user xander2(uid=1001) by (uid=0)
Aug 30 08:41:11 debianbox systemd: Started tigervncserver@:2.service - Remote desktop service (VNC).
Aug 30 08:41:12 debianbox tigervncsession: tigervncsession: tigervncserver exited with status=255
Aug 30 08:41:12 debianbox tigervncsession: pam_unix(tigervnc:session): session closed for user xander2
Aug 30 08:41:12 debianbox systemd: tigervncserver@:2.service: Deactivated successfully.
Any thoughts? I have the ports open ,etc. The logs of me trying to log in I think are from my Macbook's built-in VNC connection, but the connection didn't end up working.
Gorilla_Gonk
(1 rep)
Aug 30, 2024, 04:30 PM
0
votes
0
answers
265
views
Can guacamole change the viewport to a single monitor on a multimonitor system?
Can `guacamole` change the viewport to a single monitor on a multimonitor system? Is this a feature VNC clients possess in general? I have VNC server running on a multimonitor system, ie a laptop with its built-in 1366x768 screen and a 1920x1080 monitor. When I check the VNC server logs it indicates...
Can
I have tried
1920x1080+1366+0
29/08/2024 13:40:11 blackout rect: 1366x312+0+768: x=0-1366 y=768-1080
29/08/2024 13:40:11
29/08/2024 13:40:11 fb read rate: 1678 MB/sec
29/08/2024 13:40:11 The X server says there are 10 mouse buttons.
29/08/2024 13:40:11 screen setup finished.
29/08/2024 13:40:11
29/08/2024 13:40:11 WARNING: You are running x11vnc WITHOUT a password. See
29/08/2024 13:40:11 WARNING: the warning message printed above for more info.
29/08/2024 13:40:11
Can
guacamole
change the viewport to a single monitor on a multimonitor system?
Is this a feature VNC clients possess in general?
I have VNC server running on a multimonitor system, ie a laptop with its built-in 1366x768 screen and a 1920x1080 monitor.
When I check the VNC server logs it indicates it shows that a 3286x1080 virtual screen has been created. Regardless of how I set the geometry to be 3286x1080+1366+0, or leave it to the defaults this is what guacamole displays.

x11vnc -geometry 3286x1080+1366+0 -noxdamage -ncache_cr -wait 5 -defer 5 -display :5
and
x11vnc -noxdamage -ncache_cr -wait 5 -defer 5 -display :5
I didn't fare much better with x0tigervncserver either.
This part of the log when x11vnc starts up.
29/08/2024 13:40:11
29/08/2024 13:40:11 X FBPM extension not supported.
29/08/2024 13:40:11 X display is capable of DPMS.
29/08/2024 13:40:11 --------------------------------------------------------
29/08/2024 13:40:11
29/08/2024 13:40:11 Default visual ID: 0x21
29/08/2024 13:40:11 Read initial data from X display into framebuffer.
29/08/2024 13:40:11 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/13144
29/08/2024 13:40:11 WARNING: Width (3286) is not a multiple of 4. VncViewer has problems with that.
29/08/2024 13:40:11
29/08/2024 13:40:11 X display :5 is 32bpp depth=24 true color
29/08/2024 13:40:11
29/08/2024 13:40:11 Autoprobing TCP port
29/08/2024 13:40:11 Autoprobing selected TCP port 5900
29/08/2024 13:40:11 Autoprobing TCP6 port
29/08/2024 13:40:11 Autoprobing selected TCP6 port 5900
29/08/2024 13:40:11 listen6: bind: Address already in use
29/08/2024 13:40:11 Not listening on IPv6 interface.
29/08/2024 13:40:11
29/08/2024 13:40:11 Xinerama is present and active (e.g. multi-head).
29/08/2024 13:40:11 Xinerama: number of sub-screens: 2
29/08/2024 13:40:11 Xinerama: enabling -xwarppointer mode to try to correct
29/08/2024 13:40:11 Xinerama: mouse pointer motion. XTEST+XINERAMA bug.
29/08/2024 13:40:11 Xinerama: Use -noxwarppointer to force XTEST.
29/08/2024 13:40:11 Xinerama: sub-screen 1366x768+0+0
29/08/2024 13:40:11 Xinerama: sub-screen
guacamole
be made to pan the necessary part of the virtual screens and apply the scaling to that portion only?
When I use krdc
I'm able to scroll the windows to the necessary part of the screen and the screen is normalized.
When I use a laptop screen with 1920x1080 screen which matches the monitor, using the option -geometry 3840x1080+1920+0
the display works fine as expected.
vfclists
(7909 rep)
Aug 29, 2024, 12:59 PM
• Last activity: Aug 29, 2024, 01:13 PM
0
votes
0
answers
231
views
Problems with vncserver and/or vncviewer (black screen) - SuSE linux
I want to connect to my office PC from my home PC via VNC. I ssh'd to my office PC with ssh keys and start a server: "vncserver :2 -SecurityTypes=none". Then logout and start the viewer on my home PC: "vncviewer -via 'jump host' 'server PC' :2". The viewer opens a window and tells me that I'm connec...
I want to connect to my office PC from my home PC via VNC. I ssh'd to my office PC with ssh keys and start a server: "vncserver :2 -SecurityTypes=none". Then logout and start the viewer on my home PC: "vncviewer -via 'jump host' 'server PC' :2". The viewer opens a window and tells me that I'm connected. But..... The screen is black!! Only the very first time it worked. Now nothing happens, the screen stays black.
Is this a DISPLAY error? Or what do you guess. I read a lot about this problem, but nothing seems to help.
---
I killed the vncserver manually and/or deleted the /tmp/.X0 or any other file of the same kind. Using "ps aux | grep vnc" shows nothing. Surprisingly, after I deleted the vnc program, I got using "echo $DISPLAY" the answer: "localhost:10.0". Why? I think the normal display number is 0.
---
I want to add some new observations. I CAN start the VNC viewer if I only use the twm displaymanager in the .xstartup file on the server site. If I use startkde instead it gives me a "Call to lnusertemp failed (temporary directories full?). Check your installation." and the screen is black. I checked /var/tmp and /tmp, but there is enough space . What to do?.
How do I know if Wayland is running or not?
Uwe Nass
(1 rep)
Jun 1, 2024, 05:58 PM
• Last activity: Jun 5, 2024, 10:24 AM
2
votes
0
answers
218
views
Failed to start tigervnc on start ubuntu jammy
For some reason, I can't for the life of me cannot start vncserver to start at boot. I'm using [this][1] guide and as per the link, here's my constructed systemd file for it [Unit] Description=Start TightVNC server at startup After=syslog.target network.target [Service] Type=forking User= Group= Wor...
For some reason, I can't for the life of me cannot start vncserver to start at boot. I'm using this guide and as per the link, here's my constructed systemd file for it
[Unit]
Description=Start TightVNC server at startup
After=syslog.target network.target
[Service]
Type=forking
User=
Group=
WorkingDirectory=/home/
PIDFile=/home//.vnc/%H:%i.pid
ExecStartPre=/usr/bin/vncserver -kill :%i > /dev/null 2>&1
ExecStart=/usr/bin/vncserver -depth 24 -geometry 1280x800 -localhost no :%i
ExecStop=/usr/bin/vncserver -kill :%i
[Install]
WantedBy=multi-user.target
trying to start it via systemctl fails and checking the status shows this:
× vncserver@1.service - Remote desktop service (VNC)
Loaded: loaded (/etc/systemd/system/vncserver@1.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2024-05-09 15:57:31 PDT; 11s ago
Process: 64087 ExecStartPre=/bin/sh -c /usr/bin/vncserver -kill 1 > /dev/null 2>&1 || : (code=exited, status=0/SUCCESS)
Process: 64091 ExecStart=/usr/bin/vncserver -geometry 1800x1000 -depth 16 -dpi 120 -alwaysshared -localhost no 1 (code=exited, status=1/FAILURE)
CPU: 234ms
Also, it says:
> vncserver@1.service: Failed with result 'exit-code'.
Journalctl says this:
░░ An ExecStart= process belonging to unit vncserver@1.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
May 09 15:57:31 MBP systemd[1] : vncserver@1.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ The unit vncserver@1.service has entered the 'failed' state with result 'exit-code'.
May 09 15:57:31 MBP systemd[1] : Failed to start Remote desktop service (VNC).
░░ Subject: A start job for unit vncserver@1.service has failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit vncserver@1.service has finished with a failure.
░░
░░ The job identifier is 6471 and the job result is failed.
Skegg
(121 rep)
May 9, 2024, 11:10 PM
• Last activity: May 10, 2024, 03:50 AM
0
votes
1
answers
231
views
Tigervnc server: do I have to start a specific 'instance'?
I am trying to set up a tigervnc server on Pop! OS. When I try to start the server in systemd using `sudo systemctl start tigervncserver@` , I get the following error: > Failed to start tigervncserver@.service: Unit name > tigervncserver@.service is missing the instance name. See system logs > and '...
I am trying to set up a tigervnc server on Pop! OS. When I try to start the server in systemd using
sudo systemctl start tigervncserver@
, I get the following error:
> Failed to start tigervncserver@.service: Unit name
> tigervncserver@.service is missing the instance name. See system logs
> and 'systemctl status tigervncserver@.service' for details.
This seems to imply that I have to start an instance of the server that is linked to a specific display (i.e. with sudo systemctl start tigervncserver@:1
). However, aren't the display numbers linked to individual users? So, isn't that command starting the VNC server for just one specific user? Is there some way to start a 'general' VNC server daemon, that will start VNC sessions for whichever users log in?
Sorry, perhaps I'm just confused about how this is supposed to work.
Time4Tea
(2628 rep)
Apr 27, 2024, 05:57 PM
• Last activity: Apr 29, 2024, 12:01 PM
-2
votes
1
answers
181
views
VNC connection error
So, I was following this guide https://linuxize.com/post/how-to-install-and-configure-vnc-on-centos-7/ on how to setup a vnc server and I'm at the part where I have to connect to my vnc server via ssh and I'm getting an error. Error: `bind: Address already in use` `channel_setup_fwd_listener_tcpip:...
So, I was following this guide https://linuxize.com/post/how-to-install-and-configure-vnc-on-centos-7/ on how to setup a vnc server and I'm at the part where I have to connect to my vnc server via ssh and I'm getting an error.
Error:
bind: Address already in use
channel_setup_fwd_listener_tcpip: cannot listen to port: 5901
Could not request local forwarding.

Jaskaran
(1 rep)
Jan 27, 2024, 12:03 AM
• Last activity: Jan 27, 2024, 06:41 PM
0
votes
0
answers
273
views
No desktop during VNC session
I have followed this guide: [Configure VNC Server in RHEL][1] to setup a vnc connection on my `AlmaLinux 9.3` machine. I am running into an issue with the actual desktop that is displayed during the VNC session, which looks like this: [![Incomplete VNC Session][2]][2] I don't know why I am getting a...
I have followed this guide: Configure VNC Server in RHEL to setup a vnc connection on my
I don't know why I am getting a
AlmaLinux 9.3
machine. I am running into an issue with the actual desktop that is displayed during the VNC session, which looks like this:

Firefox
and XTerm
window appearing and not the expected xfce4-session
. However if I were to enter the command: startx
the xfce4
desktop will appear.
When I check the status of the service file nothing seem immediately obvious to me.
● vncserver@:2.service - Remote desktop service (VNC)
Loaded: loaded (/etc/systemd/system/vncserver@:2.service; disabled; preset: disabled)
Active: active (running) since Fri 2024-01-05 17:22:54 GMT; 53s ago
Process: 11707 ExecStartPre=/bin/sh -c /usr/bin/vncserver -kill :2 > /dev/null 2>&1 || : (code=exited, status=0/SUCCESS)
Process: 11712 ExecStart=/usr/bin/vncserver :2 -geometry 1280x1024 (code=exited, status=0/SUCCESS)
Main PID: 11719 (Xvnc)
Tasks: 243 (limit: 48083)
Memory: 368.7M
CPU: 3.734s
CGroup: /system.slice/system-vncserver.slice/vncserver@:2.service
├─11719 /usr/bin/Xvnc :2 -alwaysshared -geometry 1920x1080 -securitytypes vncauth,tlsvnc -auth /home/user/.Xauthority -desktop "localhost:2 (user)" -fp catalogue:/etc/X11/fontpath.d -pn -rfbauth /home/user/.vnc/passwd -rfbport 5902
├─11737 dbus-launch --sh-syntax --exit-with-session
├─11738 /usr/bin/dbus-daemon --syslog --fork --print-pid 5 --print-address 7 --session
├─11773 /usr/bin/xterm -geometry 80x50-50+150
├─11774 /usr/lib64/firefox/firefox /usr/share/doc/HTML/index.html
├─11795 bash
├─11893 /usr/libexec/gvfsd
├─11912 /usr/libexec/xdg-desktop-portal
├─11919 /usr/libexec/xdg-document-portal
├─11925 /usr/libexec/xdg-permission-store
├─11932 fusermount -o rw,nosuid,nodev,fsname=portal,auto_unmount,subtype=portal -- /home/user/.cache/doc
├─11947 /usr/libexec/xdg-desktop-portal-gtk
├─11957 /usr/libexec/at-spi-bus-launcher
├─11964 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
├─11971 /usr/libexec/at-spi2-registryd --use-gnome-session
├─12078 /usr/lib64/firefox/firefox -contentproc -parentBuildID 20231129035847 -prefsLen 27636 -prefMapSize 237382 -appDir /usr/lib64/firefox/browser {675b4206-c092-4a32-ab77-a4582e559da7} 11774 socket
├─12159 /usr/lib64/firefox/firefox -contentproc -childID 1 -isForBrowser -prefsLen 27830 -prefMapSize 237382 -jsInitLen 240916 -parentBuildID 20231129035847 -appDir /usr/lib64/firefox/browser {4e1242e4-50f6-4731-9502-01745913ab95} 11774 tab
├─12223 /usr/lib64/firefox/firefox -contentproc -childID 2 -isForBrowser -prefsLen 32519 -prefMapSize 237382 -jsInitLen 240916 -parentBuildID 20231129035847 -appDir /usr/lib64/firefox/browser {be1c4cbc-6d2c-4174-ae32-65e69f2566b1} 11774 tab
├─12269 /usr/lib64/firefox/firefox -contentproc -childID 3 -isForBrowser -prefsLen 32576 -prefMapSize 237382 -jsInitLen 240916 -parentBuildID 20231129035847 -appDir /usr/lib64/firefox/browser {1ca48e96-b7d0-4844-9d74-b269aa003429} 11774 tab
├─12303 /usr/lib64/firefox/firefox -contentproc -childID 4 -isForBrowser -prefsLen 28144 -prefMapSize 237382 -jsInitLen 240916 -parentBuildID 20231129035847 -appDir /usr/lib64/firefox/browser {56c69dce-39f9-40bf-bff1-b24208d9e6c7} 11774 tab
├─12306 /usr/lib64/firefox/firefox -contentproc -childID 5 -isForBrowser -prefsLen 28144 -prefMapSize 237382 -jsInitLen 240916 -parentBuildID 20231129035847 -appDir /usr/lib64/firefox/browser {e114b097-4c1b-40ea-86c5-53d6d9cc3928} 11774 tab
└─12310 /usr/lib64/firefox/firefox -contentproc -childID 6 -isForBrowser -prefsLen 28144 -prefMapSize 237382 -jsInitLen 240916 -parentBuildID 20231129035847 -appDir /usr/lib64/firefox/browser {feaa6536-974f-4dc1-a1ff-bd923039c8d3} 11774 tab
Jan 05 17:22:55 localhost dbus-daemon: [session uid=1000 pid=11736] Successfully activated service 'org.freedesktop.portal.Documents'
Jan 05 17:22:55 localhost dbus-daemon: [session uid=1000 pid=11736] Activating service name='org.freedesktop.impl.portal.desktop.gtk' requested by ':1.5' (uid=1000 pid=11912 comm="/usr/libexec/xdg-desktop-portal " label="kernel")
Jan 05 17:22:55 localhost dbus-daemon: [session uid=1000 pid=11736] Activating service name='org.a11y.Bus' requested by ':1.8' (uid=1000 pid=11947 comm="/usr/libexec/xdg-desktop-portal-gtk " label="kernel")
Jan 05 17:22:55 localhost dbus-daemon: [session uid=1000 pid=11736] Successfully activated service 'org.a11y.Bus'
Jan 05 17:22:55 localhost org.a11y.Bus: dbus-daemon: Activating service name='org.a11y.atspi.Registry' requested by ':1.0' (uid=1000 pid=11947 comm="/usr/libexec/xdg-desktop-portal-gtk " label="kernel")
Jan 05 17:22:55 localhost org.a11y.Bus: dbus-daemon: Successfully activated service 'org.a11y.atspi.Registry'
Jan 05 17:22:55 localhost org.a11y.Bus: SpiRegistry daemon is running with well-known name - org.a11y.atspi.Registry
Jan 05 17:22:55 localhost dbus-daemon: [session uid=1000 pid=11736] Successfully activated service 'org.freedesktop.impl.portal.desktop.gtk'
Jan 05 17:22:55 localhost xdg-desktop-por: Failed connect to PipeWire: Couldn't connect to PipeWire
Jan 05 17:22:55 localhost dbus-daemon: [session uid=1000 pid=11736] Successfully activated service 'org.freedesktop.portal.Desktop'
My guess is that VNC is trying to load the gnome
desktop by default, however I am solely using the xfce
desktop. I don't know how or where I can set my default desktop. Any advice would be greatly appreciated.
Contents of my ~/.vnc/xstarup
file:
#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
/etc/X11/xinit/xinitrc
# Assume either Gnome will be started by default when installed
# We want to kill the session automatically in this case when user logs out. In case you modify
# /etc/X11/xinit/Xclients or ~/.Xclients yourself to achieve a different result, then you should
# be responsible to modify below code to avoid that your session will be automatically killed
if [ -e /usr/bin/gnome-session ]; then
vncserver -kill $DISPLAY
fi
hymcode
(133 rep)
Jan 8, 2024, 12:50 PM
• Last activity: Jan 8, 2024, 05:43 PM
1
votes
1
answers
15792
views
TigerVNC Unable to Start Systemd Service
I recently followed a guide I found here: [How to Install VNC Server on RHEL 8][1] to create a VNC session for a given user. I have since created a new user account: `engineer` and updated the systemd service file to point to the new user account as shown below: ``` [engineer@localhost ~]$ cat /etc/...
I recently followed a guide I found here: How to Install VNC Server on RHEL 8 to create a VNC session for a given user. I have since created a new user account:
engineer
and updated the systemd service file to point to the new user account as shown below:
[engineer@localhost ~]$ cat /etc/systemd/system/vncserver@.service
[Unit]
Description=Remote Desktop Service (VNC)
After=syslog.target network.target
[Service]
Type=forking
WorkingDirectory=/home/engineer
User=engineer
Group=engineer
PIDFile=/home/engineer/.vnc/%H%i.pid
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/usr/bin/vncserver -autokill %i
ExecStop=/usr/bin/vncserver -kill %i
[Install]
WantedBy=multi-user.target
I created a new vnc password for the engineer
account and then executed the systemctl daemon-reload
command after creating my service file, then executed the command: systemctl start vncserver@:1
as per the guide and now I get the follow error message:
Failed to import environment: Process org.freedesktop.systemd1 exited with status 1
Annoyingly everything was working fine until updated the vncserver@
service file.
Interestingly if I revert all the settings in the service file back to the original user it works without fail.
hymcode
(133 rep)
Aug 31, 2023, 02:30 PM
• Last activity: Sep 1, 2023, 08:05 AM
0
votes
1
answers
1608
views
Forwarding X11 Displays to VNCs On RHEL8/RHEL9
On previous versions of RHEL (RHEL5/6/7 at least) it was possible to create run a vncserver (from tigervnc-server) and forward X11 displays from another server by exporting the `DISPLAY` environment variable on the remote server to the `hostname:display` of the vncserver. For example I have `worksta...
On previous versions of RHEL (RHEL5/6/7 at least) it was possible to create run a vncserver (from tigervnc-server) and forward X11 displays from another server by exporting the
DISPLAY
environment variable on the remote server to the hostname:display
of the vncserver.
For example I have workstation1
, server1
, and server2
. I could ssh from workstation1 to server1
, start a vncserver on :1. Separately ssh to server2
and run export DISPLAY=server1:1
. Then run an X11 application on server2
, and assuming proper xhost, firewall, and port listening settings it would appear in the vncserver on server1.
I've noticed on RHEL8 and RHEL9 that this is no longer the case. On RHEL7, when start a vncserver a listener comes up on two separate ports. One on 5900 + display number and one on 6000 + display number. On RHEL8 and RHEL9 the listener only comes up on 5900 + display.
Based on strace
output from an attempt to forward xeyes
to a vnc it appears that the connection to 6000 + display is still attempting to be made. In an attempt to "trick" the system I ran a vncserver on display 101, which created the listener on port 6001 on server1
. Then ran export DISPLAY=:1
on server2
and attempted to run xeyes. It did try to connect to port 6001
, but was still denied.
Error: Can't open display: server1:1
Is there any way to enable the X11 listener when running vncserver on RHEL8 or RHEL9? I'm aware that using SSH forwarding still works, but I would like to be able to export the display and use native X11 forwarding over the network.
Also, in case it's relevant. I'm using plasma 5 as my DE.
Natolio
(1322 rep)
Aug 2, 2023, 09:21 PM
• Last activity: Aug 3, 2023, 01:58 PM
1
votes
1
answers
3865
views
tigervncsesrver -> (EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE)
When I try to start a Tiger VNC server with an SSH tunnel, I get the following error: _XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed _XSERVTransMakeAllCOTSServerListeners: server already running (EE) Fatal server error: (EE) Cannot establish any listening sockets - Make sure a...
When I try to start a Tiger VNC server with an SSH tunnel, I get the following error:
_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running
(EE)
Fatal server error:
(EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE)
To start it, I use the command
tigervncserver -localhost :1
. I have tried running tigervncserver -kill :1
, but it says there is no VNC server. I have already removed the files /tmp/.X1-lock
and /tmp/.X11-unix/.X1
. It starts up when I use the command tigervncserver -localhost :2
, but I want to use display :1
Using netstat -lp | grep X1
, I see
unix 2 [ ACC ] STREAM LISTENING 37348 2140/Xorg @/tmp/.X11-unix/X0
unix 2 [ ACC ] STREAM LISTENING 4670129 951048/Xorg /tmp/.X11-unix/X1
unix 2 [ ACC ] STREAM LISTENING 4670128 951048/Xorg @/tmp/.X11-unix/X1
unix 2 [ ACC ] STREAM LISTENING 37349 2140/Xorg /tmp/.X11-unix/X0
But when I try to kill the Xorg process 951048, another Xorg process is automatically created that uses /tmp/.X11-unix/X1
and the same error appears.
I have already looked at these two questions, but they said to remove the files from /tmp
which I have already done.
https://unix.stackexchange.com/questions/232749/xvfb-screen-cannot-establish-any-listening-sockets-make-sure-an-x-server
https://unix.stackexchange.com/questions/314876/xvfb-screen-ee-cannot-establish-any-listening-sockets
So my question is how do I fix this error and start a VNC server with display :1?
geckels1
(173 rep)
May 16, 2023, 03:46 AM
• Last activity: May 31, 2023, 09:20 PM
2
votes
0
answers
4098
views
can't start VNC server from a service, Works fine when started from terminal TigerVNC + noVNC
I have a VNC setup using TigerVNC and noVNC on my linux machine (Ubuntu 20.4). It works perfectly when started it from terminal but I want to start it from a service so that it can auto start on boot however it is not working My service file name 'vncserver@.service' located at /etc/systemd/system l...
I have a VNC setup using TigerVNC and noVNC on my linux machine (Ubuntu 20.4). It works perfectly when started it from terminal but I want to start it from a service so that it can auto start on boot however it is not working
My service file name 'vncserver@.service' located at /etc/systemd/system looks like this
[Unit]
Description = VNC server
After=syslog.target network.target
[Service]
Type=forking
User=taisafmr15
ExecStartPre=-/usr/bin/vncserver -kill :2
ExecStart=/usr/bin/vncserver :2 -geometry 1600x900 -depth 24 -localhost no
ExecStop=/usr/bin/vncserver -kill :2
[Install]
WantedBy=multi-user.target
I can enable my service using
sudo systemctl enable vncserver@1.service
And It starts without any error
same for starting it
sudo systemctl start vncserver@1.service
However my vnc server don't start, running
sudo systemctl status vncserver@1.service
shows that it failed (code=exited, status=255/EXCEPTION)
looking into logs it shows it failed on ExecStart and the only error code / message I see is this (code=exited, status=255/EXCEPTION)
However when I run that command normally from my terminal my vnc server starts fine just not from a service,
Struggling with for days
Any help / recommendation would be helpful
EDIT:
My xstartup file at ~/.vnc/xstartup
#!/bin/sh
[-x /etc/vnc/xstartup] && exec /etc/vnc/xstartup
[-r $HOME/.Xresources] && xrdb $HOME/.Xresources
My xstartup file at /etc/vnc/xstartup
#!/bin/sh
export DISPLAY=:2
test x"$SHELL" = x"" && SHELL=/bin/bash
test x"$1" = x"" && set -- default
vncconfig -iconic &
"$SHELL" -l << EOF
export XDG_SESSION_TYPE=x11
export XDG_DATA_DIRS=/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop
export XDG_CONFIG_DIRS=/etc//xdg-ubuntu:/etc/xdg
export XDG_CURRENT_DESKTOP=ubuntu:GNOME
export DESKTOP_SESSION=/usr/share/xsessions/ubuntu.desktop
export GNOME_SHELL_SESSION_MODE=ubuntu
dbus-launch --exit-with-session /usr/bin/gnome-session --session=ubuntu
EOF
vncserver -kill $DISPLAY
both xstartup files have follwoing permissions
sudo chmod +x /etc/vnc/xstartup
sudo chmod 777 /etc/vnc/xstartup
Full Error message
vncserver: Thu Apr 13 16:26:40 2023
vncserver: ComparingUpdateTracker: 0 pixels in / 0 pixels out
vncserver: ComparingUpdateTracker: (1:-nan ratio)
vncserver: Killing Xtigervnc process ID 6921... which seems to be deadlocked. Using SIGKILL!
vncserver: Starting applications specified in /home/tai79/.vnc/xstartup has failed.
vncserver: Maybe try something simple first, e.g.,
vncserver: tigervncserver -xstartup /usr/bin/xterm
systemd: vncserver@1.service: Main process exited, code=exited, status=255/EXCEPTION
systemd: vncserver@1.service: Failed with result 'exit-code'.
ahmed
(121 rep)
Apr 13, 2023, 09:06 PM
• Last activity: Apr 13, 2023, 09:22 PM
Showing page 1 of 20 total questions