[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

How to 'su' to root from a script using Xdialog?



Hello Mentors,

since some times I am coding a debconf util which use Xdialog as
interface.  Exactly, on startup it present a list of all packages
which can be configured with debconf and then the $USER select
the desired package and configure it using Xdialog.

Prob.:  I check for "root" and if it is not the current
        $USER, I want to 'su' the 'xdebconf'.

Q 1:    How can I do this?  (I do not want to use sudo
        because I want, $USER enter the right password.)
        or is there another 'su' command which support
        file-descriptors like GPG?

Q 2:    How to avoid permission problems on $DISPLAY
        (root can not start a program on $USER x-window)

Greetings
    Michelle Konzack


-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack   Apt. 917                  ICQ #328449886
                   50, rue de Soultz         MSM LinuxMichi
0033/3/88452356    67100 Strasbourg/France   IRC #Debian (irc.icq.com)



Reply to: