• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to get application path
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get application path


  • Subject: Re: How to get application path
  • From: "Filippo Ignozza" <email@hidden>
  • Date: Thu, 21 Jun 2007 13:26:25 +0200
  • Organization: Digital Video S.p.a.
  • Priority: normal

thanks for your answer but the application i want to run is not in
PATH.

On 21 Jun 2007 at 7:28, Mark J. Reed wrote:

> On 6/21/07, Filippo Ignozza <email@hidden> wrote:
> > is there an easy  way to get using C++ the fullpath of an X11
> > Application?
>
> Applications can live anywhere on disk.  But in order to be runnable,
> they have to be somewhere in the $PATH.   The standard C library
> includes a function to search the $PATH for an app and run it
> (execvp), but I don't think there's one for finding the exe without
> running it.  I think for that you have to just loop through the
> directories in getenv("PATH") and check for existence of the program
> in each one.  You can probably borrow code from the which command, or
> any of the shells, or...
>
> --
> Mark J. Reed <email@hidden>
>




Ignozza Filippo
Digital Video S.p.a.
Tel +39 06 43599369
       +39 06 4393578
Fax +39 06 43251588
E-mail email@hidden


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list      (email@hidden)

This email sent to email@hidden

  • Follow-Ups:
    • Re: How to get application path
      • From: Vernon Williams <email@hidden>
References: 
 >How to get application path (From: "Filippo Ignozza" <email@hidden>)
 >Re: How to get application path (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Re: How to get application path
  • Next by Date: Re: How to get application path
  • Previous by thread: Re: How to get application path
  • Next by thread: Re: How to get application path
  • Index(es):
    • Date
    • Thread