[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: using kdesu on kubuntu
From: "David Boosalis" <david.boosalis () gmail ! com>
Date: 2008-07-31 21:12:14
Message-ID: 870c99310807311412k34e94b0ah5f0cd69b1d99dd40 () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Hi
I am using KDE4 on a PC-104 board that runs a instrument. One of the
screens allows them to set the IP address. My thinking was that when they
hit the 'Apply' button I would use the KDESu class to run a command. But it
always fails. I think it fails because I am using Kubuntu which uses sudo
instead of su.
Here is what I have:
if (enableDHCP) {
KDESu::SuProcess suProcess("david","/sbin/dhclient eth0");
status = suProcess.exec("mypassowrd");
kWarning() << "Status of set network = " << status; // falis
kWarning() << "Check password" <<
suProcess.checkInstall("mypassword"); // fails
}
Does anyone have a suggestion as to how I can get it to work.
I tried chmoding dcclient to 777 but it fails latteer on when it tries to
write files. I could of course follow the whole route and change everything
to 777, but ws hoping to use KDESu as it is more secure, especially since
the instrument is on a network.
Does anyone know of a way to enable root on Kubuntu ?
Thaks in advance for any help
David
[Attachment #5 (text/html)]
<div dir="ltr">Hi<br><br>I am using KDE4 on a PC-104 board that runs a \
instrument. One of the screens allows them to set the IP address. My \
thinking was that when they hit the 'Apply' button I would use the KDESu \
class to run a command. But it always fails. I think it fails because I am \
using Kubuntu which uses sudo instead of su. <br> <br>Here is what I \
have:<br><br> if (enableDHCP) {<br> \
KDESu::SuProcess suProcess("david","/sbin/dhclient \
eth0");<br> status = \
suProcess.exec("mypassowrd");<br> kWarning() \
<< "Status of set network = " << status; // \
falis<br> kWarning() << "Check \
password" << suProcess.checkInstall("mypassword"); // \
fails<br>}<br><br>Does anyone have a suggestion as to how I can get it to work. \
<br><br><br>I tried chmoding dcclient to 777 but it fails latteer on when it tries to \
write files. I could of course follow the whole route and change everything to 777, \
but ws hoping to use KDESu as it is more secure, especially since the instrument is \
on a network.<br> <br>Does anyone know of a way to enable root on Kubuntu \
?<br><br>Thaks in advance for any help<br>David <br></div>
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic