X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=development%2Fkeystest%2Fsetup.sh;fp=development%2Fkeystest%2Fsetup.sh;h=9b38777774b80bcf7625024e66140459e9e430dc;hb=81dea0164cd7f36a250a6b4e3619d9471b23fc85;hp=0000000000000000000000000000000000000000;hpb=9e5a12b905db762bc61f9d298762f3bb7884c42f;p=lyx.git diff --git a/development/keystest/setup.sh b/development/keystest/setup.sh new file mode 100755 index 0000000000..9b38777774 --- /dev/null +++ b/development/keystest/setup.sh @@ -0,0 +1,32 @@ + +#This won't work on an RPM based distro. Easy to fix though. +sudo apt-get install xclip xvkbd wmctrl xvfb libqt4-dbg icewm #svn pylint +sudo adduser keytest < /dev/null + +if ! grep keytest /etc/sudoers +then + echo allowing admin users to switch to keytest user + #echo '%adm ALL =(keytest) NOPASSWD: ALL' >> /etc/sudoers +fi +# cat /mnt/jaunty/etc/cups/printers.conf |grep -o '[^ ]*>$' |grep -v '^<'| sed 's/>$//' + +#we should really handle each printer seperately, but this will work if they are similar +if grep AllowUser /etc/cups/printers.conf +then + echo printer: using whitelisting, nothings needs be done. + exit +fi + +if grep DenyUser /etc/cups/printers.conf +then + echo There are already denied users. We do not support this yet, exiting + exit +fi + +#(cd /etc/cups/ppd/ && ls *.ppd) | sed s/.ppd$// | while read L +cat /etc/cups/printers.conf |grep -o '[^ ]*>$' |grep -v '^<'| sed 's/>$//' | while read L +do + echo $L + echo lpadmin -p $L -u deny:keytest + lpadmin -p $L -u deny:keytest +done