Replacing gksudo with pkexec: editor doesn't start in current folder

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
5
down vote

favorite
1












I'm trying to be a good boy and stop using gksudo, especially since it just got orphaned in the 18.04 daily builds (note, this question is not specific to 18.04).



In the bad old days of using gksudo, I'd typically navigate to a folder containing the file I wish to edit (I use pcmanfm) then select Tools/Open Current Folder In Terminal from the menu. Then I'd type gksudo leafpad [file-I-wish-to-edit] in the newly opened terminal.



Using information in the very useful answer How to configure pkexec? I set my .bash_aliases and I am able to now type pkexec leafpad [file-I-wish-to-edit] in the newly opened terminal and I don't get any errors. Sadly, though I get a blank file instead of what I wanted. I have determined that this is because leafpad is looking in /root instead of the folder I wished to be in.



How can I maintain my halo, continue to use pkexec instead of gksudo, yet retain the functionality I'm used to?







share|improve this question




















  • It was orphaned in 16.04. Use sudo apt install gksu.
    – WinEunuuchs2Unix
    Apr 21 at 1:14










  • I have the packages but I'd like to do things the proper way if it's not too much trouble. Surely this basic functionality is still available.
    – Organic Marble
    Apr 21 at 1:18






  • 1




    Yes I too fell into the "proper way rabbit hole" when 16.04 was released. So I wrote the gsu script which I posted in the answer below. It's nicer because it doesn't dim all attached screens like gksu does. I guess it's nice because it "follows the rules" but I honestly have had no problems with gksu. The exception being using gksu gedit in Windows 10 (within WSL framework) where Windows 10 Ubuntu 16.04 messes up permissions within NTFS in the first place anyway.
    – WinEunuuchs2Unix
    Apr 21 at 1:51














up vote
5
down vote

favorite
1












I'm trying to be a good boy and stop using gksudo, especially since it just got orphaned in the 18.04 daily builds (note, this question is not specific to 18.04).



In the bad old days of using gksudo, I'd typically navigate to a folder containing the file I wish to edit (I use pcmanfm) then select Tools/Open Current Folder In Terminal from the menu. Then I'd type gksudo leafpad [file-I-wish-to-edit] in the newly opened terminal.



Using information in the very useful answer How to configure pkexec? I set my .bash_aliases and I am able to now type pkexec leafpad [file-I-wish-to-edit] in the newly opened terminal and I don't get any errors. Sadly, though I get a blank file instead of what I wanted. I have determined that this is because leafpad is looking in /root instead of the folder I wished to be in.



How can I maintain my halo, continue to use pkexec instead of gksudo, yet retain the functionality I'm used to?







share|improve this question




















  • It was orphaned in 16.04. Use sudo apt install gksu.
    – WinEunuuchs2Unix
    Apr 21 at 1:14










  • I have the packages but I'd like to do things the proper way if it's not too much trouble. Surely this basic functionality is still available.
    – Organic Marble
    Apr 21 at 1:18






  • 1




    Yes I too fell into the "proper way rabbit hole" when 16.04 was released. So I wrote the gsu script which I posted in the answer below. It's nicer because it doesn't dim all attached screens like gksu does. I guess it's nice because it "follows the rules" but I honestly have had no problems with gksu. The exception being using gksu gedit in Windows 10 (within WSL framework) where Windows 10 Ubuntu 16.04 messes up permissions within NTFS in the first place anyway.
    – WinEunuuchs2Unix
    Apr 21 at 1:51












up vote
5
down vote

favorite
1









up vote
5
down vote

favorite
1






1





I'm trying to be a good boy and stop using gksudo, especially since it just got orphaned in the 18.04 daily builds (note, this question is not specific to 18.04).



In the bad old days of using gksudo, I'd typically navigate to a folder containing the file I wish to edit (I use pcmanfm) then select Tools/Open Current Folder In Terminal from the menu. Then I'd type gksudo leafpad [file-I-wish-to-edit] in the newly opened terminal.



Using information in the very useful answer How to configure pkexec? I set my .bash_aliases and I am able to now type pkexec leafpad [file-I-wish-to-edit] in the newly opened terminal and I don't get any errors. Sadly, though I get a blank file instead of what I wanted. I have determined that this is because leafpad is looking in /root instead of the folder I wished to be in.



How can I maintain my halo, continue to use pkexec instead of gksudo, yet retain the functionality I'm used to?







share|improve this question












I'm trying to be a good boy and stop using gksudo, especially since it just got orphaned in the 18.04 daily builds (note, this question is not specific to 18.04).



In the bad old days of using gksudo, I'd typically navigate to a folder containing the file I wish to edit (I use pcmanfm) then select Tools/Open Current Folder In Terminal from the menu. Then I'd type gksudo leafpad [file-I-wish-to-edit] in the newly opened terminal.



Using information in the very useful answer How to configure pkexec? I set my .bash_aliases and I am able to now type pkexec leafpad [file-I-wish-to-edit] in the newly opened terminal and I don't get any errors. Sadly, though I get a blank file instead of what I wanted. I have determined that this is because leafpad is looking in /root instead of the folder I wished to be in.



How can I maintain my halo, continue to use pkexec instead of gksudo, yet retain the functionality I'm used to?









share|improve this question











share|improve this question




share|improve this question










asked Apr 20 at 21:45









Organic Marble

9,87563154




9,87563154











  • It was orphaned in 16.04. Use sudo apt install gksu.
    – WinEunuuchs2Unix
    Apr 21 at 1:14










  • I have the packages but I'd like to do things the proper way if it's not too much trouble. Surely this basic functionality is still available.
    – Organic Marble
    Apr 21 at 1:18






  • 1




    Yes I too fell into the "proper way rabbit hole" when 16.04 was released. So I wrote the gsu script which I posted in the answer below. It's nicer because it doesn't dim all attached screens like gksu does. I guess it's nice because it "follows the rules" but I honestly have had no problems with gksu. The exception being using gksu gedit in Windows 10 (within WSL framework) where Windows 10 Ubuntu 16.04 messes up permissions within NTFS in the first place anyway.
    – WinEunuuchs2Unix
    Apr 21 at 1:51
















  • It was orphaned in 16.04. Use sudo apt install gksu.
    – WinEunuuchs2Unix
    Apr 21 at 1:14










  • I have the packages but I'd like to do things the proper way if it's not too much trouble. Surely this basic functionality is still available.
    – Organic Marble
    Apr 21 at 1:18






  • 1




    Yes I too fell into the "proper way rabbit hole" when 16.04 was released. So I wrote the gsu script which I posted in the answer below. It's nicer because it doesn't dim all attached screens like gksu does. I guess it's nice because it "follows the rules" but I honestly have had no problems with gksu. The exception being using gksu gedit in Windows 10 (within WSL framework) where Windows 10 Ubuntu 16.04 messes up permissions within NTFS in the first place anyway.
    – WinEunuuchs2Unix
    Apr 21 at 1:51















It was orphaned in 16.04. Use sudo apt install gksu.
– WinEunuuchs2Unix
Apr 21 at 1:14




It was orphaned in 16.04. Use sudo apt install gksu.
– WinEunuuchs2Unix
Apr 21 at 1:14












I have the packages but I'd like to do things the proper way if it's not too much trouble. Surely this basic functionality is still available.
– Organic Marble
Apr 21 at 1:18




I have the packages but I'd like to do things the proper way if it's not too much trouble. Surely this basic functionality is still available.
– Organic Marble
Apr 21 at 1:18




1




1




Yes I too fell into the "proper way rabbit hole" when 16.04 was released. So I wrote the gsu script which I posted in the answer below. It's nicer because it doesn't dim all attached screens like gksu does. I guess it's nice because it "follows the rules" but I honestly have had no problems with gksu. The exception being using gksu gedit in Windows 10 (within WSL framework) where Windows 10 Ubuntu 16.04 messes up permissions within NTFS in the first place anyway.
– WinEunuuchs2Unix
Apr 21 at 1:51




Yes I too fell into the "proper way rabbit hole" when 16.04 was released. So I wrote the gsu script which I posted in the answer below. It's nicer because it doesn't dim all attached screens like gksu does. I guess it's nice because it "follows the rules" but I honestly have had no problems with gksu. The exception being using gksu gedit in Windows 10 (within WSL framework) where Windows 10 Ubuntu 16.04 messes up permissions within NTFS in the first place anyway.
– WinEunuuchs2Unix
Apr 21 at 1:51










3 Answers
3






active

oldest

votes

















up vote
5
down vote



accepted










As mentioned in comments, gksu was "orphaned" in 16.04 but you can still install it with:



sudo apt install gksu


That said I made a wrapper script for pkexec a long time ago that might be of some interest:





#!/bin/bash

# Usage: gsu gedit file1
# -OR- gsu natuilus /dirname

COMMAND="$1" # extract gedit or nautilus
ABSOLUTE_NAME=$(realpath "$2")

pkexec "$COMMAND" "$ABSOLUTE_NAME"

#log-file "$ABSOLUTE_NAME" ~/bin/log-gsu-"$COMMAND"


I named the wrapper gsu as a short form of gksu. The log-file script is a separate project which I commented out in the script for this answer.



You need to setup gedit and nautilus policy kits before you can use this script as the comments reference. In your case you would need to setup a policy kit for leafpad.



Hope this helps!






share|improve this answer




















  • @OrganicMarble Actually it's my pleasure to finally share it with someone who might care a couple of years after writing it :)
    – WinEunuuchs2Unix
    Apr 21 at 1:53










  • Thanks, this definitely helped me solve my problem. I wrote a wrapper script much like yours just for leafpad which incorporated pkexec just as you did. With this I can execute my use case that is spelled out in the question. I have to get used to typing gleafpad but I was going to have to get used to typing pkexec leafpad anyway. Many thanks.
    – Organic Marble
    Apr 21 at 2:02






  • 1




    Another option is to call your script /home/your_user_name/bin/leafpad and it will be higher on the hierarchy list and call the regular leafpad in /bin or wherever it resides.
    – WinEunuuchs2Unix
    Apr 21 at 2:07











  • It appears that for 18.04 they've taken gksu out of the repos, you can't even install it without manually downloading the packages.
    – Organic Marble
    Apr 21 at 13:43






  • 1




    So no longer orphaned like 16.04 but kidnapped!
    – WinEunuuchs2Unix
    Apr 21 at 14:10

















up vote
1
down vote













I use this alternative in desktop launchers or bash scripts to keep the gksu feel:



bash -c 'sudo -i nautilus;'


... though no pkexec here - pls don't tell my admin.






share|improve this answer
















  • 1




    You are recommending to use sudo with graphical applications, which, even which the -i option, allegedly is not appropriate. If it were so easy, we probably would not be concerned with pkexec or admin:// after lacking the old gksu.
    – vanadium
    Jul 9 at 7:25










  • sudo -H nautilus is safer
    – WinEunuuchs2Unix
    Aug 26 at 3:14

















up vote
0
down vote













Use something like pkexec thunar %f (thunar is the xfce file manager and %f is for current path - works with Bionic XFCE just like gksu).






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',
    convertImagesToLinks: true,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    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%2f1026800%2freplacing-gksudo-with-pkexec-editor-doesnt-start-in-current-folder%23new-answer', 'question_page');

    );

    Post as a guest






























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    5
    down vote



    accepted










    As mentioned in comments, gksu was "orphaned" in 16.04 but you can still install it with:



    sudo apt install gksu


    That said I made a wrapper script for pkexec a long time ago that might be of some interest:





    #!/bin/bash

    # Usage: gsu gedit file1
    # -OR- gsu natuilus /dirname

    COMMAND="$1" # extract gedit or nautilus
    ABSOLUTE_NAME=$(realpath "$2")

    pkexec "$COMMAND" "$ABSOLUTE_NAME"

    #log-file "$ABSOLUTE_NAME" ~/bin/log-gsu-"$COMMAND"


    I named the wrapper gsu as a short form of gksu. The log-file script is a separate project which I commented out in the script for this answer.



    You need to setup gedit and nautilus policy kits before you can use this script as the comments reference. In your case you would need to setup a policy kit for leafpad.



    Hope this helps!






    share|improve this answer




















    • @OrganicMarble Actually it's my pleasure to finally share it with someone who might care a couple of years after writing it :)
      – WinEunuuchs2Unix
      Apr 21 at 1:53










    • Thanks, this definitely helped me solve my problem. I wrote a wrapper script much like yours just for leafpad which incorporated pkexec just as you did. With this I can execute my use case that is spelled out in the question. I have to get used to typing gleafpad but I was going to have to get used to typing pkexec leafpad anyway. Many thanks.
      – Organic Marble
      Apr 21 at 2:02






    • 1




      Another option is to call your script /home/your_user_name/bin/leafpad and it will be higher on the hierarchy list and call the regular leafpad in /bin or wherever it resides.
      – WinEunuuchs2Unix
      Apr 21 at 2:07











    • It appears that for 18.04 they've taken gksu out of the repos, you can't even install it without manually downloading the packages.
      – Organic Marble
      Apr 21 at 13:43






    • 1




      So no longer orphaned like 16.04 but kidnapped!
      – WinEunuuchs2Unix
      Apr 21 at 14:10














    up vote
    5
    down vote



    accepted










    As mentioned in comments, gksu was "orphaned" in 16.04 but you can still install it with:



    sudo apt install gksu


    That said I made a wrapper script for pkexec a long time ago that might be of some interest:





    #!/bin/bash

    # Usage: gsu gedit file1
    # -OR- gsu natuilus /dirname

    COMMAND="$1" # extract gedit or nautilus
    ABSOLUTE_NAME=$(realpath "$2")

    pkexec "$COMMAND" "$ABSOLUTE_NAME"

    #log-file "$ABSOLUTE_NAME" ~/bin/log-gsu-"$COMMAND"


    I named the wrapper gsu as a short form of gksu. The log-file script is a separate project which I commented out in the script for this answer.



    You need to setup gedit and nautilus policy kits before you can use this script as the comments reference. In your case you would need to setup a policy kit for leafpad.



    Hope this helps!






    share|improve this answer




















    • @OrganicMarble Actually it's my pleasure to finally share it with someone who might care a couple of years after writing it :)
      – WinEunuuchs2Unix
      Apr 21 at 1:53










    • Thanks, this definitely helped me solve my problem. I wrote a wrapper script much like yours just for leafpad which incorporated pkexec just as you did. With this I can execute my use case that is spelled out in the question. I have to get used to typing gleafpad but I was going to have to get used to typing pkexec leafpad anyway. Many thanks.
      – Organic Marble
      Apr 21 at 2:02






    • 1




      Another option is to call your script /home/your_user_name/bin/leafpad and it will be higher on the hierarchy list and call the regular leafpad in /bin or wherever it resides.
      – WinEunuuchs2Unix
      Apr 21 at 2:07











    • It appears that for 18.04 they've taken gksu out of the repos, you can't even install it without manually downloading the packages.
      – Organic Marble
      Apr 21 at 13:43






    • 1




      So no longer orphaned like 16.04 but kidnapped!
      – WinEunuuchs2Unix
      Apr 21 at 14:10












    up vote
    5
    down vote



    accepted







    up vote
    5
    down vote



    accepted






    As mentioned in comments, gksu was "orphaned" in 16.04 but you can still install it with:



    sudo apt install gksu


    That said I made a wrapper script for pkexec a long time ago that might be of some interest:





    #!/bin/bash

    # Usage: gsu gedit file1
    # -OR- gsu natuilus /dirname

    COMMAND="$1" # extract gedit or nautilus
    ABSOLUTE_NAME=$(realpath "$2")

    pkexec "$COMMAND" "$ABSOLUTE_NAME"

    #log-file "$ABSOLUTE_NAME" ~/bin/log-gsu-"$COMMAND"


    I named the wrapper gsu as a short form of gksu. The log-file script is a separate project which I commented out in the script for this answer.



    You need to setup gedit and nautilus policy kits before you can use this script as the comments reference. In your case you would need to setup a policy kit for leafpad.



    Hope this helps!






    share|improve this answer












    As mentioned in comments, gksu was "orphaned" in 16.04 but you can still install it with:



    sudo apt install gksu


    That said I made a wrapper script for pkexec a long time ago that might be of some interest:





    #!/bin/bash

    # Usage: gsu gedit file1
    # -OR- gsu natuilus /dirname

    COMMAND="$1" # extract gedit or nautilus
    ABSOLUTE_NAME=$(realpath "$2")

    pkexec "$COMMAND" "$ABSOLUTE_NAME"

    #log-file "$ABSOLUTE_NAME" ~/bin/log-gsu-"$COMMAND"


    I named the wrapper gsu as a short form of gksu. The log-file script is a separate project which I commented out in the script for this answer.



    You need to setup gedit and nautilus policy kits before you can use this script as the comments reference. In your case you would need to setup a policy kit for leafpad.



    Hope this helps!







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Apr 21 at 1:21









    WinEunuuchs2Unix

    35.6k759133




    35.6k759133











    • @OrganicMarble Actually it's my pleasure to finally share it with someone who might care a couple of years after writing it :)
      – WinEunuuchs2Unix
      Apr 21 at 1:53










    • Thanks, this definitely helped me solve my problem. I wrote a wrapper script much like yours just for leafpad which incorporated pkexec just as you did. With this I can execute my use case that is spelled out in the question. I have to get used to typing gleafpad but I was going to have to get used to typing pkexec leafpad anyway. Many thanks.
      – Organic Marble
      Apr 21 at 2:02






    • 1




      Another option is to call your script /home/your_user_name/bin/leafpad and it will be higher on the hierarchy list and call the regular leafpad in /bin or wherever it resides.
      – WinEunuuchs2Unix
      Apr 21 at 2:07











    • It appears that for 18.04 they've taken gksu out of the repos, you can't even install it without manually downloading the packages.
      – Organic Marble
      Apr 21 at 13:43






    • 1




      So no longer orphaned like 16.04 but kidnapped!
      – WinEunuuchs2Unix
      Apr 21 at 14:10
















    • @OrganicMarble Actually it's my pleasure to finally share it with someone who might care a couple of years after writing it :)
      – WinEunuuchs2Unix
      Apr 21 at 1:53










    • Thanks, this definitely helped me solve my problem. I wrote a wrapper script much like yours just for leafpad which incorporated pkexec just as you did. With this I can execute my use case that is spelled out in the question. I have to get used to typing gleafpad but I was going to have to get used to typing pkexec leafpad anyway. Many thanks.
      – Organic Marble
      Apr 21 at 2:02






    • 1




      Another option is to call your script /home/your_user_name/bin/leafpad and it will be higher on the hierarchy list and call the regular leafpad in /bin or wherever it resides.
      – WinEunuuchs2Unix
      Apr 21 at 2:07











    • It appears that for 18.04 they've taken gksu out of the repos, you can't even install it without manually downloading the packages.
      – Organic Marble
      Apr 21 at 13:43






    • 1




      So no longer orphaned like 16.04 but kidnapped!
      – WinEunuuchs2Unix
      Apr 21 at 14:10















    @OrganicMarble Actually it's my pleasure to finally share it with someone who might care a couple of years after writing it :)
    – WinEunuuchs2Unix
    Apr 21 at 1:53




    @OrganicMarble Actually it's my pleasure to finally share it with someone who might care a couple of years after writing it :)
    – WinEunuuchs2Unix
    Apr 21 at 1:53












    Thanks, this definitely helped me solve my problem. I wrote a wrapper script much like yours just for leafpad which incorporated pkexec just as you did. With this I can execute my use case that is spelled out in the question. I have to get used to typing gleafpad but I was going to have to get used to typing pkexec leafpad anyway. Many thanks.
    – Organic Marble
    Apr 21 at 2:02




    Thanks, this definitely helped me solve my problem. I wrote a wrapper script much like yours just for leafpad which incorporated pkexec just as you did. With this I can execute my use case that is spelled out in the question. I have to get used to typing gleafpad but I was going to have to get used to typing pkexec leafpad anyway. Many thanks.
    – Organic Marble
    Apr 21 at 2:02




    1




    1




    Another option is to call your script /home/your_user_name/bin/leafpad and it will be higher on the hierarchy list and call the regular leafpad in /bin or wherever it resides.
    – WinEunuuchs2Unix
    Apr 21 at 2:07





    Another option is to call your script /home/your_user_name/bin/leafpad and it will be higher on the hierarchy list and call the regular leafpad in /bin or wherever it resides.
    – WinEunuuchs2Unix
    Apr 21 at 2:07













    It appears that for 18.04 they've taken gksu out of the repos, you can't even install it without manually downloading the packages.
    – Organic Marble
    Apr 21 at 13:43




    It appears that for 18.04 they've taken gksu out of the repos, you can't even install it without manually downloading the packages.
    – Organic Marble
    Apr 21 at 13:43




    1




    1




    So no longer orphaned like 16.04 but kidnapped!
    – WinEunuuchs2Unix
    Apr 21 at 14:10




    So no longer orphaned like 16.04 but kidnapped!
    – WinEunuuchs2Unix
    Apr 21 at 14:10












    up vote
    1
    down vote













    I use this alternative in desktop launchers or bash scripts to keep the gksu feel:



    bash -c 'sudo -i nautilus;'


    ... though no pkexec here - pls don't tell my admin.






    share|improve this answer
















    • 1




      You are recommending to use sudo with graphical applications, which, even which the -i option, allegedly is not appropriate. If it were so easy, we probably would not be concerned with pkexec or admin:// after lacking the old gksu.
      – vanadium
      Jul 9 at 7:25










    • sudo -H nautilus is safer
      – WinEunuuchs2Unix
      Aug 26 at 3:14














    up vote
    1
    down vote













    I use this alternative in desktop launchers or bash scripts to keep the gksu feel:



    bash -c 'sudo -i nautilus;'


    ... though no pkexec here - pls don't tell my admin.






    share|improve this answer
















    • 1




      You are recommending to use sudo with graphical applications, which, even which the -i option, allegedly is not appropriate. If it were so easy, we probably would not be concerned with pkexec or admin:// after lacking the old gksu.
      – vanadium
      Jul 9 at 7:25










    • sudo -H nautilus is safer
      – WinEunuuchs2Unix
      Aug 26 at 3:14












    up vote
    1
    down vote










    up vote
    1
    down vote









    I use this alternative in desktop launchers or bash scripts to keep the gksu feel:



    bash -c 'sudo -i nautilus;'


    ... though no pkexec here - pls don't tell my admin.






    share|improve this answer












    I use this alternative in desktop launchers or bash scripts to keep the gksu feel:



    bash -c 'sudo -i nautilus;'


    ... though no pkexec here - pls don't tell my admin.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Jul 9 at 5:08









    kinestoo

    191




    191







    • 1




      You are recommending to use sudo with graphical applications, which, even which the -i option, allegedly is not appropriate. If it were so easy, we probably would not be concerned with pkexec or admin:// after lacking the old gksu.
      – vanadium
      Jul 9 at 7:25










    • sudo -H nautilus is safer
      – WinEunuuchs2Unix
      Aug 26 at 3:14












    • 1




      You are recommending to use sudo with graphical applications, which, even which the -i option, allegedly is not appropriate. If it were so easy, we probably would not be concerned with pkexec or admin:// after lacking the old gksu.
      – vanadium
      Jul 9 at 7:25










    • sudo -H nautilus is safer
      – WinEunuuchs2Unix
      Aug 26 at 3:14







    1




    1




    You are recommending to use sudo with graphical applications, which, even which the -i option, allegedly is not appropriate. If it were so easy, we probably would not be concerned with pkexec or admin:// after lacking the old gksu.
    – vanadium
    Jul 9 at 7:25




    You are recommending to use sudo with graphical applications, which, even which the -i option, allegedly is not appropriate. If it were so easy, we probably would not be concerned with pkexec or admin:// after lacking the old gksu.
    – vanadium
    Jul 9 at 7:25












    sudo -H nautilus is safer
    – WinEunuuchs2Unix
    Aug 26 at 3:14




    sudo -H nautilus is safer
    – WinEunuuchs2Unix
    Aug 26 at 3:14










    up vote
    0
    down vote













    Use something like pkexec thunar %f (thunar is the xfce file manager and %f is for current path - works with Bionic XFCE just like gksu).






    share|improve this answer
























      up vote
      0
      down vote













      Use something like pkexec thunar %f (thunar is the xfce file manager and %f is for current path - works with Bionic XFCE just like gksu).






      share|improve this answer






















        up vote
        0
        down vote










        up vote
        0
        down vote









        Use something like pkexec thunar %f (thunar is the xfce file manager and %f is for current path - works with Bionic XFCE just like gksu).






        share|improve this answer












        Use something like pkexec thunar %f (thunar is the xfce file manager and %f is for current path - works with Bionic XFCE just like gksu).







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Aug 25 at 22:44









        Gabriel Coutinho De Miranda

        133




        133



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1026800%2freplacing-gksudo-with-pkexec-editor-doesnt-start-in-current-folder%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            pylint3 and pip3 broken

            Missing snmpget and snmpwalk

            How to enroll fingerprints to Ubuntu 17.10 with VFS491