OLD | NEW |
1 #!/bin/sh | 1 #!/bin/sh |
2 #--------------------------------------------- | 2 #--------------------------------------------- |
3 # xdg-su | 3 # xdg-su |
4 # | 4 # |
5 # Utility script to run a command as an alternate user, generally | 5 # Utility script to run a command as an alternate user, generally |
6 # the root user, with a graphical prompt for the root | 6 # the root user, with a graphical prompt for the root |
7 # password if needed | 7 # password if needed |
8 # | 8 # |
9 # Refer to the usage() function below for usage. | 9 # Refer to the usage() function below for usage. |
10 # | 10 # |
| 11 # Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org> |
| 12 # Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org> |
11 # Copyright 2006, Jeremy White <jwhite@codeweavers.com> | 13 # Copyright 2006, Jeremy White <jwhite@codeweavers.com> |
12 # Copyright 2006, Kevin Krammer <kevin.krammer@gmx.at> | 14 # Copyright 2006, Kevin Krammer <kevin.krammer@gmx.at> |
13 # | 15 # |
14 # LICENSE: | 16 # LICENSE: |
15 # | 17 # |
16 #--------------------------------------------- | 18 #--------------------------------------------- |
17 | 19 |
18 manualpage() | 20 manualpage() |
19 { | 21 { |
20 cat << _MANUALPAGE | 22 cat << _MANUALPAGE |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 if [ $? -eq 0 ] ; then | 139 if [ $? -eq 0 ] ; then |
138 DE=generic | 140 DE=generic |
139 fi | 141 fi |
140 fi | 142 fi |
141 | 143 |
142 case "$DE" in | 144 case "$DE" in |
143 kde) | 145 kde) |
144 su_kde | 146 su_kde |
145 ;; | 147 ;; |
146 | 148 |
147 gnome) | 149 gnome|lxde) |
148 su_gnome | 150 su_gnome |
149 ;; | 151 ;; |
150 | 152 |
151 generic) | 153 generic) |
152 su_generic | 154 su_generic |
153 ;; | 155 ;; |
154 | 156 |
155 *) | 157 *) |
156 [ x"$user" = x"" ] && user=root | 158 [ x"$user" = x"" ] && user=root |
157 exit_failure_operation_impossible "no graphical method available for invokin
g '$cmd' as '$user'" | 159 exit_failure_operation_impossible "no graphical method available for invokin
g '$cmd' as '$user'" |
158 ;; | 160 ;; |
159 esac | 161 esac |
OLD | NEW |