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 2


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:


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
  • That works, thanks! Commented Jan 19, 2021 at 21:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .