Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: How does this work with the newly release Ubuntu Store version? #52

Closed
klauern opened this issue Jul 11, 2017 · 33 comments
Closed

Comments

@klauern
Copy link

klauern commented Jul 11, 2017

While I'm sure it's all of maybe a day old, I thought it'd be worthwhile to ask how this interoperates or will interoperate with the direction that seems to be going with WSL:

https://blogs.msdn.microsoft.com/commandline/2017/07/10/ubuntu-now-available-from-the-windows-store/

It appears that there's an official Ubuntu install in the Store, with other flavors forthcoming. Additionally, it appears that the plan is to have them run side-by-side or simultaneously.

Most importantly, however, I saw this on the blog post's FAQ:

Q2) Should I continue to run the current/legacy distro or move to the new Store distros
A2) You can continue to run the current/legacy distro, but we do encourage you to move to using the store distro’s as your primary distro’s, because the current/legacy distro will be deprecated at some point.

With the "old" way of starting and installing the WSL subsystem with Ubuntu, how will this tool work? How can I migrate it to use the ubuntu command that appears different/distinct from WSL's bash callout?

@nevhan
Copy link

nevhan commented Jul 12, 2017

C:\Users\nevhan>where ubuntu
C:\Users\nevhan\AppData\Local\Microsoft\WindowsApps\ubuntu.exe

C:\Users\nevhan>where bash
C:\Windows\System32\bash.exe

C:\Users\nevhan>ver
Microsoft Windows [Version 10.0.16232.1000]

I have uninstalled the legacy environment and it appears bash opens the new windows store version of ubuntu. WSLTTY still works but it complains about the icon being missing.

@mintty
Copy link
Owner

mintty commented Jul 12, 2017

I don't have the update yet, but if you tell me the new path name of the icon file, I can change installation so that it copies either of them into the wsltty installation directory (rather than refer to the assumed location).
As a workaround, you can configure the new icon location in the config file (Icon=…).

@mintty
Copy link
Owner

mintty commented Jul 12, 2017

Checking the announcement linked above:

  • Install distros side-by-side: WSL has been enhanced to support the installation of multiple distro’s alongside one another
  • Run multiple distro’s simultaneously: Not only can you install distro’s side-by-side, but you can now run more than one distro simultaneously

If anyone can contribute an idea how to handle that with wsltty, and how to find out the actual installation location(s), I'd appreciate it.

@mintty
Copy link
Owner

mintty commented Jul 12, 2017

A3) You can launch the new store based distro’s via the start menu tile created for each distro.

Information might be extracted here. Also wsltty could semi-automatically add an invocation shortcut per distro, assuming they can be recognized and distinguished.

@klauern
Copy link
Author

klauern commented Jul 13, 2017

I took a look last night to see if I could find out the location of the Ubuntu install, but was unsuccessful. I'll try again tonight. The usual "Open File Location" wasn't available for this app, and even after pinning it to the Start menu, I wasn't seeing it. Any tips on where to get the executable location from this would be appreciated.

@mintty
Copy link
Owner

mintty commented Jul 13, 2017

Wouldn't @nevhan's tip above

C:\Users\nevhan>where ubuntu
C:\Users\nevhan\AppData\Local\Microsoft\WindowsApps\ubuntu.exe

be a good starting point to look?

@klauern
Copy link
Author

klauern commented Jul 13, 2017

C:\Users\klauer
λ  which ubuntu

Definition
----------
C:\Users\klauer\AppData\Local\Microsoft\WindowsApps\ubuntu.exe

@klauern
Copy link
Author

klauern commented Jul 13, 2017

image

@klauern
Copy link
Author

klauern commented Jul 13, 2017

Similarly, inside the Canonical... directory, is another 0-byte ubuntu.exe.

@keyduq
Copy link

keyduq commented Jul 13, 2017

In this directory are store everything about it but cant find any icon file
C:\Users\{user}\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc
Rootfs directory: C:\Users\{user}\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs

@mintty
Copy link
Owner

mintty commented Jul 14, 2017

What about the Start Menu icon (after "pinning"), can you open "Properties"? It should expose target, icon, etc. That information would be needed anyway in order to find out how to address the different parallel WSL installations that are now possible.

About the icon, as the MS pages annonce that other Linux distributions than Ubuntu will be available shortly, maybe I should switch to a more generic icon anyway (linux).

@klauern
Copy link
Author

klauern commented Jul 14, 2017

Here's what I get from the start menu icon after pinning:

image

@mintty
Copy link
Owner

mintty commented Jul 14, 2017

What about the "normal" Start Menu icon (not the tile)?

@klauern
Copy link
Author

klauern commented Jul 14, 2017

Same:

image

As is the "Pin to Task Bar" options:

image

@klauern
Copy link
Author

klauern commented Jul 14, 2017

I wonder if this is hidden in the registry somewhere because this seems a little too-well hidden to be this hard to find.

@mintty
Copy link
Owner

mintty commented Jul 14, 2017

You should be able to find some usable Start Menu shortcut files under %APPDATA%\Roaming\Microsoft\Windows\Start Menu or %ProgramData%\Microsoft\Windows\Start Menu.

@klauern
Copy link
Author

klauern commented Jul 15, 2017

I might have found something. I think this path is different depending on who installs it, because it looks auto-generated to me, but the path under C:\Program Files\WindowsApps\CanonicalGroupLimited.UbuntuonWindows_1604.2017.711.0_x64__79rhkp1fndgsc\Assets has a bunch of icons and such:

image

@klauern
Copy link
Author

klauern commented Jul 15, 2017

Unfortunately, I can't run the ubuntu.exe natively from that path, as it gives me some kind of permission denied error:

image

image

The way I got this was by right-clicking on the Ubuntu app when it starts up and seeing the properties for it:

image

image

I'm not sure how it's getting called, though, because it doesn't seem to work without running from the Start menu.

@klauern
Copy link
Author

klauern commented Jul 15, 2017

Simpler yet, under the images/ subfolder is one file called icon.ico that looks like it might be it:

image

@mintty
Copy link
Owner

mintty commented Jul 20, 2017

I have a script now that would extract distro information and icons if possible (but only if icon is at a standard location, like with Ubuntu, as Microsoft does not provide information about how to get an icon from a hidden Start Menu entry).
The script is now a shell script and needs some transformation to avoid bundling a bunch of DLL dependencies.
However (@rprichard), we still need support in the wslbridge frontend to use a distinct launcher rather than bash.exe.

@rprichard
Copy link

I'll try to add support for a custom launcher path in a few days.

@mintty
Copy link
Owner

mintty commented Jul 26, 2017

@rprichard, thanks; I also tried to patch wslbridge but my first attempt failed. See also rprichard/wslbridge#14 (comment) please.

@mintty
Copy link
Owner

mintty commented Jul 28, 2017

Released 1.7.9. Please check, feedback appreciated.

@klauern
Copy link
Author

klauern commented Jul 28, 2017

Is there an installer.exe that we can use like the other versions?

@mintty
Copy link
Owner

mintty commented Jul 29, 2017

I had forgotten to attach the installer, sorry. Now available.
Otherwise, you could build it simply by downloading the source archive and running make, within a cygwin installation.
Also, then you could run make install to install directly, without the installer.

@klauern
Copy link
Author

klauern commented Jul 29, 2017

Excellent! I was able to test it and I think it works. I have both the old WSL install and Ubuntu, so it has context items for both. I was waiting on this to work before uninstalling the old WSL distro, so now that I have it, I'm pretty stoked.

If anyone else wants to chime in on their tests, feel free, but for me, this looks like it works so I would be comfortable closing the issue.

@mintty @rprichard thank you for working on this!

@mintty
Copy link
Owner

mintty commented Jul 29, 2017

Thank you.
Actually I still see an issue; if you uninstall your old WSL, its Explorer context menu entry will persist, and the "remove..." script will not remove it anymore. Maybe I should add a marker in the registry for that purpose.

@mintty mintty mentioned this issue Sep 16, 2017
mintty added a commit to mintty/mintty that referenced this issue Oct 11, 2017
@mintty
Copy link
Owner

mintty commented Oct 23, 2017

Released 1.8.0 with full support for a variety of WSL distributions, and the WSL default distribution.

@mintty mintty closed this as completed Oct 23, 2017
@mintty
Copy link
Owner

mintty commented Oct 23, 2017

See #63 about my request for a Windows Store package.

@kbui710
Copy link

kbui710 commented Feb 11, 2018

Hi all, I got the error below when try to run Ubuntu on Windows 10. I have checked the path C:\Program Files\WindowsApps... to see if its valid but there is no such folder 'WindowsApps' under 'Program Files'. Anyone help is much appreciated.
ubt1
ubt2

@willpower232
Copy link

@kbui710 please open a new issue as your problem is probably something different.

FWIW, WindowsApps is a hidden folder so you'll need to reveal those in explorer to see it. Please also make sure you have the latest version of wsltty installed.

@kbui710
Copy link

kbui710 commented Feb 11, 2018

@willpower232 thank you for the reply and helpful information.

@mintty
Copy link
Owner

mintty commented Feb 11, 2018

Actually, wsltty does not run the ubuntu.exe wrapper so I doubt you were really using wsltty at all.
If you open another issue, please describe precisely what you were doing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants