Since my main data is not in $HOME, I have made a small (executable) script to start the GUI file manager (caja) in the desired directory and put it in my local executable directory (~/.local/bin):

/usr/bin/caja /datadir

To supersede the standard command caja, the script has the same name and the path to my local executables is listed first in my ~/.profile:

if [ -d "$HOME/.local/bin" ] ; then

Works fine so far, BUT whenever I log in the file manager is opened by default. No session saving is activated, no other executable from that directory is executed (tried a few echo-scripts and even other GUI commands).

How can I suppress this behaviour?

Using MATE as DE on Debian 10 (testing)


caja is not only a file manager, but also manages a few desktop settings, e.g. desktop symbols (link). Thus it will be executed when starting a MATE session. This seems unavoidable for a proper MATE session startup.

Same goes for natuilus in gnome.

A quick-and-dirty solution would be to name your script something else, have a script create a symlink (named caja and pointing to your Caja launch script) at login but after the desktop is up and running, and delete the symlink in ~/.bash_logout (assuming your shell is bash).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.