Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Question Using Unity Hub 3.1.2 on WSL

Discussion in 'Unity Hub' started by juxyper, May 16, 2022.

  1. juxyper

    juxyper

    Joined:
    May 9, 2022
    Posts:
    1
    Hello,
    I'm currently working on a Unity project that is required to be run in Ubuntu 20.04 (we are going to use the Robotics Hub). My own computer is a Windows 11 machine that is quite capable of handling Ubuntu tasks in WSL2, and I already have an environment set up and ready to go.

    My main issue after installing unityhub on Ubuntu(WSL) through apt, is that the hub requires me to log in through a web browser. When such a request is made in WSL, the link is opened in my default browser in Windows, which opens the Unity Hub installed on my Windows drive.

    Using a browser that is specifically installed in WSL, for WSL manages to grab a different kind of link, but the browser fails to communicate back to the hub. Copying that link, and calling unityhub with the link as an argument doesn't help either, as the link is then rejected.

    Is there a nice way to use unityhub (v3) on WSL? Has anyone successfully opened a Unity project in a WSL environment? Would it be a good idea to use hub v2 (and how would I get it, now that it doesn't appear on the pages)?
     
    harrisonmg likes this.
  2. armadica100

    armadica100

    Joined:
    Jul 11, 2019
    Posts:
    1
    I'm having a similar issue, after going onto the Unity website, and following the Linux installation instructions i was able to get Unity installed, however upon running the Unity program a XLaunch window appears, requiring login credentials. I haven't tried using any different browsers on the OS however maybe that will provide some kind of solution for the login issue. I hope someone finds an answer as running Ubuntu in VirtualBox is a lot worse in terms of performance than just using WSL2.
     
  3. dagguh

    dagguh

    Joined:
    Oct 14, 2017
    Posts:
    1
    My workaround:
    • uninstall UnityHub from Windows
    • try to log in
    • see error about unityhub:// not having an application to open it
    • notice the URL from the error window title
    • in Ubuntu run: xdg-open "unityhub://login/?code=XYZABC123FOOBAR" with the code from the title
    I had ran xdg-mime default unityhub-handler.desktop x-scheme-handler/unityhub in the past, I don't know if that's necessary here.
     
  4. CptQuebec

    CptQuebec

    Joined:
    Jun 17, 2021
    Posts:
    1