I started using rofi
as an application launcher using its drun
function. It works fine, .desktop
files in /usr/share/applications
and $HOME/.local/share/applications
both show on it with no problems. I've been wanting to change where I keep my .desktop
files from $HOME/.local/share/applications
to just $HOME/desktop
, but I can't find any way to tell linux to look for .desktop
files in the directory I want. Is it even possible?
2 Answers
If you want another one directory for desktop files, you need to create a directory with the name applications
somewhere. For example:
$HOME/desktop/applications
Then put the path of the parent folder to the environmental variable XDG_DATA_DIRS
.
To do this, open the file $HOME/.profile
and add the following line to the end:
export XDG_DATA_DIRS="$HOME/desktop:$XDG_DATA_DIRS"
The same with the shell command:
echo 'export XDG_DATA_DIRS="$HOME/desktop:$XDG_DATA_DIRS"' >> $HOME/.profile
Then reboot the system (or just log out and log in again).
Quickly looking at documentations, it appears as though it takes freedesktop.org standard directories and can't be configured to do stuff otherwise
Simple suggestion/workaround would be to make a symlink:
mv $HOME/.local/share/applications $HOME/desktop
ln -s $HOME/desktop $HOME/.local/share/applications