On 01-Feb-00 Ted Harding wrote:
Now my question: How can I start up kfm with a filename argument?
'kfm filename' does NOT work!
Is there some "sub-client" of kfm which can be started in this way?
Thanks to Derek Fountain and Colin Valentine who suggested kfmclient.
The command-line method is
kfmclient openURL "filename"
However, life gets a bit more complicated if you set this as the
reader for HTML mail attachments in XFMail.
XFMail makes a copy of the attachment under /tmp and the "hook"
for this file in the MIME settings is %s.
However, if you simply put
kfmclient openURL "%s"
for the text/html MIME type in XFMail, this won't work. I guess
this is because the call to kfmclient generates a kind of
"pseudo-background" process, and XFMail then thinks the job is
done and deletes the file in /tmp; at which point, kfmclient can't
find it!
The solution I have adopted is:
1. Give every user a directory $HOME/tmp
2. Create the executable script (for me, /usr/local/bin/vuHTML)
#! /bin/bash
cp $1 $HOME/tmp/$1.temp
/opt/kde/bin/kfmclient openURL "file:$HOME/$1.temp"
3. Set up XFMail MIME to use simply vuHTML as the program to open
text/html with
NB Don't put a last line in this file which reads
rm $HOME/$1.temp
ince -- for the same reason -- this won't work either! You have
to clean up ~/tmp later. Or you could copy the /tmp file to
a fixed filename, and take the risk of clashes.
Best wishes,
Ted.
--------------------------------------------------------------------
E-Mail: (Ted Harding)