Search This Blog

2020-09-02

VNC Server Auto Start Configuration for Linux

Product: Linux/UNIX
Linux Version: All
VNC Server Version: All

Configured my Linux to auto start VNC Server using xinetd daemon instead of "systemctl" or "service" command.

To enable create following file

Filename: /etc/xinetd.d/vncts

service vnc-1280x800x16-sc
{
        disable = no
        socket_type     = stream
        wait            = no
        user            = nobody
        group           = tty
        server          = /usr/bin/vncts
        server_args     = -geometry 1280x800 -depth 16
}
service vnc-1024x768x16-sc
{
        disable = no
        socket_type     = stream
        wait            = no
        user            = nobody
        group           = tty
        server          = /usr/bin/vncts
        server_args     = -geometry 1024x768 -depth 16
}
service vnc-800x600x16-sc
{
        disable = no
        socket_type     = stream
        wait            = no
        user            = nobody
        group           = tty
        server          = /usr/bin/vncts
        server_args     = -geometry 800x600 -depth 16
}
service vnc-640x480x16-sc
{
        disable = no
        socket_type     = stream
        wait            = no
        user            = nobody
        group           = tty
        server          = /usr/bin/vncts
        server_args     = -geometry 640x480 -depth 16
}
service vnc-1024x768x8-sc
{
        disable = no
        socket_type     = stream
        wait            = no
        user            = nobody
        group           = tty
        server          = /usr/bin/vncts
        server_args     = -geometry 1024x768 -depth 8
}
service vnc-800x600x8-sc
{
        disable = no
        socket_type     = stream
        wait            = no
        user            = nobody
        group           = tty
        server          = /usr/bin/vncts
        server_args     = -geometry 800x600 -depth 8
}
service vnc-640x480x8-sc
{
        disable = no
        socket_type     = stream
        wait            = no
        user            = nobody
        group           = tty
        server          = /usr/bin/vncts
        server_args     = -geometry 640x480 -depth 8
}


To disable, modify the file with following content

service vnc-1280x800x16-sc
{
        disable = yes
        socket_type     = stream
        wait            = no
        user            = nobody
        group           = tty
        server          = /usr/bin/vncts
        server_args     = -geometry 1280x800 -depth 16
}
service vnc-1024x768x16-sc
{
        disable = yes
        socket_type     = stream
        wait            = no
        user            = nobody
        group           = tty
        server          = /usr/bin/vncts
        server_args     = -geometry 1024x768 -depth 16
}
service vnc-800x600x16-sc
{
        disable = yes
        socket_type     = stream
        wait            = no
        user            = nobody
        group           = tty
        server          = /usr/bin/vncts
        server_args     = -geometry 800x600 -depth 16
}
service vnc-640x480x16-sc
{
        disable = yes
        socket_type     = stream
        wait            = no
        user            = nobody
        group           = tty
        server          = /usr/bin/vncts
        server_args     = -geometry 640x480 -depth 16
}
service vnc-1024x768x8-sc
{
        disable = yes
        socket_type     = stream
        wait            = no
        user            = nobody
        group           = tty
        server          = /usr/bin/vncts
        server_args     = -geometry 1024x768 -depth 8
}
service vnc-800x600x8-sc
{
        disable = yes
        socket_type     = stream
        wait            = no
        user            = nobody
        group           = tty
        server          = /usr/bin/vncts
        server_args     = -geometry 800x600 -depth 8
}
service vnc-640x480x8-sc
{
        disable = yes
        socket_type     = stream
        wait            = no
        user            = nobody
        group           = tty
        server          = /usr/bin/vncts
        server_args     = -geometry 640x480 -depth 8
}

Finally run this command to activate the setting:

sudo service xinetd restart



No comments: