OpenSUSE Linux Rants

OpenSUSE Linux Tips, tricks, how-tos, opinions, and news

My Resume  -  My LinkedIn Profile

April 12, 2007

A totally useless trick in openSUSE Linux

by @ 11:57 pm. Filed under General Linux, General SUSE, SUSE Tips & Tricks

While I am sure that today could have been much worse, I’m not quite clear on how.

First, I found that my little jaunt to the Salt Flats completely destroyed my car’s engine, and I am now having to junk it and start from scratch. So that pretty much totally sucks.

Even worse than that, though, is that my wife called me at work, saying that she was at home and unable to locate our 2 1/2 year old daughter. I spent the next 15 minutes making the 25-minute drive to my house. My mind was racing and I was quite interested in getting home as soon as the laws of physics (not necessarily those pertaining to the speed limit) would allow. We were getting ready to call the Sheriff and get them to come help us find her. I thought of Elizabeth Smart and all the other crazy stuff that happens. That really, really sucked.

About a minute and a half away from my house, my wife called me back and said that they had found her, half-way across the neighborhood, playing with someone’s little bicycle.

Man, when I got home, all I could do was just pick her up and hug her for like 4 hours.

On days like this, I get really thankful for things like eyesight, having both legs, hearing, and a house (and one car, at least). Tell you what, things can always always be worse no matter how bad they get.

Alrighty then. On to Linux stuff.

One of the most annoying things about Linux is mime types for files. I can sit there in Gimp and make a graphic project and then save it out with the proprietary XCF extension that no other application on the entire system will ever use in the entire foreseeable future of the Universe. Yet, for some reason unknown to mankind, when I double-click on that .XCF file, the operating system asks me what to open it with. GIMP, stupid! And this happens with .m3u files in XMMS. .dia files open in what? Not DIA, but ARK. And then there’s the .kino files that open in what? Not KINO, but Kate, the text editor (yes, I know they’re text files). For some reason, I guess I just expect that, when I create the blasted file with a given application, that somewhere, something should know that I want to open that file again with that same application, should I just double-click on the file.

So I was playing around with my file-types, opening .jpgs in klipper, .mp3s in my RSS feed reader, and .odt files with Solitaire, when a silly thought dawned upon me. In KDE, when you right-click a file, and then select Open With, a little fly-out menu appears. You will see a couple of options in this menu. If none of them are the right one, you can click on Other. Another dialog box opens, laughing at you, daring you to attempt to locate the intended application yourself, challenging you to a battle of wits. At that point, you need to know the precise location of the program to open it with.

Except that you don’t. You only need to know the actual name of the binary.

For example, if I have a .kino file that I would like to open with KINO and not Kate, I can put some magical fairy dust into that box, making it find the app itself. All you have to do is put in the following:

`which kino`

Now, those are not quotes, they are backticks. The backtick is the key immediately to the left of your ‘1’ (number one) key at the top of your keyboard.

When the system evaluates an expression like this, it just executes what is between the backticks as though it were a shell command, and then replaces the whole thing with whatever the command returns. Thus, `which kino` evaluates to /opt/gnome/bin/kino, which is then accepted by the system as the proper location of the kino binary.

Just don’t check the box at the bottom that says “Remember application association for this type of file.” It puts weird things into the filetypes table, such that if you ever try this trick again, it will attempt to open it with that same program again. In this case, kino. On the other hand, you have different fingers. Just kidding. On the other hand, if you don’t check the box, it will forget what application to open the file with. Because of this, some of the usefulness is diminished.

So another thing you can do is to pop open a terminal window and type in “which ” followed by the application you are looking for. In this case, it would be “which kino”. Note that this is without the quotes. Then press ENTER. It will output the location of the application. Then, you can just copy and paste this output into that window that is asking you what to open the file with.

Man, I am really horrible with dangling prepositions.

That reminds me of a joke:

TEXAN: “Where are you from?” HARVARD GRAD: “Harvard — where we do not end our sentences with prepositions.” TEXAN: “OK — where are you from, stupid jerk?”

Sorry, the ADD and friends are really going full force today.

Have a good one.

2 Responses to “A totally useless trick in openSUSE Linux”

  1. lefty.crupps Says:

    I cannot claim to be an expert, but in my KDE settings, at least since KDE 3.5 was released but I think also even in 3.4, I usually right-click and select ‘Open With…’ which then brings me to a *list* of my installed applications. It looks identical to my KMenu, for the most part. I drill down into Multimedia, select Kino, click ‘Remember this application’ (if I so choose, which i often do), and never have another concern with the mimetype.

    Only in Gnome applications, and Firefox with uses Gnome settings (and god I wish it wouldn’t), do I ever have to find out where an application executable is stored (hint: most user-space apps are stored in /usr/bin). For example, in Firefox, if I try to open an unknown file type, I select the Open With… [Browse]; then a Gnomeish file manager (limited in its usefulness, of course) opens for me to find the application; and then have to click Filesystem and then I have to type in the full path. Talk about a hassle.

    I am very excited for the day when the Portland Project fixes these differences in the KDE/Gnome worlds and I can use Gnome applications without their inherent headaches and slimmed-down usefulness.

  2. andrew Says:

    Thanks man!!! I have long searched for this solution and to just find it on your page (that I check regularly) was truly awesome! Personally I use Azureus because I’ve been able to get it to work better than KTorrent (with SuSE firewall and IP Forwarding on my router), but I was never able to change the file type association. Thanks again!

OpenSUSE Linux Rants
Official OpenSUSE Linux Site

internal links:


SUSE Resources

search blog:


April 2018
« Feb    

63 queries. 0.752 seconds