delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2023/07/19/13:22:17

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1732F3858002
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1689787334;
bh=RCaWi2H/AN7U4P2fQhBNASNijKWX7fpu8z4huW+HqCA=;
h=To:CC:Subject:Date:References:In-Reply-To:List-Id:
List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:
From:Reply-To:From;
b=NJyj5a0VJhWk4hR7atWStxsCGiI/nRT0aoX+dXteHChNATsRHQKr+EDvT7mwcyASu
SEkNUI9VLNodgdXKI/FqSapczJijOaemvIoC+ZdsYXkiLzrqFy/vulYrMaIht5qP0+
4N8nfixcbUTBahVLgPE6nSgSn1bsox9gHKX8+j5U=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E15323858C33
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
b=C5vfAUlQx0YklJqEjGV4D8+4gw0R7miwcHIcPMhB1/qdyhrIKP1b3a6BdjpXr1h4EeCHrdSm48AJpAzyo17I+MutM0g2q1ucUTqNc7/5IrkkcBNbkcoOOoy4bbN27jDnK+0etjSouXE9knM9PlCdiPKdhGM17MdkdJ94HTZw/lz7Im/bJON7VfKcXMycizRqNjzm0C2mDCLABF+D562zFeUpu9rAfbgep6a3ReBw7RKrgWg185dRTh8eZvLyKJU2Wys0bT3q0YcBupWYXz81v5jnn8mwReNwUF68M2xJbrTwZmrsOhHxO8dyQZrgojl5O9VVcSyq1f5LNWKbFVoQhg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector9901;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=rkBNg7NlmuEEYcGdVXfJkNPAh1AjymRGTdTloEyL95I=;
b=VTv0lBqAfT02Y05ObgYaH1vx8MIWM1UUOfe2cdxU29JhAI3ysQ0CFdNhElFURPinRar3E5n0y4NcJbTnS7+MqytM//GpkJ85Ndj7C+GoAZkXk6W1iuXCuLYGYavz7rb/ApquValegn7JwG23IHy6R5HHwXD+Cj0mHlf+dp46jzph4DRIzAowXvyFXeEXZodpVc/6LgJ4Wkr8FH8ZwRDl7vFZhKbcuB/IIn7c9SRyRwNGZxgPq6kAPpjRIBKh8VQ2igxY75Ds+4VWH7HL1ErBsrhbpFV8GBU4l60Jz5DJDk9iVyzwxb4v7d+w5S3LfMntX712D+CyiGF1yPPrfMK7BQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=hpe.com; dmarc=pass action=none header.from=hpe.com; dkim=pass
header.d=hpe.com; arc=none
To: Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>,
"cygwin AT cygwin DOT com"
<cygwin AT cygwin DOT com>
CC: Orit Heimer <heimer DOT orit AT gmail DOT com>
Subject: RE: Cygwin64 does not show my desktop directories
Thread-Topic: Cygwin64 does not show my desktop directories
Thread-Index: AQHZujivK9ovLy2cSUeDr5TkO3cZgK/BNHMg
Date: Wed, 19 Jul 2023 17:20:31 +0000
Deferred-Delivery: Wed, 19 Jul 2023 17:20:04 +0000
Message-ID: <MW4PR84MB16847207A4B1B3340B98612AFE39A@MW4PR84MB1684.NAMPRD84.PROD.OUTLOOK.COM>
References: <CAJ8X7ET-mPr+y+P3VHyRLuqWCc_6zrRhG1uz83uC3XKu=BnRRw AT mail DOT gmail DOT com>
<20230719181510 DOT 57ca759a683ed3cc47dde1ae AT nifty DOT ne DOT jp>
In-Reply-To: <20230719181510.57ca759a683ed3cc47dde1ae@nifty.ne.jp>
Accept-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: MW4PR84MB1684:EE_|DM3PR84MB3425:EE_
x-ms-office365-filtering-correlation-id: 3df3b594-537d-453c-1615-08db887c826e
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: fohSEo2YlxcCyM8HTV+J6uzO0eIn4KrDcPOywzwlfgObaTAXzO/G3uSAZza1EqoQtV9S/YJDIJrJVhdzf79w7fUqY2GsEtF6D8toXdmMoMx4P76Sg0K9+2u2RQ0pJHXGau+UbVKmDQ2yq9Uvv13raOaSgHZZ0swL8uATeZG8/SkHS9D8wCBqcQgGL3Cu8842Q2IfL+4pfSXKWKwHtHciScNVdwoa/n3mCsP5DXcuxi2dF9clNtK6PalBdzs/8QHHTbVU8jSREYE/jo4sZm6hRo2CqxVRdZrDo56rY7xKTPbYEAOUQC1AsoJXRuQSL6iOJ8ZUIflKlTvo/7+3XGrVDKfGE3jK/hBM82glh9rD0IHca9Ff1ftm85NpAnvKXAmKN5Om7xj5wsByS+TwzQCnho6EblZkC/1mVJZWfMihCmzGloSkwJ0jVdYMBVu/ElP6+8dgesE4wd5w2cZU8VYO/zSjHOGabAyez9B6dl4xrxanqocfv9L1AjHOjXUi8J9cHpkvwu2mrD/4fY/wmg+REpvvI9ssdx2PrxN8Ihstf3o55YK+LW825X0w3X+YZ3ot5oULQeGOu1LqF9TXveFhXttYwwVqe0HpBD6GkliauenvrIoAu+//jye77RkdOLNt
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;
IPV:NLI; SFV:NSPM; H:MW4PR84MB1684.NAMPRD84.PROD.OUTLOOK.COM; PTR:; CAT:NONE;
SFS:(13230028)(39860400002)(366004)(346002)(136003)(376002)(396003)(451199021)(7696005)(6666004)(45080400002)(9686003)(110136005)(478600001)(6506007)(71200400001)(53546011)(55236004)(26005)(186003)(2906002)(66476007)(66556008)(66946007)(66446008)(76116006)(4326008)(52536014)(5660300002)(41300700001)(8936002)(8676002)(64756008)(82960400001)(38100700002)(122000001)(33656002)(316002)(86362001)(55016003)(38070700005)(83380400001);
DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?3YnPjsI3fzNR/bE9b26jsNZoMZhYW05z/VnBjUhCZnYJ4qcJ6DESW1rKkAFt?=
=?us-ascii?Q?5c2o+NHyQw1Iz9ZC3dQ9wsO4Ovl4hj1sF5+MXf7hRBjVZUdX/7utj1NYp8L7?=
=?us-ascii?Q?+5vo6PlDL1+mGUmtLTf1Uy5oYYED7vi1Oen/jWvTWKsRukIKuw3YL1Ns6OI2?=
=?us-ascii?Q?IDK3NQbUZn3sRZ16gXhJDBLreIqLC8I1MjKft9XO0gvG2UrX6UABvPTvI/Ht?=
=?us-ascii?Q?exLO/U05SGELTr8c4WP8psUfbmPX7Nv4PgkMKMoANfA9M/Miv+v36+VE4Wob?=
=?us-ascii?Q?U30jT4/2EJ92EOefJ080FblzyQcc79dFsT6d4d1urSI00lK3TijFiRsa+mFk?=
=?us-ascii?Q?cEy3tNvOtiEuSNHauCbY0+CKhk6iK9JdeppG2cmIl0j0P5v2ZkEI9CKoczUf?=
=?us-ascii?Q?cyboxb9QdN4fTBXVl8YFFkra22WlewkF13tYXmrP6hgQDgJYqPo9OZZRBEzZ?=
=?us-ascii?Q?mtHul/AyWJFzcVa0934f106ksadSBMwsI+dQO+XMKKy81iI3r0HLBe61948D?=
=?us-ascii?Q?fOaHnOgM+6hgjwRgTx53Q+vIJVZe+gAoBA4rs6js60k3mvNira7FidNryCkr?=
=?us-ascii?Q?nxGmj0AjAOAA/nXfiDM/LiOo2gDpy9Y3oOmf09wkqtYE9ejr/4Yi//BlCQ9Z?=
=?us-ascii?Q?7neqEZ4OjAcNWuvvhZDdjKqs3iM6m91+CjJyQQxBDMi8FyJfYs/Q7VrwBqYR?=
=?us-ascii?Q?JmeR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5oPvS4IQlEVJCf1?=
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: MW4PR84MB1684.NAMPRD84.PROD.OUTLOOK.COM
X-MS-Exchange-CrossTenant-Network-Message-Id: 3df3b594-537d-453c-1615-08db887c826e
X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Jul 2023 17:20:54.8334 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: dvTm7NeRWhms1upftcvEJXY+F1t5k7GnhYzFsV7CSKpDIAA9iN/A9SqCZpB1JLEgVOwzjdunOxmQs9eNunM65A==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR84MB3425
X-OriginatorOrg: hpe.com
X-Proofpoint-GUID: xfRmLU7rOOa8DbOn0f5TMLZjrPdWcHJ-
X-Proofpoint-ORIG-GUID: xfRmLU7rOOa8DbOn0f5TMLZjrPdWcHJ-
X-HPE-SCL: -1
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26
definitions=2023-07-19_12,2023-07-19_01,2023-05-22_02
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
impostorscore=0
priorityscore=1501 malwarescore=0 bulkscore=0 phishscore=0 mlxlogscore=798
lowpriorityscore=0 adultscore=0 suspectscore=0 clxscore=1011 mlxscore=0
spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1
engine=8.12.0-2306200000 definitions=main-2307190157
X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH,
DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW,
RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP,
T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: "Voris, Ben via Cygwin" <cygwin AT cygwin DOT com>
Reply-To: "Voris, Ben" <ben DOT voris AT hpe DOT com>
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

> -----Original Message-----
> From: Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>
> Sent: 19 July 2023 03:15
> To: cygwin AT cygwin DOT com
> Cc: Orit Heimer <heimer DOT orit AT gmail DOT com>
> Subject: Re: Cygwin64 does not show my desktop directories
> 
> On Wed, 19 Jul 2023 11:52:31 +0300
> Orit Heimer wrote:
> > Hello to all,
> > I am new to Cygwin64 and encountered a problem.
> > I am using a Windows 10.
> > I try to get cygwin64 to show my desktop directories.
> > I use the following command to change to this directory:
> > *cd /cygdrive/c/Users/Default/Desktop*
> > But when I then use *ls* I get nothing.
> > I suspect this is a permission problem, but I failed to overcome it.
> 
> The directory you cd'ed is not correct.
> Use:
> /cygdrive/c/Users/$USER/Desktop
> 
> --
> Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>

If you can "cd" to a directory and "ls" shows it empty, permissions
are unlikely to be the problem.

Though the original example used "C:", the Windows desktop need not
be on the C: drive. Assuming you're using bash, a more general command
is:

cd "${USERPROFILE}/Desktop"

- Quoted because doing that helps to remind me that its safer. 
- ${USERPROFILE} because it includes the Windows drive.
- "Desktop" instead of "desktop" because, though case-sensitivity is
  usually not enabled, the directory name is "Desktop".

Also, it is possible that the directory that Windows Explorer shows
as your desktop is something entirely different. For example, if you
use OneDrive to mirror your desktop, the directory that Windows
Explorer shows is "${OneDrive}/Desktop". And, at least on my system,
Here, the quotes are necessary.

I believe that OneDrive isn't the only thing that can change the
"real" location of what Windows Explorer shows:

The following command should always work but will emit
"bash: warning: command substitution: ignored null byte in input".
In case email makes a mess of the command, it is 128 characters.

ls -ld "$(cat "/proc/registry/HKEY_CURRENT_USER/SOFTWARE/Microsoft/Windows/CurrentVersion/Explorer/User Shell Folders/Desktop")"

If you don't like to see the warning and you want to have a variable
that holds the desktop directory name, this works. Again, to help in
case email makes a mess of it, the command is 202 characters.

IFS= read -r -d '' WINDOWS_DESKTOP < "/proc/registry/HKEY_CURRENT_USER/SOFTWARE/Microsoft/Windows/CurrentVersion/Explorer/User Shell Folders/Desktop" && WINDOWS_DESKTOP="$(cygpath "${WINDOWS_DESKTOP}")"

You can use the variable, like so:

ls -ld "${WINDOWS_DESKTOP}"

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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