Custom actions in thunar

@Aravisian You wrote that GUI programs should not be opened with sudo. How should e.g. gparted and synaptic then be used without using sudo? Also with pkexec?

I think it was another file. I'll try this again later.

Yes.
When these are launched from the app menu, their .desktop file launches them with pkexec, which is why you get an authorization prompt.
In terminal:

pkexec synaptic

pkexec gparted

1 Like

Is it then also better to navigate to the desired file or the parent directory in thunar first and then click on "open as root" instead of switching to rootuser right at the start when opening thunar in the home directory?

Entirely your preference. Use what works best for your workflow.

For me, I have learned that the terminal is blazing fast. I can cd to where I need to be like a Teleporter.

But... Sometimes I want the GUI eyecandy - or to just slow down and see the sights...

How can I find out which is the default program for the clipboard? I have installed xsel, but would prefer to use the default program from LM XFCE. I have not found out anywhere which clipboard program is used.

I am not aware of Linux Mint having a default Clipboard manager. Most users seem to use Clipman.

1 Like

For example, you can copy a text or a file and then paste it. Which program does this? I don't need an extra clipboard manager. Perhaps it is a function or plugin of xfce4?

Ah, I understand. Yes, this is managed within the Desktop Environment. For Mint, whether Mate, XFCE or Cinnamon, it will be gtkclipboard

1 Like

Would this be the command?

echo %F | gtkclipboard

As that is part of the Gnome GIMPToolKit (GTK), no. It is not accessed from the command line.

For a command, you can use xsel or xclip - you must install one of these.
I believe, given one of your posts above, that you have xsel already.

1 Like

Yes, I was just interested in whether it would have worked without adding an extra program.

Not for what I think you are aiming for.
gtkclipboard is a class function of the toolkit, not a standalone program you can call upon.

When I click on files that show in normal mode all my custom commands, in Thunar opened as root there is only one custom action by default (open in terminal) and none of the ones I have added. So if you want to use some custom actions in root-mode they have to be created separately.

Thunar as root also looks completely different from the normal Thunar and does not use the (icon)theme that is normally set. Which files do I have to copy where so that root also uses the same themes (icons, cursor, theme)? I assume it could be because these themes are not set up system-wide, but only for my user. The aim is that only my user and root should have this theme, but not other users.

Your assumption is spot on.

If you set a theme into /usr/share/themes and an icon set into /usr/share/icons (Move copies of yours in ~/.themes and ~/.icons) Then they can apply to your Root Elevated Thunar or other elevated apps.

Other users would be able to access and use the themes and icons if they wanted to... But it would not change their User Theme Defaults just by being present in the system wide folders.

1 Like

Thank you very much! I just realized that I had wrongly assumed that this theme would also be activated for other users.

Edit: Now thunar in root-mode looks like the normal thunar :grinning_face:
And I also added to places in root-mode my home directory so that I have easier access. At first, when I was new to Linux, it was very irritating for me that the house here does not lead to the user home directory but to the root. That way I can find everything faster.

1 Like