Announcement

Collapse
No announcement yet.

.desktop files (or icons) stopped working

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] .desktop files (or icons) stopped working

    After updating my current Kubuntu 24.04 my .desktop files (or the icons on the desktop) stopped working. Instead of starting the respective programs I briefly see some activity (rotating icon?) on the title (?) panel, but this stops quickly and nothing happens. The .desktop files are the same as before my update.

    My current system:
    • KDE Plasma Version: 5.27.12
    • KDE Frameworks Version: 5.115.0
    • Qt Version: 5.15.13
    • Kernel Version: 6.17.0-118023-tuxedo (64-bit)
    • Graphics Platform: X11

    #2
    I used the AI Claude to investigate the problem. Here is the solution (copy from the task protocol):

    =======================================
    ## The Actual Problem
    Your .desktop files weren't working because of the **wslu package** (Windows Subsystem for Linux utilities). This package installed a handler called `wslview.desktop` that was intercepting ALL `file://` URLs and trying to open them through WSL - but you're running native Linux, not WSL!
    This is why you saw errors like:
    ```
    WSL Interopability is disabled. Please enable it before using WSL.
    /usr/bin/wslview: line 216: /mnt/c/Windows/System32/reg.exe: No such file or directory
    ```
    ## The Real Fix
    **Disabled the wslview.desktop file** that was hijacking file:// URL handling:
    ```bash
    sudomv/usr/share/applications/wslview.desktop/usr/share/applications/wslview.desktop.disabled
    ```
    This prevents wslview from intercepting your .desktop file clicks.
    ## What Was Done
    1.**Identified the root cause:** wslview.desktop was set as the default handler for `x-scheme-handler/file`
    2.**Disabled wslview.desktop:** Renamed it so the system won't use it
    3.**Updated mimeapps.list:** Added proper associations for both:
    -`application/x-desktop` → org.kde.kfmclient_dir.desktop
    -`x-scheme-handler/file` → org.kde.kfmclient_dir.desktop
    4.**Configured Plasma desktop:** Added `LeftButton;NoModifier=org.kde.plasma-folder.openOrExecute`
    5.**Rebuilt KDE cache:** Ran `kbuildsycoca5 --noincremental`
    =====================================

    Additionally, I asked Claud why the desktop files problem occurred after updating Kubuntu 24.04 and why/when I should use WSL. The answer:

    =====================================
    # Why Did This Happen After the Update? + What is WSL?

    ## Question 1: Why Did the Desktop Files Problem Occur After Updating Kubuntu 24.04?
    ### The Root Cause
    The problem occurred because the **wslu package** (Windows Subsystem for Linux utilities) was either:
    1.**Newly installed during the update** - as a dependency of another package
    2.**Updated to a new version** - that changed its default behavior
    3.**Already installed but activated** - by the update process
    ### What Happened During the Update
    When you updated Kubuntu 24.04, the system likely:
    1.**Installed or updated wslu** - This package includes `wslview`, a utility meant for WSL environments
    2.**Registered wslview as a handler** - The package automatically registered itself as the default handler for `file://` URLs
    3.**Overwrote your previous settings** - Your existing file handler configuration was replaced
    4.**Created the .desktop file** - `/usr/share/applications/wslview.desktop` was installed/updated
    ### Why It Broke Your Desktop Files
    The `wslview` utility is designed to:
    - Open files and URLs from WSL (Windows Subsystem for Linux) in Windows applications
    - Bridge between Linux and Windows environments
    - Handle file:// URLs by passing them to Windows
    **But you're running native Kubuntu Linux, not WSL!** So when you clicked a .desktop file:
    1. KDE tried to execute it via the file:// handler
    2. The system used wslview (the registered handler)
    3. wslview tried to find Windows (/mnt/c/Windows/System32/reg.exe)
    4. It failed because you're not in WSL
    5. Your .desktop file never launched
    ### Why Was wslu Installed?
    The wslu package is in Ubuntu's "universe" repository. It may have been installed because:
    1.**Dependency of another package** - Some package you installed or updated required it
    2.**Recommended package** - It was suggested during an installation
    3.**Manual installation** - You or someone may have installed it accidentally
    4.**System update** - The update process may have pulled it in as a recommended package
    The package description says it "Provides: www-browser" which means it can register itself as a web browser alternative, potentially causing it to be installed automatically.
    ---
    ## Question 2: What is WSL and When Should You Enable It?
    ### What is WSL (Windows Subsystem for Linux)?
    **WSL is a Microsoft technology that allows you to run Linux distributions INSIDE Windows.**
    Think of it this way:
    -**Native Linux** (what you have): Linux is the main operating system, running directly on your hardware
    -**WSL**: Windows is the main OS, and Linux runs as a subsystem inside Windows
    ### WSL Architecture
    ```
    ┌─────────────────────────────────────┐
    │ Windows 10/11 │
    │ ┌───────────────────────────────┐ │
    │ │ WSL (Linux Subsystem) │ │
    │ │ - Ubuntu, Debian, etc. │ │
    │ │ - Runs Linux programs │ │
    │ │ - Accesses Windows files │ │
    │ └───────────────────────────────┘ │
    └─────────────────────────────────────┘
    ```
    ### What WSL Utilities (wslu) Do
    The `wslu` package provides tools to bridge between WSL Linux and Windows:
    -**wslview** - Opens files/URLs in Windows applications from WSL
    -**wslsys** - Shows Windows system information from WSL
    -**wslfetch** - Shows system info (like neofetch, but for WSL)
    -**wslact** - Manages Windows shortcuts from WSL
    ### When Should You Use WSL?
    **You should use WSL if:**
    - ✅ You're running **Windows** as your main OS
    - ✅ You want to run Linux tools/programs inside Windows
    - ✅ You need both Windows and Linux environments
    - ✅ You're a developer working on cross-platform projects
    - ✅ You want Linux command-line tools on Windows
    **You should NOT use WSL if:**
    - ❌ You're running **native Linux** (like you are with Kubuntu)
    - ❌ You don't have Windows installed
    - ❌ You're already in a full Linux environment
    ### Your Situation: Native Kubuntu Linux
    **You are running NATIVE Kubuntu Linux**, which means:
    - Linux is your main operating system
    - You're not running inside Windows
    - You don't need WSL utilities
    - The wslu package serves no purpose for you
    ### Should You Enable WSL Again?
    **NO - You should NOT enable WSL because:**
    1.**You're not running WSL** - You're running native Linux
    2.**WSL doesn't exist on your system** - WSL is a Windows feature
    3.**The wslu package is useless for you** - It's designed for WSL environments only
    4.**It will break your desktop files again** - If you re-enable wslview.desktop
    ### What You Should Do Instead
    **Option 1: Keep wslview disabled (Recommended)**
    ```bash
    # Current state - wslview is disabled
    ls-la/usr/share/applications/wslview.desktop.disabled
    ```
    This is the best solution. Your desktop files work, and you're not using WSL anyway.
    **Option 2: Completely remove wslu package (Best long-term solution)**
    ```bash
    sudoaptremovewslu
    ```
    This prevents the problem from recurring after future updates.
    **Option 3: Keep wslu but prevent it from handling files**
    If you want to keep the package for some reason (though I can't think of why on native Linux), you can:
    ```bash
    # Keep wslview disabled
    # Your current mimeapps.list already overrides it
    ```
    ### Summary
    | Scenario | Should You Use WSL? | Should You Have wslu? |
    |----------|--------------------|-----------------------|
    | Running Windows with WSL | ✅ YES | ✅ YES |
    | Running native Linux (you) | ❌ NO | ❌ NO |
    | Dual-boot Windows + Linux | ❌ NO (in Linux) | ❌ NO |
    | Virtual machine Linux | ❌ NO | ❌ NO |
    ---
    ## Recommendation
    **For your native Kubuntu system:**
    1.**Keep wslview.desktop disabled** - It's already done
    2.**Remove the wslu package** - Prevent future issues:
    ```bash
    sudo apt remove wslu
    ```
    3.**Your desktop files will continue to work** - The fix is permanent
    You will **never need to enable WSL** on your native Kubuntu system because WSL is a Windows feature that doesn't exist in native Linux.
    ---
    ## If You Ever Switch to Windows + WSL
    If you ever decide to run Windows as your main OS and use WSL to run Linux inside it, THEN you would:
    1. Install Windows 10/11
    2. Enable WSL feature in Windows
    3. Install a Linux distribution (like Ubuntu) from Microsoft Store
    4. Inside that WSL Linux, the wslu package would be useful
    5. wslview would help open files in Windows from your WSL Linux terminal
    But that's a completely different scenario from what you have now.

    =====================================

    I hope this will help others should they encounter the desktop files problem, as well.
    Last edited by EnzmannD; May 10, 2026, 09:34 AM. Reason: minor edits

    Comment


      #3
      Originally posted by EnzmannD View Post
      This is the best solution. Your desktop files work, and you're not using WSL anyway.
      **Option 2: Completely remove wslu package (Best long-term solution)**
      ```bash
      sudoaptremovewslu
      The command is: sudo apt remove wslu
      But, better (IMO) to purge it: sudo apt purge wslu
      Windows no longer obstruct my view.
      Using Kubuntu Linux since March 23, 2007.
      "It is a capital mistake to theorize before one has data." - Sherlock Holmes

      Comment


        #4
        Glad you found an answer, assuming it fixes things for you? You don't actually

        ​verify that it did

        It would be far better to summarize this too long wall of text, and simplify it.

        And add links to whatever was used as a source for the information, such as bug reports or other people's findings. (I know you are unable to post links just yet....)


        Also, not noticed is the fact that a package called wslu does not exist in 26.04, so why/how it was installed before the upgrade is a good question.


        The old gimp-help wanting www-browser dep bug, I assume.

        https://bugs.launchpad.net/ubuntu/+s...u/+bug/1981349

        There are a few older topics on it here, but internal and external search isn't showing the ones I was looking for.
        Self-built: Asus PRIME B550M-K/Ryzen 5600GT/32Gb/Intel ARC B580 12Gb/KDE neon
        HP Elitedesk 800 G3 Mini: i5-7500T(35w)/32Gb/Kubuntu LTS
        HP Chromebook 14: i5-1135G7/8Gb/512Gb SSD/KDE Linux

        Comment


          #5
          Yes, this (post #2) did actually solve the problem (sorry, I thought that "this is the solution" would be sufficient).

          I believe that the "long wall of text" contains useful information (at least to me this was helpful and others might appreciate this, as well). The source of information is (as I wrote) AI Claude (Anthropic). If you want more you have to delve into it much deeper, but then the "long wall of text" would become even longer.

          BTW: I don't know how I can mark the topic (problem) as "solved".

          Comment


            #6
            Originally posted by EnzmannD View Post
            BTW: I don't know how I can mark the topic (problem) as "solved".
            Return to the first post and cluck on Edit. To the left of the Topic click on the Prefix drop down and select SOLVED then click on Save.
            Windows no longer obstruct my view.
            Using Kubuntu Linux since March 23, 2007.
            "It is a capital mistake to theorize before one has data." - Sherlock Holmes

            Comment

            Users Viewing This Topic

            Collapse

            There are 0 users viewing this topic.

            Working...
            X