I'm not able to expose a script from within a snap
So I'm trying to learn how to create a snap package, and are using a simple python script as a base (https://gitlab.xirion.net/vroest/dice-roller/tree/master).
I have gotten snapcraft to work properly, and have installed the snap package but I'm not able to get the script to run from my terminal.
snap install --devmode --dangerous cli-diceroller_1.9_amd64.snap
I have followed the guide here: https://tutorials.ubuntu.com/tutorial/create-your-first-snap#3
Here is the yaml-file:
name: cli-diceroller
base: core18
version: '1.9'
summary: A python dice rolling application using standard dice notation
description: |
Syntax is: roll <dice_code>
Example: roll 2d8 + 6 + d8
Instead of a dice code you can also put "stats" or "dir" for a stats roll or direction roll respectively.
grade: devel
confinement: devmode
apps:
roll:
command: bin/roll
parts:
diceroller:
plugin: python
python-version: python3
source: https://gitlab.xirion.net/vroest/dice-roller.git
when i run this command, the script works as normal
/snap/cli-diceroller/x1/bin/roll
what am I missing?
snap
New contributor
add a comment |
So I'm trying to learn how to create a snap package, and are using a simple python script as a base (https://gitlab.xirion.net/vroest/dice-roller/tree/master).
I have gotten snapcraft to work properly, and have installed the snap package but I'm not able to get the script to run from my terminal.
snap install --devmode --dangerous cli-diceroller_1.9_amd64.snap
I have followed the guide here: https://tutorials.ubuntu.com/tutorial/create-your-first-snap#3
Here is the yaml-file:
name: cli-diceroller
base: core18
version: '1.9'
summary: A python dice rolling application using standard dice notation
description: |
Syntax is: roll <dice_code>
Example: roll 2d8 + 6 + d8
Instead of a dice code you can also put "stats" or "dir" for a stats roll or direction roll respectively.
grade: devel
confinement: devmode
apps:
roll:
command: bin/roll
parts:
diceroller:
plugin: python
python-version: python3
source: https://gitlab.xirion.net/vroest/dice-roller.git
when i run this command, the script works as normal
/snap/cli-diceroller/x1/bin/roll
what am I missing?
snap
New contributor
add a comment |
So I'm trying to learn how to create a snap package, and are using a simple python script as a base (https://gitlab.xirion.net/vroest/dice-roller/tree/master).
I have gotten snapcraft to work properly, and have installed the snap package but I'm not able to get the script to run from my terminal.
snap install --devmode --dangerous cli-diceroller_1.9_amd64.snap
I have followed the guide here: https://tutorials.ubuntu.com/tutorial/create-your-first-snap#3
Here is the yaml-file:
name: cli-diceroller
base: core18
version: '1.9'
summary: A python dice rolling application using standard dice notation
description: |
Syntax is: roll <dice_code>
Example: roll 2d8 + 6 + d8
Instead of a dice code you can also put "stats" or "dir" for a stats roll or direction roll respectively.
grade: devel
confinement: devmode
apps:
roll:
command: bin/roll
parts:
diceroller:
plugin: python
python-version: python3
source: https://gitlab.xirion.net/vroest/dice-roller.git
when i run this command, the script works as normal
/snap/cli-diceroller/x1/bin/roll
what am I missing?
snap
New contributor
So I'm trying to learn how to create a snap package, and are using a simple python script as a base (https://gitlab.xirion.net/vroest/dice-roller/tree/master).
I have gotten snapcraft to work properly, and have installed the snap package but I'm not able to get the script to run from my terminal.
snap install --devmode --dangerous cli-diceroller_1.9_amd64.snap
I have followed the guide here: https://tutorials.ubuntu.com/tutorial/create-your-first-snap#3
Here is the yaml-file:
name: cli-diceroller
base: core18
version: '1.9'
summary: A python dice rolling application using standard dice notation
description: |
Syntax is: roll <dice_code>
Example: roll 2d8 + 6 + d8
Instead of a dice code you can also put "stats" or "dir" for a stats roll or direction roll respectively.
grade: devel
confinement: devmode
apps:
roll:
command: bin/roll
parts:
diceroller:
plugin: python
python-version: python3
source: https://gitlab.xirion.net/vroest/dice-roller.git
when i run this command, the script works as normal
/snap/cli-diceroller/x1/bin/roll
what am I missing?
snap
snap
New contributor
New contributor
New contributor
asked yesterday
Sikander LhoteSikander Lhote
82
82
New contributor
New contributor
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
When the app name (roll
in this case) is different from the snap name (cli-diceroller
) the binary is installed as <snap-name>.<app-name>
to prevent namespace clashes:
$ cli-diceroller.roll
Syntax is: roll <dice_code>
Example: roll 2d8 + 6 + d8
Instead of a dice code you can also put "stats" or "dir" for a stats roll or direction roll respectively
If you rename your part to cli-diceroller
, the executable will be available under that name. (This is documented on the snapcraft.yaml reference.)
New contributor
ahh. i see. i missed that since it's not mentioned in the tutorials i found. i'll make sure to check the reference next time i don't understand something!
– Sikander Lhote
18 hours ago
I think that executable naming rule could be better explained, I'll report that to the documentation maintainers :)
– Claudio Matsuoka
15 hours ago
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
});
}
});
Sikander Lhote is a new contributor. Be nice, and check out our Code of Conduct.
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%2f1115834%2fim-not-able-to-expose-a-script-from-within-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
When the app name (roll
in this case) is different from the snap name (cli-diceroller
) the binary is installed as <snap-name>.<app-name>
to prevent namespace clashes:
$ cli-diceroller.roll
Syntax is: roll <dice_code>
Example: roll 2d8 + 6 + d8
Instead of a dice code you can also put "stats" or "dir" for a stats roll or direction roll respectively
If you rename your part to cli-diceroller
, the executable will be available under that name. (This is documented on the snapcraft.yaml reference.)
New contributor
ahh. i see. i missed that since it's not mentioned in the tutorials i found. i'll make sure to check the reference next time i don't understand something!
– Sikander Lhote
18 hours ago
I think that executable naming rule could be better explained, I'll report that to the documentation maintainers :)
– Claudio Matsuoka
15 hours ago
add a comment |
When the app name (roll
in this case) is different from the snap name (cli-diceroller
) the binary is installed as <snap-name>.<app-name>
to prevent namespace clashes:
$ cli-diceroller.roll
Syntax is: roll <dice_code>
Example: roll 2d8 + 6 + d8
Instead of a dice code you can also put "stats" or "dir" for a stats roll or direction roll respectively
If you rename your part to cli-diceroller
, the executable will be available under that name. (This is documented on the snapcraft.yaml reference.)
New contributor
ahh. i see. i missed that since it's not mentioned in the tutorials i found. i'll make sure to check the reference next time i don't understand something!
– Sikander Lhote
18 hours ago
I think that executable naming rule could be better explained, I'll report that to the documentation maintainers :)
– Claudio Matsuoka
15 hours ago
add a comment |
When the app name (roll
in this case) is different from the snap name (cli-diceroller
) the binary is installed as <snap-name>.<app-name>
to prevent namespace clashes:
$ cli-diceroller.roll
Syntax is: roll <dice_code>
Example: roll 2d8 + 6 + d8
Instead of a dice code you can also put "stats" or "dir" for a stats roll or direction roll respectively
If you rename your part to cli-diceroller
, the executable will be available under that name. (This is documented on the snapcraft.yaml reference.)
New contributor
When the app name (roll
in this case) is different from the snap name (cli-diceroller
) the binary is installed as <snap-name>.<app-name>
to prevent namespace clashes:
$ cli-diceroller.roll
Syntax is: roll <dice_code>
Example: roll 2d8 + 6 + d8
Instead of a dice code you can also put "stats" or "dir" for a stats roll or direction roll respectively
If you rename your part to cli-diceroller
, the executable will be available under that name. (This is documented on the snapcraft.yaml reference.)
New contributor
New contributor
answered 20 hours ago
Claudio MatsuokaClaudio Matsuoka
161
161
New contributor
New contributor
ahh. i see. i missed that since it's not mentioned in the tutorials i found. i'll make sure to check the reference next time i don't understand something!
– Sikander Lhote
18 hours ago
I think that executable naming rule could be better explained, I'll report that to the documentation maintainers :)
– Claudio Matsuoka
15 hours ago
add a comment |
ahh. i see. i missed that since it's not mentioned in the tutorials i found. i'll make sure to check the reference next time i don't understand something!
– Sikander Lhote
18 hours ago
I think that executable naming rule could be better explained, I'll report that to the documentation maintainers :)
– Claudio Matsuoka
15 hours ago
ahh. i see. i missed that since it's not mentioned in the tutorials i found. i'll make sure to check the reference next time i don't understand something!
– Sikander Lhote
18 hours ago
ahh. i see. i missed that since it's not mentioned in the tutorials i found. i'll make sure to check the reference next time i don't understand something!
– Sikander Lhote
18 hours ago
I think that executable naming rule could be better explained, I'll report that to the documentation maintainers :)
– Claudio Matsuoka
15 hours ago
I think that executable naming rule could be better explained, I'll report that to the documentation maintainers :)
– Claudio Matsuoka
15 hours ago
add a comment |
Sikander Lhote is a new contributor. Be nice, and check out our Code of Conduct.
Sikander Lhote is a new contributor. Be nice, and check out our Code of Conduct.
Sikander Lhote is a new contributor. Be nice, and check out our Code of Conduct.
Sikander Lhote is a new contributor. Be nice, and check out our Code of Conduct.
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%2f1115834%2fim-not-able-to-expose-a-script-from-within-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