where should I put my .desktop files in kde plasma?

6,279

Global application launch files ending ".desktop" go in:

/usr/share/applications

Personal application files go in:

/home/$USER/.local/share/applications/

Share:
6,279

Related videos on Youtube

opensas
Author by

opensas

Updated on September 18, 2022

Comments

  • opensas
    opensas over 1 year

    In gnome I can create a shortcut to an application by placing the .dektop file in the ~/.local/share/applications/, like this

    cat > ~/.local/share/applications/vscode.desktop <<EOL
    [Desktop Entry]
    Exec=/media/data/sas/devel/opt/code/code %f
    Icon=/media/data/sas/devel/opt/code/visual-studio-code-green.png
    Terminal=false
    Type=Application
    Name=vscode
    Comment=Editor for building and debugging modern web and cloud applications
    Categories=Development;WebDevelopment;IDE;Utility;TextEditor;
    EOL
    

    So I can press the super key ad just start typing code to run it

    How can I achieve the same with kde 5???

    Using Kubuntu 18.04, kde plasma 5.12.7, kde framework 5.44


    edit: just had to create the folder and everything worked as expected, sorry...

    • Admin
      Admin almost 5 years
      Why not? What happens when you try, assuming you've made the .desktop file executable and the name is unique.
    • Admin
      Admin almost 5 years
      It should be the same.
    • Admin
      Admin almost 5 years
      sorry, the directory just wasn't there, in ubuntu (gnome) it's always there by default... I created it and everything worked fine... I googled around but couldn't find an example for kde...
    • Admin
      Admin almost 5 years
      It doesn't exist in Kubuntu 19.04. I guess the same applies to Kubuntu 18.04 as well but I can't remember!