Discussion:
setting file search paths in gnome (or any DE) applications
Robin Paulson
2011-02-03 01:33:41 UTC
Permalink
is there a generic way to set a global search path for gnome
applications? or any commonly-agreed upon standard across DEs?

i have some files i want an application to find and use by default,
but it appears to only look in ~/.<application> or
/usr/share/<application>/

moving the files to one of those locations (or using symlinks - this
is on windows) is not viable

how would i define an arbitrary location it looks in, without digging
through the source code, changing those locations and re-compiling?

i'm guessing there might be a standard format to put in the
~/.<application>rc file. something like
searchpath=<some location>
--
robin

http://tangleball.org.nz/ - Auckland's Creative Space
http://bumblepuppy.org/blog/

_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Vik Olliver
2011-02-03 01:42:28 UTC
Permalink
Post by Robin Paulson
is there a generic way to set a global search path for gnome
applications? or any commonly-agreed upon standard across DEs?
i have some files i want an application to find and use by default,
but it appears to only look in ~/.<application> or
/usr/share/<application>/
moving the files to one of those locations (or using symlinks - this
is on windows) is not viable
how would i define an arbitrary location it looks in, without digging
through the source code, changing those locations and re-compiling?
i'm guessing there might be a standard format to put in the
~/.<application>rc file. something like
searchpath=<some location>
Like appending to the PATH varaible in your ~/.profile but less geeky?

Vik :v)


_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Robin Paulson
2011-02-03 01:47:38 UTC
Permalink
Post by Vik Olliver
Post by Robin Paulson
i'm guessing there might be a standard format to put in the
~/.<application>rc file. something like
searchpath=<some location>
Like appending to the PATH varaible in your ~/.profile but less geeky?
exactly like that. but this is on windows, so there's no ~/.profile
unfortunately

would PATH=<some path> in the ~/.dia/diarc file do it? would that be
executed (i am under the impression the rc files are basically a shell
script executed at run-time of the application?) correctly on windows.
or am i asking the wrong crowd for windows advice...
--
robin

http://tangleball.org.nz/ - Auckland's Creative Space
http://bumblepuppy.org/blog/

_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Nevyn
2011-02-03 01:51:36 UTC
Permalink
Post by Robin Paulson
exactly like that. but this is on windows, so there's no ~/.profile
unfortunately
would PATH=<some path> in the ~/.dia/diarc file do it? would that be
executed (i am under the impression the rc files are basically a shell
script executed at run-time of the application?) correctly on windows.
or am i asking the wrong crowd for windows advice...
--
robin
Ahh.... I kind of miss the good old config.sys and autoexec.bat days.
Setting the path is a little strange nowadys. There's a gui way of
doing it.

Regards,
Nevyn
http://nevsramblings.blogspot.com/

_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Dagan McGregor
2011-02-03 02:01:38 UTC
Permalink
Post by Robin Paulson
exactly like that. but this is on windows, so there's no ~/.profile
unfortunately
would PATH=<some path> in the ~/.dia/diarc file do it? would that be
executed (i am under the impression the rc files are basically a shell
script executed at run-time of the application?) correctly on windows.
or am i asking the wrong crowd for windows advice...
Under Windows, it should be under System Properties. Right-click My
Computer/Computer -> Properties (if you can) or go through Control Panel.

Under System Properties should be Advanced tab, then Environment
Variables button. Edit the System variables -> Path there, add the folder
you need.

YMMV under Vista/Win7 as layout has changed, and I don't have it here to
look at it, but should be in a similar place.

I update Windows path for using things like Python on Windows. All
applications should respect the PATH environment variable of the host OS.

Dagan

_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Cliff Pratt
2011-02-03 06:09:34 UTC
Permalink
Post by Robin Paulson
Post by Vik Olliver
Post by Robin Paulson
i'm guessing there might be a standard format to put in the
~/.<application>rc file. something like
searchpath=<some location>
Like appending to the PATH varaible in your ~/.profile but less geeky?
exactly like that. but this is on windows, so there's no ~/.profile
unfortunately
would PATH=<some path> in the ~/.dia/diarc file do it? would that be
executed (i am under the impression the rc files are basically a shell
script executed at run-time of the application?) correctly on windows.
or am i asking the wrong crowd for windows advice...
You can set the path in Windows, but I forget how. I've certainly done it.

Cheers,

Cliff

_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Steve Holdoway
2011-02-03 06:25:10 UTC
Permalink
Post by Cliff Pratt
Post by Robin Paulson
Post by Vik Olliver
Post by Robin Paulson
i'm guessing there might be a standard format to put in the
~/.<application>rc file. something like
searchpath=<some location>
Like appending to the PATH varaible in your ~/.profile but less geeky?
exactly like that. but this is on windows, so there's no ~/.profile
unfortunately
would PATH=<some path> in the ~/.dia/diarc file do it? would that be
executed (i am under the impression the rc files are basically a shell
script executed at run-time of the application?) correctly on windows.
or am i asking the wrong crowd for windows advice...
You can set the path in Windows, but I forget how. I've certainly done it.
Cheers,
Cliff
under control panel>system iirc
Post by Cliff Pratt
_______________________________________________
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
--
Steve Holdoway <***@greengecko.co.nz>
http://www.greengecko.co.nz
MSN: ***@greengecko.co.nz
Skype: sholdowa


_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Dagan McGregor
2011-02-03 06:57:45 UTC
Permalink
On Thu, 03 Feb 2011 19:25:10 +1300, Steve Holdoway
Post by Steve Holdoway
Post by Cliff Pratt
Post by Robin Paulson
Post by Vik Olliver
Post by Robin Paulson
i'm guessing there might be a standard format to put in the
~/.<application>rc file. something like
searchpath=<some location>
Like appending to the PATH varaible in your ~/.profile but less geeky?
exactly like that. but this is on windows, so there's no ~/.profile
unfortunately
would PATH=<some path> in the ~/.dia/diarc file do it? would that be
executed (i am under the impression the rc files are basically a shell
script executed at run-time of the application?) correctly on windows.
or am i asking the wrong crowd for windows advice...
You can set the path in Windows, but I forget how. I've certainly done it.
Cheers,
Cliff
under control panel>system iirc
Are my emails not getting through to this list, or just being delayed?

Dagan

_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Ben M.
2011-02-03 07:09:10 UTC
Permalink
Hi Dagan,

Sorry your email about your emails not getting through did not get through ...
8-)

Only joking.



________________________________
From: Dagan McGregor <***@acsonline.co.nz>
To: NZLUG Mailing List <***@linux.net.nz>
Sent: Thu, 3 February, 2011 7:57:45 PM
Subject: Re: [nzlug] setting file search paths in gnome (or any DE) applications

Are my emails not getting through to this list, or just being delayed?

Dagan

_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Dagan McGregor
2011-02-03 09:24:37 UTC
Permalink
Post by Ben M.
Hi Dagan,
Sorry your email about your emails not getting through did not get
through
Post by Ben M.
...
:D

Ok weird because I answered where to find the PATH setting in Windows,
and it appeared nobody saw it :)

Dagan

_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Nevyn
2011-02-03 09:36:59 UTC
Permalink
Post by Robin Paulson
Post by Ben M.
Hi Dagan,
Sorry your email about your emails not getting through did not get
through
Post by Ben M.
...
 :D
 Ok weird because I answered where to find the PATH setting in Windows,
and it appeared nobody saw it :)
 Dagan
I'm not sure we're actually answering the original question. Rob - if
it is a script being interpreted by DOS or whatever new fangled name
they've got for it now, then putting something like
PATH=%PATH%;c:\where\ever\you\want\it\to\look inside the file will do
it. Otherwise a wrapper or some sort? A batch file perhaps.

This would work only when the application was run rather than having
it globally set.

However, I'm not entirely sure whether you'd have much luck with this
as I'm under the impression that most programs have a predefined set
of locations they search. For example, the man page for useradd has a
list paths to files. /etc/default/useradd for example would not be
okay if it was /usr/bin/useradd - it simply doesn't look in /usr/bin.

In saying that though, they normally do have a set of defaults
somewhere in /etc. I'm not sure how this is handled (or if it is
handled) in Windows.

Regards,
Nevyn
http://nevsramblings.blogspot.com/

_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Cliff Pratt
2011-02-03 09:38:38 UTC
Permalink
Post by Robin Paulson
Post by Ben M.
Hi Dagan,
Sorry your email about your emails not getting through did not get
through
Post by Ben M.
...
:D
Ok weird because I answered where to find the PATH setting in Windows,
and it appeared nobody saw it :)
No, I at least saw it. It was much more informative than my comment!

Cheers,

Cliff

_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug

Cliff Pratt
2011-02-03 09:36:38 UTC
Permalink
Post by Dagan McGregor
On Thu, 03 Feb 2011 19:25:10 +1300, Steve Holdoway
Post by Steve Holdoway
Post by Cliff Pratt
Post by Robin Paulson
Post by Vik Olliver
Post by Robin Paulson
i'm guessing there might be a standard format to put in the
~/.<application>rc file. something like
searchpath=<some location>
Like appending to the PATH varaible in your ~/.profile but less
geeky?
Post by Steve Holdoway
Post by Cliff Pratt
Post by Robin Paulson
exactly like that. but this is on windows, so there's no ~/.profile
unfortunately
would PATH=<some path> in the ~/.dia/diarc file do it? would that be
executed (i am under the impression the rc files are basically a
shell
Post by Steve Holdoway
Post by Cliff Pratt
Post by Robin Paulson
script executed at run-time of the application?) correctly on
windows.
Post by Steve Holdoway
Post by Cliff Pratt
Post by Robin Paulson
or am i asking the wrong crowd for windows advice...
You can set the path in Windows, but I forget how. I've certainly done it.
under control panel>system iirc
Are my emails not getting through to this list, or just being delayed?
Because I said the same as you? I read the original and replied before I
read yours.

Cheers,

Cliff

_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Steve Holdoway
2011-02-03 02:19:15 UTC
Permalink
Post by Robin Paulson
is there a generic way to set a global search path for gnome
applications? or any commonly-agreed upon standard across DEs?
i have some files i want an application to find and use by default,
but it appears to only look in ~/.<application> or
/usr/share/<application>/
moving the files to one of those locations (or using symlinks - this
is on windows) is not viable
how would i define an arbitrary location it looks in, without digging
through the source code, changing those locations and re-compiling?
i'm guessing there might be a standard format to put in the
~/.<application>rc file. something like
searchpath=<some location>
The generic /etc/profile? Not application specific, but I don't know of
anywhere that is.
--
Steve Holdoway BSc(Hons) MNZCS <***@greengecko.co.nz>
http://www.greengecko.co.nz
MSN: ***@greengecko.co.nz
Skype: sholdowa
Loading...