General

Startup

At startup, Geany loads all files from the last time Geany was launched. You can disable this feature in the preferences dialog(see Figure 3.4, “General tab in preferences dialog”). If you specify some files on the command line, only these files will be opened, but you can find the files from the last session in the file menu under the "Recent files" item. By default this contains the last 10 recently opened files. You can change the amount of recently opened files in the preferences dialog.

You can start several instances of Geany, but only the first will load files from the last session. To run a second instance of Geany, do not specify any filenames on the command-line, or disable opening files in a running instance using the appropriate command line option.

Opening files from the command-line in a running instance

Geany detects an already running instance of itself and opens files from the command-line in the already running instance. So, Geany can be used to view and edit files by opening them from other programs such as a file manager. If you do not like this for some reason, you can disable using the first instance by using the appropriate command line option - see the section called “Command line options”.

Virtual terminal emulator widget (VTE)

If you have installed libvte.so in your system, it is loaded automatically by Geany, and you will have a terminal widget in the notebook at the bottom.

If Geany cannot find libvte.so at startup, the terminal widget will not be loaded. So there is no need to install the package containing this file in order to run Geany. Additionally, you can disable the use of the terminal widget by command line option, for more information see the section called “Command line options”.

You can use this terminal (from now on called VTE) nearly as an usual terminal program like xterm. There is basic clipboard support. You can paste the contents of the clipboard by pressing the right mouse button to open the popup menu and choosing Paste. To copy text from the VTE, just select the desired text and then press the right mouse button and choose Copy from the popup menu. On systems running the X Window System you can paste the last selected text by pressing the middle mouse button in the VTE (on 2-button mice, the middle button can often be simulated by pressing both mouse buttons together).

In the preferences dialog you can specify a shell which should be started in the VTE. To make the specified shell a login shell just use the appropriate command line options for the shell. These options should be found in the manual page of the shell. For zsh and bash you can use the argument --login.

Note

Geany tries to load libvte.so. If this fails, it tries to load libvte.so.4. If this fails too, you should check whether you installed libvte correctly. Again, Geany also runs without this library.

It could be, that the library is called something else than libvte.so.4 (e.g. on FreeBSD 6.0 it is called libvte.so.8). So please set a link to the correct file (as root).

# ln -s /usr/lib/libvte.so.X /usr/lib/libvte.so.4

Obviously, you have to adjust the paths and set X to the number of your libvte.so.

Defining own widget styles using .gtkrc-2.0

You can define your widget style for many of Geany's GUI parts. To do this, just edit your .gtkrc-2.0 (usually found in your home directory on UNIX-like systems and in the etc subdirectory of your Geany installation on Windows).

To get a defined style get noticed by Geany you must it assign to one of Geany's widgets. To do so, use the following line:

widget "Geany*" style "geany_style"

This would assign your already defined style "geany_style" to all Geany widgets. You can also assign styles only to specific widgets. At the moment you can use the following widgets:

  1. GeanyMainWindow

  2. GeanyEditMenu

  3. GeanyToolbarMenu

  4. GeanyDialog

  5. GeanyDialogPrefs

  6. GeanyDialogProject

  7. GeanyDialogSearch

Example of a simple .gtkrc-2.0:

style "geanyStyle"
{
	font_name="Sans 12"
}
widget "GeanyMainWindow" style "geanyStyle"

style "geanyStyle"
{
	font_name="Sans 10"
}
widget "GeanyPrefsDialog" style "geanyStyle"