Re: [Pcbsd-developer] Re: Detecting if computer is laptop or desktop
Status: Beta
Brought to you by:
kmoore134
From: Kris M. <pie...@gm...> - 2006-04-08 20:04:16
|
We'll have to put this on a list of TODO's for the next release :) I'll save a copy of this script, do some testing with it here. --- Kris Moore Federico Lorenzi wrote: > Well, my laptop's (which i managed to ressurect) cpu line on dmesg is the > EXACT same as my P3 server, so i dont think that that would work, however > most modern laptops have a lid... so here is a little script which should > detect laptop / desktop: > > #!/bin/sh > # Laptop detection script V0.001 > # Reply to the mailing list if it doesn't work... > > dmesgLine=`dmesg | grep "acpi_lid0: <Control Method Lid Switch> on acpi0"` > > if test "${dmesgLine}" = ""; then > echo "You have a desktop!" > else > echo "You have a laptop!" > fi > > Cheers > > On 4/1/06, mai...@gm... <mai...@gm...> wrote: >> Some laptops (such as the one I'm using right now), have a numpad installed. >> I would recommend an installer option that asks the user whether or not it's >> got a numpad. >> >> >> >> It's probably also not feasible to look at the CPU name both because there >> are a lot of cpu types out there, and I doubt you're going to find a nice >> list of every one possibly available, and because there are some crazy folk >> out there who put a mobile chip in a desktop (for overclocking), or a normal >> chip in a laptop. >> >> -Matt McDonald >> >> >> >> _____ >> >> From: pcb...@li... >> [mailto:pcb...@li...] On Behalf Of Charles A. >> Landemaine >> Sent: Saturday, April 01, 2006 6:27 AM >> To: pcb...@li... >> Subject: [Pcbsd-developer] Detecting if computer is laptop or desktop >> >> >> >> Hello guys :) >> >> >> >> Is it possible to detect if the user's computer is a laptop or desktop? >> Renato suggested looking at the CPU name and decide accordingly. Is it 100% >> sure to work? >> >> Is there another way? >> >> If not, I suggested to add a "Select between laptop or desktop" option >> during installation to turn on/off the numlock key accordingly. >> >> Discussion here: http://www.pcbsd.org/forums/viewtopic.php?t=2402 >> >> Have a nice week-end! :) >> >> -- >> Charles A. Landemaine. >> >> >> > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=k&kid0944&bid$1720&dat1642 > _______________________________________________ > PCBSD-Developer mailing list > PCB...@li... > https://lists.sourceforge.net/lists/listinfo/pcbsd-developer > |