[K12OSN] Push Icon to desktop problem

Kevin Squire gentgeen at linuxmail.org
Tue Mar 15 13:42:32 UTC 2005


Dear David,

If you are using the script as root, you should not have to do the chmod
line.  Also, I just thought you might like to change the
iconyouwishtoremove.desktop to $1, then you can run it from the command
line.  So the script would be:


!#/bin/bash
for x in `ls /home`; do
echo "Doing $x ..."
cd /home/${x}/Desktop
rm -f $1
done

Then from the command line do a:
foo iconyouwishtoremove.desktop

where foo is the name of the script above.   Someone even more clever
then me can reply with a way to change the $1 into a $ANY so that you
could do:

foo iconremove1.desktop iconremove2.desktop iconremoveN.desktop




On Tue, 15 Mar 2005 08:27:05 -0500
"David Trask" <dtrask at vcs.u52.k12.me.us> wrote:

> Here's one I used to remove an "oops" icon from everyone's
> desktop....not sure if the chmod line was needed....I commented it
> out, but you can uncomment it....
> 
> !#/bin/bash
> for x in `ls /home`; do
> echo "Doing $x ..."
> cd /home/${x}/Desktop
> chmod 777 iconyouwishtoremove.desktop
> rm -f iconyouwishtoremove.desktop
> done
> 
> 
> David N. Trask
> Technology Teacher/Coordinator
> Vassalboro Community School
> dtrask at vcs.u52.k12.me.us
> (207)923-3100
> 
> _______________________________________________
> K12OSN mailing list
> K12OSN at redhat.com
> https://www.redhat.com/mailman/listinfo/k12osn
> For more info see <http://www.k12os.org>


-- 




More information about the K12OSN mailing list