If there is something that some Linux developers can't get right, that is File Dialogs. Example, look at Gnomes (older or the new brand spanking versions), they suck. But gnome ain't only one, chose so does most of file dialogs too. And even how great Firefox is, Firefox File Dialogs aren't any exception. You knew this? Allright, to the point. If someone remembers, there (here, at kde-look.org) has had post that replaced Firefox file dialog with KDEs one. And most whom tried it, propably remembers that there were certain "issues". It can be that there was/is newer version and I have just missed it. Newertheless, it started to look some alternative way, so I crossed to this: http://update.mozilla.org/extensions/moreinfo.php?id=27&vid=134&category=Download%20Tools It allows you to use alternative download manager in firefox, eg. wget or kget. Sadly kget crashed for me at startup and it was useless. So, just when all hope was gone, and I was returning to do my thing, it hitted me; Why no use Kdialog? I have had many enjoyable moments with it and shellscriptin. I started to look ways of using it, and I must tell you, it was criminally easy.
== How-to:
First, you need to install DowloadWith from: http://update.mozilla.org/extensions/moreinfo.php?id=27&vid=134&category=Download%20Tools After installed, you need to restart firefox, but first, download my example script. Select from firefox tools menu -> extensions and open DownloadWith settings dialog from top-right icon of DownloadWith section. Click "Create new application" from bottom left of settings window and wonder where Firefox pop-up blockker is. Choose custom configuration. In Identification and Label field insert something, like KDialog. But in Command field choose my kfiresave.sh script. And in Arguments field type (with brackets). Press OK. Now, you should see your Kdialog in applications section like in second screenshoot. If so, jump to Automatic download tab. Select "All files", or, if you prefer, Specified files. But remember to select from Application dropdown menu Kdialog. Hit OK and enjoy.
Does not work? Check that script has exec rights.
Tested in KDE 3.3-beta2 but should work on KDE > 3.2
I would like to thank academy, And KDE for staying as "U*ix desktop environment".
The method you referenced does not work for FireFox 2.0 on Ubuntu Edgy.
isoteemu's method works _great_ using FlashGot instead of DownloadWith (DownloadWith hasn't been updated for FF 2), and the corrected script above.
Here's a bug fix so you can save to directories w/ spaces... the kfmclient line should be:
kfmclient copy "$URL" "$KDIALOG"
Note the quotes around KDIALOG.
I have another bugfix.
I tried this method and found that if I pressed cancel on the getsavefilename kdialog the kfmclient portion of the script would still be run. This is not good behavior. You can apply one of the following to fix this bug.
#!/bin/sh
URL=$1
FILE=`basename $URL`
KDIALOG=`kdialog --getsavefilename $FILE`
if [ ${#KDIALOG} -gt 0 ]; then
kfmclient copy "$URL" "$KDIALOG"
fi
or
#!/bin/sh
URL=$1
FILE=`basename $URL`
if KDIALOG=`kdialog --getsavefilename $FILE`; then
kfmclient copy "$URL" "$KDIALOG"
fi
The latter is probaly a more elegant solution. ;-)
I love this thing! The only problem is that it doesn't ask me if I want to open the file from it's location (Not a real problem, but it still might be nice).
Ratings & Comments
9 Comments
I think this method http://ubuntuforums.org/showthread.php?t=110353 is alot easier.
The method you referenced does not work for FireFox 2.0 on Ubuntu Edgy. isoteemu's method works _great_ using FlashGot instead of DownloadWith (DownloadWith hasn't been updated for FF 2), and the corrected script above.
Here's a bug fix so you can save to directories w/ spaces... the kfmclient line should be: kfmclient copy "$URL" "$KDIALOG" Note the quotes around KDIALOG.
I have another bugfix. I tried this method and found that if I pressed cancel on the getsavefilename kdialog the kfmclient portion of the script would still be run. This is not good behavior. You can apply one of the following to fix this bug. #!/bin/sh URL=$1 FILE=`basename $URL` KDIALOG=`kdialog --getsavefilename $FILE` if [ ${#KDIALOG} -gt 0 ]; then kfmclient copy "$URL" "$KDIALOG" fi or #!/bin/sh URL=$1 FILE=`basename $URL` if KDIALOG=`kdialog --getsavefilename $FILE`; then kfmclient copy "$URL" "$KDIALOG" fi The latter is probaly a more elegant solution. ;-)
does this work on firefox 1.0 or any of the nightlies??
Yes, I am using it on 1.04.
I love this thing! The only problem is that it doesn't ask me if I want to open the file from it's location (Not a real problem, but it still might be nice).
Very cool!
it just works. how cool. Only problem, is that when I "save as" it uses the old dialog box. I know "save with" but it still sux. G R E A T J O B !