While messing around with Lubuntu 19.04, running lxqt-sudo to launch Pluma text editor as root so that I could edit the /var/www PHP projects I had, I noticed when rightclicking the file browser pane and choosing View Folder, that it opened up, at first, PCManFM-Qt. However, when it did so, it used a very ugly theme. (That's another question I have posted.) Then, I installed Nautilus. When I did, now when I open Pluma as root, it uses some file manager called Files, which I assume is Nautilus because it shows up when I do ps -ef | grep -i nautilus.

How do I tell Pluma to use PCManFM-Qt instead of Nautilus? What config file do I edit?


Setting the default is done with:

xdg-mime default pcmanfm-qt.desktop inode/directory application/x-gnome-saved-search

(I assumed it is pcmanfm-qt.desktop so do check for the actual .desktop file inside /usr/share/applications folder.)

  • nautilus.desktop for Nautilus.
  • nemo.desktop for nemo.
  • etc.

when I open Pluma as root

Please stop this behaviour. Use pkexec instead.

But even then don't! If you need root to edit files in /var/www/ your files are set incorrectly. Check the group of those files and add your user to that group. The group is going to be either www-data or apache if you use apache. Then you can edit the files from your user.

  • Note currently when I type xdg-mime query default inode/directory, it returns with org.gnome,Nautilus.desktop when in sudo su (root). But as a regular user, it returns with pcmanfm-qt.desktop. Perhaps this is useful info to someone. – Volomike May 2 '19 at 6:23
  • As for pkexec, I'm glad you pointed out that tool to me. I had not seen it before. I really just need to edit the PHP files as the www-data user context. I haven't figured out how to make that work just yet -- it says Cannot open display:. Currently my launcher is using lxqt-sudo to launch Pluma as root, and being asked for my login password on lxqt-sudo is annoying when it's just my local desktop. – Volomike May 2 '19 at 6:26
  • see the addition ;-) – Rinzwind May 2 '19 at 6:44
  • Thanks on that. Also, I found this which explains how to get around the Cannot open display and No protocol specified problems. – Volomike May 2 '19 at 6:56

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.