Gimp Command Line Switches AKA Flags (Options)
|
|
An excellent source of information about the command line switches and environments that Gimp supports can be found in the Gimp man page. It's located in the All of this is done in a shell, such as in an xterm or rxvt window. As we mentioned earlier, you have probably hidden all this in your Window Manager so you only have to click on an icon or open a menu. If you want to test flags and different environments or even run Gimp without Xwindow, you must do this in a shell. Typing [
The [olof@olof olof]$ gimp -v GIMP version 1.0 Always visit Batch Mode And No-InterfaceThe
gimp -n -b '(gimp-procedural-db-dump "pdb_dump.tmp")' '(gimp-quit 0)' These will dump Gimp's pdb database to a file called gimp -n -b '(my-script 1 "\"Sample text.\"")' '(gimp-quit 0)' The If you don't have X-window up and running (i.e., you are running your UNIX session in a console that has no graphic capabilities or you have a modem connection to your UNIX host with a vt100 terminal only), then you still can run Gimp in batch mode; just do it like this: Xvfb :1 -screen 0 10x10x8 -pixdepths 1 & gimp --display :1.0 -n -b '<commandos> ' '(gimp-quit 0)' This will fire up an invisible X-server, in which you run Gimp. More OptionsAs you saw above, we introduced a new flag, Normally you run and display Gimp on the same host, and you don't have to barter about display settings. Here's an example of how to use the display option in Gimp. Say that you have a "supercomputer" at your campus running UNIX, and this computer has Gimp installed. Then, it would be more than efficient to edit huge Gimp images at this computer while displaying them at your local workstation or X-terminal. Here is a quick how to. At your workstation, you will execute a command allowing the supercomputer to display Gimp on your workstation: [olof@olof olof]$ xhost niceriver.frozenriver.com (my local supercomputer ;) niceriver.frozenriver.com being added to access control list The second line enabled the supercomputer to access our X-server at our workstation. All we have to do now is to [olof@olof olof]$ rlogin niceriver.frozenriver.com [olof@niceriver olof]$ Now, we are logged in to the supercomputer. All we have to is open Gimp and tell it where to display (at gimp --no-xshm --display olof.frozenriver.com:0.0 Now, Gimp will display at your workstation and you can work with it just as if you had run Gimp at your workstation. When you are finished with Gimp you just have to log out from the supercomputer and tell your workstation that you don't want the supercomputer accessing your X-server: [olof@olof olof]$ xhost - niceriver.frozenriver.com niceriver.frozenriver.com being removed from access control list The last line tells us that the supercomputer no longer can access our X-server. There are, of course, better ways to handle remote display, that have better security, automatic transfer of the display environment, etc., but that is beyond the scope of this book. We introduced another new option earlier,
[olof@olof olof]$ gimp --verbose parsing "/home/olof/.gimp/gtkrc" parsing "/usr/local/share/gimp/gimprc" parsing "/home/olof/.gimp/gimprc" parsing "/home/olof/.gimp/pluginrc" writing "/home/olof/.gimp/pluginrc" parsing "/home/olof/.gimp/menurc" Starting extensions: extension_script_fu The last option is | |
Installing A New Version Of Gimp
|
|
If you are installing a new version of Gimp, please remember to remove your personal | |
Initialization Files AKA rc-files
|
|
Gimp has a lot of initializations files that control the behavior of Gimp. Most of the options that you set in different rc files are done using the Preference dialog (see Chapter 5). We will only take a look at the options that you can't set from the dialog. gimprc And ~/.gimp/gimprcThe system-wide
There won't be much in it, because most of the options are written in the system-wide As you can see, the file is more or less self-explanatory, and we will only comment on things that you can't set in the Preference dialog. # This is the system-wide gimprc file. Any change made in this file # will affect all users of this system, provided that they are not # overriding the default values in their personal gimprc file. # # Lines that start with a '#' are comments. # Blank lines are ignored. # The variable gimp_dir is set to either the interned value # .gimp or the environment variable GIMP_DIRECTORY. If # the path in GIMP_DIRECTORY is relative, it is considered # relative to your home directory. (prefix "/usr/local") (exec_prefix "${prefix}") (gimp_data_dir "${prefix}/share/gimp") (gimp_plugin_dir "${exec_prefix}/lib/gimp/0.99") You shouldn't change these preferences, but if you feel you must, you can only do it in an editor. # Set the temporary storage directory...files will appear here # during the course of running the gimp. Most files will disappear # when the gimp exits, but some files are likely to remain, # such as working palette files, so it is best if this directory # not be one that is shared by other users or is cleared on machine # reboot such as /tmp. (temp-path "${gimp_dir}/tmp") # Set the swap file location. The gimp uses a tile-based memory # allocation scheme. The swap file is used to quickly and easily # swap files out to disk and back in. Be aware that the swap file # can easily get very large if the gimp is used with large images. # Also, things can get horribly slow if the swap file is created on # a directory that is mounted over NFS. For these reasons, it may # be desirable to put your swap file in "/tmp". (swap-path "${gimp_dir}") # Set the brush search path...this path will be searched for valid # brushes at startup. (brush-path "${gimp_dir}/brushes:${gimp_data_dir}/brushes") # Specify a default brush. If none is specified it Defaults to the # "1circle.gbr" brush which is just a single pixel-sized brush. # The brush is searched for in the brush path. (default-brush "19fcircle.gbr") Not adjustable in the Preferences dialog. # Set the pattern search path...this path will be searched for # valid patterns at startup. (pattern-path "${gimp_dir}/patterns:${gimp_data_dir}/patterns") # Specify a default pattern. # The pattern is searched for in the specified pattern paths. (default-pattern "wood2.pat") Not adjustable in the Preferences dialog. # Set the palette search path...this path will be searched for # valid palettes at startup. (palette-path "${gimp_dir}/palettes:${gimp_data_dir}/palettes") # Specify a default palette. # The pattern is searched for in the specified pattern paths. (default-palette "Default") Not adjustable in the Preferences dialog. # Set the gradient search path...this path will be searched for # valid gradients at startup. (gradient-path "${gimp_dir}/gradients:${gimp_data_dir}/gradients") # Specify a default gradient. # The gradient is searched for in the specified gradient paths. (default-gradient "German_flag_smooth") Not adjustable in the Preferences dialog. # Set the plug-in search path...this path will be searched for # plug-ins when the plug-in is run. (plug-in-path "${gimp_dir}/plug-ins:${gimp_dir}/plug-ins/script-fu:${gimp_plugin_dir}/plug-ins") # Set the path for the script-fu plug-in. This value is ignored by # the GIMP if the script-fu plug-in is never run. (script-fu-path "${gimp_dir}/scripts:${gimp_data_dir}/scripts") Not adjustable in the Preferences dialog. # The tile cache is used to make sure the gimp doesn't thrash # tiles between memory and disk. Setting this value higher will # cause the gimp to use less swap space, but will also cause # the gimp to use more memory. Conversely, a smaller cache size # causes the gimp to use more swap space and less memory. # Note: the gimp will still run even if `tile-cache-size' is # set to 0. The actual size can contain a suffix of 'm', 'M', # 'k', 'K', 'b' or 'B', which makes the gimp interpret the # size as being specified in megabytes, kilobytes and bytes # respectively. If no suffix is specified the size defaults to # being specified in kilobytes. (tile-cache-size 10m) # Speed of marching ants in the selection outline # this value is in milliseconds # (less time indicates faster marching) (marching-ants-speed 300) # Set the number of operations kept on the undo stack (undo-levels 5) # Set the color-cube resource for dithering on 8-bit displays # The 4 values stand for Shades of red, green, blue and grays # Multiplying the # of shades of each primary color yields # the total number of colors that will be allocated from the # gimp colormap. This number should not exceed 256. Most of the # colors remaining after the allocation of the colorcube # will be left to the system palette in an effort to reduce # colormap "flashing". (color-cube 6 6 4 24) Not adjustable in the Preferences dialog. # Install a GIMP colormap by default -- only for 8-bit displays # (install-colormap) # Specify that marching ants for selected regions will be drawn # with colormap cycling as opposed to redrawing with different # stipple masks. This color cycling option works only with 8-bit # displays (colormap-cycling) # Tools such as fuzzy-select and bucket fill find regions based on # a seed-fill algorithm. The seed fill starts at the initially # selected pixel and progresses in all directions until the # difference of pixel intensity from the original is greater than a # specified threshold ==> This value represents the default # threshold (default-threshold 15) Not adjustable in the Preferences dialog. # There is always a tradeoff between memory usage and speed. In # most cases, the GIMP opts for speed over memory. However, if # memory is a big issue, set stingy-memory-use # (stingy-memory-use) # When zooming into and out of images, this option enables the # automatic resizing of windows # (allow-resize-windows) # Context-dependent cursors are cool. They are enabled by # default. However, they require overhead that you may want to do # without. Uncomment this line to disable them. # (no-cursor-updating) # Layer preview sizes: # none: no previews in layers dialog/layer selector # small: 32x32 # medium: 64x64 # large: 128x128 # #: #x# (preview-size small) # Tooltips # Comment this out to disable the tooltips in the toolbox # (dont-show-tool-tips) # Controlling ruler visibility # The default behavior is for rulers to be ON # This can also be toggled with the View->Show Rulers command or # shift+control+r (dont-show-rulers) Not adjustable in the Preferences dialog. # Ruler units # The units of rulers can be one of: (pixels inches centimeters) # The default is pixels (ruler-units pixels) Not adjustable in the Preferences dialog. Don't change this unless you know what you are doing. # Disable auto saving # Just uncomment the line below... # (dont-auto-save) Not adjustable in the Preferences dialog. It doesn't do anything at the moment. # Disable confirmation before closing an image without saving # Just uncomment the next line # (dont-confirm-on-close) Not adjustable in the Preferences dialog. # Setting the level of interpolation # Uncommenting this line will enable cubic interpolation. # By default, GIMP uses linear interpolation, which is faster, but # has poorer quality # (cubic-interpolation) # Set the gamma correction values for the display # 1.0 corresponds to no gamma correction. For most displays, # gamma correction should be set to between 2.0 and 2.6 # Run the utility "gamma_correct" to determine appropriate values # for your display. # # One important item to keep in mind: Many images that you might # get from outside sources will in all likelihood already be # gamma-corrected. In these cases, the image will look washed-out # if the gimp has gamma-correction turned on. If you are going # to work with images of this sort, turn gamma correction off # by removing this line, or setting the values to 1.0. # gamma-correction 1.0 # gamma-correction 2.0 # ___ (gamma-correction 1.0) Not adjustable in the Preferences dialog. See Chapter 13 on how to make a gamma correction. # Set the manner in which transparency is displayed in images # Transparency type can be one of: # 0: Light Checks # 1: Mid-Tone Checks # 2: Dark Checks # 3: White Only # 4: Gray Only # 5: Black Only # Check size can be one of: # 0: Small # 1: Medium # 2: Large (transparency-type 1) (transparency-size 2) The rest of the file contains paths for different plug-ins. Quite often you have to add a line like this to specify the path to auxiliary files for some new plug-ins. These lines are not adjustable in the Preferences dialog. (fractalexplorer-path "${gimp_data_dir}/fractalexplorer:${gimp_dir}/fractalexplorer") (gfig-path "${gimp_data_dir}/gfig:${gimp_dir}/gfig") (gflare-path "${gimp_dir}/gflares:${gimp_data_dir}/gflares") menurcThis is a personal-only file located in your [olof@olof olof]$ rm ~/.gimp/menurc There is also a key binding file that will make Gimp use Photoshop's key bindings. It's located in the system-wide directory, and it's called [olof@olof olof]$ cp /usr/local/share/gimp/ps-menurc ~/.gimp/ But why use Photoshop key bindings when there are Gimp key bindings? pluginrcThis file holds information about all the plug-ins available to Gimp. Do not edit this file! If Gimp starts having problems with plug-ins, then you can delete this file and Gimp will write a new one for you: [olof@olof olof]$ rm ~/.gimp/pluginrc gtkrcThis file is also a personal-only file. It controls the behavior of the GTK tool kit that Gimp uses for its menus, tabs, etc. One of the few reasons to edit this file is to change the font or font size that Gimp uses in the menus. Here is an extract: # style <name> [= <name>] # { # <option> # } # # widget <widget_set> style <style_name> # widget_class <widget_class_set> style <style_name> style "ruler" { font = "-adobe-helvetica-medium-r-normal--*-80-*-*-*-*-*-*" } style "default" { font = "-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-*-*" } #style "lsystem_rules" #{ # font = "-*-courier-medium-r-normal--*-100-100-100-m-*-*-*" #} widget_class "*Ruler*" style "ruler" widget_class "*" style "default" To understand how to change the font line, please read "Text And Fonts" starting on page 165 and "How To Get Fonts To Gimp" starting on page 759. This file is otherwise quite self-explanatory. |
|
Frozenriver Digital Design http://www.frozenriver.nu Voice: +46 (0)31 474356 Fax: +46 (0)31 493833 support@frozenriver.com |
Publisher Coriolis http://www.coriolis.com |