GNOME Hex Editor Documentation
Copyright (C) 1998, Jaka Mocnik
This program and the documentation are free software; you can redistribute
it and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the License,
or (at your option) any later version. This program is distributed in the
hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
For more details see the file COPYING.
1. Table of contents
-
Table of contents
-
Introduction
-
Use
-
Feedback
2. Introduction
GHex (the GNOME Hex Editor) is a small tool that enables
you, its user, to view and edit contents of any file in hex and as ASCII
text. It is supposed to be a part of the GNOME project and tries to nicely
integrate with its other components and conform to the general guidelines
for GNOME applications.
3. Use
When starting GHex, it will pop up a window with nothing but a menubar.
When a file is loaded, its contents will be displayed below the menubar
in an area that will occupy the largest part of the window. The contents
are displayed in both hex and ascii at once, with hexadecimal values on
the left and the corresponding ascii representation of those bytes on the
right-hand side of the display.
The menubar
Menu File
-
Open lets you select a file and opens it, reading its contents to
a buffer and displaying it immediately in a view.
-
Save writes the contents of the buffer to the file with the same
name. Be careful with this since you can easily corrupt many files that
correspond to a given format.
-
Save As lets you select a filename and then saves the contents of
the buffer to a file with this name.
-
Revert reloads the contents of the file.
-
Close closes all views and removes the file from the memory.
-
Preferences brings up the Preferences Dialog
-
Quit should be obvious: it quits GHex.
Menu Edit (is shown only when a file is being edited)
-
Find opens the Find Dialog
-
Replace opens the Find & Replace Dialog
-
Goto Byte opens the Jump To Byte Dialog
Group Data As offers three different ways how the bytes in the
hex display are grouped: either as single bytes or in groups of two bytes
(words) or four bytes (long words).
Menu View
-
Add view adds another view of the currently edited file.
-
Remove view removes the active view. Even if this is the last view
of the corresponding file, the file will not be closed and will remain
accessible through the Documents menu
Menu Documents
-
Displays names of all the open documents. You can access any of them by
simply picking them from this menu.
Menu Help
-
About shows you what GHex is and who is responsible for it.
-
Help brings up the Gnome help browser with this very file.
Editing a file
You can move around the file using the arrow keys, the numeric keypad,
the scrollbar on the left of the buffer display or by clicking into display
with a mouse. Clicking into the hex or ascii display will activate hex
or ascii editing mode. The active display is indicated by a full cursor,
while the other one displays cursor as an outline. In ascii mode, you can
edit the file pretty much as with any text editor except that GHex will
not let you insert any data but only overwrite it. In hex mode, you can
change the value of the nibble (four bits, a half of a byte) under the
cursor with keys '0' .. '9' and 'a' .. 'f'.
Finding and replacing data
Selecting Find from the Edit menu will bring up the Find
Dialog. It allows you to search the file for a string that you can enter
in either hex or ascii. To find an ascii string, simply enter it into the
entry widget and click on the Find Next or Find Previous
button. You can specify the value to be found in hex if you begin the string
with a $: searching for "$474e55" is the same as searching for "GNU".
If you really need to search for an ascii string beginning with a $
character, you can escape the leading $ with $$: "$$GNU"
represents string "$GNU".
Replacing data is much alike, except that you have to enter both a
string to be found and a string that will replace the found value. Both
strings must be of the same length (because GHex allows only overwriting
of data and no insertion). The Find Next button will search for
the next occurence of the string from the first entry widget, the Replace
button will replace the data if the cursor is on the beginning of a
string that equals to the searched-for one and then search for the next
occurence, if the cursor is not positioned on the beginning of the searched-for
string, it will try to find the next occurence of it, but will not replace
that one. Finally, the Replace All button will replace all occurences
of the searched-for string from the current cursor position to the end
of the file.
Setting user preferences
-
Display settings: here you can set the default data grouping type and the
display font
-
MDI settings: lets user select preferred interface type. Currently supported
options are:
-
Notebook: displays views in notebook pages, enabling user to create a new
toplevel window from each notebook page by dragging it to the root window
-
Toplevel: displays each view in its own toplevel window
-
Modal: only displays one view at a time, allowing user to select a document
from the Documents menu
4. Feedback
GHex is being maintained by Jaka
Mocnik <jaka.mocnik@kiss.uni-lj.si>. If you are having trouble installing
and/or running GHex, feel free to e-mail me.
You can check the current status of GHex via WWW at this
page. The most recent version is also available at the Gnome
CVS repository in module gnome-utils.
Comments, ideas and (most of all) bug reports (and especially patches)
are very welcome at the above e-mail address.