Contributed by deanna on from the not-just-for-routers dept.
My kids at home run dual boot machines. They boot Windows for gaming, and when their school work demands they do it.
However, because long ago I got tired of windows viruses and dealing with de-scumming the windows machine I made a simple rule. Minimal internet access from windows. Because schoolwork may demand it, I do let the windows machine have web contact to the outside, yes, I know this is risky, but it's a long stretch from allowing everything, especially chat protocols etc. However, doing that has another side effect.
My kids want to do things like chat and email, etc. Since it simply won't work from Windows, they are simply more likely to do that stuff from the other side of the machine, where things are unrestricted - that side runs OpenBSD.
For all the naysayers who think OpenBSD doesn't make a "desktop" operating system, OpenBSD with a reasonably full set of ports installed seems to do just fine, and my kids are living proof. It's interesting, because as a long time unix user I usually can't be bothered to figure out how all the "bloatware" applications in ports work, I can get done what I need without them. However, after installing the bloat for my kids they figure out what they need just fine.
My "reasonably full" ports install for my kids is OpenBSD 4.0 with:
- kde and all the goodies (koffice, etc.)
- jdk (gotta have java games)
- xmms (gotta have music)
- gaim (heavy use by my daughter for chat)
- blender (my son is a blender addict fascinated with graphics)
- and some other stuff.
My hat's off to the ports developers for the fact that most of this (scary) stuff works and works well.
Interestingly, my kids actually end up doing most of their schoolwork on OpenBSD, not windows. OpenOffice and koffice stuff gets lots of use, I haven't had to do any handholding (which is good, because I don't personally use any of them much). I have spent $325 (canadian) on a LexMark 510 Laser printer that understands postscript, so all the printing "just works" instead of screwing around with a cups/sillyfilter/ghostscript craziness to support "proprietary" printers (i.e. inkjets that need a proprietary driver). So once they can print and deal with the word and powerpoint docs they find, they tend not to bother with windows, except for gaming.
A challenge was my daughter's ipod nano. Enter gtkpod, from ports. gtkpod works pretty well with her nano, to let her move music on and off it, however, I had to give her all sorts of sudo craziness to mount it and tell her to manually unmount it, etc. etc. While she got it it was a bit of a pain, compared to her friends with macs. (where you just plug it in and it goes).
I also got her a usb thumb drive to sneakernet big things back and forth with her friends and to school.
Now my daughter has a dedicated machine, so I was thinking, how could I make her machine do the right thing for her.
hotplugd notices hotplug devices (like usb sticks and ipod nanos) coming and going. It can then run an "attach" and a "detach" script whenever it sees something happen.
After reading the man page, it took me about 20 minutes to come up with the following, which I have in /etc/hotplug/attach on cathryn's machine:
#!/bin/ksh DEVCLASS=$1 DEVNAME=$2 case $DEVCLASS in 2) # disk devices disklabel=`/sbin/disklabel $DEVNAME | grep '^label:' | \ sed -e 's/^label: //'` case $disklabel in iPod*) # Apple ipod - mount, run gtkpod as cathryn. (mount_msdos -o nodev,nosuid -u 1012 -g 1012 /dev/"$DEVNAME"j /mnt/ipod && \ su cathryn -c "(export DISPLAY=:0 && /usr/local/bin/gtkpod)" ; \ sleep 1; sync ; umount /mnt/ipod) & ;; USB?Flash?Disk*) # Rally or other USB flash disk. mount_msdos -o nodev,nosuid -u 1012 -g 1012 /dev/"$DEVNAME"i /mnt/flash ;; esac ;; 3) # network devices #/sbin/dhclient $DEVNAME ;; esac
Now of course, this is customized for Cathryn's computer, but you should be able to get the idea.
With this, if she plugs in her ipod when logged in, up pops gtkpod - she can do what she likes, and once she exits gtkpod, the ipod is safely unmounted and ready to be unplugged ("just like a mac").
OTOH, if she plugs in her thumb drive, it too automatically gets mounted on /mnt/flash, and she can easily use it. (although in this mode of use she has been told to type "sync" in a shell before unplugging it - a detach script isn't really needed, the usb layer handles unplugs and umounts now cleanly if you yank the device. :)
Anyway, ymmv, but have fun with hotplugd.
(Comments are closed)