projects
/
xudo.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a fullstop at the end of a sentence
[xudo.git]
/
xudo.sh
diff --git
a/xudo.sh
b/xudo.sh
index
5a2735a
..
17e54ed
100755
(executable)
--- a/
xudo.sh
+++ b/
xudo.sh
@@
-18,15
+18,13
@@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# This is the equivalent of sux[1] but simpler and using sudo,
-# since I don't have su installed on some of my systems.
-#
+# This is the equivalent of sux[1] but simpler and using sudo.
# [1] http://fgouget.free.fr/sux/
set -e
usage() {
# [1] http://fgouget.free.fr/sux/
set -e
usage() {
- echo "usage: $(basename $0) [OPTION]... <sudo_options>"
;
+ echo "usage: $(basename $0) [OPTION]... <sudo_options>"
echo "Execute a command as another user, with access to the X display"
echo
echo "List of OPTIONs:"
echo "Execute a command as another user, with access to the X display"
echo
echo "List of OPTIONs:"
@@
-72,7
+70,7
@@
id $USERNAME > /dev/null || { echo "Invalid user." 1>&2; exit 1; }
[ "x$@" != "x" ] || { usage 1>&2; exit 1; }
[ "x$@" != "x" ] || { usage 1>&2; exit 1; }
-# Authorize the user
+# Authorize the user
.
xauth extract - $DISPLAY | sudo -u "$USERNAME" xauth merge -
# Execute the command.
xauth extract - $DISPLAY | sudo -u "$USERNAME" xauth merge -
# Execute the command.