5

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

3

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).

2

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
1
  • 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 .