delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/08/26/15:28:23

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:from:to:subject:date:message-id:content-type
:content-transfer-encoding:mime-version; q=dns; s=default; b=rEv
2JI05xwCibP9Tmvhm69UXZv2jjIlA7PhvKjec/x9XpaRkKuiZh/WyFyfUKDfbjvV
5HlF9FZsHEQGK1Mp/dxG5Ybj7BFPHGHtJs+XrBALnNzBI+bDpsGoSWWmEcmtCB1u
lKynEgMZVpVNk1VQfzRQat7baH7gJD5WJMPxrvck=
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:from:to:subject:date:message-id:content-type
:content-transfer-encoding:mime-version; s=default; bh=W2zoOM9bb
wlkasipvVQYKZXs9PQ=; b=qRb+nhmzL+dcHmg4AZ8lZi0HiEijseq1wmsNkI+dJ
OUF4ymLJ9oexVpNSlgZ9so/xRKZPK1lVgk7UZPaTnppuF4K6ptlRJfRVGQq5yscs
VrVOExis9BB0pNT0KBtTvlFpCZpIemIAkjNPDDWm++fMgHvj1z3iopYkuQ/cyzE9
aA=
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=1.5 required=5.0 tests=AWL,BAYES_40,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2
X-HELO: USA7109MR007.ACS-INC.COM
From: "Nellis, Kenneth" <Kenneth DOT Nellis AT xerox DOT com>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: how to detect whether a laptop is docked
Date: Wed, 26 Aug 2015 19:27:46 +0000
Message-ID: <0D835E9B9CD07F40A48423F80D3B5A702E917C2B@USA7109MB022.na.xerox.net>
MIME-Version: 1.0
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id t7QJSIku032160

Dear Cygwin Users:

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).

* https://www.autoitscript.com/forum/topic/147332-how-do-you-detect-a-docking-station/
‡ /proc/registry/HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/IDConfigDB/CurrentDockInfo/DockingState

--Ken Nellis

--
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