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 # |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 if [ $? -eq 0 ] ; then | 139 if [ $? -eq 0 ] ; then |
140 DE=generic | 140 DE=generic |
141 fi | 141 fi |
142 fi | 142 fi |
143 | 143 |
144 case "$DE" in | 144 case "$DE" in |
145 kde) | 145 kde) |
146 su_kde | 146 su_kde |
147 ;; | 147 ;; |
148 | 148 |
149 gnome|lxde) | 149 gnome*|lxde) |
150 su_gnome | 150 su_gnome |
151 ;; | 151 ;; |
152 | 152 |
153 generic) | 153 generic) |
154 su_generic | 154 su_generic |
155 ;; | 155 ;; |
156 | 156 |
157 *) | 157 *) |
158 [ x"$user" = x"" ] && user=root | 158 [ x"$user" = x"" ] && user=root |
159 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'" |
160 ;; | 160 ;; |
161 esac | 161 esac |
OLD | NEW |