Xfce Forum

Sub domains
 

You are not logged in.

#1 2024-12-07 21:14:17

mint4all
Member
From: off the map
Registered: 2018-08-21
Posts: 285
LinuxFirefox 133.0

XFCE's list of "autostart" apps ... CLI to query and set

Greetings --

After looking over XFCE4's settings in ~/.config/xfce4 folders, I can't seem to find where the list of user-space auto-started apps is located. I'd like to know if there are any built-in terminal commands (CLI, such as xfconf) available that could be used to query the list of apps, to add/remove apps, or to toggle their auto-start on/off as needed. Thanks for looking into this...

Cheers, m4a


Linux Mint 21.3 -- xfce 4.18 ... Apple iMAC -- Lenovo, Dell, HP Desktops and Laptops -- Family & Community Support

Offline

#2 2024-12-08 00:29:59

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,547
LinuxFirefox 133.0

Re: XFCE's list of "autostart" apps ... CLI to query and set

The user-space autostart files are located in ~/.config/autostart. The "Hidden" field indicates whether it is active (checked in Settings Manager > Session and Startup > Autostart Application). A missing Hidden field indicates a true value.

Unfortunately, this info is not stored in xfconf - so you can't use xfconf-query to manage the files. You can edit them manually, or here is a script that you can run to toggle the value of the Hidden field (you need to pass the name of the desktop file you want to toggle):

#!/usr/bin/env bash
# $1 is the name of the autostart desktop file

# check to see if $1 is a valid file
[[ ! -f $1 ]] && exit 1

# check to see if hidden field exists
if grep -i hidden $1; then

	# if so get current value
	CV=$(grep -i hidden $1 | awk -F'=' '{print $2}')

	# get toggle value
	[[ $CV == "true" ]] && NV="false" || NV="true"

	# set the new vale
	sed -i "s/Hidden.*/Hidden=$NV/" $1

# if it doesn't exist, it must be true
else
	echo "Hidden=false" >> $1

fi

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2024-12-08 13:30:05

mint4all
Member
From: off the map
Registered: 2018-08-21
Posts: 285
LinuxFirefox 133.0

Re: XFCE's list of "autostart" apps ... CLI to query and set

Thank you very much ... As always, I admire your expertise! Your script will go a long way towards what I'm trying to do.

Question: is the ~/.config/autostart folder unique to XFCE, or generally used by Linux? It looks like it doesn't appear in my global environment settings, but I could be missing something...

Thanks, again.
Cheers, m4a


Linux Mint 21.3 -- xfce 4.18 ... Apple iMAC -- Lenovo, Dell, HP Desktops and Laptops -- Family & Community Support

Offline

#4 2024-12-08 13:59:33

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,547
LinuxFirefox 133.0

Re: XFCE's list of "autostart" apps ... CLI to query and set

~/.config/autostart is part of the XDG Autostart spec - if the DE supports it then it would be used.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.009 seconds, 7 queries executed - Memory usage: 536.23 KiB (Peak: 537.08 KiB) ]