How to launch Tigher-VNC-Viewer at startup

Hi,

I need support.
What I need to achieve is at DietPi startup I need a Tiger VNC Client to connect to a remote VNC Server immediately.

So I configured via dietpi-config to autologin the root user both in local and in the LYDE desktop.
At system startup the desktop loads properly.

So the next step I made is via crontab.

the command I used was

sudo crontab -e

and I added the following few lines at the end of the crontab file opened by the nano editor:

@reboot sleep 5 && xtigervncviewer -FullScreen 192.168.1.4
@reboot date >> /date.txt

the second line is for testing purpose only. In this way I can assume that the cron demon is running because the date.txt file is appended by a new line containing the actual system startup date.

unfortunately nothing is starting against xtigervncviewer

I tried to run the command xtigervncviewer -FullScreen 192.168.1.4 within the terminal ad it works exactly as expected.

I thing that the issue is because cron is running the command outside the GUI or something like that.

Cound someone assist me?

I guess you need to create a desktop shortcut that is started automatically on login.

This works the same way on all Linux desktops. Ant *.desktop file in ~/.config/autostart will be started on login.

They look like this:

[Desktop Entry]
Type=Application
Name=conky
Exec=your_action
StartupNotify=false
Terminal=false

Have a look into /usr/share/applications for examples.

Here is an overview of GUI ways to do it on a bunch of common desktop environments, but I haven’t tested those: How to start a program automatically in Linux desktop

Hi,

I solved my need following the method 1 reported at this link: