Page 1 of 1

trouble with the default terminal

Posted: Thu Dec 10, 2009 5:35 pm
by macbeth8
Hello,

after the last update of FlashGot, it stopped working for me on Kubuntu 9.10. The problem is that I do not have gnome-terminal installed (and I don't want to install another terminal application for FlashGot). The shell script generated by the add-on does not really work, at least on my system. The condition

Code: Select all

if [ "$COLORTERM"=="gnome-terminal" -a -x `which gnome-terminal 2>/dev/null` ];
is satisfied even if there is no gnome-terminal application installed. FlashGot tries to run the script, but it results in

Code: Select all

gnome-terminal: not found
and ends.

I tried to fix the script (content/flashgot/DMS.js) myself and use just xterm (or konsole for KDE, it can be started just like xterm with the -x option), but it does not seem to work, probably because the file FlashGot.jar is hashed and its MD5/SHA1 hashes changed.

I would also like to inform you, that (at least on my system), this code

Code: Select all

if [ -x `which xterm 2>/dev/null` ]; then DOWN_CMD='xterm -e curl';
probably does not do what it is meant to do, which can be easily tried by the following script

Code: Select all

if [ -x `which this_is_an_example 2>/dev/null` ];
then
    echo "wrong"
fi
one possibility how to fix this problem could look like this:

Code: Select all

PRES_XTERM=`which xterm`;
if [ -n $PRES_XTERM ]; 
then 
    DOWN_CMD='xterm -e wget'; 
else...
or something like

Code: Select all

if which xterm &>/dev/null;
then
    DOWN_CMD='xterm -e wget'; 
fi
I hope that this is not only the problem with my bash/shell settings.

Thanks for reading,
Peter.

Re: trouble with the default terminal

Posted: Thu Dec 10, 2009 11:45 pm
by Giorgio Maone
Please check if 1.2.1.02 fixes your issue.

Re: trouble with the default terminal

Posted: Fri Dec 11, 2009 5:27 pm
by macbeth8
Thanks for the reply and the new version.

The downloading works again now, but only after I close the first terminal window that appears. (I.e. after I choose the destination folder of the video, a terminal window appears and nothing happens unitl I close it. After that, another terminal window with curl appears and the downloading begins...) I think it is because of the back-quotes in the condition, without them, the downloading begins immediately...

Peter.

Re: trouble with the default terminal

Posted: Fri Dec 11, 2009 6:00 pm
by Giorgio Maone
Please check 1.2.1.03.

Re: trouble with the default terminal

Posted: Fri Dec 11, 2009 9:15 pm
by macbeth8
works like a charm, thanx :)

Peter