You are not logged in.

#1 2023-01-14 08:09:52

tethys
Member
Registered: 2019-08-13
Posts: 175

Question about $HOME/.config/autostart

I am using GNOME.

How can I run my own script from $HOME/.config/autostart?

All searches I made talk about a .desktop file that must be dropped there, that I know. But are there other possibilities, that is, other types of files that can be executed from autostart? Is it perhaps possible to directly execute a (modified version of a) bash script or should I always write a .destop file?

Offline

#2 2023-01-14 10:30:09

Data007
Member
Registered: 2022-09-06
Posts: 101

Re: Question about $HOME/.config/autostart

tethys wrote:

I am using GNOME.

How can I run my own script from $HOME/.config/autostart?

Hi Tethys
Dt on YouTube did a nice video on how to autostart programs on Linux, I can't remember if he covered scripts in it.

Search

DT Autostart

DT=Distro Tube

HIH

--
Data 007

Offline

#3 2023-01-14 13:23:37

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,149

Re: Question about $HOME/.config/autostart


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#4 2023-01-14 18:21:44

tethys
Member
Registered: 2019-08-13
Posts: 175

Re: Question about $HOME/.config/autostart

Thank you Data007 & Lone_Wolf!

Data007: I think I found the video you mentioned but the guy talks only about .desktop files.

Lone_Wolf: I had already read both the documents you linked, again they mention only .desktop files.

So I guess that only .desktop files can be launched from $HOME/.config/autostart in GNOME, however I will not mark this thread as solved yet but wait for more feedback.

Offline

#5 2023-01-14 18:31:23

Data007
Member
Registered: 2022-09-06
Posts: 101

Re: Question about $HOME/.config/autostart

Hi tethys.

Its a year old but may help you.

https://www.youtube.com/watch?v=jcE8U1lG514

--
Data007

Offline

#6 2023-01-14 18:49:34

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: Question about $HOME/.config/autostart

tethys wrote:

IBut are there other possibilities, that is, other types of files that can be executed from autostart? Is it perhaps possible to directly execute a (modified version of a) bash script

No. The only way to run a script is from the Exec entry in a .desktop file.

EDIT: scripts can be run directly from ~/.xprofile but not for the Wayland GNOME desktop (the clue is in the name of the file).

Last edited by Head_on_a_Stick (2023-01-14 19:00:23)


Jin, Jîyan, Azadî

Offline

#7 2023-01-15 10:22:05

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,149

Re: Question about $HOME/.config/autostart

There are several other possibilities mentioned on the autostarting wiki page that do not use XDG autostart (~/.config/autostart) , but will work regardless of X, wayland , DE, WM etc .

To determine whether one of them will work for you, we need to know more .

What is the script supposed to achieve ?
When does it need to run ?



-


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#8 2023-01-15 18:29:51

tethys
Member
Registered: 2019-08-13
Posts: 175

Re: Question about $HOME/.config/autostart

Actually I am confronted with the same issue discussed in this thread. I am using GNOME with LightDM. Unfortunately, although the wiki says that $HOME/.Xmodmap should be loaded automatically at startup (which I checked myself by examining /etc/lightdm/Xsession), this is not the case. So I chose the solution mentioned in the above-mentioned solved thread, that is, over XDG autostart.

Offline

Board footer

Powered by FluxBB