old-www/LDP/LG/issue01to08/tkdesk.html

166 lines
7.6 KiB
HTML

<HTML>
<HEAD>
<TITLE>TkDesk: Another Approach to File Management</TITLE>
</HEAD>
<BODY BGCOLOR=#FFEFD5 TEXT=#483D8B>
<CENTER><H1>Introduction to TkDesk </H1></CENTER>
<CENTER>by <B>Larry Ayers</B></CENTER><P>
<CENTER><A HREF="mailto:
layers@vax2.rain.gen.mo.us">&lt;layers@vax2.rain.gen.mo.us&gt;</A><BR>
Copyright (c) 1996<BR></CENTER>
<CENTER><H5>Published in Issue 8 of the Linux Gazette</H5></CENTER>
This month I'll describe yet another nifty file/desktop manager, TkDesk,
written by
<A HREF="mailto://zzhibol@rrzn-user.uni-hannover.de">Christian Bolik</A>.
This Tcl/Tk based application has been under development for several years
now, and though it is still in the first beta release, it is very stable and
dependable.<P>
Current GUI program development for Linux/unix has in recent years diverged
into two disparate pathways: Tcl/Tk programs, made up of a series of Tcl
scripts which are interpreted at runtime by a &quot;wish interpreter&quot; which does
the bulk of the work, and programs which use the proprietary Motif
libraries.<P>
I confess to complete ignorance of how well Motif programs perform on a system
with the libraries installed. I <EM>have</EM> run quite a few apps with the
libraries statically-linked into the executable, such as Netscape 2.0 and the
Moxfm file-manager which I reviewed last month.<P>
I've reached the conclusion that, unless an application has features which
can't be found elsewhere (a perfect example is Netscape) the long loading time
and increased memory requirements of the statically-linked Motif programs make
them in general a second choice. <P>
This circumstance has caused me to gravitate towards non-Motif X applications,
and towards the growing number of Tcl-Tk scripted programs which are
available. Tk windows even resemble the Motif windows, which I'm sure was
intentional. Both user-interfaces have a distinctive &quot;modern&quot; look, easily
made evident by placing a Tk and an Openlook window side by side.<P>
The current release of TkDesk requires at least Tcl-7.4 and Tk 4.0; this is
the level most distributions install. I would recommend updating to Tcl-7.5
with Tk-4.1, as with these releases shared libraries can easily be compiled.
This results in multiple Tk apps using the same libraries. I found out that
TkDesk compiled under the 7.4-4.0 releases won't work under the 7.5-4.1
versions, but it's a simple matter to recompile TkDesk.<P>
<HR SIZE=4 WIDTH="85%">
<CENTER><H3>Features and Configuration</H3></CENTER>
One convenient feature of Tk apps is that the tcl script files are
human-readable, editable, and (even if you are not a Tcl/Tk programmer), the
syntax is fairly comprehensible. Christian Bolik makes good use of this
feature by including a menu which enables you to call up any of several
configuration files, using a handy built-in editor. The files are
well-commented and enable quite a wide array of changes to the appearance and
behaviour of TkDesk. As an added touch, a second pull-down menu will reload
whichever files have been modified, facilitating on-the-fly changes. <P>
Here is a link to a screen-shot showing a somewhat customized TkDesk main
window:<P>
<CENTER><A HREF="./gx/ayers/tkdesk.gif">Main Window</A></CENTER><P>
Right-mouse-button menus are a major convenience in this file-manager; they
also are configurable via a Tcl text file. As an example, with some help from
Christian Bolik I put a new entry in the menu which appears over a directory
panel; this one opens an xterm based in that directory.<P>
Navigation across drives and directories is thoughtfully implemented in
TkDesk.The default main window shows three directories, and as you open
further subdirectories a horizontal scroll-bar appears which enables
traversing quite a few levels very quickly. As well as a bookmarking feature,
there is a pull-down menu which displays the current session's history of
directories visited. This is saved between sessions.<P>
There <EM>is</EM> an option to display small icons in the directory panes,
next to the filename, but this does slow down the display and serves no real
purpose.<P>
Another optional feature is a well-designed configurable button-bar, which can
have submenus invoked via a right-mouse-button click on an icon.
<P>
<IMG SRC="./gx/ayers/button.gif" ALIGN=LEFT>
This button-bar appears on all of fvwm's virtual desktops.<P>One feature I've
found to be useful is the ability to open up a single-pane, single-directory
window before moving on to another distant directory. Files can then be
dragged and dropped between non-contiguous directories with ease.<P>
A few other features of the built-in editor are worth noting. This is a
multi-buffer, single-window editor with its own internal clipboard,i.e., cut
and paste doesn't interface with X's system clipboard. As installed it is
invoked by double-clicking on any text or shell-script file entry in a
directory pane. It appears nearly instantly and is ideally suited to the
tweaking of configuration files, both TkDesk's and any others.<P>
Yet another convenience which has been added to the current version is
script-based auto-mounting of floppy and cdrom drives. This can easily be
configured to mount either msdos or ext2 filesystem floppies, depending on
which you use.<P> <HR SIZE=4 WIDTH="75%">
<CENTER> <H3>A Comparison of TkDesk and the Midnight Commander</H3></CENTER>
As nice as TkDesk is, I have to admit that for maximum speed, the Midnight
Commander reigns supreme, especially when run from the a console session.
This program has been greatly improved in the last year or so. It's virtual
file-system allows opening of gzipped tar files, as well as zip files, as if
they were ordinary directories. MC can be used as an ftp client as well,
allowing one of the two directory panes to be on a remote filesystem and the
other to be on your own disk. This actually works pretty well, though I find
myself using ncftp for most file transfers.<P>
The Midnight Commander's major flaw, at least on my Slackware 3.0 system, is
its interface with termcap and terminfo. The program comes with termcap and
terminfo extensions optimized for MC, but I find that if I install them other
apps are adversely affected, such as ncftp in an xterm. Without the
extensions MC in an xterm is lacking the home and end keys, for example. I've
fiddled with this on and off and have never really gotten it right. The
console sessions work well, with color and mouse support, so I mostly run MC
in that mode. (Since I wrote this paragraph I've done some more fiddling and
now everything but NcFtp works well in an xterm, so it can be done!)
<P>
TkDesk is of course much nicer looking, and isn't that much slower. It has a
different approach to disk navigation than MC; for some tasks TkDesk's
approach is better, for others MC's is well-suited. Of course a shell
command-line is often the quickest way to accomplish specific tasks, without
the visual overview the file-managers offer.<P>
<CENTER><H3>Availability</H3></CENTER>
The current version of TkDesk (version 1.0b1) is available at sunsite and its
mirrors; I like the
<A HREF="ftp://ftp.cc.gatech.edu/pub/linux/">Georgia Tech Site</A>.
It is also available from one of the primary Tcl/Tk archives,
<A HREF="ftp://ftp.neosoft.com/archive4/languages/tcl/NEW/">Neosoft</A>.<P>
The Midnight Commander is also available from Georgia Tech, but the home site
in Mexico will always have the latest releases and betas:
<A HREF="ftp://ftp.nuclecu.unam.mx/linux/local/">MC Site</A><P>
<HR>
<A HREF="./gazette_toc.html">Back up to Linux Gazette T.O.C</A><P>
<!-- HHMTS START -->
Last modified: Sun Jun 2 20:33:30 CDT 1996
<!-- HHMTS END --><P>
<CENTER><IMG SRC="./gx/ayers/bluesquig.gif"></CENTER>
</BODY>
</HTML>