Bug 430611 - Autostart Not Working For Kali Linux 2020.4 & Garuda Linux using KDE
Summary: Autostart Not Working For Kali Linux 2020.4 & Garuda Linux using KDE
Status: RESOLVED NOT A BUG
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_autostart (show other bugs)
Version: 5.19.5
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Nicolas Fella
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-20 05:59 UTC by Matt
Modified: 2020-12-22 22:46 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt 2020-12-20 05:59:52 UTC
Garuda KDE Dr460nized:
When adding my own script to the Autostart it did not load even with it being chmod +x

With the default setup.sh I had to chmod +x then add what I wanted inside.

Please update the Autostart to work with other .sh file after adding them to Autostart.

Kali 2020.4 
I found zero success on Kali. I tried to replicate what I did in Garuda Linux. Kali does not have a default setup.sh. I made a setup.sh and put it in both locations. /home/accountName/.config/autostart-scripts/ & /home/accountName/.config/autostart/

Both did not work with chmod +x.
Thank you.

Garuda, needs other sh scripts to work.
Kali 2020.4, needs a default scripts start up. Plus must work with other scripts a user addeds.


STEPS TO REPRODUCE
1. From start menu type start. Click on Autostart, click Add script. Startup option should be already set. Log out log on in or reboot no scripts will run.



SOFTWARE/OS VERSIONS:Kali 2020.4

Linux/KDE Plasma: 107, 5.195
(available in About System)
KDE Plasma Version: plasmashell 5.19.5
KDE Frameworks Version: 5.74.0
Qt Version: 5.15.1(built against 5.15.1)

ADDITIONAL INFORMATION
Comment 1 Matt 2020-12-20 20:02:44 UTC
Trying a work around for .desktop could not get working.
Comment 2 Matt 2020-12-22 01:10:01 UTC
I have added KDE to PopOS same issue.
Comment 3 Nicolas Fella 2020-12-22 01:28:36 UTC
The scripts need to have an appropriate shebang (e.g. #!/usr/bin/env sh), otherwise it won't because Plasma doesn't assume any particular shell.

Does your script have that?
Comment 4 Matt 2020-12-22 10:32:40 UTC
I got the script to work with #!/bin/sh

Could you tell me why my script without #!/bin/sh would work in xfce for start up?

I thought "#" would just comment out the #!/bin/sh, as long as the file type is .sh and you set it to execute with an sh. It would just work.

P.S. were would I post for a feature request for KDE? I would like to add sounds when closing and opening windows.

Thank you for all your help.
Comment 5 Nicolas Fella 2020-12-22 14:21:51 UTC
(In reply to Matt from comment #4)
> I got the script to work with #!/bin/sh
> 
> Could you tell me why my script without #!/bin/sh would work in xfce for
> start up?
I don't know how XFCE does it exactly, but it could be that they just run every script using sh, which would be wrong if that script is something like python or perl.

> I thought "#" would just comment out the #!/bin/sh, as long as the file type
> is .sh and you set it to execute with an sh. It would just work.

# indeed is usually a comment, but #! makes it special. Strictly speaking the extension is just a name and has no further meaning. Although it would be weird it would technically be valid to have a file named foo.sh to be a python script under the hood by having #!/usr/bin/env python

> P.S. were would I post for a feature request for KDE? I would like to add
> sounds when closing and opening windows.
Here on bugs.kde.org for the kwin product, but the answer to that will probably be something like "You can write a custom KWin script that does that"
Comment 6 Matt 2020-12-22 22:46:08 UTC
Do you happen to what is a good resource for kwin scripting?

Thank you for your help.
You can close the ticket.