On Thu, 8 May 2014 10:37:39 +0200
"Dmitrij D. Czarkoff" <czark...@gmail.com> wrote:

> But this is easy to work around with a shell script.  Having something
> like "http-helper.sh" below, you may make a simple .desktop file and (...)

This is a solution, but who likes dealing with this xdg-crap if he
doesn't even have desktop-icons.

> It is more consistent with a model, doesn't break package manager (you
> have xdg-utils in dependecies for software, don't you?) and is easier to
> fine-tune.

Soap doesn't break it either. If the package-manager overwrites the
soap-xdg-open, you just go to your soap-repo and reinstall it.
 
> Obviously, this is the way to work around the issue.  Still, moving
> configuration of program X to configuration file of program Y feels like
> bad taste to me.

Your shell script is also just a way around the problem, which is in
fact the nature of the xdg-system itself.
I've been thinking about scrapping xdg-open completely and make soap
configurable in a way that it doesn't need to rely on xdg-open any more.

I personally am sick of this system!

Cheers

FRIGN


PS:
> ------------------------------------------------------------------------
>   http-helper.sh:
> ------------------------------------------------------------------------
> #!/bin/sh
> 
> MIME=`curl -I --max-redirs -1 -s "$@" | sed -Ee '/Content-Type/!d' -e 's/.+: 
> ([^;]+)(;.*)?/\1/'`
> 
> if [ "$MIME" == "text/html" -o "x$MIME" == "x" ]
> then
>       $BROWSER "$@"
> else
>       file=`mktemp -p "${TMP:-/tmp}" xdgXXXXXX`
>       curl -s "$@" > $file
>       xdg-open $file
>       rm $file
> fi

Wow! And you complain about the "danger" of my `-escaped
shell-parameter.

-- 
FRIGN <d...@frign.de>

Reply via email to