Thank you both so much!
This is very helpful.
Orit.

On Wed, 19 Jul 2023 at 22:17, Brian Inglis <brian.ing...@shaw.ca> wrote:

> On 2023-07-19 11:20, Voris, Ben via Cygwin wrote:
> >> -----Original Message-----
> >> From: Takashi Yano <takashi.y...@nifty.ne.jp>
> >> Sent: 19 July 2023 03:15
> >> To: cygwin@cygwin.com
> >> Cc: Orit Heimer <heimer.o...@gmail.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.y...@nifty.ne.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")"
>
> Does not always work:
>
>         $ regtool get
> "/proc/registry/HKEY_CURRENT_USER/SOFTWARE/Microsoft/Windows/CurrentVersion/Explorer/User
>
> Shell Folders/Desktop"
>         %USERPROFILE%\Desktop
>
> to get absolute canonical path use:
>
>         $ cygpath -aUD
>         /proc/cygdrive/c/Users/.../Desktop
>
> or for All users:
>
>         $ cygpath -aAUD
>         /proc/cygdrive/c/Users/Public/Desktop
>
> For more useful known folder options see:
>
>         $ man cygpath
>
> For Windows known folder ids (CSIDL) use:
>
>         $ cygpath -aUF $id      # 0...63
>
> See links below and attached logs for more details about those known
> folders:
>
>         https://learn.microsoft.com/en-us/windows/win32/shell/csidl
>
>
> https://learn.microsoft.com/en-us/windows/win32/shell/knownfolderid
>
> --
> Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada
>
> La perfection est atteinte                   Perfection is achieved
> non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to
> add
> mais lorsqu'il n'y a plus rien à retirer     but when there is no more to
> cut
>                                  -- Antoine de Saint-Exupéry

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

Reply via email to