[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.&nbsp; One of the screens allows them to set the IP address.&nbsp; My \
thinking was that when they hit the &#39;Apply&#39; button I would use the KDESu \
class to run a command.&nbsp; But it always fails. I think it fails because I am \
using Kubuntu which uses sudo instead of su.&nbsp; <br> <br>Here is what I \
have:<br><br>&nbsp;&nbsp;&nbsp; if (enableDHCP) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
KDESu::SuProcess suProcess(&quot;david&quot;,&quot;/sbin/dhclient \
eth0&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; status = \
suProcess.exec(&quot;mypassowrd&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; kWarning() \
&lt;&lt; &quot;Status of set network = &quot; &lt;&lt; status;&nbsp;&nbsp;&nbsp; // \
falis<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; kWarning() &lt;&lt; &quot;Check \
password&quot; &lt;&lt; suProcess.checkInstall(&quot;mypassword&quot;); // \
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