0

Ubuntu 22.10

The text of the script file (gamma.sh) I wish to invoke at boot/reboot is as follows:

xgamma -gamma 0.6 

In terminal, the script can be invoked without difficulties by command: ./gamma.sh

The .sh file properties are set to execute as program.

PROBLEM...

I opened Startup Applications. Added ./gamma.sh

Result... Upon boot/reboot, the gamma.sh will not start.

QUESTION: How to invoke the gamma.sh on boot/reboot?

thank you.

Raffa
  • 34,963
rob grune
  • 1,161

1 Answers1

0

It looks like you are trying to create a shell script.

The first line of a script must list the interpreter of the script, which must start with a / . Subsequent lines can then be commands, for example xgamma.

for example

#!/bin/sh
xgamma -gamma 0.6

Once you have done that, you have to make the script executable: chmod +x gamma.sh

It is possible to take some shortcuts and leave out some of these pieces, but for best results, use the above.

Next, you have to find an appropriate way to start this script. You probably should not start it at boot, as xgamma needs the X11 server to be running and it needs access permissions to use the X server, neither of which is the case at boot.

Instead, you may want to run this as part of the display server login banner initialization, or more likely, part of the user login session. (Or maybe both.)

user10489
  • 5,533