delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/08/26/16:59:27

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:in-reply-to:references:date
:message-id:subject:from:to:content-type
:content-transfer-encoding; q=dns; s=default; b=BI89D3nSLFO0pO93
p0hQFXblF27jZaEoYWAR7EqdZUnwDRkZeoqLg4gzWgyl6N69Va9ocawVGyi1qk1t
3isaC+SNyg2veOTC+cDneaj/s4A9X8HaovQTa7JowigVm3KTkgRgYxVHVrnbkK5T
pcTAlVIgQv+Vwi/gi8FfQ4wiGV8=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:in-reply-to:references:date
:message-id:subject:from:to:content-type
:content-transfer-encoding; s=default; bh=bUXBO0OfNJHOBu9KWeYx80
xQvQE=; b=KZEIPMIn6ebvrLUGtv2y64mzV4nB5R0r0iHRlr+IEcg00z9HmaSoZF
rh3H1aR84mtH49ZsNaQW28TJN0vU4CKRRHmOZcyc37CZZCaxQmc5KOQo+HrCpWW/
9sbnSd9AzPhXtX/LaYua5aVDpiPkET5M7jb065OYwMCy8RtIuFRA0=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail-yk0-f174.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=lRe18gtG3wwfraVZ/nwkUyIgrH54mZET6xvPlfDhbDI=; b=YRHZZRjPwzRI1YN4TIeHPO9QUIp1E9VTNXHFAqeE7xJVWglbkYup0lGGBBQTKszttp vqC16N41l/RPx5v6ihoxp8oKZemkJNMUuU8MozkkjVIZXLpHcJWIOn99zxx1lbnUOoDW L8SycLwH/V2xSC3EMaDFGeRk89PeEvpy3B9tzppbtNfXw3lvK9jwRgfpeIDEkxlK34OC pxzmgU4OQquTrpxV3duNs6keSLjd5ovTQPAw3uK187+R/pup1dbcgQdBoOtVnCakhWbb v/fsmyShZebcZ1iiI1bjyj1IwDCxb9h/YHrVzOWUpiQXfTDHaEPRMT5l1elJe4hShEVP ja/w==
X-Gm-Message-State: ALoCoQla6UXxqVxY5be6PwqpWOoxVBgsMDQQ1FGec/7OHjGijcttsVr8xXHnDhOzRBRPGVD7zW+d
MIME-Version: 1.0
X-Received: by 10.129.86.5 with SMTP id k5mr554481ywb.156.1440622746768; Wed, 26 Aug 2015 13:59:06 -0700 (PDT)
In-Reply-To: <1440618651.6808.33.camel@cygwin.com>
References: <0D835E9B9CD07F40A48423F80D3B5A702E917C2B AT USA7109MB022 DOT na DOT xerox DOT net> <1440618651 DOT 6808 DOT 33 DOT camel AT cygwin DOT com>
Date: Wed, 26 Aug 2015 13:59:06 -0700
Message-ID: <CAOC2fq9treK2Qt45723-=hyqrG3ftZJPQq+1i-bq+Drb8fYcuQ@mail.gmail.com>
Subject: Re: how to detect whether a laptop is docked
From: Michael Enright <mike AT kmcardiff DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id t7QKxMJ2006734

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
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019