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

  1. Table of contents
  2. Introduction
  3. Use
  4. 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 Menu Edit (is shown only when a file is being edited) Menu View Menu Files Menu Help

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 choose in which form (either hex or ASCII) you wish to enter the search string with the two radio buttons below the entry widget
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.

Base Conversion Dialog

Shows you up to four bytes of data as their binary, decimal, hexadecimal and ASCII representation. The values automatically update when you change data in any entry.

Setting user preferences

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 and/or get the latest stable release 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.