I wrote a small compose program with tray icon for...
# random
e
I wrote a small compose program with tray icon for vpn management, how can I have it run automatically on boot? I'm on Ubuntu (and it's supposed to be linux-only), I tried the following on `crontab -e`:
@reboot /home/elect/IdeaProjects/easnx/run.sh
but nothing runs..
script is dead simple
Copy code
#!/bin/bash

cd /home/elect/IdeaProjects/easnx
./gradlew run
and works flawless if called manually
s
I think systemd will work. Look for some instructions on making a systemd service. Basic principle is to create a
.service
config file for it, and then use
systemctl enable myservice
.
r
systemd is indeed the best option most of the time if you actually require it to run on boot. Depending on what your program does though, it may be simpler/ more appropriate to run it on login to your graphical Desktop session. You can configure Startup Applications in Gnome Tweak Tool (or equivalent for different DEs)
very nice 1