GUI wrapper for timidity -ig with Firefox

Andre Mangan andremangan at gmail.com
Fri Sep 7 02:51:43 BST 2007


Thank you, Peter.

I have the gtk interface installed as well as (-ia and -ik), so there is no
problem there.  It is the gtk interface that displays normally when playing
a midi file from my home folder.  Also, if accessing a midi file from the
web via Firefox, the first time it is accessed, there is no GUI but the
second and subsequent times there is a GUI and the file can be terminated.

I will try your suggestion but need clarification on how to find the
"helper" files in Firefox.

Cheers,
Andre



On 07/09/07, Peter Garrett <peter.garrett at optusnet.com.au> wrote:
>
> On Thu, Sep 06, 2007 at 04:53:51PM +1000, Andre Mangan wrote:
> > Hello to all Ubuntu users,
> >
> > For general information:
> >
> > After much research, testing and fiddling about, I have added System
> Monitor
> > to my top panel and in order to turn off any midi file accessed via
> Firefox
> > that loads without the TiMidity GUI, I can access the icon for the
> System
> > Monitor with ease and elect to stop (or kill) the process (yes, I know
> that
> > I could do it via the command line too).
> >
> > I knew it was going to be easy, it just took a while to get there..
>
>
> Apologies if this turns out to be a duplicate post - I seem to be having
> some email issues here with Sylpheed. Trying again with Mutt...
>
> I thought this was an interesting problem, so I tried a few things...
>
> I use the gtk interface for timidity . which is called as
>
> timidity -ig
>
> If you don't have it, install " timidity-interfaces-extra' from the
> universe repo.
>
> Now, this was a bit of an adventure *cough* ...
>
> I tried calling timidity from a little wrapper script thus:
>
> #!/bin/bash
> timidity -ig "$@"
>
> This was ... interesting...  It not only refused to run, it shot the CPU
> through the roof so badly that the whole system was wedged - I couldn't
> even ssh in to kill it.
>
> After several attempts at variations, I hit on the problem, which is that
> you need the * full path to timidity * for this to work in a script ,,,
> First time I've come across something that requires the full path
> hard-coded like this, but there you are...
>
> So, here is how to get Firefox to give you a gui when you play a midi on a
> website: put this somewhere ( doesn't matter much where, I suggest ~/bin)
>
> #---------------------------------------------------------------------#
> #!/bin/bash
>
> # Wrapper for timidity with firefox  - $HOME/bin/timidity-wrapper
> # Uses the gtk interface from timidity-interfaces-extra
> # You can use the athena version with -ia
> # You *must* give the full /usr/bin/timidity path as below, or it will
> # freeze everything ( I'm not kidding - I found out the hard way)
>
> /usr/bin/timidity -ig  "$@"
>
> #---------------------------------------------------------------------#
>
> I put this in /home/peter/bin/timidity-wrapper , and gave that path for
> timidity to Firefox in the dialogue that pops up in FF for "helper" apps .
> You might need to alter yours if you have set "Always do... "
> Of course the "script" needs to be executable
>
> chmod u+x ~/bin/timidity-wrapper    ( if in ~/bin , of course )
>
> This appears to work.
>
> Tested at
>
> http://www.trachtman.org/ragtime/
>
> I think this is not a Firefox bug - I think it's a problem with timidity's
> way of finding the PATH, or perhaps the way it is called ( don't know).
>
> Perhaps the galeon devs etc. call it the right way ? (In which case I
> suppose it could be seen as a Firefox bug, although hard coding paths
> doesn't seem like something you should need to do ? ) .
>
> Peter
>
>
> --
> ubuntu-au mailing list
> ubuntu-au at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-au
>



-- 
andremangan at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/ubuntu-au/attachments/20070907/d02197e4/attachment.htm 


More information about the ubuntu-au mailing list