TL;DR: What's the new right way to do a graphical
sudo from a shell script?
I just upgraded from kubuntu 16.04 to 18.04 and I'm doing the normal triage.
kdesudo is gone in 18.04 (unmaintained).
I use it a lot in bash scripts with GUI i/o.
Some post said use
kdesu - which seems weird.
I seem to recall that it messes with the effective user or something like that.
That's not installed in my PATH.
I found it at
bigbird@sananda:~/pq$ ls -l /etc/alternatives/kdesu rwxrwxrwx 1 root root 41 Aug 19 03:23 /etc/alternatives/kdesu -> /usr/lib/kde4/libexec/kdesu-distrib/kdesu
which still says kde4.
sudo -A ls
and it said
bigbird@sananda:~$ sudo -A ls sudo: no askpass program specified, try setting SUDO_ASKPASS
I went in a few circles looking at
ssh-askpass, but both say they're not intended to be called directly.
I am not doing anything with
I need this for bash scripts that do almost everything as a normal user and then run one or two commands as root. These scripts are often launched from desktop icons where there is no terminal window open (and I don't need or want one.) They often use
kdialog) to interface with the user.