File association query

Alex Schuster wonko at wonkology.org
Tue Jul 17 10:54:28 BST 2012


Renaud (Ron) Olgiati writes:

> Next, in Konqueror, I have right-clicked on a *.mid file, gone to Open
> With, put in the name of my script (called, imaginatively mis2mp3  ;-3)
> and selected Run in Terminal, Do Not Close... and Remember
> Association...
> 
> The script runs in a Konsole window when I click on a .mid in Konqueror
> file BUT the Konsole window close when the script exits.

This is working for me. On KDE 4.8.4 and I think also before.

> How can I get to remain open ?

Maybe it works when you do it like this, which also provides more
flexibility:

Right-click on the file -> settings -> spanner icon, then add an
application to the list at the bottom. There you put the name of your
script as before, but you do not need to enable the terminal.

When that application was added, click the edit button. Now you can
specify more detailed stuff. Go to the 'program' tab, click the 'advanced
settings' button. Here, you can specify to open in a terminal, and to let
the terminal stay open after the program ended. I'd also disable the
startup notification.

If that doesn't help, you probably need a workaround like Björn
suggested. Maybe with an option to your script, so it wouldn't also wait
when you run it directly from the terminal.

WaitKey=
while getopts "w" opt
do
	case $opt in
	w ) WaitKey=true ;;
	esac
done
shift $((OPTIND-1))

[your mis2mp3 script]

[[ $WaitKey ]] && read -n 1 -s -p "Press key to exit "

	Wonko
___________________________________________________
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.




More information about the kde mailing list