Hi Andrew, could you help me?
On Saturday 18 February 2006 22:59, you wrote: > On 2/18/06, Armin M. Warda <[EMAIL PROTECTED]> wrote: > > 2.) the applet runs as user, swapon/off needs root > > > > For 1.) I am simply struggling with gconf, wrt. 2.) I am > > considering to add two lines to /etc/sudoers and call "sudo > > /sbin/swapoff ..." etc. from the applet. Any better ideas or > > hints? > > Open a pty and drive a root-enabled shell through `sudo gainroot'? I do not know how to do that. I am no experienced hacker or C coder, but I try to contribute. Could you for example provide some C code sniplet that demonstrates how I can open a pty and drive a root-enabled shell through sudo gainroot? > Then users will only have to ensure R&D mode is enabled without any > further hacking. Yes, that would be much better than hacking /etc/sudoers. Everybody who wants to use swap has to enable R&D mode anyway... > HTH, > > Andrew > > -- > Andrew Flegg -- mailto:[EMAIL PROTECTED] | http://www.bleb.org/ Btw, I solved my hassle with gconf. Actually, I think gconf is quite easy. What I achieved yet by modifying Jakub's released source: - make all settings of the load-applet gconf-persistent over reboots - add a 'swapon/off' menu entry (does nothing yet) - add a 'Swapfile' config string to the settings menu - discover an active swapfile on start (=boot), if none set via gconf I will create a patch for my changes and will ask Jakub to include it. I hope he will continue to maintain the load-plugin, otherwise I (or someone else) would have to fork it. But I am no experienced coder, thus I would prefer to not have to maintain it myself. Armin. -- --- May the Source be with you! Linux. --- --- http://www.arminwarda.mynetcologne.de/ --- secure eMail: http://www.gnupg.de/ ---
pgpGdzY2Pgm3P.pgp
Description: PGP signature
_______________________________________________ maemo-developers mailing list [email protected] https://maemo.org/mailman/listinfo/maemo-developers
