| OLD | NEW |
| 1 #!/bin/sh | 1 #!/bin/sh |
| 2 #--------------------------------------------- | 2 #--------------------------------------------- |
| 3 # xdg-terminal | 3 # xdg-terminal |
| 4 # | 4 # |
| 5 # Utility script to open the registered terminal emulator | 5 # Utility script to open the registered terminal emulator |
| 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 14 matching lines...) Expand all Loading... |
| 25 cat << _USAGE | 25 cat << _USAGE |
| 26 _USAGE | 26 _USAGE |
| 27 } | 27 } |
| 28 | 28 |
| 29 #@xdg-utils-common@ | 29 #@xdg-utils-common@ |
| 30 | 30 |
| 31 terminal_kde() | 31 terminal_kde() |
| 32 { | 32 { |
| 33 terminal=`kreadconfig --file kdeglobals --group General --key TerminalApplic
ation --default konsole` | 33 terminal=`kreadconfig --file kdeglobals --group General --key TerminalApplic
ation --default konsole` |
| 34 | 34 |
| 35 terminal_exec=`which $terminal >/dev/null 2>/dev/null` | 35 terminal_exec=`which $terminal 2>/dev/null` |
| 36 | 36 |
| 37 if [ -x "$terminal_exec" ]; then | 37 if [ -x "$terminal_exec" ]; then |
| 38 if [ x"$1" == x"" ]; then | 38 if [ x"$1" == x"" ]; then |
| 39 $terminal_exec | 39 $terminal_exec |
| 40 else | 40 else |
| 41 $terminal_exec -e "$1" | 41 $terminal_exec -e "$1" |
| 42 fi | 42 fi |
| 43 | 43 |
| 44 if [ $? -eq 0 ]; then | 44 if [ $? -eq 0 ]; then |
| 45 exit_success | 45 exit_success |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 TERM=xterm | 159 TERM=xterm |
| 160 fi | 160 fi |
| 161 DE=generic | 161 DE=generic |
| 162 fi | 162 fi |
| 163 | 163 |
| 164 case "$DE" in | 164 case "$DE" in |
| 165 kde) | 165 kde) |
| 166 terminal_kde "$command" | 166 terminal_kde "$command" |
| 167 ;; | 167 ;; |
| 168 | 168 |
| 169 gnome) | 169 gnome*) |
| 170 terminal_gnome "$command" | 170 terminal_gnome "$command" |
| 171 ;; | 171 ;; |
| 172 | 172 |
| 173 xfce) | 173 xfce) |
| 174 terminal_xfce "$command" | 174 terminal_xfce "$command" |
| 175 ;; | 175 ;; |
| 176 | 176 |
| 177 lxde) | 177 lxde) |
| 178 terminal_lxde "$command" | 178 terminal_lxde "$command" |
| 179 ;; | 179 ;; |
| 180 | 180 |
| 181 generic) | 181 generic) |
| 182 terminal_generic "$command" | 182 terminal_generic "$command" |
| 183 ;; | 183 ;; |
| 184 | 184 |
| 185 *) | 185 *) |
| 186 exit_failure_operation_impossible "no terminal emulator available" | 186 exit_failure_operation_impossible "no terminal emulator available" |
| 187 ;; | 187 ;; |
| 188 esac | 188 esac |
| OLD | NEW |