Running a script from the KDE desktop

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Thumpdog

Running a script from the KDE desktop

Post by Thumpdog »

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.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
wlake

Re: Running a script from the KDE desktop

Post by wlake »

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
Thumpdog

Re: Running a script from the KDE desktop

Post by Thumpdog »

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], 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.
wlake

Re: Running a script from the KDE desktop

Post by wlake »

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
Locked

Return to “Software & Applications”