10

I made a fresh install of Ubuntu 22.04 from a live usb key around start of May, on two different machines. Everything went fine except that the icons on the desktop do not open. More precisely:

Both for files and folders on the desktop (including the home directory icon that 22.04 puts by default), the following methods only make the icon highlighted, but do not open it (whether using the mouse or the touchpad):

  • left double click
  • middle click
  • right click + "Open" in the menu.

Only the following method does work for files on the desktop (but is not available for folders):

  • right click + "Open with..." + select the first application --- or any other in the list, actually.

The following observation might also be of interest:

  • I can launch the Gnome Files manager from the side bar, open my desktop folder in it, and then open anything inside with any usual method, such as double click
  • I can also right click on an icon on the desktop, and select "Show in Files", and then it appears in Files and I can double click on it
  • however, if I right click directly on the Desktop and select "Open Desktop in Files", then nothing happens.

I made the following checks:

  • the permissions of my Desktop folder, and of the folders and files in it, are correct (755 or 644)

  • the default applications are correct (document viewer for pdf files, text editor for txt files, etc.)

  • sudo apt-get install --reinstall ubuntu-desktop

  • wait a few weeks for updates and install them

  • create new users with default configuration.

But the problem is still there. Any ideas that could help? (The only hypothesis that further comes to my mind that I have not investigated yet, is that I installed gnome-tweaks on both machines, so maybe it could interfere somehow.)

EDIT: each time I try and fail opening an icon on the desktop, /var/log/syslog logs errors of this type:

gnome-shell[xxxx]: DING: grep: /proc/sys/fs/binfmt_misc/WSLInterop: No such file or directory
gnome-shell[xxxx]: DING: WSL Interopability is disabled. Please enable it before using WSL.
gnome-shell[xxxx]: DING: grep: /proc/sys/fs/binfmt_misc/WSLInterop: No such file or directory
gnome-shell[xxxx]: DING: #033[31m#033[1m[error] WSL Interoperability is disabled. Please enable it before using WSL.#033(B#033[m
gnome-shell[xxxx]: DING: /usr/bin/wslview: line 216: /mnt/c/Windows/System32/reg.exe: No such file or directory
gnome-shell[xxxx]: DING: /usr/bin/wslview: line 308: [: -ge: unary operator expected
gnome-shell[xxxx]: DING: #033[31m[error]#033(B#033[m This protocol is not supported before version 1903.

So it seems desktop-icons NG wants me to enable WSL Interoperability, but I wasn't able to find out how to do it.

That said, I don't see what interoperability between Windows and Linux has to do with opening folders or pdf files on my desktop?!

My machines are dual boot. But my Ubuntu installations are independent of Windows. I'm certainly not running a Linux inside a Windows. So why does desktop-icons NG ask for WSL Interoperability?!

HuguesR
  • 113
  • 1
  • 8
  • Go to https://extensions.gnome.org/local/, find `Desktop Icons NG`, make sure it's enabled, then click the blue settings icon. Check settings. Are you using Wayland or X11/Xorg? – heynnema May 26 '22 at 15:33
  • Desktop Icons NG is enabled, and the parameters seem ok (trying to fiddle with them did not solve the problem). The session type is Wayland (I guess it is the default choice because I don't remember do anything specific about this during the installation). – HuguesR May 26 '22 at 18:56
  • See my EDIT: it seems there is a problem with WSL Interoperability, but I don't understand what it does there, nor how to fix it. – HuguesR May 26 '22 at 19:19
  • @HuguesR I agree, this sounds very odd. It sounds like have Ubuntu installed on a physical machine (via USB key), not on Windows using WSL, right? – NotTheDr01ds May 26 '22 at 21:27
  • Yes, both times, Ubuntu was installed on a physical machine via a live usb key. Both machines are Dell, although different models (one 10 years old, the other one very recent). During the installation I ticked the box "Install third-party software". Could this have interfered? – HuguesR May 26 '22 at 21:40
  • Also, I don't know if this could be related, but on both machines I have (harmless) boot problems. On the older machine, I had to create a UEFI partition. Now on boot, I have an error message "Invalid partition table". But I hit Enter and it just disappears, grub starts, and everything goes fine. While on the recent machine, if I boot with Ubuntu and then reboot with Windows, it asks me to enter a Bitlocker recovery key. (Probably this has nothing to do with my problem, but I provide the info just in case.) – HuguesR May 26 '22 at 21:43
  • Note "desktop icon" are called "desktop entry" you can use that next time for better search results. – lnee May 26 '22 at 22:53
  • Try using a X11/Xorg session and see if that makes any difference. Start comments to me with @heynnema or I'll miss them. – heynnema May 27 '22 at 03:21
  • @heynnema Thanks, I just tried the various login options (including "Ubuntu on Xorg") unfortunately the problem is still there, and I still have the strange error in /var/log/syslog about gnome-shell/DING asking for WSLInterop. Only thing I noticed: certain login options like GNOME Classic add a Trash icon on the desktop, and this entry I can open (but it is the only one). – HuguesR May 27 '22 at 07:00
  • Log into a different user account and see if the same problem occurs. If you don't have another user account, create one to test this. You can always delete the account later. Report back. – heynnema May 27 '22 at 10:05
  • @heynnema Yes when I log in with another account (even a newly created one), it has the problem too. – HuguesR May 27 '22 at 15:34
  • Do you have any NTFS partitions mounted? If so, unmount them and retest. – heynnema May 27 '22 at 15:39
  • @heynnema No ntfs partition mounted. There was a uefi partition but to be sure I unmounted it, so now I only have ext4 partitions. Problem still there. – HuguesR May 27 '22 at 20:35
  • Last test... boot to a Ubuntu Live USB and see if that works. – heynnema May 27 '22 at 20:46

2 Answers2

12

This issue does not appear restricted to a dual boot environment. I had this problem as well and also solved it by uninstalling wslu. I do not have Windows or any other OS installed besides Kubuntu 22.04.

The output of command

sudo apt purge wslu

helps track down the dependency of wslu.

Your mileage may vary but in my case it was gimp-help-en:

Reading state information... Done
The following package was automatically installed and is no longer required:
  gimp-help-common
Use 'sudo apt autoremove' to remove it.
The following packages will be REMOVED:
  gimp-help-en* wslu*
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
After this operation, 63.8 MB disk space will be freed.
Do you want to continue? [Y/n]

When gimp is installed, a message "Language support is incomplete, additional packages are required" pops up in every session and a click to resolve the issue installs gimp's help. After that help was installed links to webpages did not work anymore.

In my installation wslu is indeed a dependency of gimp's help. I can verify that by manually installing apt install gimp-help-en and see that wslu will be installed as well (and will need to be removed again).

I have looked into the dependencies of gimp-help-en with command apt depends gimp-help-en and gimp-help-en depends on virtual package www-browser. www-browser is satisfied by many packages, among them chromium-browser, firefox, konqueror and also wslu. In Ubuntu 20.04 and earlier firefox was installed by default and gimp-help-en's dependency was satifisfied; in Ubuntu 22.04 firefox is not a package anymore but a snap and installing gimp-help-en also installed wslu.

In my case, this issue was a side-effect of Canonical turning firefox into a snap in Ubuntu 22.04. If I had installed chromium-browser, konqueror or firefox as a package, dependency www-browser would not have installed wslu and I would not have had this issue.

The downside of removing wslu as the fix is that not just wslu is removed but also the packages that caused it to be installed, in my case gimp-help-en. After removing gimp-help-en and wslu message "Language support is incomplete, additional packages are required" pops up again in every session and should I give in and click on this message gimp-help-en and wslu will be installed again and the issue will be back.

The best solution that I found is to install another package that also satisfies www-browser before removing wslu. This way, only wslu will be removed. This worked fine for me:

sudo apt install firefox
sudo apt purge wslu

where package firefox does not actually install firefox as a package; it just links to the snap. Installing it satisfies the dependency www-browser. Any other package besides firefox that satisfies www-browser should work as well, e.g. chromium-browser, konqueror or lynx.

joergmlpts
  • 121
  • 4
7

sudo apt purge wslu

I had this problem on a Mac Mini with a fresh independent machine install. After purging wslu, bingo! The desktop files once again open on the desktop.

NotTheDr01ds
  • 15,380
  • 6
  • 51
  • 79
  • 1
    A good find (and I'm not sure why one user downvoted it). Good to see that it was accepted, so I'm assuming it fixed the OP's problem. Do you think `wslu` was installed as a dependency of something else (probably in error)? Or is there a chance you (and the OP) installed it by mistake thinking it was something else? If it's a dependency error, someone should probably get it reported as a bug. – NotTheDr01ds May 31 '22 at 15:36
  • Also, just a thought - Since you and the OP had the same issue, it seems that you would agree that the question itself is also helpful. If so, please consider upvoting it (now that you have enough reputation to do so). – NotTheDr01ds May 31 '22 at 15:38
  • @NotTheDr01ds I confirm that it solved my problem (so I accepted the answer). I don't remember having done anything during the installation that involved `wlsu`. – HuguesR Jun 03 '22 at 11:17
  • Thanks for this, @Younghoon Nah. Fixed it for me. – Pansmanser Jun 13 '22 at 16:31
  • Hi and thanks for that find ! I was struggling on a new 22.04 LTS installation for a few days. No problem during live-session. No Windows on that machine - which is also a Dell ( optiplex3240. ) Not first time I install a 22.04 LTS, never met this _wslu_ package before. `sudo apt purge wslu` did not remove anything else ( no dependency ) but I already had removed anything _snap_ related before noticing the issue with desktop icons. For reference ( french ) https://forum.ubuntu-fr.org/viewtopic.php?pid=22675050#p22675050 – Coeur Noir May 06 '23 at 23:39