How to add custom action to open folder as root to Thunar?Custom action to set emblem in thunarAdd Searchmonkey to Thunar custom actionsHow to remove a default action in thunar?Thunar custom action to open terminal as rootThunar - Custom actions: select pdf extract pages as imagesCustom actions will not show up in Thunar context menu under “send to”Add Custom Emblem in Thunar, Xubuntu 14.04Open Vim in Xfce4 Terminal from ThunarAre system-wide Thunar custom actions possible?Open a thunar directory with an application action

Do manufacturers try make their components as close to ideal ones as possible?

Can you please explain this joke: "I'm going bananas is what I tell my bananas before I leave the house"?

Company did not petition for visa in a timely manner. Is asking me to work from overseas, but wants me to take a paycut

Can a 2nd-level sorcerer use sorcery points to create a 2nd-level spell slot?

Implement Homestuck's Catenative Doomsday Dice Cascader

How can drunken, homicidal elves successfully conduct a wild hunt?

Is it a problem that pull requests are approved without any comments

What happens to foam insulation board after you pour concrete slab?

How to make a setting relevant?

Are the AT-AT's from Empire Strikes back a deliberate reference to Mecha

What is the advantage of carrying a tripod and ND-filters when you could use image stacking instead?

How do I calculate APR from monthly instalments?

Calling GPL'ed socket server inside Docker?

Java guess the number

How do I write "Show, Don't Tell" as an Asperger

In this example, which path would a monster affected by the Dissonant Whispers spell take?

Credit card offering 0.5 miles for every cent rounded up. Too good to be true?

What happens if you do emergency landing on a US base in middle of the ocean?

Count down from 0 to 5 seconds and repeat

Is there any word or phrase for negative bearing?

PhD student with mental health issues and bad performance

Can Green-Flame Blade be cast twice with the Hunter ranger's Horde Breaker ability?

What is the purpose of building foundations?

When writing an error prompt, should we end the sentence with a exclamation mark or a dot?



How to add custom action to open folder as root to Thunar?


Custom action to set emblem in thunarAdd Searchmonkey to Thunar custom actionsHow to remove a default action in thunar?Thunar custom action to open terminal as rootThunar - Custom actions: select pdf extract pages as imagesCustom actions will not show up in Thunar context menu under “send to”Add Custom Emblem in Thunar, Xubuntu 14.04Open Vim in Xfce4 Terminal from ThunarAre system-wide Thunar custom actions possible?Open a thunar directory with an application action






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








6















Thunar has an option to add context menu custom actions to open Terminal, or to open folders and files in different applications.



Could it be possible to add a menu custom action that would open Thunar itself as root?










share|improve this question






























    6















    Thunar has an option to add context menu custom actions to open Terminal, or to open folders and files in different applications.



    Could it be possible to add a menu custom action that would open Thunar itself as root?










    share|improve this question


























      6












      6








      6


      1






      Thunar has an option to add context menu custom actions to open Terminal, or to open folders and files in different applications.



      Could it be possible to add a menu custom action that would open Thunar itself as root?










      share|improve this question
















      Thunar has an option to add context menu custom actions to open Terminal, or to open folders and files in different applications.



      Could it be possible to add a menu custom action that would open Thunar itself as root?







      root thunar






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 14 at 20:17









      Diogo Gomes

      352214




      352214










      asked Oct 9 '12 at 9:38







      user47206



























          4 Answers
          4






          active

          oldest

          votes


















          7














          It appears that this is indeed possible. Following are specific instructions to add such an action, taken from the Xfce site.



          Opening a root Thunar
          Name: Open a root Thunar here
          Command: gksu thunar %f
          File pattern: *
          Appears if selection contains: Directories






          share|improve this answer

























          • is there a way that change is so that i can open nearly anthing as root?

            – user194862
            Oct 10 '13 at 11:54











          • Would there be a reason why this doesn't work? Neither this nor "edit folder as root" do anything for me... nothing opens or happens...

            – dez93_2000
            Oct 15 '14 at 0:12






          • 2





            to add: gksu not installed by default in xubuntu, sudo is. "sudo thunar %f" doesn't work, presumably because there's no way to pass the password to it. "thunar %f" works. You have to right-click a folder.

            – dez93_2000
            Sep 19 '15 at 16:00


















          2














          As of 18.04 gksu is no longer even included in the default repositories. The recommended way to do this now is as follows:



          Name: Open as admin
          Command: thunar admin://%f
          File pattern: *
          Appears if selection contains: Directories


          Weirdly though, Polkit will sometimes ask for the password twice when you first use this command. The elevated privileges seem to persist for several minutes so you won't be asked for the password again if you use the command several times in a short space of time.



          Be aware that this isn't true root. You can modify or delete any files that would require root privileges via this method, however any files you create will just have your default user permissions.






          share|improve this answer
































            0














            a dirty little trick i use because on my distro the "%f" will never be blatantly passed on to pkexe



            create a newfile with the following



            #!/bin/sh
            # Super User Execute
            # Gives PkExec current environmental variables
            # and passes current parameters thru running shells to it.
            #
            # Use this file instead of gksu, gksudo, and, pkexe.
            # /usr/bin/suxe

            pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY $1 $2 $3 $4 $5 $6


            save it as:
            ~/suxe
            (note: some distros DO NOT like the ~/ shorthand
            for home folder access. So, use your actual path in this situation)
            e.g
            /home/Johnny/Documents/suxe



            then make it an executable file in /usr/bin



            sudo cp ~/suxe /usr/bin/suxe


            make it executable



            cd /usr/bin
            su chmod -x ./suxe


            now in Thunars' custom action use:



            Name: Open with admin access



            Command: suxe thunar %f



            File pattern: *



            Appears if selection contains: Directories



            hope this helps






            share|improve this answer






























              0














              I found with UbuntuStudio 18.04 suxe thunar method works without the %f but only after right clicking on a thunar file/folder pane. Doesn't work when right clicking on the desktop.






              share|improve this answer























                Your Answer








                StackExchange.ready(function()
                var channelOptions =
                tags: "".split(" "),
                id: "89"
                ;
                initTagRenderer("".split(" "), "".split(" "), channelOptions);

                StackExchange.using("externalEditor", function()
                // Have to fire editor after snippets, if snippets enabled
                if (StackExchange.settings.snippets.snippetsEnabled)
                StackExchange.using("snippets", function()
                createEditor();
                );

                else
                createEditor();

                );

                function createEditor()
                StackExchange.prepareEditor(
                heartbeatType: 'answer',
                autoActivateHeartbeat: false,
                convertImagesToLinks: true,
                noModals: true,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: 10,
                bindNavPrevention: true,
                postfix: "",
                imageUploader:
                brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                allowUrls: true
                ,
                onDemand: true,
                discardSelector: ".discard-answer"
                ,immediatelyShowMarkdownHelp:true
                );



                );













                draft saved

                draft discarded


















                StackExchange.ready(
                function ()
                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f198128%2fhow-to-add-custom-action-to-open-folder-as-root-to-thunar%23new-answer', 'question_page');

                );

                Post as a guest















                Required, but never shown
























                4 Answers
                4






                active

                oldest

                votes








                4 Answers
                4






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                7














                It appears that this is indeed possible. Following are specific instructions to add such an action, taken from the Xfce site.



                Opening a root Thunar
                Name: Open a root Thunar here
                Command: gksu thunar %f
                File pattern: *
                Appears if selection contains: Directories






                share|improve this answer

























                • is there a way that change is so that i can open nearly anthing as root?

                  – user194862
                  Oct 10 '13 at 11:54











                • Would there be a reason why this doesn't work? Neither this nor "edit folder as root" do anything for me... nothing opens or happens...

                  – dez93_2000
                  Oct 15 '14 at 0:12






                • 2





                  to add: gksu not installed by default in xubuntu, sudo is. "sudo thunar %f" doesn't work, presumably because there's no way to pass the password to it. "thunar %f" works. You have to right-click a folder.

                  – dez93_2000
                  Sep 19 '15 at 16:00















                7














                It appears that this is indeed possible. Following are specific instructions to add such an action, taken from the Xfce site.



                Opening a root Thunar
                Name: Open a root Thunar here
                Command: gksu thunar %f
                File pattern: *
                Appears if selection contains: Directories






                share|improve this answer

























                • is there a way that change is so that i can open nearly anthing as root?

                  – user194862
                  Oct 10 '13 at 11:54











                • Would there be a reason why this doesn't work? Neither this nor "edit folder as root" do anything for me... nothing opens or happens...

                  – dez93_2000
                  Oct 15 '14 at 0:12






                • 2





                  to add: gksu not installed by default in xubuntu, sudo is. "sudo thunar %f" doesn't work, presumably because there's no way to pass the password to it. "thunar %f" works. You have to right-click a folder.

                  – dez93_2000
                  Sep 19 '15 at 16:00













                7












                7








                7







                It appears that this is indeed possible. Following are specific instructions to add such an action, taken from the Xfce site.



                Opening a root Thunar
                Name: Open a root Thunar here
                Command: gksu thunar %f
                File pattern: *
                Appears if selection contains: Directories






                share|improve this answer















                It appears that this is indeed possible. Following are specific instructions to add such an action, taken from the Xfce site.



                Opening a root Thunar
                Name: Open a root Thunar here
                Command: gksu thunar %f
                File pattern: *
                Appears if selection contains: Directories







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Jun 5 '18 at 12:03









                Melebius

                5,93652447




                5,93652447










                answered Oct 9 '12 at 9:42









                Karthik TKarthik T

                1,30611019




                1,30611019












                • is there a way that change is so that i can open nearly anthing as root?

                  – user194862
                  Oct 10 '13 at 11:54











                • Would there be a reason why this doesn't work? Neither this nor "edit folder as root" do anything for me... nothing opens or happens...

                  – dez93_2000
                  Oct 15 '14 at 0:12






                • 2





                  to add: gksu not installed by default in xubuntu, sudo is. "sudo thunar %f" doesn't work, presumably because there's no way to pass the password to it. "thunar %f" works. You have to right-click a folder.

                  – dez93_2000
                  Sep 19 '15 at 16:00

















                • is there a way that change is so that i can open nearly anthing as root?

                  – user194862
                  Oct 10 '13 at 11:54











                • Would there be a reason why this doesn't work? Neither this nor "edit folder as root" do anything for me... nothing opens or happens...

                  – dez93_2000
                  Oct 15 '14 at 0:12






                • 2





                  to add: gksu not installed by default in xubuntu, sudo is. "sudo thunar %f" doesn't work, presumably because there's no way to pass the password to it. "thunar %f" works. You have to right-click a folder.

                  – dez93_2000
                  Sep 19 '15 at 16:00
















                is there a way that change is so that i can open nearly anthing as root?

                – user194862
                Oct 10 '13 at 11:54





                is there a way that change is so that i can open nearly anthing as root?

                – user194862
                Oct 10 '13 at 11:54













                Would there be a reason why this doesn't work? Neither this nor "edit folder as root" do anything for me... nothing opens or happens...

                – dez93_2000
                Oct 15 '14 at 0:12





                Would there be a reason why this doesn't work? Neither this nor "edit folder as root" do anything for me... nothing opens or happens...

                – dez93_2000
                Oct 15 '14 at 0:12




                2




                2





                to add: gksu not installed by default in xubuntu, sudo is. "sudo thunar %f" doesn't work, presumably because there's no way to pass the password to it. "thunar %f" works. You have to right-click a folder.

                – dez93_2000
                Sep 19 '15 at 16:00





                to add: gksu not installed by default in xubuntu, sudo is. "sudo thunar %f" doesn't work, presumably because there's no way to pass the password to it. "thunar %f" works. You have to right-click a folder.

                – dez93_2000
                Sep 19 '15 at 16:00













                2














                As of 18.04 gksu is no longer even included in the default repositories. The recommended way to do this now is as follows:



                Name: Open as admin
                Command: thunar admin://%f
                File pattern: *
                Appears if selection contains: Directories


                Weirdly though, Polkit will sometimes ask for the password twice when you first use this command. The elevated privileges seem to persist for several minutes so you won't be asked for the password again if you use the command several times in a short space of time.



                Be aware that this isn't true root. You can modify or delete any files that would require root privileges via this method, however any files you create will just have your default user permissions.






                share|improve this answer





























                  2














                  As of 18.04 gksu is no longer even included in the default repositories. The recommended way to do this now is as follows:



                  Name: Open as admin
                  Command: thunar admin://%f
                  File pattern: *
                  Appears if selection contains: Directories


                  Weirdly though, Polkit will sometimes ask for the password twice when you first use this command. The elevated privileges seem to persist for several minutes so you won't be asked for the password again if you use the command several times in a short space of time.



                  Be aware that this isn't true root. You can modify or delete any files that would require root privileges via this method, however any files you create will just have your default user permissions.






                  share|improve this answer



























                    2












                    2








                    2







                    As of 18.04 gksu is no longer even included in the default repositories. The recommended way to do this now is as follows:



                    Name: Open as admin
                    Command: thunar admin://%f
                    File pattern: *
                    Appears if selection contains: Directories


                    Weirdly though, Polkit will sometimes ask for the password twice when you first use this command. The elevated privileges seem to persist for several minutes so you won't be asked for the password again if you use the command several times in a short space of time.



                    Be aware that this isn't true root. You can modify or delete any files that would require root privileges via this method, however any files you create will just have your default user permissions.






                    share|improve this answer















                    As of 18.04 gksu is no longer even included in the default repositories. The recommended way to do this now is as follows:



                    Name: Open as admin
                    Command: thunar admin://%f
                    File pattern: *
                    Appears if selection contains: Directories


                    Weirdly though, Polkit will sometimes ask for the password twice when you first use this command. The elevated privileges seem to persist for several minutes so you won't be asked for the password again if you use the command several times in a short space of time.



                    Be aware that this isn't true root. You can modify or delete any files that would require root privileges via this method, however any files you create will just have your default user permissions.







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Aug 24 '18 at 22:45

























                    answered Aug 24 '18 at 18:08









                    FibblesFibbles

                    1214




                    1214





















                        0














                        a dirty little trick i use because on my distro the "%f" will never be blatantly passed on to pkexe



                        create a newfile with the following



                        #!/bin/sh
                        # Super User Execute
                        # Gives PkExec current environmental variables
                        # and passes current parameters thru running shells to it.
                        #
                        # Use this file instead of gksu, gksudo, and, pkexe.
                        # /usr/bin/suxe

                        pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY $1 $2 $3 $4 $5 $6


                        save it as:
                        ~/suxe
                        (note: some distros DO NOT like the ~/ shorthand
                        for home folder access. So, use your actual path in this situation)
                        e.g
                        /home/Johnny/Documents/suxe



                        then make it an executable file in /usr/bin



                        sudo cp ~/suxe /usr/bin/suxe


                        make it executable



                        cd /usr/bin
                        su chmod -x ./suxe


                        now in Thunars' custom action use:



                        Name: Open with admin access



                        Command: suxe thunar %f



                        File pattern: *



                        Appears if selection contains: Directories



                        hope this helps






                        share|improve this answer



























                          0














                          a dirty little trick i use because on my distro the "%f" will never be blatantly passed on to pkexe



                          create a newfile with the following



                          #!/bin/sh
                          # Super User Execute
                          # Gives PkExec current environmental variables
                          # and passes current parameters thru running shells to it.
                          #
                          # Use this file instead of gksu, gksudo, and, pkexe.
                          # /usr/bin/suxe

                          pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY $1 $2 $3 $4 $5 $6


                          save it as:
                          ~/suxe
                          (note: some distros DO NOT like the ~/ shorthand
                          for home folder access. So, use your actual path in this situation)
                          e.g
                          /home/Johnny/Documents/suxe



                          then make it an executable file in /usr/bin



                          sudo cp ~/suxe /usr/bin/suxe


                          make it executable



                          cd /usr/bin
                          su chmod -x ./suxe


                          now in Thunars' custom action use:



                          Name: Open with admin access



                          Command: suxe thunar %f



                          File pattern: *



                          Appears if selection contains: Directories



                          hope this helps






                          share|improve this answer

























                            0












                            0








                            0







                            a dirty little trick i use because on my distro the "%f" will never be blatantly passed on to pkexe



                            create a newfile with the following



                            #!/bin/sh
                            # Super User Execute
                            # Gives PkExec current environmental variables
                            # and passes current parameters thru running shells to it.
                            #
                            # Use this file instead of gksu, gksudo, and, pkexe.
                            # /usr/bin/suxe

                            pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY $1 $2 $3 $4 $5 $6


                            save it as:
                            ~/suxe
                            (note: some distros DO NOT like the ~/ shorthand
                            for home folder access. So, use your actual path in this situation)
                            e.g
                            /home/Johnny/Documents/suxe



                            then make it an executable file in /usr/bin



                            sudo cp ~/suxe /usr/bin/suxe


                            make it executable



                            cd /usr/bin
                            su chmod -x ./suxe


                            now in Thunars' custom action use:



                            Name: Open with admin access



                            Command: suxe thunar %f



                            File pattern: *



                            Appears if selection contains: Directories



                            hope this helps






                            share|improve this answer













                            a dirty little trick i use because on my distro the "%f" will never be blatantly passed on to pkexe



                            create a newfile with the following



                            #!/bin/sh
                            # Super User Execute
                            # Gives PkExec current environmental variables
                            # and passes current parameters thru running shells to it.
                            #
                            # Use this file instead of gksu, gksudo, and, pkexe.
                            # /usr/bin/suxe

                            pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY $1 $2 $3 $4 $5 $6


                            save it as:
                            ~/suxe
                            (note: some distros DO NOT like the ~/ shorthand
                            for home folder access. So, use your actual path in this situation)
                            e.g
                            /home/Johnny/Documents/suxe



                            then make it an executable file in /usr/bin



                            sudo cp ~/suxe /usr/bin/suxe


                            make it executable



                            cd /usr/bin
                            su chmod -x ./suxe


                            now in Thunars' custom action use:



                            Name: Open with admin access



                            Command: suxe thunar %f



                            File pattern: *



                            Appears if selection contains: Directories



                            hope this helps







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Sep 18 '15 at 22:17









                            j.Paradisej.Paradise

                            11




                            11





















                                0














                                I found with UbuntuStudio 18.04 suxe thunar method works without the %f but only after right clicking on a thunar file/folder pane. Doesn't work when right clicking on the desktop.






                                share|improve this answer



























                                  0














                                  I found with UbuntuStudio 18.04 suxe thunar method works without the %f but only after right clicking on a thunar file/folder pane. Doesn't work when right clicking on the desktop.






                                  share|improve this answer

























                                    0












                                    0








                                    0







                                    I found with UbuntuStudio 18.04 suxe thunar method works without the %f but only after right clicking on a thunar file/folder pane. Doesn't work when right clicking on the desktop.






                                    share|improve this answer













                                    I found with UbuntuStudio 18.04 suxe thunar method works without the %f but only after right clicking on a thunar file/folder pane. Doesn't work when right clicking on the desktop.







                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered Sep 15 '18 at 3:09









                                    lasakrolasakro

                                    213




                                    213



























                                        draft saved

                                        draft discarded
















































                                        Thanks for contributing an answer to Ask Ubuntu!


                                        • Please be sure to answer the question. Provide details and share your research!

                                        But avoid


                                        • Asking for help, clarification, or responding to other answers.

                                        • Making statements based on opinion; back them up with references or personal experience.

                                        To learn more, see our tips on writing great answers.




                                        draft saved


                                        draft discarded














                                        StackExchange.ready(
                                        function ()
                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f198128%2fhow-to-add-custom-action-to-open-folder-as-root-to-thunar%23new-answer', 'question_page');

                                        );

                                        Post as a guest















                                        Required, but never shown





















































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown

































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown







                                        Popular posts from this blog

                                        Tamil (spriik) Luke uk diar | Nawigatjuun

                                        Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

                                        Training a classifier when some of the features are unknownWhy does Gradient Boosting regression predict negative values when there are no negative y-values in my training set?How to improve an existing (trained) classifier?What is effect when I set up some self defined predisctor variables?Why Matlab neural network classification returns decimal values on prediction dataset?Fitting and transforming text data in training, testing, and validation setsHow to quantify the performance of the classifier (multi-class SVM) using the test data?How do I control for some patients providing multiple samples in my training data?Training and Test setTraining a convolutional neural network for image denoising in MatlabShouldn't an autoencoder with #(neurons in hidden layer) = #(neurons in input layer) be “perfect”?