From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6072 invoked by alias); 26 Aug 2015 20:59:10 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 5981 invoked by uid 89); 26 Aug 2015 20:59:09 -0000 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 Received: from mail-yk0-f174.google.com (HELO mail-yk0-f174.google.com) (209.85.160.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 26 Aug 2015 20:59:08 +0000 Received: by ykbi184 with SMTP id i184so200382774ykb.2 for ; Wed, 26 Aug 2015 13:59:06 -0700 (PDT) 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) Received: by 10.37.42.194 with HTTP; Wed, 26 Aug 2015 13:59:06 -0700 (PDT) In-Reply-To: <1440618651.6808.33.camel@cygwin.com> References: <0D835E9B9CD07F40A48423F80D3B5A702E917C2B@USA7109MB022.na.xerox.net> <1440618651.6808.33.camel@cygwin.com> Date: Wed, 26 Aug 2015 22:16:00 -0000 Message-ID: Subject: Re: how to detect whether a laptop is docked From: Michael Enright To: cygwin@cygwin.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg00471.txt.bz2 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 Lin= ux >> and Windows users, but the several ways I tried did not work out. >> >> One Windows solution * provided a VB script that accessed a registry var= iable =E2=80=A1, >> 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