| 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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 case "$(uname 2>/dev/null)" in | 326 case "$(uname 2>/dev/null)" in |
| 327 Darwin) | 327 Darwin) |
| 328 DE=darwin; | 328 DE=darwin; |
| 329 ;; | 329 ;; |
| 330 esac | 330 esac |
| 331 fi | 331 fi |
| 332 | 332 |
| 333 if [ x"$DE" = x"gnome" ]; then | 333 if [ x"$DE" = x"gnome" ]; then |
| 334 # gnome-default-applications-properties is only available in GNOME 2.x | 334 # gnome-default-applications-properties is only available in GNOME 2.x |
| 335 # but not in GNOME 3.x | 335 # but not in GNOME 3.x |
| 336 which gnome-default-applications-properties 2> /dev/null || DE="gnome3" | 336 which gnome-default-applications-properties > /dev/null 2> /dev/null || DE
="gnome3" |
| 337 fi | 337 fi |
| 338 } | 338 } |
| 339 | 339 |
| 340 #---------------------------------------------------------------------------- | 340 #---------------------------------------------------------------------------- |
| 341 # kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4 | 341 # kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4 |
| 342 # It also always returns 1 in KDE 3.4 and earlier | 342 # It also always returns 1 in KDE 3.4 and earlier |
| 343 # Simply return 0 in such case | 343 # Simply return 0 in such case |
| 344 | 344 |
| 345 kfmclient_fix_exit_code() | 345 kfmclient_fix_exit_code() |
| 346 { | 346 { |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 ;; | 605 ;; |
| 606 | 606 |
| 607 generic) | 607 generic) |
| 608 open_generic "$url" | 608 open_generic "$url" |
| 609 ;; | 609 ;; |
| 610 | 610 |
| 611 *) | 611 *) |
| 612 exit_failure_operation_impossible "no method available for opening '$url'" | 612 exit_failure_operation_impossible "no method available for opening '$url'" |
| 613 ;; | 613 ;; |
| 614 esac | 614 esac |
| OLD | NEW |