How to start a headless session without a desktop environment using tigervnc?

42 Views Asked by At

As describe in https://wiki.archlinux.org/title/TigerVNC#Running_vncserver_for_virtual_(headless)_sessions ,

tigervnc need to specify the desk environment, when run `vncserver`.

However, i do not use any desktop enviroment and I use `startx`.

When I run `vncserver :1`, it report

` Could not find a desktop session to run`.

I tried to create `/usr/share/xsessions/startx.desktop` as follow

[Desktop Entry]
Encoding=UTF-8
Name=StartX
Comment=StartX Session
Exec=startx
Type=Application

It still does not work, and reports

Errors from xkbcomp are not fatal to the X server
[mi] mieq: warning: overriding existing handler (nil) with 0x64f83815c3e0 for event 2
[mi] mieq: warning: overriding existing handler (nil) with 0x64f83815c3e0 for event 3
xinit: XFree86_VT property unexpectedly has 0 items instead of 1
Running X session wrapper
Loading profile from /etc/profile
Loading xinit script /etc/X11/xinit/xinitrc.d/40-libcanberra-gtk-module.sh
Loading xinit script /etc/X11/xinit/xinitrc.d/50-systemd-user.sh
X session wrapper complete, running session startx

/usr/lib/Xorg.wrap: Only console users are allowed to run the X server
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
Couldn't get a file descriptor referring to the console.
xinit: connection to X server lost

waiting for X server to shut down  ComparingUpdateTracker: 0 pixels in / 0 pixels out
 ComparingUpdateTracker: (1:-nan ratio)

start a headless session without a desktop environment using tigervnc

0

There are 0 best solutions below