# Autostart -\>Program at KDE/Plasma launch

**URL:** <https://forum.endeavouros.com/t/autostart-program-at-kde-plasma-launch/27074>\
**Category:** Newbie\
**Created:** [May 14, 2022, 10:40am UTC](https://forum.endeavouros.com/t/autostart-program-at-kde-plasma-launch/27074 "2022-05-14T10:40:51Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Data](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/data/32/49870_2.png) [@Data](https://forum.endeavouros.com/u/Data)\
**Post date:** [May 14, 2022, 10:40am UTC](https://forum.endeavouros.com/t/autostart-program-at-kde-plasma-launch/27074/1 "2022-05-14T10:40:51Z")

</div>

Hi  
I have looked up various pages online looking for the answer, Ive done this before and can not remember how. I wish to run a command at start up/Login “streamdeck -n”

I can do this at the prompt but it grabs output and closes when prompt closes,  
I therefore if doing manualy from the prompt have to enter “nohup streamdeck -n &”.

I have created a small bash script to be run at startup, however this does not seem to function,  
the only thing I can think of is IAm running ZSH rather than Bash.

Manual input from prompt  
 ![Prompt](https://forum.endeavouros.com/uploads/default/original/3X/3/8/38e3da9af3211ce68030ec29222993ada684a9e0.png)  
Script  
 ![Contents](https://forum.endeavouros.com/uploads/default/original/3X/2/a/2a2cd1809441e78c8137b57bfb77891c2a0feae1.png)  
Autostart  
 ![autostart](https://forum.endeavouros.com/uploads/default/original/3X/9/c/9c1f5852766453b6c21badb16600d86685ac7ec3.png)  
Autostart Properties  
 ![AutostartPropertise](https://forum.endeavouros.com/uploads/default/original/3X/e/6/e629264d2500672c66e656987ccae00a48e064c6.png)

What changes / What have I done wrong?

–  
Data

---

<div class="post-metadata">

**Author:** ![HCHR](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/h/eada6e/32.png) [@HCHR](https://forum.endeavouros.com/u/HCHR)\
**Post date:** [May 14, 2022, 10:52am UTC](https://forum.endeavouros.com/t/autostart-program-at-kde-plasma-launch/27074/2 "2022-05-14T10:52:25Z")

</div>

Go to Settings - Startup and Shutdown - Autostart  
and add your script there

---

<div class="post-metadata">

**Author:** ![Data](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/data/32/49870_2.png) [@Data](https://forum.endeavouros.com/u/Data)\
**Post date:** [May 14, 2022, 11:23am UTC](https://forum.endeavouros.com/t/autostart-program-at-kde-plasma-launch/27074/3 "2022-05-14T11:23:08Z")

</div>

Hi  
That was my first choice. But it still does not launch at boot/launch/login  
It’s missing something!!  
 ![aurostart1](https://forum.endeavouros.com/uploads/default/original/3X/c/b/cb1af77f49c51036e3b970786bc7df8c96db9ebc.png)

–  
Data

---

<div class="post-metadata">

**Author:** ![HCHR](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/h/eada6e/32.png) [@HCHR](https://forum.endeavouros.com/u/HCHR)\
**Post date:** [May 14, 2022, 12:26pm UTC](https://forum.endeavouros.com/t/autostart-program-at-kde-plasma-launch/27074/4 "2022-05-14T12:26:27Z")

</div>

Try this:  
move the script out of ~./config/autostart/  
Add the script again from the new location in  
Settings - Startup and Shutdown - Autostart

I don’t know about ZSH, but the duckduckgo says:  
To use zsh explicitly, add the shebang as:  
#!/usr/bin/zsh

---

<div class="post-metadata">

**Author:** ![Data](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/data/32/49870_2.png) [@Data](https://forum.endeavouros.com/u/Data)\
**Post date:** [May 14, 2022, 12:51pm UTC](https://forum.endeavouros.com/t/autostart-program-at-kde-plasma-launch/27074/5 "2022-05-14T12:51:46Z")

</div>

Hi  
Thanks for the info-Shebang.zsh  
I made a new directory in home as suggested,  
 ![NewFolder](https://forum.endeavouros.com/uploads/default/original/3X/5/3/53b544918409e7fc582a90f997e95b50118db58c.png)

Altered shebang  
Reapplied chmod a+x streamdeck1.ls

* * *

I tried adding it as a normal autostart  
I also tried adding it as a logon script

No Joy.

–  
Bamboozled Data

---

<div class="post-metadata">

**Author:** ![HCHR](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/h/eada6e/32.png) [@HCHR](https://forum.endeavouros.com/u/HCHR)\
**Post date:** [May 14, 2022, 1:25pm UTC](https://forum.endeavouros.com/t/autostart-program-at-kde-plasma-launch/27074/6 "2022-05-14T13:25:37Z")

</div>

The script does work if you db-click on it?

If streamdeck is an application, you should add it as that and not as script

---

<div class="post-metadata">

**Author:** ![Data](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/data/32/49870_2.png) [@Data](https://forum.endeavouros.com/u/Data)\
**Post date:** [May 14, 2022, 2:32pm UTC](https://forum.endeavouros.com/t/autostart-program-at-kde-plasma-launch/27074/7 "2022-05-14T14:32:52Z")

</div>

Hi thanks for continued efforts 🙂

When I start/attempt the program/script in dolphin I get!!!  
 ![DolphinStartAuto](https://forum.endeavouros.com/uploads/default/original/3X/3/a/3ad7ab4da6ade4fa4d218bd95b570f1dac46199c.png)  
when I execute the script from the prompt It works.  
 ![FromTerminator](https://forum.endeavouros.com/uploads/default/original/3X/b/6/b699625044ed9eff2a97e6d7af442c942ea62355.png)

To answer you : This is an python scripted program, as such it has no “application” I can confirm  
that the script streamdeck(not confuse with my script) is on the command path.

–  
Data

---

<div class="post-metadata">

**Author:** ![pebcak](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/pebcak/32/100472_2.png) [@pebcak](https://forum.endeavouros.com/u/pebcak)\
**Post date:** [May 14, 2022, 2:40pm UTC](https://forum.endeavouros.com/t/autostart-program-at-kde-plasma-launch/27074/8 "2022-05-14T14:40:23Z")

</div>

> [@Data](#):
>
> python scripted program

Try

`python streamdeck -n`

or

`python3 streamdeck -n`

in a terminal. If this works, put it into the script and see if it works.

---

<div class="post-metadata">

**Author:** ![Data](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/data/32/49870_2.png) [@Data](https://forum.endeavouros.com/u/Data)\
**Post date:** [May 14, 2022, 2:54pm UTC](https://forum.endeavouros.com/t/autostart-program-at-kde-plasma-launch/27074/9 "2022-05-14T14:54:54Z")

</div>

Hi  
Sorry it looks for a file or program… Phython does.  
 ![Python](https://forum.endeavouros.com/uploads/default/original/3X/7/9/79072fb2d66ed56dce0ce7b89b4a129d4bacef6b.png)

–  
Data

---

<div class="post-metadata">

**Author:** ![pebcak](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/pebcak/32/100472_2.png) [@pebcak](https://forum.endeavouros.com/u/pebcak)\
**Post date:** [May 14, 2022, 3:25pm UTC](https://forum.endeavouros.com/t/autostart-program-at-kde-plasma-launch/27074/10 "2022-05-14T15:25:38Z")

</div>

> [@Data](#):
>
> looks for a file or program

How about (just guessing 😉):

`python /path/to/streamdeck`

?

---

<div class="post-metadata">

**Author:** ![Data](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/data/32/49870_2.png) [@Data](https://forum.endeavouros.com/u/Data)\
**Post date:** [May 14, 2022, 3:37pm UTC](https://forum.endeavouros.com/t/autostart-program-at-kde-plasma-launch/27074/11 "2022-05-14T15:37:42Z")

</div>

Grand Solved. Thanks @pebcak

#!/usr/bin/zsh

python ~/.local/bin/streamdeck -n

EDITED  
“Solution highlighted as requested below”

@ricklinux lock pls thanks for your patience.

---

<div class="post-metadata">

**Author:** ![pebcak](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/pebcak/32/100472_2.png) [@pebcak](https://forum.endeavouros.com/u/pebcak)\
**Post date:** [May 14, 2022, 3:42pm UTC](https://forum.endeavouros.com/t/autostart-program-at-kde-plasma-launch/27074/12 "2022-05-14T15:42:07Z")

</div>

Great! Glad you got it sorted out!

If you are content with the outcome, please consider to mark the appropriate post as the solution. In this way the forum software will also recognize it as such and others searching in solved threads looking for a solution to similar problem would find it more easily.

:enos_flag:

---

<div class="post-metadata">

**Author:** ![system](https://forum.endeavouros.com/uploads/default/original/2X/9/9ea52f9fd5ef8e609e593c362d61a36295f48be8.png) [@system](https://forum.endeavouros.com/u/system)\
**Post date:** [May 16, 2022, 3:43pm UTC](https://forum.endeavouros.com/t/autostart-program-at-kde-plasma-launch/27074/13 "2022-05-16T15:43:10Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
