Xfce Wiki

Sub domains
 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
xfce:thunar:custom-actions [2024/01/06 17:18] – [Open root terminal here] alexxconsxfce:thunar:custom-actions [2024/03/29 19:47] (current) – Using dbus-launch seems to be the best way to get proper support for D-Bus services and as few warnings as possible gael
Line 167: Line 167:
 ==== Open root terminal here ==== ==== Open root terminal here ====
     * Name: **Open root terminal here**     * Name: **Open root terminal here**
-    * Command(1): ''<nowiki>sudo xfce4-terminal --default-working-directory=%f</nowiki>''+    * Command(1): ''<nowiki>pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY dbus-launch xfce4-terminal --default-working-directory=%f</nowiki>''
     * Command(2): ''<nowiki>gksu xfce4-terminal --default-working-directory=%f</nowiki>''     * Command(2): ''<nowiki>gksu xfce4-terminal --default-working-directory=%f</nowiki>''
     * File pattern: *     * File pattern: *
     * Appears if selection contains: Directories     * Appears if selection contains: Directories
  
-**Note:** Use either sudo or gksu ... whatever your distro ships. You should rewrite the command with normal straight quotes.+**Note:** Use either pkexec or gksu, depending on what is available for your distro. 
 + 
 +**Note:** You should rewrite the command with normal straight quotes.
  
 ---- ----
 ==== Open thunar as root here ==== ==== Open thunar as root here ====
     * Name: **Open thunar as root here**     * Name: **Open thunar as root here**
-    * Command: ''gksu thunar %f''+    * Command(1): ''pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY dbus-launch thunar %f'' 
 +    * Command(2): ''thunar admin:/''''/''''/%f'' 
 +    * Command(3): ''gksu thunar %f''
     * File pattern: *     * File pattern: *
     * Appears if selection contains: Directories     * Appears if selection contains: Directories
  
-**Note:** Some distributions no longer include ''gksu''. Use ''pkexec'' instead.+**Note:** Some distributions no longer include ''gksu''. Use ''pkexec'' or the ''admin'' interface instead.
  
 ---- ----
 ==== Edit file as root ==== ==== Edit file as root ====
     * Name: **Edit as root**     * Name: **Edit as root**
-    * Command: ''gksu put-your-favourite-text-editor-here %f''+    * Command(1): ''pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY dbus-launch put-your-favourite-text-editor-here %f'' 
 +    * Command(2): ''gksu put-your-favourite-text-editor-here %f''
     * File pattern: *     * File pattern: *
     * Appears if selection contains: Text files     * Appears if selection contains: Text files