TkDesk User's Guide: Frequently Asked Questions

Next Previous Contents

## 10. Frequently Asked Questions

## 10.1 How can I change the position of the application bar?

Since version 1.1 the appbar contains a "handle" at the upper or left edge that can be used to drag the appbar around the screen by just pressing the left mouse button over it.

You can also drag the application bar around simply by holding down the Alt- or Meta-key and simultaneously pressing the left mouse button over the application bar. You can also invoke the "Move..." entry from the comet button's popup menu to do the same without having to press Alt/Meta.

Since version 1.0b1 the configuration file "AppBar" sets also a variable named tkdesk(appbar,wm_managed) which can be used to have the apllication bar managed by the window manager, although this is usually not necessary.

## 10.2 Can I have transparent icons?

No, but have a look at the answer to the next question. As far as I know to have transparent icons in X you need to make use of X11's SHAPE extension. Now as raw X programming is something only for the very brave, I didn't look into this any deeper yet. Any takers?

## 10.3 How can I change the background colour of the icons and desk items?

The background colour of icons used when the window manager iconifies a window can be set in the configuration file "System". The variable you are looking for is tkdesk(color,icon_background). By setting this variable to the same colour as your root window you can achieve the effect of transparent icons. You can define the colour either as a normal name (such as "grey", "blue") or in the form #rrggbb.

## 10.4 How can I have a different set of desk items on each virtual screen?

### FVWM and similar or derived window managers

First, you have to set the variable `tkdesk(desk_items,wm_managed)` in the System config file to 1. Then you have to configure fvwm to not decorate windows of class `dsk_DeskItem`. For instance:

> `

>     Style "dsk_DeskItem"    NoTitle, NoHandles, WindowListSkip, BorderWidth 0

> `

### CDE window manager

As for FVWM, you first have to set the variable `tkdesk(desk_items,wm_managed)` in the System config file to 1. To tell the CDE window manager (dtwm) to not decorate desk items you have to add the following line to either the file Dtwm or .Xdefaults in your home directory, and then restart dtwm:

> `

>     Dtwm*dsk_DeskItem*clientDecoration:  none

> `

## 10.5 How do I configure FVWM mini-icons for TkDesk?

For fvwm95's Style command (like fvwm2 from which it comes) you can use a variety of things to identify a tkdesk window - you don't have to use the name only; you can also use the window's class name or resource string. To find out what the window class and resource string are for a certain type of tkdesk window, use the FvwmIdent module (if you use Debian, this will be under the Window Managers->Modules menu; if you're using the default fvwm95rc that comes with the fvwm95 distribution, this will be under the Programs->Modules menu; I don't know about others).

Anyway, FvwmIdent tells me that the window opened by tkDesk's "Open Browser..." menu has a class name of dsk_FileViewer, so I open the FvwmConsole (or FvwmTalk) module, and enter the commands:

> `

>     Style dsk_FileViewer TitleIcon mini-filemgr.xpm
>     Recapture

> `

Then the browser window appears with the appropriate icon. To get the window opened by the "Open Directory..." menu, use: Style dsk_FileList TitleIcon mini-filemgr.xpm

(The "recapture" command is only necessary to apply the command to windows already open; it isn't necessary in your config. file) (Contributed by Daniel Martin, `dtm12@jhunix.hcf.jhu.edu`)

## 10.6 Configuring the appbar or popup menus to execute (export foo=bar; program;) doesn't work.

Yes, this is a bit tricky. What you need to do is the following:

> `

>     dsk_exec sh -c {export foo=bar; program}

> `

## 10.7 Composing characters doesn't work in TkDesk's editor.

Currently you have to edit the file cb_tools/bindings.tcl in TkDesk's library directory to make this work. Locate the two lines containing the word "XKB"; all you need to do is to comment out the following lines by prepending a '#'.

## 10.8 TkDesk's layout seems to be screwed. I can't get the appbar displayed anymore.

TkDesk saves all layout information in the file /.tkdesk/_layout, so this is the place to look for bad lines. If in doubt you can safely delete this file and all should be back to normal.

In case of the appbar not showing up you can try the following (sent by Jochem Huhmann, joh@unidui.uni-duisburg.de):

1. Quit tkdesk
2. Open the file ".tkdesk/_layout" within your home directory with your favorite editor
3. Delete the line looking like "Toplevel dsk_appbar 1 66x740+956+0"
4. Write the file back to disk
5. Restart tkdesk. It will place the AppBar according to its defaults now.
6. Place the AppBar as you like (it doesn't like horizontal layout too much)
7. Do a "TkDesk/Save All Now"

## 10.9 On my RedHat 5.x system the appbar clock shows the wrong time.

This is from Bryan Venable, spif@vousi.com:

This may have to do with the location of the zoneinfo directory. For libc5 I believe it's /usr/lib/zoneinfo, whereas for glibc it'd be /usr/share/zoneinfo. Try making a symbolic link from whichever you have to whichever you don't. There is a fix to Red Hat 5.0 which has to do with this, but in that situation the problem is with libc5 programs running on a system "optimized" for glibc.

And Raul Quiroga, quiroga@cartan.math.cinvestav.mx, also has got some advice for this:

Concerning the problem described below I received several suggestions. Some allowed to get the date in the tkdesk right but an incorrect one with the date command. Finally what I did is set the time with timeconfig to Universal with "Hardware clock set to GMT" checked; after a reboot both the appbar and date reported the correct time. Thanks all for your help.

## 10.10 TkDesk complains about "invalid command name wm" and won't start up

There seem to be two solutions to this problem: One is if you're running on a RedHad Linux 5.x system, the libc5 that's packaged and installed in /lib may be too old a version. If `ls /lib/libc.so.5.*` on your system gives something like `/lib/libc.so.5.3.xx` you should upgrade to at least 5.4.20. I think you can get a newer version of libc from sunsite.unc.edu in /pub/Linux/GCC.

The other solution that should always work is to do the following (thanks to Ike Hishikawa, ike@hishikawa.f.uunet.de, for this one):

> `

>     Assuming that the tarball was unpacked under /usr/local,
>     open /usr/local/bin/tkdesk with your favorite editor.
>     At the very top of the file it should say:

>       #!/bin/sh
>       #-*- tcl -*- \
>       PATH=/usr/local/bin:$PATH ;#\
>       exec tkdesksh "$0" "$@"

>     After the 3rd line, insert two lines pointing to the location of
>     tcl/tk libs,  so that you get:

>       #!/bin/sh
>       #-*- tcl -*- \
>       PATH=/usr/local/bin:$PATH ;#\
>       export TCL_LIBRARY=/usr/local/lib/TkDesk/tcl_lib ;#\
>       export TK_LIBRARY=/usr/local/lib/TkDesk/tk_lib ;#\
>       exec tkdesksh "$0" "$@"

>     This did the trick for me :)
>     Hope this helps,

> `

## 10.11 I cannot launch other Tcl/Tk applications from within TkDesk

Probably your version of TkDesk sets the environment variables TK_LIBRARY and TCL_LIBRARY, which confuses other Tcl/Tk apps. Unset these variables in the config files before the invocation of the problematic commands, eg. replace xterm with

> `

>             sh -c {unset TK_LIBRARY TCL_LIBRARY; xterm}

> `

(contributed by Christoph Dalitz, `dalitz@infotech.de`)

## 10.12 I'd like TkDesk to do this and that. How can I achieve this?

The first place to start are the various configuration files of TkDesk. These can be accessed either by the "TkDesk/Configuration" menu of the file browser windows, or by the "Configuration" submenu of the popup menu of the very first button of the application bar of TkDesk.

Since TkDesk uses Tcl as the language for its configuration, and these configuration files are simply "source"ed, you could add any sort of Tcl proc for instance to the configuration file "System". This proc would then be available in every other configuration file as well. With the set of commands provided by TkDesk, which are listed e.g. in the configuration file "Popups", TkDesk provides a very powerful platform for the user who knows Tcl.

## 10.13 Is there a TkDesk mailing list?

Yes! Thanks to Chris Sterritt and Alan V. Shackelford, there is a mailing list dedicated to TkDesk at shaknet.clark.net. Just send a mail to `majordomo@shaknet.clark.net` with an empty subject line and "subscribe tkdesk" as the message body. Please join, it's worth it! The list's address is `tkdesk@shaknet.clark.net`, by the way.

There is also a searchable archive of the TkDesk mailing list on the web at http://www.findmail.com/list/tkdesk. This is probably the best place to start looking when you run into problems with TkDesk.

## 10.14 Where can I find out more about Tcl/Tk?

The official Tcl/Tk homepage is at `http://www.scriptics.com/`. The Tcl/Tk FAQs and lots of user-contributed software can be obtained from `ftp://ftp.neosoft.com/pub/tcl`. There is also a newsgroup dedicated to Tcl/Tk: `comp.lang.tcl`.

Next Previous Contents