Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
What desktop environment are you in? I don't think you can run a shell script from the GUI - you have to either open a terminal window and drag-and-drop the shell script into it OR create a shortcut to the shell script and in the options specify 'run in terminal'.
Just create a shortcut to it (a 'Link to Application') on your desktop or create an entry in the menus for it. Making sure to enable the 'Run in Terminal' option.
I hope this is considered related to this problem.
I wanted either a Panel icon to click on to play a .wav sound file, or a Desktop icon to do the same thing, preferably a Panel icon. I wanted the sound file to play in the background, without opening a terminal. Click the icon, hear the sound, that's it, no terminal window or program window to close.
This solution solved both.
I placed my sound.wav file in "me" /home directory (/home/me) so it was in the path.
Using "gedit" I made the following simple bash shell script named: "sound.sh"
#!/bin/bash
clear
/home/me
play sound.wav
This file (sound.sh) was then placed in the directory /home/me. "play" is a linux program, I suppose furnished either with bash or the system somehow. "play" satisfies playing the sound file in the background, rather than opening Real Player, Banshee, or another program.
The sound.wav file was opened for "Properties", and under "Open With" the "Add" button was clicked and "Use a custom command"(option at bottom) was used to add "play" to the list. "play" was then selected via the radio button in the "Open With" dialog box of Properties.
I took an instrument "image.gif" file and used Gimp to convert in to a "image.png" file, then saved the new "image.png" in the "me" directory.
Use "su" to be as root and copy the "image.png" to the /opt/gnome/share/pixmaps directory.
To put it all together, right click on a space in the Panel. Click on "Add to Panel", click on "Custom Application Launcher", give the launcher a name (Bells), browse for the "Command:" (/home/me/sound.sh). Finally, assign an "Icon:" to the script from the selections offered (/opt/gnome/share/pixmaps).
This allowed playing the sound.wav with one click on the panel "Bells" image.png icon.
By right clicking on the desktop you can also create a launcher for the desktop, where on my system it would have taken 2 clicks to play the sound file in the background. Lazy me opted for the one click panel approach.
Thanks to all those who have offered assistance to me here, and I hope this is some bit of a payback.
I'm using Suse Linux Enterprise Desktop 10 on a Dell Optiplex GX260.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.