#!/bin/bash

# ***************************************************************************
# *   Copyright (C) 2007 by Rafał Kłys                                      *
# *   rafalklys@wp.pl       23.09.2007                                      *
# *                                                                         *
# *   This program is free software; you can redistribute it and/or modify  *
# *   it under the terms of the GNU General Public License as published by  *
# *   the Free Software Foundation; either version 2 of the License, or     *
# *   (at your option) any later version.                                   *
# *                                                                         *
# *   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.                          *
# *                                                                         *
# *   You should have received a copy of the GNU General Public License     *
# *   along with this program; if not, write to the                         *
# *   Free Software Foundation, Inc.,                                       *
# *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
# ***************************************************************************/

## Odkomentuj aby ustawic wlasna szerokosc i wysokosc okienka
# WIDTH=180
# HEIGHT=180
## Odkomentuj aby ustawic pozycje okna (HEIGTH i WIDTH musza byc odkomenowane)
# XOFF="+0"
# YOFF="+0"
## Sciezka do ikonki
ICON="/usr/share/pixmaps/kadu-64.png"

## Nie zmieniaj nic ponizej:)
for i in `grep "^kadu:" /etc/group | cut -d ":" -f 4 | tr "," " "`; do
	PARAMS=${PARAMS}\ $i\ $i
done
USER=`kdialog --title "Filozof" --menu "Wybierz użytkownika" $PARAMS -geometry ${WIDTH}x${HEIGHT}${XOFF}${YOFF}`
if [ $? = 0 ]; then
	kdesu -n --noignorebutton -i $ICON -u $USER kadu
fi
