How can I find the command to be used in a desktop icon that will launch a snap application?
I want make a desktop icon, that will launch a program. Currently I can launch app from icon in "Show Applications", but I want icon on desktop.
I know, I should use
gnome-desktop-item-edit --create-new ~/Desktop
for creating shortcuts.
The problem is - I don't know command that will launch this particular app from terminal. And obviously, I need this unknown to me command for creating shortcuts.
I installed from snap, so I can't just copy icon from /usr/share/applications.
Any advice how to find such command or move icon from "Show Applications" to desktop?
gnome-shell snap .desktop
add a comment |
I want make a desktop icon, that will launch a program. Currently I can launch app from icon in "Show Applications", but I want icon on desktop.
I know, I should use
gnome-desktop-item-edit --create-new ~/Desktop
for creating shortcuts.
The problem is - I don't know command that will launch this particular app from terminal. And obviously, I need this unknown to me command for creating shortcuts.
I installed from snap, so I can't just copy icon from /usr/share/applications.
Any advice how to find such command or move icon from "Show Applications" to desktop?
gnome-shell snap .desktop
1
You need to clarify which one you want - open the.desktop
file from terminal, how to create a shortcut for snap, or how to place it onto desktop - because these are all separate issues and the post is considered too broad, and might be closed. I can give a hint on the first one : opening.desktop
from terminal can be done either viagtk-launch
or python script(askubuntu.com/a/239883/295286).
– Sergiy Kolodyazhnyy
Jan 27 at 12:52
@sergiy I don't think it's too broad. As I understood OP just wants to create a launcher for a snap application in desktop. They toyed with a couple of ideas: (1) copying the launcher from system, but they failed as it's not there in/usr/share/applications
(since it's a snap application), and (2) they tried to create a launcher by hand usinggnome-desktop-item-edit
, and again they failed as they didn't know what was to be used in the 'command' box.
– pomsky
Jan 27 at 13:27
add a comment |
I want make a desktop icon, that will launch a program. Currently I can launch app from icon in "Show Applications", but I want icon on desktop.
I know, I should use
gnome-desktop-item-edit --create-new ~/Desktop
for creating shortcuts.
The problem is - I don't know command that will launch this particular app from terminal. And obviously, I need this unknown to me command for creating shortcuts.
I installed from snap, so I can't just copy icon from /usr/share/applications.
Any advice how to find such command or move icon from "Show Applications" to desktop?
gnome-shell snap .desktop
I want make a desktop icon, that will launch a program. Currently I can launch app from icon in "Show Applications", but I want icon on desktop.
I know, I should use
gnome-desktop-item-edit --create-new ~/Desktop
for creating shortcuts.
The problem is - I don't know command that will launch this particular app from terminal. And obviously, I need this unknown to me command for creating shortcuts.
I installed from snap, so I can't just copy icon from /usr/share/applications.
Any advice how to find such command or move icon from "Show Applications" to desktop?
gnome-shell snap .desktop
gnome-shell snap .desktop
edited Jan 27 at 13:43
pomsky
32.8k11103135
32.8k11103135
asked Jan 27 at 12:45
igor Smirnovigor Smirnov
82
82
1
You need to clarify which one you want - open the.desktop
file from terminal, how to create a shortcut for snap, or how to place it onto desktop - because these are all separate issues and the post is considered too broad, and might be closed. I can give a hint on the first one : opening.desktop
from terminal can be done either viagtk-launch
or python script(askubuntu.com/a/239883/295286).
– Sergiy Kolodyazhnyy
Jan 27 at 12:52
@sergiy I don't think it's too broad. As I understood OP just wants to create a launcher for a snap application in desktop. They toyed with a couple of ideas: (1) copying the launcher from system, but they failed as it's not there in/usr/share/applications
(since it's a snap application), and (2) they tried to create a launcher by hand usinggnome-desktop-item-edit
, and again they failed as they didn't know what was to be used in the 'command' box.
– pomsky
Jan 27 at 13:27
add a comment |
1
You need to clarify which one you want - open the.desktop
file from terminal, how to create a shortcut for snap, or how to place it onto desktop - because these are all separate issues and the post is considered too broad, and might be closed. I can give a hint on the first one : opening.desktop
from terminal can be done either viagtk-launch
or python script(askubuntu.com/a/239883/295286).
– Sergiy Kolodyazhnyy
Jan 27 at 12:52
@sergiy I don't think it's too broad. As I understood OP just wants to create a launcher for a snap application in desktop. They toyed with a couple of ideas: (1) copying the launcher from system, but they failed as it's not there in/usr/share/applications
(since it's a snap application), and (2) they tried to create a launcher by hand usinggnome-desktop-item-edit
, and again they failed as they didn't know what was to be used in the 'command' box.
– pomsky
Jan 27 at 13:27
1
1
You need to clarify which one you want - open the
.desktop
file from terminal, how to create a shortcut for snap, or how to place it onto desktop - because these are all separate issues and the post is considered too broad, and might be closed. I can give a hint on the first one : opening .desktop
from terminal can be done either via gtk-launch
or python script(askubuntu.com/a/239883/295286).– Sergiy Kolodyazhnyy
Jan 27 at 12:52
You need to clarify which one you want - open the
.desktop
file from terminal, how to create a shortcut for snap, or how to place it onto desktop - because these are all separate issues and the post is considered too broad, and might be closed. I can give a hint on the first one : opening .desktop
from terminal can be done either via gtk-launch
or python script(askubuntu.com/a/239883/295286).– Sergiy Kolodyazhnyy
Jan 27 at 12:52
@sergiy I don't think it's too broad. As I understood OP just wants to create a launcher for a snap application in desktop. They toyed with a couple of ideas: (1) copying the launcher from system, but they failed as it's not there in
/usr/share/applications
(since it's a snap application), and (2) they tried to create a launcher by hand using gnome-desktop-item-edit
, and again they failed as they didn't know what was to be used in the 'command' box.– pomsky
Jan 27 at 13:27
@sergiy I don't think it's too broad. As I understood OP just wants to create a launcher for a snap application in desktop. They toyed with a couple of ideas: (1) copying the launcher from system, but they failed as it's not there in
/usr/share/applications
(since it's a snap application), and (2) they tried to create a launcher by hand using gnome-desktop-item-edit
, and again they failed as they didn't know what was to be used in the 'command' box.– pomsky
Jan 27 at 13:27
add a comment |
1 Answer
1
active
oldest
votes
As you have mentioned that you installed the application from snap and it can be found in 'Show Applications', the .desktop
launcher for the application should be found in the /var/lib/snapd/desktop/applications/
directory. Just copy the .desktop
launcher from there to your desktop.
Also you should be able to find the executable for the application in the /snap/bin/
directory. So if you want to manually create the .desktop
launcher in your desktop, then you can use /snap/bin/<application>
(e.g. /snap/bin/firefox
) as the command. You can find the <application>
part by running
snap list
Alternatively, you can use snap run <application>
as the command (and of course, also to run the application from Terminal).
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1113266%2fhow-can-i-find-the-command-to-be-used-in-a-desktop-icon-that-will-launch-a-snap%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
As you have mentioned that you installed the application from snap and it can be found in 'Show Applications', the .desktop
launcher for the application should be found in the /var/lib/snapd/desktop/applications/
directory. Just copy the .desktop
launcher from there to your desktop.
Also you should be able to find the executable for the application in the /snap/bin/
directory. So if you want to manually create the .desktop
launcher in your desktop, then you can use /snap/bin/<application>
(e.g. /snap/bin/firefox
) as the command. You can find the <application>
part by running
snap list
Alternatively, you can use snap run <application>
as the command (and of course, also to run the application from Terminal).
add a comment |
As you have mentioned that you installed the application from snap and it can be found in 'Show Applications', the .desktop
launcher for the application should be found in the /var/lib/snapd/desktop/applications/
directory. Just copy the .desktop
launcher from there to your desktop.
Also you should be able to find the executable for the application in the /snap/bin/
directory. So if you want to manually create the .desktop
launcher in your desktop, then you can use /snap/bin/<application>
(e.g. /snap/bin/firefox
) as the command. You can find the <application>
part by running
snap list
Alternatively, you can use snap run <application>
as the command (and of course, also to run the application from Terminal).
add a comment |
As you have mentioned that you installed the application from snap and it can be found in 'Show Applications', the .desktop
launcher for the application should be found in the /var/lib/snapd/desktop/applications/
directory. Just copy the .desktop
launcher from there to your desktop.
Also you should be able to find the executable for the application in the /snap/bin/
directory. So if you want to manually create the .desktop
launcher in your desktop, then you can use /snap/bin/<application>
(e.g. /snap/bin/firefox
) as the command. You can find the <application>
part by running
snap list
Alternatively, you can use snap run <application>
as the command (and of course, also to run the application from Terminal).
As you have mentioned that you installed the application from snap and it can be found in 'Show Applications', the .desktop
launcher for the application should be found in the /var/lib/snapd/desktop/applications/
directory. Just copy the .desktop
launcher from there to your desktop.
Also you should be able to find the executable for the application in the /snap/bin/
directory. So if you want to manually create the .desktop
launcher in your desktop, then you can use /snap/bin/<application>
(e.g. /snap/bin/firefox
) as the command. You can find the <application>
part by running
snap list
Alternatively, you can use snap run <application>
as the command (and of course, also to run the application from Terminal).
edited Jan 27 at 13:13
answered Jan 27 at 13:08
pomskypomsky
32.8k11103135
32.8k11103135
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1113266%2fhow-can-i-find-the-command-to-be-used-in-a-desktop-icon-that-will-launch-a-snap%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
You need to clarify which one you want - open the
.desktop
file from terminal, how to create a shortcut for snap, or how to place it onto desktop - because these are all separate issues and the post is considered too broad, and might be closed. I can give a hint on the first one : opening.desktop
from terminal can be done either viagtk-launch
or python script(askubuntu.com/a/239883/295286).– Sergiy Kolodyazhnyy
Jan 27 at 12:52
@sergiy I don't think it's too broad. As I understood OP just wants to create a launcher for a snap application in desktop. They toyed with a couple of ideas: (1) copying the launcher from system, but they failed as it's not there in
/usr/share/applications
(since it's a snap application), and (2) they tried to create a launcher by hand usinggnome-desktop-item-edit
, and again they failed as they didn't know what was to be used in the 'command' box.– pomsky
Jan 27 at 13:27