You are not logged in.
I've been pouring over the documentation, and I can't seem to find an answer to this question (I'm running xfce 4.6.2)
What I ultimately want to do is run xmodmap on my custom rules every time xfce starts. I understand that there's some bugginess with xfce and xmodmap, which makes putting a simple xmodmap ~/.Xmodmap line in .xinitrc problematic. I can throw together a short shell script like #!/bin/sh xmodmap ~/.Xmodmap or #!/bin/sh sleep 10; xmodmap ~/.Xmodmap or whatever ends up being necessary to force xmodmap to run after whatever xfce does with the keyboard, but I can't figure out how to make that script itself execute on startup. Putting an entry to run a script in the Application Autostart screen doesn't do anything, and I've tried it with other shell scripts that I know work without any success either. In fact I'm not really sure *why* the application autostart screen works for certain little utility programs but won't load my bash scripts.
Offline
Create a .desktop file in ~/.config/autostart
Folder might not exist by default. If not, create it.
The file can be named any as long as the extension is .desktop.
It should look like this:
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=Script
Type=Application
Exec=/usr/local/share/script.sh
Icon=
Terminal=false
StartupNotify=false
Hidden=false
GenericName=
GenericName[en_US]=
Where I bolded is the path to your script.
Offline
Hello,
Just a few notes:
- the encoding line is deprecated, just remove it
- lines with nothing after the "=" can be removed, like "Icon=", "GenericName=" and "GenericName="
Cheers,
Jérôme
Offline
Should also mention that you can auto-generate the autostart file by going into Settings>Session and Startup>Application Autostart and clicking, "Add".
Offline
Create a .desktop file in ~/.config/autostart
Do I really need to bother with desktop files for simple things like "unclutter &" or personal scripts? In icewm there is a script called "startup" where you can put any startup command you wish, which is useful since .xinitrc does not seem to be loaded as long as I currently still use lightdm along with xfce.
Last edited by Oberlin (2024-05-15 16:01:54)
Offline
[ Generated in 0.010 seconds, 7 queries executed - Memory usage: 532.03 KiB (Peak: 532.66 KiB) ]