It is currently Sun Jul 21, 2024 2:24 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: a question on path & home directory
PostPosted: Tue Sep 13, 2011 4:29 pm  (#1) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
I know that is possible wrote a absolute path starting from the user directory that will works whatever the user name may be

The question is : what the syntax ?
i will like a example...let say from home to the gimp plugin folder

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: a question on path & home directory
PostPosted: Tue Sep 13, 2011 4:45 pm  (#2) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
Which OS?

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: a question on path & home directory
PostPosted: Tue Sep 13, 2011 4:55 pm  (#3) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
Well ...i had in mind win
but i will like to know also for Linux (debian/ubuntu if this make a difference)

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
 Post subject: Re: a question on path & home directory
PostPosted: Tue Sep 13, 2011 5:02 pm  (#4) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
In GNU/Linux, when you are using an interactive command line, you can use a tilde ~ as a substitute for your personal user directory. This will not necessarily work from within a program or script, but $HOME should. Both of these forms are just abbreviations/alternate names for /home/user_name -- for example, /home/photocomics or /home/saul .

Examples,
    ~/.gimp-2.6/scripts ==> /home/saul/.gimp-2.6/scripts
    $HOME/images ==> /home/saul/images


Also, the 'cd' (change directory) command will take you to your $HOME directory if executed without specifying a directory.

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: a question on path & home directory
PostPosted: Tue Sep 13, 2011 5:34 pm  (#5) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4757
For Windows there are several environment variables as well, in particular USERPROFILE

_________________
Image


Top
 Post subject: Re: a question on path & home directory
PostPosted: Tue Sep 13, 2011 7:14 pm  (#6) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
ofnuts wrote:
For Windows there are several environment variables as well, in particular USERPROFILE


So in Windows USERPROFILE/.gimp-2.6/scripts should do the trick ?

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
 Post subject: Re: a question on path & home directory
PostPosted: Tue Sep 13, 2011 7:24 pm  (#7) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14715
Location: USA
No i believe it is HOME/.gimp-2.6/scripts
As the HOME variable value in Windows XP is C:\Documents and Settings\YOURUSERFOLDER

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: a question on path & home directory
PostPosted: Wed Sep 14, 2011 4:38 am  (#8) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 1171
Location: Here and there
on my Windows XP system there isn't a HOME variable

I have
HOMEDRIVE = D:
HOMEPATH = \Profiles\username

and
USERPROFILE = D:\Profiles\username


So in a DOS prompt the path to my personal plug-ins folder is
%USERPROFILE%\gimp-2.6\plug-ins

What are you trying to do with this? Are we re-visiting this thread: viewtopic.php?f=9&t=1763


Top
 Post subject: Re: a question on path & home directory
PostPosted: Wed Sep 14, 2011 7:36 am  (#9) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
Quote:
Are we re-visiting this thread: viewtopic.php?f=9&t=1763

i read again that tread before posting, because there was a hint about absolute path that could even start from a variable as home
But I thought was better start a new topic because there the point of home was not central, and in this case is not about the ShellOut script (well maybe could be applied to that, but i had other in mind )

Quote:
What are you trying to do with this?


I want to know if may edit the file that control the gimp preference, as example to make load what in .gimp/plug-ins/gap or gimp/plugins/mathmap and the alike

To be more clear the idea is GimpVideo a customized version of Gimp tailored for enhance capacity for edit/create animation and video

BUT and this is a central point and the main reason of the question, i wish all (or almost all) "customization" clearly separated from the gimp core
so i was thinking to edit the file that control the gimp preference for folders and to then to change (mostly at binary level) the content of the .gimp user folders:
But here to make easier a user update of the single components i would prefer them separated ,each in its own subfolder
(example ,
.gimp/plug-ins/file with inside the apng and swf plugins,
.gimp/plug-ins/gap,
.gimp/plug-ins/gmic,
.gimp/plug-ins/Liquid Rescale
.gimp/plug-ins/mathmap
and so on with this logic:
any plugin that is not included in a single file in its own subfolder: the others grouped for group, basically 2 groups,
1 for additional Load/save plugins
the other for plugin that may directly or indirectly (indirectly as the kaleidoscope plugin from wich depend 2 animation scripts ) be used for animation

and something similar for the script folder )

I believe something similar will work on the portable version :i did a quick test on Gimp 2.7.3-portable but without using subfolders,just using the plug-ins, script, gradient and pattern folder(the last 2 because a few animation scripts depend on extra patterns & gradients ),in what in the portable version correspond to the home directory of the standard version
(that is the .gimp-2.7.3 subfolder)


then i did copy the modded version from the laptop , pasted on my other PC a desktop, and everything went fine

But
1 ) without using subfolders , the user plugin folder looks too messy to my taste, and i fear user error in case of update of single component as gmic
2) I know that for some reason many don't like use the portable version, so i was looking if was possible how to do something similar based the "standard" gimp

############################################################
############################################################

BTW a bit OT i would really appreciate help for "GimpVideo", i saw that JamesH already did something very close
(HERE viewtopic.php?f=9&t=2241 )

Main difference is that i would like the "customization" separated as much possible from the Gimp core, ( are other difference for the menu and forasome more animation scripts , but the central point for me is mantain separate the gimp core as much possible)

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
 Post subject: Re: a question on path & home directory
PostPosted: Wed Sep 14, 2011 8:31 am  (#10) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
PhotoComix wrote:
I want to know if may edit the file that control the gimp preference, as example to make load what in .gimp/plug-ins/gap or gimp/plugins/mathmap and the alike

Such things are controlled by the 'gimprc' file. Any file can be selected as your 'gimprc' by specifying the "--gimprc filename" when starting GIMP (if you are using a desktop shortcut then edit the startup command in that shortcuts preferences).

By default, $GIMP2_DIRECTORY/gimprc is the file used for 'gimprc'. On Windows, I am guessing this would be specified as %GIMP2_DIRECTORY%\gimprc. However, if the environment variable GIMP2_DIRECTORY is not defined then it is assumed to be $HOME/.gimp-2.6.

PhotoComix wrote:
so i was thinking to edit the file that control the gimp preference for folders and to then to change (mostly at binary level) the content of the .gimp user folders:
But here to make easier a user update of the single components i would prefer them separated ,each in its own subfolder
(example ,
.gimp/plug-ins/file with inside the apng and swf plugins,
.gimp/plug-ins/gap,
.gimp/plug-ins/gmic,
.gimp/plug-ins/Liquid Rescale
.gimp/plug-ins/mathmap

This would be specified in your 'gimprc' file with a line such as:
(plug-in-path "${gimp_dir}/plug-ins:${gimp_dir}/plug-ins/file:${gimp_dir}/plug-ins/gap:${gimp_dir}/plug-ins/gmic:${gimp_dir}/plug-ins/Liquid\ Rescale:${gimp_dir}/plug-ins/mathmap:${gimp_data_dir}/plug-ins")

The "${gimp_data_dir}" will be replaced by the GIMP system directory (on a typical GNU/Linux distribution this would be /usr/share/gimp/2.0/) and the "${gimp_dir} will be replaced by the appropriate location -- either the value of the environment variable $GIMP2_DIRECTORY or, if that is not defined, $HOME/.gimp-2.6.

This is all explained more completely in the gimprc manual.

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: a question on path & home directory
PostPosted: Wed Sep 14, 2011 9:12 am  (#11) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
Excellent tip and pointers ,i am reading now the manual
Thank it seems exactly what i was needing

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Directory search not working

3

No new posts 89ºF when I got home.

4

No new posts GEGL PLUGINS DIRECTORY FOR SNAP GIMP ON LINUX

0

No new posts Ghost Rider -Why The Toilet Paper Burns-Up On The Way Home

4

No new posts Attachment(s) i struggle with the option to copy the path - the path where a file i

3



* Login  



Powered by phpBB3 © phpBB Group