# __ ___ _ ____
# \ \ / / \ | |/ ___|
# \ \ / /| \| | |
# \ V / | |\ | |___
# \_/ |_| \_|\____|
#
ALA, Kali Linux
At one time or another almost every system admin has had to setup a VNC server. Here is a brief and haphazard means to accomplish this. For this example we will setup a vncserver that initiated by systemd on a debian derivitive using tigervnc.
For information on how to setup the X-dummy driver for truly headless desktops, please see vnc-xdummy.
vncpassword
as the user you intend to login as./etc/tigervnc/vncserver.users
.~/.vnc/config
with the following syntax.This was the eventually resolution chosen for setup. As it worked effortlessly, and allowed for good screen resolution and performance.
session=i3
geometry=1920x1080
localhost
alwaysshared
/etc/X11/xorg.conf.d/10-vnc.conf
:Section "Module"
Load "vnc"
EndSection
Section "Screen"
Identifier "Screen0"
Option "UserPasswdVerifier" "VncAuth"
Option "PasswordFile" "/root/.vnc/passwd"
EndSection
/etc/lightdm/lightdm.conf
Probably not the reccommended way to setup a vnc server, but with this method, one is allowed to run vnc on a truly headless host.
This method was abandoned as it only opened a empty gray screen.
We will use Xinetd to manage starting the xnvcserver, and so we will need to configure that service for xinetd.
service xvncserver {
disable = no
protocol = tcp
socket_type = stream
wait = no
user = root
server = /usr/bin/Xtigervnc
server_args = -inetd -query localhost -once -geometry 1024x768 -depth 24 -fp /usr/share/X11/fonts/misc -securitytypes=none
}
/etc/services
In order for xinetd to know which service it is to start, you will need to add it to the /etc/services
file.
Add it to the bottom of the file, where it notates custom services
, or some reasonable facsimile thereof.
xvncserver 5950/tcp #for xvncserver
Both gdm and lightdm can be used for this as well, but gdm tends to be rather heavy and lightdm appears to require a head. So for this xdm was chosen.
/etc/X11/xdm/Xaccess
uncomment the line * #any host can get a login window
, this
will enable remote access/etc/X11/xdm/xdm-config
comment the line !DisplayManager.requestPort: 0
with a !
.