Running a script from the KDE desktop

Forums for the KDE Edition
Forum rules
Before you post please read this

Running a script from the KDE desktop

Postby Thumpdog on Wed Oct 17, 2012 10:40 pm

I have a shell script that launches three files in one instance of Emacs. They're three home-office type files that I need to access several times a day.

I also have the Linux Mint 13 KDE edition, which I installed recently and am liking a lot.

In an ideal world, I'd be able to go Alt-F2, type in the name of the script, and have the three documents appear on the screen. However, bash today.sh fails silently, and tosay.sh displays the shell script itself in Emacs.

I can launch Konsole and type bash today.sh, but then I have to click the Konsole window closed. If I could alt-tab back to Konsole and type exit, that would be easier for me and less annoying, but Konsole doesn't return to a prompt after it executes the script.

If I have to use a mouse at all, I'd like to run the shell script from the menu, but the bash today.sh menu entry caused something to appear in the panel for a few seconds and then die, and a today.sh menu entry did nothing. Maybe I'm doing something wrong?

I thought maybe I could create a symlink to today.sh and move it to the panel, like in MATE, but if that is possible, I haven't figured it out. I have seen descriptions of ways to add a launcher to the taskbar by running a script in the startup menu, but that caused the desktop to freeze the two times I tried it, so it's not for me.

Any creative ideas will be appreciated.
Thumpdog
Level 1
Level 1
 
Posts: 15
Joined: Tue Nov 04, 2008 9:24 pm
Location: Southeastern Connecticut

Linux Mint is funded by ads and donations.
 

Re: Running a script from the KDE desktop

Postby wlake on Fri Oct 19, 2012 7:51 am

As far as Konsole goes. I think if you just hit Enter or Ctrl-C you will get the prompt. Also in System Settings -> Startup and Shutdown -> Autostart there is a place to add scripts and the drop down combo box allows you to specify when the script starts. Fair warning I myself have not used the script facility. I should add I am running KDE 4.9.2 with Mint 13 KDE.

Regards,
wlake
wlake
Level 2
Level 2
 
Posts: 61
Joined: Thu Jul 24, 2008 2:30 pm

Re: Running a script from the KDE desktop

Postby Thumpdog on Sun Oct 21, 2012 1:56 pm

Thanks for the ideas. I seem to be having trouble with the startup script facilities in KDE (not just in Linux Mint's KDE, either).

Anyway, on my 3rd or 4th try, I was able to make a new blank menu entry and put a command in the "Command" box, for instance:

emacs -fn "MattAntique BT-11" /home/thumpdog/Central/Today/aa_phonebook.org /home/thumpdog/Central/Today/aa_pw.org /home/thumpdog/Central/Today/aa_tasks.org

KDE helpfully found an unused letter to assign as a mnemonic, so I can go [Alt-F1], [b] to pull those three files up. I have no idea why my first couple of attempts didn't work. But as of now, it works just great.
Thumpdog
Level 1
Level 1
 
Posts: 15
Joined: Tue Nov 04, 2008 9:24 pm
Location: Southeastern Connecticut

Re: Running a script from the KDE desktop

Postby wlake on Sun Oct 21, 2012 4:33 pm

Well, if it is working for you then that's good.

I had thought you would probably put the name of an executable shell script file for both name and commad. I suppose that way you could have multiple commands. There is a script in my Mint 13 KDE with the name and command as "gtk2-default-theme.rc.sh" (without the quotes) but it is tagged as Pre-KDE startup. The file is located in /usr/share/mintkde-default-settings/.

Regards,
wlake
wlake
Level 2
Level 2
 
Posts: 61
Joined: Thu Jul 24, 2008 2:30 pm


Return to KDE

Who is online

Users browsing this forum: No registered users and 12 guests