| OLD | NEW |
| 1 #!/bin/sh | 1 #!/bin/sh |
| 2 #--------------------------------------------- | 2 #--------------------------------------------- |
| 3 # xdg-open | 3 # xdg-open |
| 4 # | 4 # |
| 5 # Utility script to open a URL in the registered default application. | 5 # Utility script to open a URL in the registered default application. |
| 6 # | 6 # |
| 7 # Refer to the usage() function below for usage. | 7 # Refer to the usage() function below for usage. |
| 8 # | 8 # |
| 9 # Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org> | 9 # Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org> |
| 10 # Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org> | 10 # Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org> |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/D
Bus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/nul
l 2>&1` ; then DE=gnome; | 311 elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/D
Bus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/nul
l 2>&1` ; then DE=gnome; |
| 312 elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/nul
l 2>&1; then DE=xfce; | 312 elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/nul
l 2>&1; then DE=xfce; |
| 313 elif xprop -root 2> /dev/null | grep -i '^xfce_desktop_window' >/dev/null 2>
&1; then DE=xfce | 313 elif xprop -root 2> /dev/null | grep -i '^xfce_desktop_window' >/dev/null 2>
&1; then DE=xfce |
| 314 fi | 314 fi |
| 315 | 315 |
| 316 if [ x"$DE" = x"" ]; then | 316 if [ x"$DE" = x"" ]; then |
| 317 # fallback to checking $DESKTOP_SESSION | 317 # fallback to checking $DESKTOP_SESSION |
| 318 case "$DESKTOP_SESSION" in | 318 case "$DESKTOP_SESSION" in |
| 319 gnome) | 319 gnome) |
| 320 DE=gnome; | 320 DE=gnome; |
| 321 ;; |
| 321 LXDE) | 322 LXDE) |
| 322 DE=lxde; | 323 DE=lxde; |
| 323 ;; | 324 ;; |
| 324 xfce|xfce4) | 325 xfce|xfce4) |
| 325 DE=xfce; | 326 DE=xfce; |
| 326 ;; | 327 ;; |
| 327 esac | 328 esac |
| 328 fi | 329 fi |
| 329 | 330 |
| 330 if [ x"$DE" = x"" ]; then | 331 if [ x"$DE" = x"" ]; then |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 ;; | 611 ;; |
| 611 | 612 |
| 612 generic) | 613 generic) |
| 613 open_generic "$url" | 614 open_generic "$url" |
| 614 ;; | 615 ;; |
| 615 | 616 |
| 616 *) | 617 *) |
| 617 exit_failure_operation_impossible "no method available for opening '$url'" | 618 exit_failure_operation_impossible "no method available for opening '$url'" |
| 618 ;; | 619 ;; |
| 619 esac | 620 esac |
| OLD | NEW |