1

I am trying to autostart a music player when my Lubuntu boots but I can't seem to get it to work. I am fairly new to Linux systems and have searched the internet for hours but I am out of ideas. This is a .desktop file I made:

[Desktop Entry]
Name=Script
Exec=/home/t/script.sh
Icon=home/t/script.sh
Terminal=true
Type=Application
X-KeepTerminal=true
StartupNotify=false

When I manually start it it works perfectly. I've added this file in:

  • /.config/autostart
  • /etc/xdg/autostart
  • /usr/share/applications

At: /.config/lxsession/Lubuntu I added the line

@/home/t/dtest.desktop

I also added the directory to rc.local

Zanna
  • 70,465
Tiest
  • 11
  • 1
    you don't need a .desktop file, just add /home/t/script.sh to startup applications. – pLumo Apr 27 '20 at 11:15
  • Thank you for your reply, I tried adding script.sh to the directories but it still didn't work. I was using a .desktop file to force the script to execute in terminal because otherwise it does not work. – Tiest Apr 27 '20 at 11:39
  • What does /home/t/script.sh do? – Melebius May 05 '20 at 10:07

1 Answers1

0

The most reliable and easy way of eadling with setting up autostart scripts is doing it using tools from your Desktop Enviroment.

I think answer for your question is here: How can I add new autostart programs in Lubuntu?

(you should look at answer: For Lubuntu 19.04+)

pktiuk
  • 879