Posts Tagged ‘remote display’

VNC minimal server on RHEL8 / CentOS8 / OEL8

Tuesday, June 29th, 2021

With the update to version 8 (or, if to be accurate, according to common documentations, 8.3 and above), VNC configuration has had a major overhaul, and it is entirely different. Most documentations will refer to using ‘gnome’ as the desktop manager, however – if you want something lightweight with minimal impact (both package-wise and performance-wise), using the minimal ‘xinit-compat’ could work well for you.

To make it work, you will need to follow these steps:

Install the required packages

The required packages are xorg-x11-xinit-session, xorg-x11-xinit, tigervnc-server, metacity, xterm. All dependant packages need to be installed too, of course.


The initial (and minimal) configuration required is to edit /etc/tigervnc/vncserver.users and add the required user with a display port. In this example, I have used ‘:1’. The content of the file should look something like this:

# TigerVNC User assignment
# This file assigns users to specific VNC display numbers.
# The syntax is <display>=<username>. E.g.:
# :2=andrew
# :3=lisa

Then, set a vnc password for the user, using ‘vncpasswd’ as the user.

Then, create a file in the directory .vnc in the user’s home directory, called config, with contents such as this:


Now comes the tricky part (and not well documented) of setting the xinit startup script. Create a file in the user’s home directory called ‘.xsession’ with execution permissions, containing the following code:

xterm &
xterm &

This file is being read by xinit-compat, and will allow running a minimal desktop with two xterm windows, and a window manager (metacity).

Starting the service

Now, all that is required is to start the vnc service,. Use the command ‘systemctl start [email protected]:1’ . Note that the number ‘:1’ is in correlation to the file mentioned earlier ‘vncserver.users’.

This should do the trick. Let me know how it worked for you.

Old Dell iDrac – work around Java failures

Wednesday, June 5th, 2019

I have an old Dell server (R610, if it’s important) and I seem to fail to connect to its iDrac console via Java. No other options exist, and the browser calling Java flow fails somehow.

I have found an explanation here, and I will copy it for eternity 🙂

First – Download the latest JRE version 1.7 from https::/

Then, extract it to a directory of your choice. We’ll call this directory $RUN_ROOT

Download the viewer.jnlp file to this directory $RUN_ROOT, and open it with a text editor. You will see an XML block pointing at a JAR file called avctKVM.jar. Download it manually using ‘wget’ or ‘curl’ from the URL provided in the viewer.jnlp XML file.

Extract the avctKVM.jar file using ‘unzip’. You will get two libraries – avctKVMIO(.so or .dll for Windows) and avmWinLib(.so or .dll for Windows). Move these two files into a new directory under $RUN_ROOT/lib

Download/copy-paste the below .bat or .sh script files (.bat file for Windows, .sh file for Linux).

@echo off

set /P drachost="Host: "
set /p dracuser="Username: "
set "psCommand=powershell -Command "$pword = read-host 'Enter Password' -AsSecureString ; ^
    $BSTR=[System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($pword); ^
for /f "usebackq delims=" %%p in (`%psCommand%`) do set dracpwd=%%p

echo -n 'Host: '
read drachost

echo -n 'Username: '
read dracuser

echo -n 'Password: '
read -s dracpwd

./jre/bin/java -cp avctKVM.jar -Djava.library.path=./lib com.avocent.idrac.kvm.Main ip=$drachost kmport=5900 vport=5900 user=$dracuser passwd=$dracpwd apcp=1 version=2 vmprivilege=true "helpurl=https://$drachost:443/help/contents.html"

Run the downloaded script file (with Linux – you might want to give it execution permissions first), and you will be asked for your credentials.

Thanks Nicola for this brilliant solution!

Solaris SSH weird behaviour

Thursday, July 3rd, 2008

Sun likes IPv6. They like it so badly that they strive to use it in all cases.

Solaris 9 and 10 SSH daemon is bounded to IPv6, which leads to a problem when trying to forward X. Editing the config file /etc/ssh/sshd_conf and assigning the SSH daemon to IPv4 address (bind to address is not enough. You need to make sure that the sshd process is started with the “-4” flag. In Solaris 10, it means editing /lib/svc/method/sshd and appending “-4” to the sshd start command.

I wonder what will happen after an upgrade or a patch…