gksudo 16.10
Ralf Mardorf
silver.bullet at zoho.com
Sat Nov 5 04:30:46 UTC 2016
On Fri, 4 Nov 2016 20:40:10 +0200, Tom H wrote:
>On Fri, Nov 4, 2016 at 12:30 PM, Ralf Mardorf wrote:
>> You can't install gksudo, but need to run an editor with root
>> privileges? However, what should be the advantage of gksudo over
>> sudo?
>>
>> apt update && apt install gksu
>
>Exactly. There's no gksudo package. It's gksu that provides gksu and
>gksudo.
>
>But gksu was deprecated a long time ago, but it was moved from "main"
>to "universe" with 14.04 (LTS-wise; maybe it was moved earlier when
>all releases are taken into account) probably because some DEs still
>use it.
>
>The correct and current tools are pkexec and sudo but you'd have to
>ensure that DISPLAY and XAUTHORITY are preserved for a gui tool to
>function properly. IIRC, you'd also need to define XDG_RUNTIME_DIR.
>
>
>> Depending on the task, you anyway need to run xhost when either using
>> sudo or gksudo, apart from this you could temporarily override the
>> HOME variable.
>>
>> I never run gksudo, I always use sudo.
>>
>> In case gedit should cause an dconf issue run
>>
>> sudo rm /run/user/1???/dconf/user
>
>Is this command safe? Wouldn't it remove non-gedit dconf settings too?
I never experienced an issue [1], but it might be better to avoid it by
setting XDG_RUNTIME_DIR ;). Btw. I never cared about DISPLAY and
XAUTHORITY variables.
Regards,
Ralf
[1]
[rocketmouse at archlinux ~]$ grep drecksconf .bashrc
alias drecksconf='echo " $(id -un)@$(hostname): \"dconf > /dev/nirvana\""; sudo rm /run/user/1???/dconf/user'
[rocketmouse at archlinux ~]$ drecksconf
rocketmouse at archlinux: "dconf > /dev/nirvana"
[sudo] password for rocketmouse:
[rocketmouse at archlinux ~]$ id
uid=1000(rocketmouse) gid=1000(rocketmouse) groups=1000(rocketmouse),10(wheel),50(games),91(video),92(audio),93(optical),95(storage),98(power),100(users),108(vboxusers),150(wireshark),1003(vmanusers)
[rocketmouse at archlinux ~]$ ls -hAl /run/user/1000/dconf/
total 0
[rocketmouse at archlinux ~]$ pluma 2>/dev/null
[rocketmouse at archlinux ~]$ ls -hAl /run/user/1000/dconf/
total 4.0K
-rw------- 1 rocketmouse rocketmouse 2 Nov 5 05:27 user
More information about the ubuntu-users
mailing list