| 1 |
Q: On my SuSE system, KDE su does not compile. I get an error that some Qt |
| 2 |
header files cannot be found. |
| 3 |
A: Install the package qtcompat. |
| 4 |
|
| 5 |
Q: Is KDE su safe? |
| 6 |
A: No program is 100% safe. However, KDE su is not setuid root and it |
| 7 |
handles the password you enter with great care so it should be safe |
| 8 |
enough. |
| 9 |
|
| 10 |
Q: How safe is password keeping? |
| 11 |
A: Enabling password keeping is less secure that disabling it. However, the |
| 12 |
scheme kdesu uses to keep passwords prevents everyone (including you, the |
| 13 |
user) from accessing them. Please see the HTML documentation for a full |
| 14 |
description of this scheme. |
| 15 |
|
| 16 |
Q: Can I execute tty applications with kdesu? |
| 17 |
A: No. TTY application will probably never be supported. Use the Unix su for |
| 18 |
those. |
| 19 |
NOTE: As of version 0.94, tty _output_ _only_ is supported with the `-t' |
| 20 |
switch. This disables password keeping, though. |
| 21 |
|
| 22 |
Q: What systems does KDE su support? |
| 23 |
A: Tested are: |
| 24 |
* Linux 2.x (Redhat 6.x, Mandrake "Cooker", Debian potato, SuSE 6.1) |
| 25 |
* Solaris 7 (intel) |
| 26 |
* FreeBSD 3.2 (intel, w/ egcs 1.1.2) |
| 27 |
It will probably work on more systems but I cannot test that. |
| 28 |
|
| 29 |
Q: Why doesn't it support every system that is out there. |
| 30 |
A: KDE su needs to setup a pty/tty pair for communicating with `su'. This is |
| 31 |
because some `su' implementations refuse to read a password from stdin if |
| 32 |
that is not a tty. Setting up a pty/tty pair is not completely portable. |
| 33 |
|
| 34 |
Q: A good debug tip? |
| 35 |
A: If kdesu doesn't fire up your application, use the '-t' switch. |
| 36 |
This way, you'll get terminal output. Maybe there is something wrong with |
| 37 |
the program you're trying to run. |
| 38 |
|
| 39 |
Q: I always get the warning: "Terminal output not available on non-terminal". |
| 40 |
A: Maybe you're not logged on from a terminal but probably you're using |
| 41 |
UNIX98 pty's without glibc 2.1 (Linux). The glibc 2.0 ttyname() function |
| 42 |
incorrectly reports that UNIX98 slave pty's are no tty's. |
| 43 |
|
| 44 |
Q: Why not use DBUS for the communications with the daemon? |
| 45 |
A: KDE su needs one instance of the daemon per host, instead of per desktop |
| 46 |
session. |
| 47 |
|
| 48 |
Q: How do I attach the dialog box properly to my program? |
| 49 |
A: Using --attach <winid>. In C++, for example, you can call kdesu like: |
| 50 |
|
| 51 |
QStringList arguments; |
| 52 |
arguments << "--attach" << QString::number(window()->winId()) |
| 53 |
arguments << "--" << "program_to_run"; |
| 54 |
//kdesu is a libexec program, so it will not be in the path. findExe will find it correctly anyway |
| 55 |
QString su = KStandardDirs::findExe("kdesu"); |
| 56 |
if(su.isEmpty()) return false; //Cannot find kdesu |
| 57 |
QProcess *process = new QProcess(NULL); |
| 58 |
connect(process, SIGNAL(error(QProcess::ProcessError)), this, SLOT(processFailed())); |
| 59 |
connect(process, SIGNAL(finished( int, QProcess::ExitStatus) ), this, SLOT(processFinished())); |
| 60 |
process->start(su, arguments); |
| 61 |
|
| 62 |
Q: How do I use kdesu from a bash script? |
| 63 |
A: kdesu is a libexec program, so does not normally reside in your PATH. |
| 64 |
Use something like: |
| 65 |
|
| 66 |
$(kde4-config --path libexec)kdesu -- program_to_run |
| 67 |
|
| 68 |
If you want kdesu to attach as a proper dialog box of the current |
| 69 |
konsole window, you can do (bash specific): |
| 70 |
|
| 71 |
$(kde4-config --path libexec)kdesu ${WINDOWID:+--attach $WINDOWID} -- program_to_run |
| 72 |
|