From kde-devel Tue May 10 21:26:35 2011 From: David Jarvie Date: Tue, 10 May 2011 21:26:35 +0000 To: kde-devel Subject: Re: Locating executables in root's PATH (in KAuth helper) Message-Id: <201105102226.45178.djarvie () kde ! org> X-MARC-Message: https://marc.info/?l=kde-devel&m=130506284404200 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============1860995306==" --===============1860995306== Content-Type: multipart/signed; boundary="nextPart5554045.LgOZP5AAJG"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart5554045.LgOZP5AAJG Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable On Monday 09 May 2011 00:07:27 johnmS2 wrote: > On 05/08/2011 11:35 AM, David Jarvie wrote: > > On Sunday 08 May 2011 18:46:46 Enda Cronnolly wrote: > >> On Sunday 08 May 2011 18:35:42 David Jarvie wrote: > >>> Is there any KDE or Qt way to locate an executable using the root PAT= H. > >>> Specifically, I want to run something which on my system is in /usr/s= bin/, > >>> calling it from a KAuth helper module running as root. > >>> KStandarDirs::findExe() doesn't produce any result (the PATH variable > >>> doesn't seem to be set up). I could hard code the /usr/sbin/ path, but > >>> that doesn't seem desirable in case the executable is elsewhere on so= me > >>> systems. > >> > >> http://unixhelp.ed.ac.uk/CGI/man-cgi?whereis > >=20 > > This does the job on the command line, but it's not particularly easy t= o call it from C++ code. > >=20 > >=20 >=20 > Run whereis using popen() is easy enough, but I believe it is only on > POSIX systems if that matters. That works fine. Thanks. =2D-=20 David Jarvie. KDE developer. KAlarm author -- http://www.astrojar.org.uk/kalarm --nextPart5554045.LgOZP5AAJG Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEABECAAYFAk3JrY0ACgkQTGZ1gSTAjlN4DgCeNNleb4cySHdfNF+5uamSuf6Q KawAn07a320EL7Ltk+7b0H0ObAS+uoRN =yabF -----END PGP SIGNATURE----- --nextPart5554045.LgOZP5AAJG-- --===============1860995306== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe << --===============1860995306==--