How to create a menu item in KDE that executes a terminal command?
I have been trying to accomplish this task for years and every time I try it, I fail miserably and simply give up completely after Googling it and trying for hours. This time though, I decided to seek help from you!
Logically speaking, It should be a very straightforward simple task as follows:
Step 1: Right-click on the menu button, then go to "Edit Applications".
Step 2: Click on "Add new item", assign a menu entry name then create your launcher or command.
No matter how many variations of commands I try, it is never working out. I tried to launch the Konsole terminal then execute the command, but the Konsole is not holding still and closing automatically even after issuing the right flag to keep it running.
konsole -e anaconda-navigator --noclose
Specifying the command directly also does not work out and simply renders nothing on the screen.
anaconda-navigator
I wonder why it has to be very hard like that. Your help will be greatly appreciated!
My System Information - For Reference:
command-line kubuntu 17.10 kde anaconda
add a comment |
I have been trying to accomplish this task for years and every time I try it, I fail miserably and simply give up completely after Googling it and trying for hours. This time though, I decided to seek help from you!
Logically speaking, It should be a very straightforward simple task as follows:
Step 1: Right-click on the menu button, then go to "Edit Applications".
Step 2: Click on "Add new item", assign a menu entry name then create your launcher or command.
No matter how many variations of commands I try, it is never working out. I tried to launch the Konsole terminal then execute the command, but the Konsole is not holding still and closing automatically even after issuing the right flag to keep it running.
konsole -e anaconda-navigator --noclose
Specifying the command directly also does not work out and simply renders nothing on the screen.
anaconda-navigator
I wonder why it has to be very hard like that. Your help will be greatly appreciated!
My System Information - For Reference:
command-line kubuntu 17.10 kde anaconda
add a comment |
I have been trying to accomplish this task for years and every time I try it, I fail miserably and simply give up completely after Googling it and trying for hours. This time though, I decided to seek help from you!
Logically speaking, It should be a very straightforward simple task as follows:
Step 1: Right-click on the menu button, then go to "Edit Applications".
Step 2: Click on "Add new item", assign a menu entry name then create your launcher or command.
No matter how many variations of commands I try, it is never working out. I tried to launch the Konsole terminal then execute the command, but the Konsole is not holding still and closing automatically even after issuing the right flag to keep it running.
konsole -e anaconda-navigator --noclose
Specifying the command directly also does not work out and simply renders nothing on the screen.
anaconda-navigator
I wonder why it has to be very hard like that. Your help will be greatly appreciated!
My System Information - For Reference:
command-line kubuntu 17.10 kde anaconda
I have been trying to accomplish this task for years and every time I try it, I fail miserably and simply give up completely after Googling it and trying for hours. This time though, I decided to seek help from you!
Logically speaking, It should be a very straightforward simple task as follows:
Step 1: Right-click on the menu button, then go to "Edit Applications".
Step 2: Click on "Add new item", assign a menu entry name then create your launcher or command.
No matter how many variations of commands I try, it is never working out. I tried to launch the Konsole terminal then execute the command, but the Konsole is not holding still and closing automatically even after issuing the right flag to keep it running.
konsole -e anaconda-navigator --noclose
Specifying the command directly also does not work out and simply renders nothing on the screen.
anaconda-navigator
I wonder why it has to be very hard like that. Your help will be greatly appreciated!
My System Information - For Reference:
command-line kubuntu 17.10 kde anaconda
command-line kubuntu 17.10 kde anaconda
asked Apr 14 '18 at 3:58
KenKen
6761823
6761823
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
According to the --help
option the -e
should be the last part of the line:
-e <cmd> Command to execute. This option will catch all following arguments, so use it as the last option.
So, to run the command to keep it open, it would then be:
konsole --noclose -e anaconda-navigator
Hope this helps!
Thank you for your reply. The terminal window is opening but it is closing instantly after a second. It is still not working out for me even if the -e flag is at the end.
– Ken
Apr 14 '18 at 5:31
@Ken Can you try it with another command possibly? All the tests I have ran at it seem to keep the terminal open even if it is a command that doesn't exist.konsole --noclose -e ls
returns a listing of my folder but keeps the window open.
– Terrance
Apr 14 '18 at 5:35
All types of commands are not working out for me. The commands are just working if I am plugging them manually into the terminal.
– Ken
Apr 14 '18 at 5:44
@Ken, please show us a command line withkonsole --noclose -e some-command
, that does not work for you, and we can debug it in our systems. - An alternative might be to [install if necessary and] use oldxterm
like so,xterm -fa default -fs 12 -hold -e lsb_release -a &
– sudodus
Apr 14 '18 at 6:51
add a comment |
Here is how I was able to do it, using the example of command
fortune | cowsay
Open a text editor and type
#!/bin/bash
fortune | cowsay
Save file as
cow.sh
( or any name you wish and note location path)
Open KDE Menu Editor ( note to use proper path to your cow.sh )
Command:
konsole --noclose -e /home/username/Documents/cow.sh
click save and test it!
New contributor
add a comment |
anaconda-navigator should run without any additional parameters.
Ensure the path to anaconda is in ~/.bachrc
i.e.
export PATH="/home/<user>/path/to/anaconda3/bin:$PATH"
Ensure conda is updated: (this next command will fail, but it will give you the correct command for updating your system.)
conda update
Otherwise, a plasma config file might require deletion/recreation. Try renaming one or both of the following files (Warning: Desktop settings will be set back to default!):
- ~/.config/plasmashellrc
- ~/.config/plasma-org.kde.plasma.desktop-appletsrc
Then restart plasma:
killall plasmashell && plasmashell &
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%2f1024849%2fhow-to-create-a-menu-item-in-kde-that-executes-a-terminal-command%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
According to the --help
option the -e
should be the last part of the line:
-e <cmd> Command to execute. This option will catch all following arguments, so use it as the last option.
So, to run the command to keep it open, it would then be:
konsole --noclose -e anaconda-navigator
Hope this helps!
Thank you for your reply. The terminal window is opening but it is closing instantly after a second. It is still not working out for me even if the -e flag is at the end.
– Ken
Apr 14 '18 at 5:31
@Ken Can you try it with another command possibly? All the tests I have ran at it seem to keep the terminal open even if it is a command that doesn't exist.konsole --noclose -e ls
returns a listing of my folder but keeps the window open.
– Terrance
Apr 14 '18 at 5:35
All types of commands are not working out for me. The commands are just working if I am plugging them manually into the terminal.
– Ken
Apr 14 '18 at 5:44
@Ken, please show us a command line withkonsole --noclose -e some-command
, that does not work for you, and we can debug it in our systems. - An alternative might be to [install if necessary and] use oldxterm
like so,xterm -fa default -fs 12 -hold -e lsb_release -a &
– sudodus
Apr 14 '18 at 6:51
add a comment |
According to the --help
option the -e
should be the last part of the line:
-e <cmd> Command to execute. This option will catch all following arguments, so use it as the last option.
So, to run the command to keep it open, it would then be:
konsole --noclose -e anaconda-navigator
Hope this helps!
Thank you for your reply. The terminal window is opening but it is closing instantly after a second. It is still not working out for me even if the -e flag is at the end.
– Ken
Apr 14 '18 at 5:31
@Ken Can you try it with another command possibly? All the tests I have ran at it seem to keep the terminal open even if it is a command that doesn't exist.konsole --noclose -e ls
returns a listing of my folder but keeps the window open.
– Terrance
Apr 14 '18 at 5:35
All types of commands are not working out for me. The commands are just working if I am plugging them manually into the terminal.
– Ken
Apr 14 '18 at 5:44
@Ken, please show us a command line withkonsole --noclose -e some-command
, that does not work for you, and we can debug it in our systems. - An alternative might be to [install if necessary and] use oldxterm
like so,xterm -fa default -fs 12 -hold -e lsb_release -a &
– sudodus
Apr 14 '18 at 6:51
add a comment |
According to the --help
option the -e
should be the last part of the line:
-e <cmd> Command to execute. This option will catch all following arguments, so use it as the last option.
So, to run the command to keep it open, it would then be:
konsole --noclose -e anaconda-navigator
Hope this helps!
According to the --help
option the -e
should be the last part of the line:
-e <cmd> Command to execute. This option will catch all following arguments, so use it as the last option.
So, to run the command to keep it open, it would then be:
konsole --noclose -e anaconda-navigator
Hope this helps!
answered Apr 14 '18 at 4:58
TerranceTerrance
20k34898
20k34898
Thank you for your reply. The terminal window is opening but it is closing instantly after a second. It is still not working out for me even if the -e flag is at the end.
– Ken
Apr 14 '18 at 5:31
@Ken Can you try it with another command possibly? All the tests I have ran at it seem to keep the terminal open even if it is a command that doesn't exist.konsole --noclose -e ls
returns a listing of my folder but keeps the window open.
– Terrance
Apr 14 '18 at 5:35
All types of commands are not working out for me. The commands are just working if I am plugging them manually into the terminal.
– Ken
Apr 14 '18 at 5:44
@Ken, please show us a command line withkonsole --noclose -e some-command
, that does not work for you, and we can debug it in our systems. - An alternative might be to [install if necessary and] use oldxterm
like so,xterm -fa default -fs 12 -hold -e lsb_release -a &
– sudodus
Apr 14 '18 at 6:51
add a comment |
Thank you for your reply. The terminal window is opening but it is closing instantly after a second. It is still not working out for me even if the -e flag is at the end.
– Ken
Apr 14 '18 at 5:31
@Ken Can you try it with another command possibly? All the tests I have ran at it seem to keep the terminal open even if it is a command that doesn't exist.konsole --noclose -e ls
returns a listing of my folder but keeps the window open.
– Terrance
Apr 14 '18 at 5:35
All types of commands are not working out for me. The commands are just working if I am plugging them manually into the terminal.
– Ken
Apr 14 '18 at 5:44
@Ken, please show us a command line withkonsole --noclose -e some-command
, that does not work for you, and we can debug it in our systems. - An alternative might be to [install if necessary and] use oldxterm
like so,xterm -fa default -fs 12 -hold -e lsb_release -a &
– sudodus
Apr 14 '18 at 6:51
Thank you for your reply. The terminal window is opening but it is closing instantly after a second. It is still not working out for me even if the -e flag is at the end.
– Ken
Apr 14 '18 at 5:31
Thank you for your reply. The terminal window is opening but it is closing instantly after a second. It is still not working out for me even if the -e flag is at the end.
– Ken
Apr 14 '18 at 5:31
@Ken Can you try it with another command possibly? All the tests I have ran at it seem to keep the terminal open even if it is a command that doesn't exist.
konsole --noclose -e ls
returns a listing of my folder but keeps the window open.– Terrance
Apr 14 '18 at 5:35
@Ken Can you try it with another command possibly? All the tests I have ran at it seem to keep the terminal open even if it is a command that doesn't exist.
konsole --noclose -e ls
returns a listing of my folder but keeps the window open.– Terrance
Apr 14 '18 at 5:35
All types of commands are not working out for me. The commands are just working if I am plugging them manually into the terminal.
– Ken
Apr 14 '18 at 5:44
All types of commands are not working out for me. The commands are just working if I am plugging them manually into the terminal.
– Ken
Apr 14 '18 at 5:44
@Ken, please show us a command line with
konsole --noclose -e some-command
, that does not work for you, and we can debug it in our systems. - An alternative might be to [install if necessary and] use old xterm
like so, xterm -fa default -fs 12 -hold -e lsb_release -a &
– sudodus
Apr 14 '18 at 6:51
@Ken, please show us a command line with
konsole --noclose -e some-command
, that does not work for you, and we can debug it in our systems. - An alternative might be to [install if necessary and] use old xterm
like so, xterm -fa default -fs 12 -hold -e lsb_release -a &
– sudodus
Apr 14 '18 at 6:51
add a comment |
Here is how I was able to do it, using the example of command
fortune | cowsay
Open a text editor and type
#!/bin/bash
fortune | cowsay
Save file as
cow.sh
( or any name you wish and note location path)
Open KDE Menu Editor ( note to use proper path to your cow.sh )
Command:
konsole --noclose -e /home/username/Documents/cow.sh
click save and test it!
New contributor
add a comment |
Here is how I was able to do it, using the example of command
fortune | cowsay
Open a text editor and type
#!/bin/bash
fortune | cowsay
Save file as
cow.sh
( or any name you wish and note location path)
Open KDE Menu Editor ( note to use proper path to your cow.sh )
Command:
konsole --noclose -e /home/username/Documents/cow.sh
click save and test it!
New contributor
add a comment |
Here is how I was able to do it, using the example of command
fortune | cowsay
Open a text editor and type
#!/bin/bash
fortune | cowsay
Save file as
cow.sh
( or any name you wish and note location path)
Open KDE Menu Editor ( note to use proper path to your cow.sh )
Command:
konsole --noclose -e /home/username/Documents/cow.sh
click save and test it!
New contributor
Here is how I was able to do it, using the example of command
fortune | cowsay
Open a text editor and type
#!/bin/bash
fortune | cowsay
Save file as
cow.sh
( or any name you wish and note location path)
Open KDE Menu Editor ( note to use proper path to your cow.sh )
Command:
konsole --noclose -e /home/username/Documents/cow.sh
click save and test it!
New contributor
edited 3 hours ago
zx485
1,47131115
1,47131115
New contributor
answered 4 hours ago
velidvelid
111
111
New contributor
New contributor
add a comment |
add a comment |
anaconda-navigator should run without any additional parameters.
Ensure the path to anaconda is in ~/.bachrc
i.e.
export PATH="/home/<user>/path/to/anaconda3/bin:$PATH"
Ensure conda is updated: (this next command will fail, but it will give you the correct command for updating your system.)
conda update
Otherwise, a plasma config file might require deletion/recreation. Try renaming one or both of the following files (Warning: Desktop settings will be set back to default!):
- ~/.config/plasmashellrc
- ~/.config/plasma-org.kde.plasma.desktop-appletsrc
Then restart plasma:
killall plasmashell && plasmashell &
add a comment |
anaconda-navigator should run without any additional parameters.
Ensure the path to anaconda is in ~/.bachrc
i.e.
export PATH="/home/<user>/path/to/anaconda3/bin:$PATH"
Ensure conda is updated: (this next command will fail, but it will give you the correct command for updating your system.)
conda update
Otherwise, a plasma config file might require deletion/recreation. Try renaming one or both of the following files (Warning: Desktop settings will be set back to default!):
- ~/.config/plasmashellrc
- ~/.config/plasma-org.kde.plasma.desktop-appletsrc
Then restart plasma:
killall plasmashell && plasmashell &
add a comment |
anaconda-navigator should run without any additional parameters.
Ensure the path to anaconda is in ~/.bachrc
i.e.
export PATH="/home/<user>/path/to/anaconda3/bin:$PATH"
Ensure conda is updated: (this next command will fail, but it will give you the correct command for updating your system.)
conda update
Otherwise, a plasma config file might require deletion/recreation. Try renaming one or both of the following files (Warning: Desktop settings will be set back to default!):
- ~/.config/plasmashellrc
- ~/.config/plasma-org.kde.plasma.desktop-appletsrc
Then restart plasma:
killall plasmashell && plasmashell &
anaconda-navigator should run without any additional parameters.
Ensure the path to anaconda is in ~/.bachrc
i.e.
export PATH="/home/<user>/path/to/anaconda3/bin:$PATH"
Ensure conda is updated: (this next command will fail, but it will give you the correct command for updating your system.)
conda update
Otherwise, a plasma config file might require deletion/recreation. Try renaming one or both of the following files (Warning: Desktop settings will be set back to default!):
- ~/.config/plasmashellrc
- ~/.config/plasma-org.kde.plasma.desktop-appletsrc
Then restart plasma:
killall plasmashell && plasmashell &
answered Apr 14 '18 at 5:47
TheCummuterTheCummuter
362
362
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%2f1024849%2fhow-to-create-a-menu-item-in-kde-that-executes-a-terminal-command%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