gksudo 16.10

Ralf Mardorf silver.bullet at zoho.com
Sat Nov 5 07:28:19 UTC 2016


On Sat, 5 Nov 2016 05:38:27 +0100, Ralf Mardorf wrote:
>On Fri, 4 Nov 2016 22:12:31 +0000, Colin Law wrote:
>>Deprecated it may be, but I don't know how else easily to run
>>something like gedit with sudo permissions.  
>
>sudo HOME=/root gedit
>
>or
>
>sudo -i
>gedit

Btw. sudo is not the same on all distros.

[rocketmouse at archlinux ~]$ grep sluma .bashrc 
alias sluma='sudo pluma 2>/dev/null'
[rocketmouse at archlinux ~]$ sluma /etc/fstab
[rocketmouse at archlinux ~]$ ls -hAld .config/pluma/ .config/pluma/*
drwxr-xr-x 2 rocketmouse rocketmouse 4.0K Nov  5 06:18 .config/pluma/
-rw-r--r-- 1 rocketmouse rocketmouse 9.5K Nov  5 06:18 .config/pluma/accels
-rw-r--r-- 1 rocketmouse rocketmouse   91 Nov  5 06:18 .config/pluma/pluma.ini
-rw-r--r-- 1 rocketmouse rocketmouse  232 Oct 25 18:36 .config/pluma/pluma-page-setup
-rw-r--r-- 1 rocketmouse rocketmouse    0 Oct 25 18:36 .config/pluma/pluma-print-settings

on Ubuntu I simply would edit the alias to

alias sluma='sudo HOME=/root pluma 2>/dev/null'

resp. if I would use gedit to

alias sedit='sudo HOME=/root gedit 2>/dev/null'

IOW the OP only needs to run "sedit" instead of "gedit". And there
likely is just a limited amount of GUI apps we want to run with root
privileges. Perhaps gparted, meld and perhaps a file manager and/or
terminal, so just a handful of aliases is required.

Regards,
Ralf





More information about the ubuntu-users mailing list