Skip to content

Linux GUI apps aren't showing up in Start menu (shell script support in start menu shortcut) #4

Closed

Description

Environment

Windows build number: Microsoft Windows [Version 10.0.21343.1010]
Your Distribution version: Ubuntu 20.04
Your WSLg version: 0.2.13


Steps to reproduce

Commands I ran to install Jet Brains Rider:

curl https://download-cf.jetbrains.com/rider/JetBrains.Rider-2020.3.4.tar.gz -o /tmp/rider.tar.gz
sudo tar -xzf /tmp/rider.tar.gz -C /opt
cd /opt/JetBrains\ Rider-2020.3.4/bin
bash ./rider.sh

WSL logs:
pulseaudio.log
weston.log
versions.txt

Expected behavior

I would see the Jet Brains Rider app under the Ubuntu folder in the Start Menu

Actual behavior

There is no Ubuntu folder in the Star Menu

Activity

  1. craigloewen-msft commented on Mar 26, 2021

    @craigloewen-msft
    Member

    Steven could you open up an Ubuntu instance and run
    cp /mnt/wslg/versions.txt /mnt/c/Temp/

    To copy it to the C:/Temp folder or any other folder on your machine and then attach it?

    Accessing versions.txt is a known issue that we are fixing

  2. stevenbrix commented on Mar 26, 2021

    @stevenbrix
    Author

    Thanks Craig Loewen (@craigloewen-msft) - I updated the original post to include it

  3. hideyukn88 commented on Mar 30, 2021

    @hideyukn88
    Contributor

    Steven Brix (@stevenbrix), can you see where .desktop file is placed for "Jet Brains Rider" ? In my past experience, JetBrains often places .desktop file under user's home, such as ~/.local/share/applications. But currently we only support global location, such as /usr/share/applications. Also please let us know where your XDG_DATA_DIRS environment variable points to. Thanks!

  4. stevenbrix commented on Apr 7, 2021

    @stevenbrix
    Author

    Thanks Hideyuki Nagase (@hideyukn88), hmm there is no ~/.local/share/applications folder, but I can confirm that it is not in /usr/share/applications

    stevenki@poseidon-devbook:~/.local/share$ echo $XDG_DATA_DIRS
    /usr/local/share:/usr/share:/var/lib/snapd/desktop
    
  5. spronovo commented on Apr 16, 2021

    @spronovo
    Contributor

    Following Steven's step above on my Ubuntu 20.04, rider did create the desktop file under ~/.local/share/applications per below.

    spronovo@spronovo-book:~/.local/share/applications$ ls
    chrome-aapocclcgogkmnckokdopfmhonfmgoek-Default.desktop jetbrains-rider.desktop mimeinfo.cache
    chrome-nmmhkkegccagdldgiimedpiccmgmieda-Default.desktop mimeapps.list

    Unfortunately this is a known limitation at the moment.

  6. taikulawo commented on Apr 22, 2021

    @taikulawo

    If clion don't create shortcut for you, you can create it manually

    create a file at /usr/share/applications/clion.desktop

    change clion path for you own

    [Desktop Entry]
    Version=13.0
    Type=Application
    Terminal=false
    Icon[en_US]=/root/clion-2021.1/bin/clion.png
    Name[en_US]=Clion
    Exec=/root/clion-2021.1/bin/clion.sh
    Name=Clion
    Icon=/root/clion-2021.1/bin/clion.png
    

    wait for a while, you can access shortcut from windows start menu

  7. stevenbrix commented on Apr 22, 2021

    @stevenbrix
    Author

    Steve Pronovost (@spronovo) could you share what the rider desktop file looks like? i'll try @iamwwc's suggestion and see if i can copy it to the global location

  8. spronovo commented on Apr 22, 2021

    @spronovo
    Contributor

    Steve Pronovost (@spronovo) could you share what the rider desktop file looks like? i'll try @iamwwc's suggestion and see if i can copy it to the global location

    Here is the content of the file

    [Desktop Entry]
    Version=1.0
    Type=Application
    Name=JetBrains Rider
    Icon=/opt/JetBrains Rider-2020.3.4/bin/rider.svg
    Exec="/opt/JetBrains Rider-2020.3.4/bin/rider.sh" %f
    Comment=A cross-platform IDE for .NET
    Categories=Development;IDE;
    Terminal=false
    StartupWMClass=jetbrains-rider
    StartupNotify=true
    
  9. stevenbrix commented on Apr 29, 2021

    @stevenbrix
    Author

    thanks Steve Pronovost (@spronovo). so even after adding that file, i still don't see anything in my start menu. do i need to restart?

  10. stevenbrix commented on Apr 29, 2021

    @stevenbrix
    Author

    for the record, i have other .desktop files in that directory, but none of them show up in my start menu either

  11. hideyukn88 commented on Apr 29, 2021

    @hideyukn88
    Contributor

    by looking at weston.log previously provided from you, it looks those .desktop have either "terminal" or "NoDisplay" property, thus those applications won't be registered up at start menu.

    and if you created .desktop at /usr/share/applications, WSLg monitors that folder and dynamically adds programs start menu without reboot/restarting WSL, and if you can take a peek /mnt/wslg/weston.log, those are logged there, and if any error, it most likely logged, too.

  12. stevenbrix commented on Apr 29, 2021

    @stevenbrix
    Author

    image

    Heyy, look at that! Thanks Hideyuki Nagase (@hideyukn88), the issue was the line endings in the file were Windows style

  13. stevenbrix commented on Apr 29, 2021

    @stevenbrix
    Author

    Hmm, it's still not launching. Something went wrong, but my weston.log file is now almost 3GB in space, so i can't open it in any editors to see what's inside
    WhenYou'reHangingOutAndRememberYouHadAnApptGIF

  14. hideyukn88 commented on Apr 29, 2021

    @hideyukn88
    Contributor

    I noticed "Exec="/opt/JetBrains Rider-2020.3.4/bin/rider.sh" %f" so it's shell script, I don't think this is currently possible with WSLg

  15. stevenbrix commented on Apr 29, 2021

    @stevenbrix
    Author

    Thanks Hideyuki Nagase (@hideyukn88), is there a known issue tracking this?

  16. hideyukn88 commented on Apr 29, 2021

    @hideyukn88
    Contributor

    It's not directly tracking but #66 is the suggesting to launch start menu program under the possible choice of shell (such as bash), and we are currently looking into that, so it's possible to address this as well. We can keep this issue opened until we are sure that can provide solution when Exec is pointing shell script.

  17. stevenbrix commented on Apr 29, 2021

    @stevenbrix
    Author

    Sounds good, i'm also starting to see these errors when i run the rider script locally,

    stevenki@poseidon-devbook:~/code/avs$ bash /opt/JetBrains\ Rider-2020.3.4/bin/rider.sh
    OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.

    (process:25172): dconf-CRITICAL **: 11:13:51.844: failed to allocate file '/mnt/wslg/runtime-dir/dconf/user': No space left on device. dconf will not work properly.

    (process:25172): dconf-CRITICAL **: 11:13:51.847: failed to allocate file '/mnt/wslg/runtime-dir/dconf/user': No space left on device. dconf will not work properly.

    (process:25172): dconf-CRITICAL **: 11:13:51.852: failed to allocate file '/mnt/wslg/runtime-dir/dconf/user': No space left on device. dconf will not work properly.

    (process:25172): dconf-CRITICAL **: 11:13:51.854: failed to allocate file '/mnt/wslg/runtime-dir/dconf/user': No space left on device. dconf will not work properly.

    (process:25172): dconf-CRITICAL **: 11:13:51.876: failed to allocate file '/mnt/wslg/runtime-dir/dconf/user': No space left on device. dconf will not work properly.
    IDE has not been initialized yet

  18. hideyukn88 commented on Apr 29, 2021

    @hideyukn88
    Contributor

    Given your weston.log is 3GB, can you try to shutdown wsl (by wsl --shutdown or --terminate [distro name]). We will also trim the amount of logging or make it circular somehow.

  19. changed the title [-]Linux GUI apps aren't showing up in Start menu[/-] [+]Linux GUI apps aren't showing up in Start menu (shell script support in start menu shortcut)[/+] on Apr 29, 2021
  20. stevenbrix commented on Apr 30, 2021

    @stevenbrix
    Author

    Hideyuki Nagase (@hideyukn88) interesting, this is now working. i wonder if my wsl was in a bad state or something

  21. stevenbrix commented on May 4, 2021

    @stevenbrix
    Author

    Just for an update, i'm now back in this invalid state. I'll try restarting my machine and see if that fixes things. Here are the logs:(weston.log is empty)

    pulseaudio.log
    versions.txt

    Here's output from the debug console:
    wsl_output.txt

  22. stevenbrix commented on May 4, 2021

    @stevenbrix
    Author

    A restart does fix things, and thankfully Windows has made restarts less disruptive, but it would be nice to not require one

  23. spronovo commented on May 22, 2021

    @spronovo
    Contributor

    The issue with the GUI application not showing up in the start menu in this case has been fix with today's release of 1.0.22 (weston.log should also be growing at a much slower state now :-)). To update to 1.0.22 please run the following from an elevated command prompt:

    wsl --shutdown
    wsl --update
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions