Replacing gksudo with pkexec: editor doesn't start in current folder
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
5
down vote
favorite
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?
gksudo pkexec
add a comment |Â
up vote
5
down vote
favorite
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?
gksudo pkexec
It was orphaned in 16.04. Usesudo 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 thegsu
script which I posted in the answer below. It's nicer because it doesn't dim all attached screens likegksu
does. I guess it's nice because it "follows the rules" but I honestly have had no problems withgksu
. The exception being usinggksu 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
add a comment |Â
up vote
5
down vote
favorite
up vote
5
down vote
favorite
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?
gksudo pkexec
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?
gksudo pkexec
asked Apr 20 at 21:45
![](https://i.stack.imgur.com/DbsU5.jpg?s=32&g=1)
![](https://i.stack.imgur.com/DbsU5.jpg?s=32&g=1)
Organic Marble
9,87563154
9,87563154
It was orphaned in 16.04. Usesudo 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 thegsu
script which I posted in the answer below. It's nicer because it doesn't dim all attached screens likegksu
does. I guess it's nice because it "follows the rules" but I honestly have had no problems withgksu
. The exception being usinggksu 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
add a comment |Â
It was orphaned in 16.04. Usesudo 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 thegsu
script which I posted in the answer below. It's nicer because it doesn't dim all attached screens likegksu
does. I guess it's nice because it "follows the rules" but I honestly have had no problems withgksu
. The exception being usinggksu 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
add a comment |Â
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!
@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 regularleafpad
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
add a comment |Â
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.
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
add a comment |Â
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).
add a comment |Â
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!
@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 regularleafpad
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
add a comment |Â
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!
@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 regularleafpad
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
add a comment |Â
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!
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!
answered Apr 21 at 1:21
![](https://i.stack.imgur.com/2SXNl.jpg?s=32&g=1)
![](https://i.stack.imgur.com/2SXNl.jpg?s=32&g=1)
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 regularleafpad
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
add a comment |Â
@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 regularleafpad
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
add a comment |Â
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.
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
add a comment |Â
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.
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
add a comment |Â
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.
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.
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
add a comment |Â
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
add a comment |Â
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).
add a comment |Â
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).
add a comment |Â
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).
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).
answered Aug 25 at 22:44
Gabriel Coutinho De Miranda
133
133
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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 likegksu
does. I guess it's nice because it "follows the rules" but I honestly have had no problems withgksu
. The exception being usinggksu 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