- Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Sponsored Links

Latest News
  General News
  Press Releases
  Off Topic

Back to files


Cutview is a tool that automatically picks up, stores and displays data in the cut buffer. The user can specify a number of buffers to be used, thus providing a history mechanism for cut operations. Buffers can be locked, so that later cut operations will not overwrite them, and since the contents of the buffers are saved in a file, the user can store data there long term. The contents of the buffers can be edited within the window via the text edit widget, or with the user's favorite editor, or sent to a printer by selecting a menu item. The number of buffers can be increased or decreased dynamically.

I have been using cutview in an additional manner: as a post-it type of application. By being able to lock and save the contents of buffers, cutview provides a quick way to save notes (even better since you can get the data into it by cutting it, not typing it!). You can also use cutview to store sets of commands you frequently use.

cutview uses both selections (the current method for sharing selected text), and the cut buffer, the older mechanism used for sharing selected text. By using both, cutview propagates the information from one mechanism to another transparently to the user.

xcat is a simple program that takes stdin (standard input) and puts the contents into cutbuffer0 (cutview would then copy the data to the current selection).

xecho is a simple program that takes the current contents of cutbuffer0 and copies it to stdout (standard out).

Building and Installing

cutview can built using ANSI C or K&R C compilers. The most difficult part is ensuring proper paths for headers and libraries. Also, different versions of Motif may require different libraries to be specified as link arguments.

To build cutview, edit the Makefile and uncomment the lines that seem most appropriate for your system, or make changes if none of the entries apply to your system.

cutview can be installed anywhere in your path (the default is /usr/local/bin/X11).


Applications have been known to have memory leaks in their code to handle requests for the selection. Since cutview issues requests for the selection often (according to the setting for time), it can seem that cutview is causing a problem with the other application. This problem can be observed using top or ps to observe the size of the suspected process. If its size is growing while no other activities are occurring, it is likely experiencing a memory leak. Notify the owner of that code of the problem. It is possible to reduce the symptoms of this problem by increasing the interval between updates of cutview (see -time). This does not fix the problem in the other application.

Hugh Mahon              |___|       |   |     
                            |\  /|
                            | \/ |

Sponsored Links

Discussion Groups
  Networking / Security

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 All rights reserved.