Can I link a terminal command to an icon in the Panel?
Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Can I link a terminal command to an icon in the Panel?
I have a reboot command:
sudo grub-reboot 4 && sudo reboot?
I would like to create a icon on the Panel that I can click to lunch the command. Just adding it as is to "Command" box did not work. I tried with "Application" and "Application in terminal."
Yes, the launcher appears to be having a problem with the multiple commands, even if separated by a &&.
In that case, create a .sh script somewhere in your home directory with the command in it, make that script file executable, and then have the launcher command as:
I have the file winboot.sh in what I think is /home/james/AA My Scripts/winboot.sh as that is what it shows in the properties for the file. In the Command box I have:
mate-terminal -x /home/james/AA My Scripts/winboot.sh
I have the file winboot.sh in what I think is /home/james/AA My Scripts/winboot.sh as that is what it shows in the properties for the file. In the Command box I have:
mate-terminal -x /home/james/AA My Scripts/winboot.sh
It says no such file or directory.
Very probably due to your use of spaces in a directory name. When the command you've given is parsed, it will try to execute /home/james/AA. Either escape the spaces in the command or don't use them in the directory name.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.