Bash Script won't load on Start

I have a little bash script in Auto Start, that should load my Colour-Profile for my nvidia card:

#!/bin/bash
sleep 5
/usr/bin/nvidia-settings -l

Its in this directory:
/home/koboldx/.config/autostart-scripts/nvidia.sh

I also select under Properties>Permission:
Executable

With a manually double click on my .sh file, my script just works but its somehow ignored when i put it in Autostart.

Is it not working because you have no display defined in the script?

Also you could use the other way to autostart, instead of making an autostart script, make an autostart application (with .desktop file).

1 Like

i don’t think so, because manual execution works.

Thats what i wrote under my screenshot.

The problem is, i already have another Application script for nvidia settings:

/usr/bin/nvidia-settings -a currentmetamode="2560x1440_144 { AllowGSYNC=Off }"

And i can’t create 2x nvidia application Script for the same Application.

I mean i can add 2 Application Script’s but it won’t let me use 2 differend commands then. :face_with_diagonal_mouth:

One App Script will overwrite the other…

but manually executing your script from your desktop graphical environment is not the same as a script autostarting on boot, right?

I would say you can, but I never tried.
You can put two commands in one .desktop file anyway (you wrote script, I assume it was a mistake the four times you wrote that, and you meant a .desktop file added in the autostart folder).

2 Likes

You should create a new desktop file in ~/.config/autostart/nvidia.desktop

[Desktop Entry]
Name=Nvidia autostart
Exec=/home/koboldx/.config/autostart-scripts/nvidia.sh
Terminal=false
Type=Application
1 Like

I had the same issue, with my bash file that loads a Alsamixer Profile for my Soundcard, after a Kernel Update it looks to me that Auto Start Scripts (for non App Scripts) no longer working since above a 1year now.

I solved the Issue, with adding 2x Nvidia X Server Settings to autostart but i renamed the first Profile under General and under Application>Name, in this way i could link 2 Profiles to 1 Application.

Thank you both for the support :slight_smile:

I think autostart scripts work anyway. However, my autostart script in KDE are found in the autostart folder, not the autostart-scripts folder. Add your script in KDE from the System Settings dedicated page.

My script also showed up in Autostart folder, it looks like a additional link for KDE or something like that… i never openend this file with kate and i deleted now the nvidia.sh file.

Anyways, im happy that everything works now :slight_smile:

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