#!/bin/sh # Copyright (C) 2005 Krzysztof Kozlowski # License: GNU General Public License version 2 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # version 2 as published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # Ostatnia zmiana: 14.11.2005 # # "sudox" - 'sudo' z przekazaniem zmiennych zwiazanych z X-ami, tzn. # DISPLAY oraz XAUTHORITY. # Uzywane, gdy uzytkownik probujacy wykonac w X-ach komende z sudo dostaje # komunikat, np.: # Gtk-WARNING **: cannot open display: DISP=`echo $DISPLAY | sed -e 's/\./\\\./' -e 's/:/\\\:/'` sudo sh -c "export DISPLAY=$DISP ; export XAUTHORITY=$XAUTHORITY ; $*"