Tux Guitar


  Forums : Help
Subject How to set a run action and an icon to .tg files?

Author Message
Post: May 25th 2009 at 12:05 AM

Hi all, I've just installed tuxguitar-1.1-linux-x86 on Puppy Linux, and I'm trying to set a run action on .tg files. At the moment I can only open them via tuxguitar, but I want to be able to open tuxguitar via them.

The tarball that I downloaded was precompiled, and everything went okay, I've extracted everything to /usr/share/. I then had to add that folder to my PATH, so I could open Tux from anywhere, because the only way of opening tux is via the 'tuxguitar' script from the command line. If I click on the scipt nothing happens and I've tried using this to open .tg files but again nothing happens.

How do I get TuxGuitar to open with .tg files when I select them?

Back to Top
Post: May 26th 2009 at 1:39 PM


there are 2 things that you need.

* a .desktop entry in /usr/share/applications that says tuxguitar support the "audio/x-tuxguitar" mime type.

This is the used for debian package mantainer:

fix the paths to yours,
Replace to:

* Then you need, tell your desktop that ".tg" file format is a "audio/x-tuxguitar" mime type

Download this file:

add it in: /usr/share/mime/packages

Then you need to exec some commands to update the desktop cache.
(as root)
update-mime-database /usr/share/mime
update-desktop-database -q

At last, your desktop maybe need some command or restart to see the changes
as i'm not sure what desktop do you have, and what is your file manager.. just restart your PC...

You should see then, all .tg files as a "TuxGuitar File"
and you should have the option to open them with tuxguitar.

Back to Top
Post: May 28th 2009 at 2:40 PM

Thank you so much, you even explained what to do and what's happening when you do it. I was expecting "yeah, do this, this, and this, type this here, and that's it" but instead you've actually TAUGHT me the process and why, so I can now do it with other Apps too, thank you!

I'm using JWM as my window manager (sorry I was a bit newbish, and left that out). I've managed to create an entry in my Menu. My problem is that Puppy doesn't have update-mime-database or update-desktop-database, I got the files you mentioned from the source package which I've downloaded as well (I did actually want to install TuxGuitar from source but I realized the first package I downloaded was pre-compiled after I'd extracted it).

I put the .desktop in the right place and changed the Exec and Icon paths to match where they're located. But when it came to place tuxguitar.xml in /mime/packages, the directory wasn't there. So I put it in /mime/application which had all the .xml's for Puppy and that's when I found that Puppy doesn't have update-mime-database.

So I installed update-mime-database, but it disagrees with Puppy. After I installed it I put Puppy's .xml's back in application and tuxguitar.xml in the newly created packages directory. I ran the command update-mime-database and it wiped all of Puppy's .xml files. It also caused my window manager to act really strangely.

Puppy obviously handles these things differently, I think it has something to do with ROX, but I'm not sure. Anyway I'd backed up everything (I'm not silly), and everything's back to normal, I think, as long as I don't invoke that code. I'm guessing that update-mime-database creates scripts from the .xml and places them where they belong, which for Puppy is /root/Choices/MIME-types (root=home for Puppy). I've tried to find a way to update Puppy's mime database, but have come up short, the only way I can think of is writing the scripts myself and putting them where they belong.

Also the way you tell the desktop to recognise certain files is by creating a symlink in /root/.config/rox.sourceforge.net/OpenWith/ with the executable and with that tuxguitar script it doesn't work. This of course might be because I haven't updated the MIME-types yet, but even when I click on it, it won't open the other symlinks in there do.

I will keep digging, I don't really mind much because I always end up leaning so much, and I plan to build my own Linux system from scratch, so its all good, and again thank you for your help.

Back to Top
Post: May 28th 2009 at 3:05 PM

these mime things, are the standard from freedesktop.org..
i'm not really sure how to set it on puppy, without have it for test..
but on my system (debian) i can tell you that

this folder is "automatically generated" after execute update-mime-database..
if you open any .xml there, you can see the comment:
"Created automatically by update-mime-database. DO NOT EDIT!"

So every thing that you add there, may be removed when system automatically generate mime types.

now, if update-mime-database don't exists on pupy, try to find "what is the replace" for puppy (or for JWM )

What kind of packages uses puppy (e.g: deb, rpm, etc) ?
If you have a way to explore the content of any puppy package, and take a look to the "post install" actions,
( ofcourse, take a look to a package that have these mime types, such as gimp )
you can maybe find the command (if there is one) used for puppy, or the xml format, and when you should paste it.

>> for Puppy is /root/Choices/MIME-types (root=home for Puppy). ....
"/root" is the root user home. ( as yours is /home/username )
it's not from puppy, it's from all GNU/linux itself ( and allmost unix based systems )
you don't should add or do things there

Back to Top
Post: May 29th 2009 at 8:00 PM

Hi, Puppy can use quite a few packages including; Debian and Slackware, but the native packages are .pets or .pups, these were the .xml's that got replaced when 'application' was created by update-mime-database. The problem is that for Puppy, that's where they belong. Here's what the .pet one looks like;

PET archive

it says it was created by update-mime-database, but when I tried that command before I installed it, I got "command not found," and when I try it now it works and creates 'application' but it doesn't recreate Puppy's xml's, so they get lost.

>> for Puppy is /root/Choices/MIME-types (root=home for Puppy). ....
"/root" is the root user home. ( as yours is /home/username )
it's not from puppy, it's from all GNU/linux itself ( and allmost unix based systems )
you don't should add or do things there

No, no, Puppy is a bit different, you don't have any additional users, just root, and our 'root' is '/' (that's where we've got; bin, boot, etc), but we don't have a home folder with our user name its called 'root.' I know this is weird, I've been used to Fedora where its normal and you have to use su - (which we don't have to do with Puppy).

There are scripts inside 'MIME-types' that look like this one "audio_x-mp3" which I think is what I'm after and here's what they look like inside;

#! /bin/sh
exec defaultmediaplayer "$1"

Which is just a script to open that mime-type with 'defaultmediaplayer' I'm hoping that I can create one for "audio/x-tuxguitar" something like this;

#! /bin/sh
exec /usr/share/tuxguitar-1.1-linux-x86/tuxguitar "$1"

I'm going to try this out, but I'm just thinking whether I should put tuxguitar.xml in application with Puppy's xml's or should I create a packages directory and put it there? If I do create 'packages' then I'll probably remove update-mime-database because I don't want it interfering with how Puppy works.

Thank you for your help, I'm so close, it is a bit frustrating at times with Puppy being a bit different, but I learn a little bit extra than I normally would.

Back to Top
Post: May 29th 2009 at 8:06 PM

I've just seen that you can't see what the .pet looked like (its taken the code and replaced it with "PET archive")

I'll try again;

?xml version="1.0" encoding="utf-8"?>
mime-type xmlns="http://www.freedesktop.org/standards/shared-mime-info" type="application/pet">

PET archive

Back to Top
Post: May 29th 2009 at 8:35 PM

Don't worry for the XML, i receibe plain text main when you post on the forum. so i can see it.

add tuxguitar.xml in application folder will no work.
just because the XML generated is different.
the tuxguitar.xml file i sent you, is the source file.
after exec update-blabla... it generates the other .xml
so if you are going to add it manually.. you need figure out the format of it. (and if is there any other thing needed )

the recommended way is do it as puppy does.. ( ofcourse i don't have idea how is it )

>>> No, no, Puppy is a bit different, you don't have any additional users, just root, and our 'root' is '/' .....

mmm no no.. wait, now i understand.
puppy is just a distribution ( GNU/Linux is the OS )
the differences beetween distributions, are these default configurations, package manager, etc..

As i read from your text, the problem is that "you don't have a normal user"

"/" folder is the default root ( mount point ) for all distributions
"/root" is the root (user) home folder.

But, you don't have "/home/xxx" because you didn't created users.
i don't know if puppy installer don't give you the option to create users ( or maybe a mistake during the install ).

but it's not different than fedora or debian..
if you don't have an user, you can allways create one.

"su" command, isn't also really to have root access
su ( switch user instead of super user as many people think ) is used to change users.
when you don't specify the username, as default "root" is the name.
So if you are logged in as "pepe" and you want to loggin as "carlos"
you do
~$ su carlos
if you want to be root, you can do
~$ su root
~$ su

The conclusion is that you are logged as a root now. and you are doing all as root. this is why you don't need exec "su" to do root things.
But it was never recommended work as root.. i'm not sure if beleive that puppy wants that or if it was a mistake during the install. it's a security thing.

Exec this on a terminal:
~$ cd ~
~$ pwd

isn't /root the result ???
if yes, definitly "root" is the root home dir as in all distributions.

I really suggest you create a normal user account.
and loggin as root only when you need configure your system.

Back to Top
Post: May 29th 2009 at 9:07 PM

Your quite right,/root is the result I get, but this is what's said on the Puppy Linux website about root;

"In contrast to most other Linux distributions Puppy does not differentiate between a normal user and the administrator root. Rather you always works as root, which simplifies the use of Puppy. The question arises if it is unsecure to work as root and to have full access to all files, programs and data.
For the normal home user, there are no special risks compared to other Linux distributions. On the contrary, Puppy is probably a bit safer than many other distributions.
First let's analyze the risk of a distribution, which differentiates between user and root. The user works as a normal user, who does not have privileges to write/delete programs and system files. An intruder can compromise only the user’s files. However the intruder has an entrance to the system and can try to gain root-privileges (find the password file, use exploits to transfer malware code and so on), and afterwards try to get access to all files.
As long as Puppy starts from CD-ROM via the ...pfix=ram...bootcode, the program-files and system-files are secure. Everytime you reboot any malware programs, which an intruder could have left, are gone. Of course your own files stored into the pup_save.3fs-file or on a harddrive can be compromised by an intruder, but this can happen to the normal user of another Linux-distribution as well. If you want to be safe from intrusion, store checksums of all files and backup your files regulary".

So its Puppy's plan is for people to be running as root. I get what your saying about the other .xml I need to find a way to make it, I have another install of Puppy that I plan to overwrite with Fedora 11, now that I have more ram, so I might use that to try make the other .xml, because it doesn't matter if it messes things up. I can then place the files where they belong on Puppy and all should be good. Fingers crossed, (I have tried to find out how Puppy handles mimes, but I can't find anything on it.

Back to Top
Post: May 29th 2009 at 9:18 PM

Ok ok, but you never told me that you was under a booteable CD :) Ofcouse, under a non-writable disk, you can't have system problems.

about the mime...
what about if on /usr/share/mime/applications
( it was on /usr/share/mime/audio automatically generated on my system )
if you create the new file:

as you have this .pet..

and you put these values:
[comment] TuxGuitar File [/comment]

( ofcourse replace [] to xml chars. )

try that, and reboot your system..
in theory, thats all you need..
but i still not sure if you need exec something to tell the X desktop that it was changed.. or if it's automatic.

Back to Top
Post: May 29th 2009 at 9:34 PM

No I've got a full install, but they make out like its okay to run as root, I'm guessing I should be worried. I do have adduser so I might be using that pretty soon!

Okay when I typed update-mime-database an audio directory was created, but stupidly I deleted everything when I restored Puppy. So what I'm going to do is, run that code again get all the files I need, and if I don't refresh the menus then things won't go weird. I should then be able to put things back to the way they were and I should have all the right files, I just need to work out where in Puppy these should go.

I'll post when I've found how this works for Puppy.

Back to Top
Post: May 29th 2009 at 10:53 PM

Success! I finally have it working.

I ran that code and it made three .xml files in the audio folder, I then put things back the way they were and put the newly created .xml's with Puppy's other .xml's in application.

I then had to go into MIME-types and create "application_tuxguitar" which is a script like this;

#! /bin/sh
exec /usr/share/tuxguitar-1.1-linux-x86/tuxguitar "$1"

I then had to create an "open with" so I could associate file types with Tuxguitar. With Puppy your supposed to create a symlink with the executable in /root/.config/rox.sourceforge.net/OpenWith/ but if you try that with tuxguitar it doesn't work. Instead you need to create a symlink to the folder that contains tuxguitar, then if you right-click and choose open with, highlight the folder and it'll open out and you can select tuxguitar from there (this could be something to do with the Java).

I'm not sure if ALL the above steps are necessary, I have a feeling that if I'd found out about having to use the folder for the symlink instead of the executable, it might have worked sooner.

Anyway its all good and everything works perfectly I can open .tg; .ptb; .gp so I'm happy. Again thank you for your help, I used to use Tux Guitar all the time when I had my Fedora box, and Puppy has no tab editor.

Kind regards

Back to Top
Post: May 29th 2009 at 11:17 PM


The Open With... should be solved with the .desktop file
did you put it on /usr/share/applications ??
and does it have the mime type info ??

Back to Top
Post: May 30th 2009 at 12:06 AM

Yep, its in the right place and has the right info, I think it was the .desktop that gave me the entry in Puppy's Menu, that was one of the first things that worked. I don't mind too much about having to go to the extra menu, because I can set files to just open when I click on them, then I don't have to use the menu at all :)

Back to Top
Post: May 30th 2009 at 12:17 AM

yes the .desktop file gives you the menu item ( it's the category )
and on MimeType, there are the mimetypes that it can open.
make sure that the mime type you created, have the same name as the .desktop says.
in mine it is: audio/x-tuxguitar

and, the mime type is on
( it says type="audio/x-tuxguitar" )

What i mean is, if you configured "audio/tuxguitar" instead of "audio/x-tuxguitar"
the .desktop file will not match with the type..

to to be clear.. make sure that both have exactly same names.

It can also be a rox configuration thing.. i never used it.. so not sure how is it.
on mine ( i use Thunar ) i see the .tg files
"TuxGuitar File"
and if i make right click Open With TuxGuitar is the first option.

Back to Top
Post: Feb 22nd 2012 at 3:20 AM

LF-The christian shoes is an insanely popular brand. It is why many online retailers the famous genuine ugg boots and selling them at incredibly low prices. It has become a problem for Winter boots. These cheap Christian lacroix are made with synthetic materials. I recommend carries christian shoe in all sizes, they offer free shipping. womens edmonton ugg requires. Ugg boots do cost more, but they are of much higher quality. ugg boots still turn heads. If you are wearing Authentic Christian louboutin online.

Back to Top
Barbour Kids Jackets
Post: Feb 23rd 2012 at 2:12 AM

ZY-The quilted jackets barbour tough to choose in between ugg snow boots and Just UGG Women's short boots. barbour quilted jackets They are extremely comparable in construction and physical appearance but there are two barbour jacket I have determined among the two brand names of UGG Men's boots and barbour jackets for ladies.UGG Kid's boots look to have a thicker lining inside the barbour jackets than their counterpart so possibly will be a bit.They are also about womens barbour duffle more affordable generally .

Back to Top
Post: Mar 8th 2012 at 1:28 PM

Why do Goyard tote bags we go goyard bags to these goyard tote for sale lengths goyard tote replica for you? Simple. goyard handbags Over goyards the goyard tote replica past 15 goyard tote bags buy years we’goyard tote bags for sale ve seen goyard tote bags st louis changes goyard tote bags barneys in this goyard tote bags price industry goyard st louis tote replica that would goyard bags replica knock goyard bag online your goyard tote bags white socks goyard pairs off – both sac goyard good goyard barneys and bad. In goyard price our goyard online business, we goyard need to goyard tote be on goyard handbags online top of goyard bags online every goyard.com change Christian Louboutin replica out Fake christian Louboutin there to Faux Chrisitan Louboutin ensure Christian Louboutin replica boots our Replica christian Louboutin customers red bottom shoes are well Christian louboutin imitation taken knock off christian louboutin bootscare of christian louboutin replica handbags and christian louboutin boots 2011completely louboutin shoes satisfied. christian louboutin sale shoes That’s christian louboutin for less our shoes christian louboutin promise christian louboutin on sale to you – buy christian louboutin complete christian louboutin shoes cheap satisfaction christian louboutin discount shoes or your christian louboutin daffodile money back christian louboutin replica daffodile when you Designer handbagsbuy replica Replica Handbags watches.And Louis Vuitton replica for over Replica Bags 20 years Replica bags uk we’ve pioneered designer handbags purses unbelievable designer handbags for cheap advances in designer wholesale handbags an industry designer handbags discount that’s been designer handbags for sale tainted by designer handbag sale the phrase top designer handbags fake watches.Why best designer handbags do we say designer handbag online tainted? Because designer leather handbag the term fake designer bags for less almost always discount designer handbags outlet mean “junk.” And designer handbags discounted we never accept junk here.Rolex is a world famous Watch company, but not every one has got the money to buy Rolex watch, so for them there is the option of Rolex Watch Replicas. For buying Rolex Watch Replicas it is necessary to go to a good and reputed shop as they can offer such Rolex Watch Replicas that are quality wise sound.

Back to Top
Post: Apr 5th 2012 at 5:56 AM

Do you Know Gucci ? It is the symbol of high society and luxury life. All product printed GUCCI will be sold

with a very high price. I am love the gucci so much , and i used to buy it from
Gucci Purses On Sale store.

Back to Top
Discount Louboutins
Post: Apr 6th 2012 at 7:58 AM

Long before spiked heels with exotic names red bottom shoes became objects of desire, chicks have been cheap christian louboutin shoe-crazy. But recently, we got proof of exactly how crazy: While louboutins cheap sales of most things have plummeted thanks to the recession, Christian Louboutin Pumps have gone up compared to the same period last year. Trust science to have the Christian Louboutin Sandals: Turns out, we've always been wired for shoe lust, even when the going gets through http://www.cheaplouboutinredbottom.com/.

Back to Top
Post: May 14th 2012 at 3:54 AM

cheap jewelry, Shane Doan Jersey, Authentic Carlos Boozer Jersey, Throwback Heat Jerseys, cheap tiffany jewelry , nike nfl jerseys 2012 for sale, Brad Richards Jersey, Authentic Alonzo Mourning jersey, Henrik Lundqvist Jersey, Throwback Bulls Jerseys, Nike NFL Jerseys Wholesale, Dustin Brown Jersey, Authentic Joakim Noah Jersey, Authentic John Salmons Jersey, Authentic Dennis Rodman Jersey, Authentic LeBron James Jersey, Cheap Nike NFL Jerseys, Martin Brodeur Jersey, Wayne Gretzky Jersey, Drew Doughty Jersey, Authentic Michael Jordan Jersey, Ilya Kovalchuk Jersey, Authentic Mario Chalmers jersey, Nike NFL Jerseys Cheap, Ray Whitney Jersey, Sean Avery Jersey, Authentic Derrick Rose Jersey, number one wholesale, Ryan Callahan Jersey, Wholesale Nike NFL Jerseys, Zach Parise Jersey, china wholesale nike, Authentic Udonis Haslem jersey, Anze Kopitar Jersey, Authentic Scottie Pippen Jersey, Patrik Elias Jersey, Authentic Dwyane Wade Jersey, wholesale jerseys china, Authentic Luol Deng Jersey, Marc Staal Jersey, Authentic Chris Bosh Jersey, Nike NFL Jerseys 2012, wholesale jerseys china free shipping, Cheap NFL Jerseys

Back to Top