Questions tagged [.desktop]

A .desktop file describes how a particular program is to be launched, how it appears in menus, etc. It is used by Freedesktop-compliant environments such as Gnome, KDE and Xfce.

Filter by
Sorted by
Tagged with
0 votes
1 answer
16 views

When Click an Application Icon On Taskbar, Jump To the Workspace It was First Created

I am using Zorin which uses Gnome. I am attaching an screenshot first: You can see that, I have open nemo and firefox in workspace 1. Then I went to workspace 2. Now when I click nemo icon on taskbar,...
user avatar
  • 1,329
0 votes
0 answers
20 views

How to `source` a desktop file after creation [duplicate]

In Bash I can do after editing my .bashrc file: source .bashrc and then the changes have taken affect. But I created a .desktop file in /usr/share/applications, how can I make the changes take effect?...
user avatar
0 votes
0 answers
26 views

Software Update application fails when run from .desktop file, but not from terminal

I have the following problem: I wrote a software which installs software from a package name with a GUI. Now, the software runs fine when run from the terminal, but not from a .desktop file in /usr/...
user avatar
0 votes
0 answers
18 views

How to configure a desktop file so that I can set different parameters for a same application with KDE

Example of behaviors I have been able to set different windows of Vscode to open on different desktops or activities by targetting the window title. I have done the same with gnome-terminal using ...
user avatar
0 votes
1 answer
106 views

.desktop File not Working Properly

I'm trying to create a .desktop file for a python script (for the Electrum Bitcoin wallet). If I navigate to the folder where the file is saved and run it (python3 /home/username/.local/bin/electrum), ...
user avatar
0 votes
1 answer
294 views

Always run Firefox ESR in Wayland instead of X.org on Debian

When using the latest stable desktop environment, to enable features like screen share inside of video conference programs, and for stability, Wayland seems to work better than the ancient X.org. I ...
user avatar
0 votes
1 answer
251 views

Ways to launch a desktop application with environment variable

I have actually one environment variable that is needed by some GUI applications : QT_QPA_PLATFORMTHEME=qt5ct. For now I export it in ~/.bashrc. When I run qt5ct from a terminal, the app sees the ...
user avatar
3 votes
1 answer
137 views

Application showing in Menu, but .desktop file not present in /usr/share/applications

I have somehow the opposite problem of the proponent of this question: why-are-my-application-desktop-files-not-showing-up-in-linux-application-menu in my case I have an application showing in the ...
user avatar
  • 249
0 votes
1 answer
18 views

Launching application in favorites creates 2nd icon on taskbar

I have Element-Nightly installed using the official installation instructions. This creates a desktop file in /usr/share/applications, which I've added to my GNOME taskbar: seth@seth-pc-tux:/usr/share/...
user avatar
0 votes
1 answer
121 views

What is the canonical way to run a .sh from file manager?

Hope, this belongs here and not e.g. on SU. I would like to make my life a bit easier and therefore want to be able to run a script.sh from file manager. This is possible in other distributions (or ...
user avatar
  • 205
1 vote
1 answer
546 views

xdg-open from .desktop file (in script)

I am trying to get a shell script to launch a browser. When run standalone, this script successfully opens a browser with xdg-open http://localhost:8080 However, I am trying to make it convenient ...
user avatar
  • 125
0 votes
1 answer
3k views

How to create a desktop icon for an application on RHEL 8?

I copied an existing and working .desktop file for an application that can be launched from Applications → Favorites into ~/Desktop but the file is displayed on and opened from the desktop as text ...
user avatar
2 votes
0 answers
86 views

Launch same application with different .desktop (and icons) task manager

Suppose I have a program myapp. It has two sub tasks, A and B. Launcjhing myapp --task A launches A and similar for B. Launching myapp only opens another intro window. I have three .desktop files in /...
user avatar
  • 21
0 votes
0 answers
90 views

.desktop file KDE Service menu - how to copy many files

I have a servicemenuitem for KDE which copies the selected file to the desktop. It works when one file is selected on the desktop, but when multiple files are selected, they are not copied. The -exec ...
user avatar
  • 1
0 votes
1 answer
318 views

How to debug a .desktop file?

I've installed Gnome Boxes, Gnome Builder and Peek through flatpak, and when I click the app in the aplication menu, they don't start. And I don't know why, so I just looked at the .desktop in /var/...
user avatar
  • 101
0 votes
1 answer
32 views

My desktop entry seem to have cached some old entries for some fields

I am writing a desktop entry for an application that doesn't come with one (let's say application A). As usual, I just copy a desktop entry that exists already (let's say the desktop entry of ...
user avatar
0 votes
0 answers
43 views

If I execute this program via terminal it opens, but if I open it via .desktop file it doesn't

I've installed Matlab inside /home/user/Desktop/matlabFolder/bin/ . I can run Matlab running /home/user/Desktop/matlabFolder/bin/matlab inside a terminal, and it works. I created a .desktop file here: ...
user avatar
  • 221
0 votes
1 answer
55 views

Manipulate linux workspaces with scripts

I want to write a script(s) that lets me manipulate Linux workspaces on my computers. I'm looking for compatibility with EWMH/NetWM compatible X Window Managers. I currently use wmctrl to move ...
user avatar
0 votes
1 answer
2k views

.desktop file with Exec and Terminal=True: temporarily prevent terminal shutdown on application exit?

I have a Python terminal application, that I call from a .desktop file, something like this: [Desktop Entry] Version=1.0 Name=My App Exec=python3 /home/pi/my_app.py Terminal=true Type=Application ...
user avatar
  • 360
1 vote
1 answer
90 views

.local/share/applications isn't detected by xdg-mime

I'm trying to change the default program to open PDF files with xdg-open using the command xdg-mime default pdf.desktop application/pdf. The file pdf.desktop is already in ~/.local/share/applications. ...
user avatar
1 vote
1 answer
231 views

How to associate markdown files with a web browser?

Out of GUI-based software like ReText or Formiko, and using just a command-line tool like pandoc, is it possible to open markdown files (MIME type association) as an HTML file in a web browser, ...
user avatar
  • 141
1 vote
1 answer
500 views

Two Commands in a Launcher

I researched this for a while, and couldn't find a solution. What I'm trying to do is to create a launcher in the XFCE desktop environment which runs several commands: cd Documents ./run_program....
user avatar
  • 11
4 votes
2 answers
457 views

Is it possible to tell linux to look for .desktop files in a directory?

I started using rofi as an application launcher using its drun function. It works fine, .desktop files in /usr/share/applications and $HOME/.local/share/applications both show on it with no problems. ...
user avatar
0 votes
1 answer
77 views

How to access custom PATH programs from .desktop file

I have a scripts directory that I have added to path (specifically in the ~/.bashrc). I can run the scripts as expected from the terminal, but it says that the command is not found when I run it from ...
user avatar
1 vote
2 answers
2k views

How to launch `.desktop` files from the terminal (or dmenu)

I want to run .desktop files from the terminal and dmenu. From the terminal, it should ideally be run with ./app.desktop or /path/to/app.desktop, and app.desktop would be put in a $PATH directory. I'd ...
user avatar
0 votes
1 answer
228 views

Use Tor Browser as Default alongside Firefox in GNOME

My system comes with Firefox as its browser and I have installed Tor Browser for my user. It took me a while to determine how to register Tor Browser as GNOME's default browser (Settings > Details &...
user avatar
  • 4,151
1 vote
2 answers
941 views

Run shell command exectly one time at login

I am on Ubuntu 18.04 and trying swap Ctrl and CapsLock using xmodmap. But failed to find a way of doing that automatically: .[X|x]modmap[rc] and .config/autostart didn't work. What other ways are ...
user avatar
1 vote
1 answer
273 views

xfce - Show text along launcher icon in xfce panel

I created a custom launcher file to launch a program and show progress percentage using notify-send. But I want to show that percentage along my launcher icon. One way I can do this is by creating ...
user avatar
  • 155
2 votes
2 answers
569 views

Spaces in .desktop file Exec path

I'm trying to create a .desktop file that runs a shell script that's in the same folder as the .desktop file. So far I got the following to work: Exec=bash -xc 'cd "$(dirname %k)" && ...
user avatar
0 votes
0 answers
68 views

Desktop Launcher not Working on Elementary OS

I'm still learning about how to make a desktop launcher. I'm trying to make a desktop launcher for the XAMPP Manager (a.k.a. the GUI). This is the location of the .run file: /opt/lampp/manager-linux-...
user avatar
1 vote
1 answer
470 views

Where is the relevant .desktop file?

I can open a Python source file using xdg-open, e.g., $ xdg-open Documents/tmp/paramk.py Waiting for Emacs... $ what happens is that emacsclient is invoked and xdg-open returns when I close the Emacs'...
user avatar
  • 945
4 votes
0 answers
191 views

How do Chrome app icons work?

This is fairly trivial question, but I’m curious about how this works. I just wanted to change an icon used by a Chromium App created from a web address. The .desktop file refers to an icon with a ...
user avatar
0 votes
1 answer
215 views

Run sudo Exec in .desktop via pkexec: Qt Error

I have a configuration in virtualbox that requires me to run the application with sudo privileges. I have been editing the .desktop file to run with sudo (note a simply changing the Exec variable to ...
user avatar
1 vote
0 answers
244 views

Manjaro Linux desktop file stored in ~/Desktop is not working

I've stored a chromium desktop file in ~/Desktop and added some actions .Although I can see the icon and on clicking the default Exec gets executed but I don't see any options on right clicking the ...
user avatar
  • 114
0 votes
0 answers
125 views

.desktop WINE -- open file in running program

I am using Ubuntu 18.04. I'm running a text editor under WINE and am trying to figure how to add the ability to right-click on a text file in a file manager and have it open in that text editor, or at ...
user avatar
  • 189
0 votes
1 answer
33 views

.desktop is not showing via right click

I created .desktop app and it is stored (/usr/share/applications), (.local/share/applications), but I am unable to open via GUI like..right click on mp4 and open with other application. This .desktop ...
user avatar
1 vote
1 answer
197 views

Autostarted .desktop application doesn't exit on log out

I'm following the answer of Autostarting .desktop application at startup not working, and it is working well. I'm launching a python script. The .desktop application looks like this: [Desktop Entry] ...
user avatar
  • 155
3 votes
3 answers
299 views

Avoid .desktop terminal starter to be in same group as other terminal windows in (gnome and other) window managers

I made a custom .desktop file and put it into .local/share/applications. Now I can run it from desktop menus like gnome shell. The content is: [Desktop Entry] Name=Todovim GenericName=Todovim Comment=...
user avatar
  • 31
1 vote
1 answer
59 views

Trying to get process name from Exec= line in .desktop file. Error when running Exec= when its a bash script

I've written this shell script to get the name of the process spawned from the exec line. My issue is when I try it on Arduino IDE I get an error. I investigated and its exec line is another shell ...
user avatar
2 votes
1 answer
231 views

Why are environment variables not resolved when double-clicking .desktop file?

I have a Java application which is launched by a shell script. The first part of the shell script is to resolve the Java location by looking at $JAVA_HOME. The shell script is working well if launched ...
user avatar
  • 173
1 vote
2 answers
107 views

How to get expected process name from executable path in .desktop file

I'm reading through the .desktop files found in /usr/share/applications and it appears SOME don't share the same process name as the executable file (most do). Is there a way to find that the process ...
user avatar
0 votes
1 answer
484 views

GNOME ".desktop" shortcut: Specify Start-In path

I'm making some shortcuts to games I would normally run via terminal. For instance, UT2004: cd "$HOME/Unreal Tournament 2004/System/" ./ut2004-bin-linux-amd64 My work so far: [Desktop Entry] ...
user avatar
0 votes
0 answers
96 views

Launch vsim without opening a terminal window

I don't know if this is very specific to vsim (executable of Modelsim-Altera) or not, but I will try my chance. I have an executable which I can run by giving its path to terminal from any working ...
user avatar
  • 183
1 vote
2 answers
992 views

How to define wm class for terminal commands in .desktop files

I'm playing around with .desktop files and ended up with this one: [Desktop Entry] Version=1.0 Name=Music Player (cmus) Comment=Command Line Music Player GenericName=Music Player Exec=cmus Terminal=...
user avatar
  • 113
1 vote
0 answers
23 views

How do I add "Right click>close" option to a .desktop file?

I have created a .desktop file for a program I use frequently. When I left click the .desktop file, it runs the program. I would like to have an "exit/close" option when I right click the file. How ...
user avatar
  • 11
3 votes
1 answer
497 views

"@@" in Flatpak desktop files

In the Exec lines of desktop files exported by Flatpak, the field code for the file/URL to be passed to the application is surrounded by @@: Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --...
user avatar
  • 2,538
0 votes
0 answers
188 views

Set icon from the current directory in a .desktop file

I have an application in /home/sourav/project/.src/ directory. I have a desktop entry to run the application. I have set Path='./.src' to the .desktop file to run the application from the src/ and ...
user avatar
  • 1,645
0 votes
0 answers
386 views

Why don't .desktop files on Debian 10 execute?

I have trouble executing .desktop files in Debian 10.. Do they even run? Debian 9 had no issues running the same files I have issues with now. I have set the files themselves as executable. And in ...
user avatar
  • 1
0 votes
2 answers
357 views

Why is the icon I've placed into /usr/share/icons not displaying in the MATE Applications menu?

I have a .desktop file in /usr/share/applications with the entry: [Desktop Entry] Icon=my-app ... I have placed my-app.png into /usr/share/icons/hicolor/32x32/apps. The icon displays just fine for ...
user avatar
  • 2,175
0 votes
1 answer
771 views

Centos 7 RPM Packaging - Create a desktop shortcut during installation

I am developing a cross-platform UI with .Net Core and am packaging it using RPM Package Manager. I have created the RPM file to be locally installed. The %install section of my spec file looks like ...
user avatar