How to run a command in a snap package
I have read some tutorials about Snapcraft and snappy and I am really excited about it.
I am using 16.04 and used snap find
to find and install the ubuntu-calculator-app
snap. But I don't know how to start it.
It is neither in my Dash (Unity 7) nor in my path (using zsh)
Also, I followed the instructions in this blog post
To create a links snap and install it. But, again, I don't know how to start the app.
Thanks for your help
ubuntu-core 16.04 calculator snap
add a comment |
I have read some tutorials about Snapcraft and snappy and I am really excited about it.
I am using 16.04 and used snap find
to find and install the ubuntu-calculator-app
snap. But I don't know how to start it.
It is neither in my Dash (Unity 7) nor in my path (using zsh)
Also, I followed the instructions in this blog post
To create a links snap and install it. But, again, I don't know how to start the app.
Thanks for your help
ubuntu-core 16.04 calculator snap
add a comment |
I have read some tutorials about Snapcraft and snappy and I am really excited about it.
I am using 16.04 and used snap find
to find and install the ubuntu-calculator-app
snap. But I don't know how to start it.
It is neither in my Dash (Unity 7) nor in my path (using zsh)
Also, I followed the instructions in this blog post
To create a links snap and install it. But, again, I don't know how to start the app.
Thanks for your help
ubuntu-core 16.04 calculator snap
I have read some tutorials about Snapcraft and snappy and I am really excited about it.
I am using 16.04 and used snap find
to find and install the ubuntu-calculator-app
snap. But I don't know how to start it.
It is neither in my Dash (Unity 7) nor in my path (using zsh)
Also, I followed the instructions in this blog post
To create a links snap and install it. But, again, I don't know how to start the app.
Thanks for your help
ubuntu-core 16.04 calculator snap
ubuntu-core 16.04 calculator snap
edited Apr 21 '16 at 13:06
David Planella
11.4k662123
11.4k662123
asked Apr 20 '16 at 15:09
Alejandro VeraAlejandro Vera
1,28221218
1,28221218
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
Just log out and log back in. If you are upgrading from an earlier version of 16.04 development release you will not have /snap/bin
in your PATH
environment variable.
Great. If you can point me where in the documentation is that path it would be great.
– Alejandro Vera
Apr 20 '16 at 16:51
1
appendPATH=$PATH:/snap/bin
to end of~/.bashrc
file.
– noobninja
Nov 5 '16 at 6:00
Logging out and in didn't do it for me. I had to manually add /snap/bin to my PATH in my .bashrc file.
– Marnix A. van Ammers
Sep 14 '17 at 20:17
add a comment |
Essentially, as Zygmunt was saying. For completeness, the other alternative is to run the app from the command line:
ubuntu-calculator-app.calculator
Check out the documentation on how to get started with snaps on classic Ubuntu.
add a comment |
Snaps can be run with snap run, so for the example in the question snap run ubuntu-calculator-app
. But that is annoying so it is better to add snaps to your path.
Snaps are not in your path by default on 16.04. They are stored in /snap/bin. Since snaps are a system-wide installation it would probably be best to add this directory to your system-wide path. This is done via /etc/environment. The following can break stuff, so you should backup the file before editing it sudo cp /etc/environment /etc/environment.bak
. Use an editor with sudo to open /etc/environment
, and add :/snap/bin
to the end of the PATH entry. Make sure you restart your terminal or source /etc/environment
If that still doesn't work, you need to make sure your user .bashrc file has added /etc/environment to its sources. grep "source /etc/environment" ~/.bashrc
will echo that line if it exists. If it doesn't echo "source /etc/evnironment" >> ~/.bashrc
will add it.
If it is a gui you can add it to your dash. See https://askubuntu.com/a/112812/846378.
New contributor
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%2f759557%2fhow-to-run-a-command-in-a-snap-package%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Just log out and log back in. If you are upgrading from an earlier version of 16.04 development release you will not have /snap/bin
in your PATH
environment variable.
Great. If you can point me where in the documentation is that path it would be great.
– Alejandro Vera
Apr 20 '16 at 16:51
1
appendPATH=$PATH:/snap/bin
to end of~/.bashrc
file.
– noobninja
Nov 5 '16 at 6:00
Logging out and in didn't do it for me. I had to manually add /snap/bin to my PATH in my .bashrc file.
– Marnix A. van Ammers
Sep 14 '17 at 20:17
add a comment |
Just log out and log back in. If you are upgrading from an earlier version of 16.04 development release you will not have /snap/bin
in your PATH
environment variable.
Great. If you can point me where in the documentation is that path it would be great.
– Alejandro Vera
Apr 20 '16 at 16:51
1
appendPATH=$PATH:/snap/bin
to end of~/.bashrc
file.
– noobninja
Nov 5 '16 at 6:00
Logging out and in didn't do it for me. I had to manually add /snap/bin to my PATH in my .bashrc file.
– Marnix A. van Ammers
Sep 14 '17 at 20:17
add a comment |
Just log out and log back in. If you are upgrading from an earlier version of 16.04 development release you will not have /snap/bin
in your PATH
environment variable.
Just log out and log back in. If you are upgrading from an earlier version of 16.04 development release you will not have /snap/bin
in your PATH
environment variable.
edited Apr 25 '16 at 11:08
David Planella
11.4k662123
11.4k662123
answered Apr 20 '16 at 15:38
Zygmunt KrynickiZygmunt Krynicki
1,611157
1,611157
Great. If you can point me where in the documentation is that path it would be great.
– Alejandro Vera
Apr 20 '16 at 16:51
1
appendPATH=$PATH:/snap/bin
to end of~/.bashrc
file.
– noobninja
Nov 5 '16 at 6:00
Logging out and in didn't do it for me. I had to manually add /snap/bin to my PATH in my .bashrc file.
– Marnix A. van Ammers
Sep 14 '17 at 20:17
add a comment |
Great. If you can point me where in the documentation is that path it would be great.
– Alejandro Vera
Apr 20 '16 at 16:51
1
appendPATH=$PATH:/snap/bin
to end of~/.bashrc
file.
– noobninja
Nov 5 '16 at 6:00
Logging out and in didn't do it for me. I had to manually add /snap/bin to my PATH in my .bashrc file.
– Marnix A. van Ammers
Sep 14 '17 at 20:17
Great. If you can point me where in the documentation is that path it would be great.
– Alejandro Vera
Apr 20 '16 at 16:51
Great. If you can point me where in the documentation is that path it would be great.
– Alejandro Vera
Apr 20 '16 at 16:51
1
1
append
PATH=$PATH:/snap/bin
to end of ~/.bashrc
file.– noobninja
Nov 5 '16 at 6:00
append
PATH=$PATH:/snap/bin
to end of ~/.bashrc
file.– noobninja
Nov 5 '16 at 6:00
Logging out and in didn't do it for me. I had to manually add /snap/bin to my PATH in my .bashrc file.
– Marnix A. van Ammers
Sep 14 '17 at 20:17
Logging out and in didn't do it for me. I had to manually add /snap/bin to my PATH in my .bashrc file.
– Marnix A. van Ammers
Sep 14 '17 at 20:17
add a comment |
Essentially, as Zygmunt was saying. For completeness, the other alternative is to run the app from the command line:
ubuntu-calculator-app.calculator
Check out the documentation on how to get started with snaps on classic Ubuntu.
add a comment |
Essentially, as Zygmunt was saying. For completeness, the other alternative is to run the app from the command line:
ubuntu-calculator-app.calculator
Check out the documentation on how to get started with snaps on classic Ubuntu.
add a comment |
Essentially, as Zygmunt was saying. For completeness, the other alternative is to run the app from the command line:
ubuntu-calculator-app.calculator
Check out the documentation on how to get started with snaps on classic Ubuntu.
Essentially, as Zygmunt was saying. For completeness, the other alternative is to run the app from the command line:
ubuntu-calculator-app.calculator
Check out the documentation on how to get started with snaps on classic Ubuntu.
edited Apr 22 '16 at 6:45
answered Apr 20 '16 at 16:22
David PlanellaDavid Planella
11.4k662123
11.4k662123
add a comment |
add a comment |
Snaps can be run with snap run, so for the example in the question snap run ubuntu-calculator-app
. But that is annoying so it is better to add snaps to your path.
Snaps are not in your path by default on 16.04. They are stored in /snap/bin. Since snaps are a system-wide installation it would probably be best to add this directory to your system-wide path. This is done via /etc/environment. The following can break stuff, so you should backup the file before editing it sudo cp /etc/environment /etc/environment.bak
. Use an editor with sudo to open /etc/environment
, and add :/snap/bin
to the end of the PATH entry. Make sure you restart your terminal or source /etc/environment
If that still doesn't work, you need to make sure your user .bashrc file has added /etc/environment to its sources. grep "source /etc/environment" ~/.bashrc
will echo that line if it exists. If it doesn't echo "source /etc/evnironment" >> ~/.bashrc
will add it.
If it is a gui you can add it to your dash. See https://askubuntu.com/a/112812/846378.
New contributor
add a comment |
Snaps can be run with snap run, so for the example in the question snap run ubuntu-calculator-app
. But that is annoying so it is better to add snaps to your path.
Snaps are not in your path by default on 16.04. They are stored in /snap/bin. Since snaps are a system-wide installation it would probably be best to add this directory to your system-wide path. This is done via /etc/environment. The following can break stuff, so you should backup the file before editing it sudo cp /etc/environment /etc/environment.bak
. Use an editor with sudo to open /etc/environment
, and add :/snap/bin
to the end of the PATH entry. Make sure you restart your terminal or source /etc/environment
If that still doesn't work, you need to make sure your user .bashrc file has added /etc/environment to its sources. grep "source /etc/environment" ~/.bashrc
will echo that line if it exists. If it doesn't echo "source /etc/evnironment" >> ~/.bashrc
will add it.
If it is a gui you can add it to your dash. See https://askubuntu.com/a/112812/846378.
New contributor
add a comment |
Snaps can be run with snap run, so for the example in the question snap run ubuntu-calculator-app
. But that is annoying so it is better to add snaps to your path.
Snaps are not in your path by default on 16.04. They are stored in /snap/bin. Since snaps are a system-wide installation it would probably be best to add this directory to your system-wide path. This is done via /etc/environment. The following can break stuff, so you should backup the file before editing it sudo cp /etc/environment /etc/environment.bak
. Use an editor with sudo to open /etc/environment
, and add :/snap/bin
to the end of the PATH entry. Make sure you restart your terminal or source /etc/environment
If that still doesn't work, you need to make sure your user .bashrc file has added /etc/environment to its sources. grep "source /etc/environment" ~/.bashrc
will echo that line if it exists. If it doesn't echo "source /etc/evnironment" >> ~/.bashrc
will add it.
If it is a gui you can add it to your dash. See https://askubuntu.com/a/112812/846378.
New contributor
Snaps can be run with snap run, so for the example in the question snap run ubuntu-calculator-app
. But that is annoying so it is better to add snaps to your path.
Snaps are not in your path by default on 16.04. They are stored in /snap/bin. Since snaps are a system-wide installation it would probably be best to add this directory to your system-wide path. This is done via /etc/environment. The following can break stuff, so you should backup the file before editing it sudo cp /etc/environment /etc/environment.bak
. Use an editor with sudo to open /etc/environment
, and add :/snap/bin
to the end of the PATH entry. Make sure you restart your terminal or source /etc/environment
If that still doesn't work, you need to make sure your user .bashrc file has added /etc/environment to its sources. grep "source /etc/environment" ~/.bashrc
will echo that line if it exists. If it doesn't echo "source /etc/evnironment" >> ~/.bashrc
will add it.
If it is a gui you can add it to your dash. See https://askubuntu.com/a/112812/846378.
New contributor
edited 3 mins ago
New contributor
answered 12 mins ago
David WarnkeDavid Warnke
11
11
New contributor
New contributor
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%2f759557%2fhow-to-run-a-command-in-a-snap-package%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