I created a bash script using kdialog (and it runs on Kubuntu 12.04). The GUI is used for every user interaction (after the first one). However, the script still has to be launched from the terminal and the terminal is still visible even though the user never needs to read terminal output or enter anything into the terminal. Is there a simple way to go to the next step and make my bash script look 100% like a KDE Gui application?
From the initial answers by slm and Ilya Ananyev below, I see that making a .desktop file can accomplish this. That's pretty amazing to me and it is the kind of simple answer I was looking for. (I wanted a task I can complete on my lunch hour and take my bash script the rest of the way toward looking like a real GUI app.) The .desktop file may be the right answer for other readers of this question too.
However, in my specific case, the script is an installer script. So I find myself in a Catch-22. How do I install the .desktop file to launch my installer without the user having to first run another installer for the .desktop file?
Furthermore, in my case, the script is used by end users who are not computer literate. The end users purchase a computer with Linux preinstalled at my recommendation. My goal is to let them install my software without going to the terminal at all. (Most likely they have never seen a command prompt before -- some of them don't even know how to use a mouse yet!)
So, it appears, my solution requires some magical way to get the .desktop file installed so that the user can then click it to launch my installer script.
In summary, my main requirements are:
- a way to launch the script without showing the terminal. A .desktop file will accomplish this.
- a way to keep the terminal hidden during execution (as I rely entirely on kdialog). A .desktop file will accomplish this with
- optionally, a secure way for the user to enter their sudo password. I know about the kdialog password entry dialog, but the usage examples I've seen are not secure. kdesudo may be a solution but it reprompts for the password many times, ignoring the usual/default sudo timeout of X minutes. So it isn't working for me atm.
- simple enough to implement on my lunch hour. A .desktop file will accomplish this.
- utilizes my existing bash script with kdialog. A .desktop file will accomplish this.
- doesn't require the user to undertake additional setup steps before they can run my script. It turns out that a KDE user can click a .desktop file which resides at any location. So my users can download the .desktop file into their ~/Downloads folder and launch it from there.