You are not logged in.
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
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
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
~/.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
[ Generated in 0.009 seconds, 7 queries executed - Memory usage: 536.23 KiB (Peak: 537.08 KiB) ]