This is the mail archive of the
mailing list for the Cygwin project.
Re: how to detect whether a laptop is docked
- From: Michael Enright <mike at kmcardiff dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 26 Aug 2015 13:59:06 -0700
- Subject: Re: how to detect whether a laptop is docked
- Authentication-results: sourceware.org; auth=none
- References: <0D835E9B9CD07F40A48423F80D3B5A702E917C2B at USA7109MB022 dot na dot xerox dot net> <1440618651 dot 6808 dot 33 dot camel at cygwin dot com>
On Wed, Aug 26, 2015 at 12:50 PM, Yaakov Selkowitz wrote:
> On Wed, 2015-08-26 at 19:27 +0000, Nellis, Kenneth wrote:
>> I am looking for a method by which I can determine within a shell script
>> whether my laptop is docked or not. Google provided some answers for Linux
>> and Windows users, but the several ways I tried did not work out.
>> One Windows solution * provided a VB script that accessed a registry variable â,
>> but my registry value remains the same whether or not I'm docked.
>> The Linux solutions required either a file I don't have (/var/run/stab) or a tool
>> that I don't have and couldn't find in a Cygwin search (acpid or lsusb).
If you cat the path to the registry key it doesn't show anything but
if you hexdump it there is a '1' (in my case, 2 out of 2 systems)
stored as a DWORD I suppose. I think that value is wrong for at least
one of those (a docked laptop or a VM in a PC). I got the impression
the feature is not 100% solid.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple