> > > > I also try to get my computer to set it as default browser but it
> > > > never learns.

> It's a new Xfce or GNOME/gtk bug.

It definitively is, because I don't experience this issue with KDE.

Since it's possible to edit KDE's menu without any problem, I rewrote a
script, I wrote just as an example for somebody else. Now I'm using it
myself.

It now always checks if the default browser is running and only use
another browser, if it's not running, but another already is opened. If
a link with "tube" in the name is clicked, it opens chrome.

It's not well tested until now.

[rocketmouse@archlinux ~]$ cat /mnt/saucy/usr/local/bin/debro
#!/bin/dash

# Name:        Debro
# Description: Use default or opened web browser
# Comment:     Launch default web browser or use already opened web browser
# Command:     /usr/local/bin/debro %u

# Default browser
default_b=qupzilla

# Alternative browsers in order of usage
browser_1=firefox
browser_2=opera
browser_3=rekonq
last_brow=google-chrome-stable

# Browser for tube websites with flash content
tube_brow=google-chrome-stable

if [ "$(id -u)" = "0" ]; then
  echo "It is not allowed to run Debro with root privileges"; exit 1
fi

echo "$*" | grep tube > /dev/null
case $? in 0) test -f /usr/bin/$tube_brow && exec $tube_brow "$*";; esac

pidof $default_b > /dev/null
case $? in 0) exec $default_b "$*";; esac

pidof $browser_1 > /dev/null
case $? in 0) exec $browser_1 "$*";; esac

pidof $browser_2 > /dev/null
case $? in 0) exec $browser_2 "$*";; esac

pidof $browser_3 > /dev/null
case $? in 0) exec $browser_3 "$*";; esac

pidof $last_brow > /dev/null
case $? in
  0) exec $last_brow "$*";;
  *) test -f /usr/bin/$default_b && exec $default_b "$*";;
esac

echo "No /usr/bin/$default_b available"
exit 1

Regards,
Ralf


-- 
ubuntu-studio-devel mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-studio-devel

Reply via email to