Category Archives: Uncategorized

Debian/Ubuntu Gnome: Restoring Nautilus as default folder viewer opener

UPDATE 2016-10-21: Consider the newer article on the same topic, which uses xdg-mime.


So, you installed Thunar, PCManFM, Dolphin or Konqueror and now when you doubleclick on a folder on your Gnome desktop (techically, nautilus desktop) or choose a folder in your Gnome panel, you don’t get Nautilus? For all files you can choose the default program to open with, but not so with folder?

Honestly, I don’t know what smartass from Gnome team thought it’s a good idea to honor, occasionally, setting set through external file that specifies which program to use for opening folders … yet to provide no way to change this through GUI. Especially when you already support same thing for all other files!

So let’s change the default folder handler manually!

This problem occured to me a lot of times by now. Solution is quite simple and completely nonintuitive.

Key file is

/usr/share/applications/mimeinfo.cache

This file is one source of information for which program to use to open a specific file type. File types are designated by their mime type. Folders are internally listed as “x-directory/normal” and “inode/directory“. From my experience the latter one is actually being used.

So let’s edit this file. Edit /usr/share/applications/mimeinfo.cache as root. Now, find the line which starts with “inode/directory“. In that line you’ll find “nautilus-folder-handler.desktop;“. Together with the semicolon, move it to be the LAST entry in the line.

Example!

Original line:

inode/directory=pcmanfm.desktop;Thunar-folder-handler.desktop;pcmanfm-find.desktop;pcmanfm-folder-handler.desktop;nautilus-folder-handler.desktop;kde4-dolphin.desktop;kde4-cervisia.desktop;kde4-kfmclient_dir.desktop;kde4-kdesvn.desktop;

Edited line:

inode/directory=pcmanfm.desktop;Thunar-folder-handler.desktop;pcmanfm-find.desktop;pcmanfm-folder-handler.desktop;kde4-dolphin.desktop;kde4-cervisia.desktop;kde4-kfmclient_dir.desktop;kde4-kdesvn.desktop;nautilus-folder-handler.desktop;

I’d now recommend that you restart nautilus. Easiest way is logging out and logging back in.Or run “killall nautilus” from shell; this should shut down nautilus, but the session manager should restart it immediately.

Hope this helps. Questions and comments welcome.

Chronicles of Irredente book I, Out from Edom


Out from Edom is an excellent book by J. Patrick Sutton. By profession a lawyer, he wrote such an excellent sci-fi book that I thought he was a professional writer.

I’ve accidentally stumbled upon the book on an e-book reading site, where the author uploaded first 31 chapters of the book. What to say except – it intrigued me enough to attempt to contact mr. Sutton via email on information how to buy the full book since it is no longer available on Amazon (updated midnight May 28th: Kindle version is available). I didn’t expect a response; what I got was an explanation that the book is currently undergoing a rewrite and full version of previous revision of novel. (Of course, I won’t be sharing it — a promise is a promise is a promise.)

So a few words about the novel, while trying to avoid spoilers. The Irredente is a futuristic society which maintains purity of body, along with a religion. I enjoyed making parallels with regimes from our past, I enjoyed discovering how the author created a new variant of the well-known regimes that caused WWII, I enjoyed the original sci-fi setting…

Or, even better way to put it: Take Asimov’s Foundation/Empire series and a description of a futuristic galactic empire. Now, forget about the empire and add fascist-republican-theocratic regime (I can’t tell if it’s also democratic or not.) Now, throw in some Star Trek/Star Wars/Battlestar Galactica and see it all merge into a new kind of sci-fi social study.

One of the best and most innovative features of this book are what I’d call “future histories”. That means, at the beginning of many chapters, there is a historical overview of some events that happened in the Irredente’s era. So you’re reading this book in book’s past… about events that happen in book’s present… with occasional jump in perspective to book’s future! It’s something similar to those pieces in Asimov’s Foundation that he called Encyclopedia Galactica. Except even better: you actually feel the blur that passage of time has caused. You feel how the historians are guessing about the events and situation in Irredente. That’s nothing to say about the Great Scribe, Asimov: unless you see how masterfully Sutton has written these intros, there will be nothing wrong with Encyclopedia Galactica intros. And there really is nothing wrong; it’s just that Irredente‘s intros are somewhat bettter.

Sadly, in the revision the book is currently undergoing, they might get scrapped, or get considerably shortened. Ah well.

That’s all I can say about this great book without revealing too much stuff you’ll enjoy discovering on your own. I’m very, very happy I discovered it, and can’t wait for the chance to purchase the rest of the saga as soon as it’s released. Sadly, it won’t be soon, since even the first book is undergoing revisions. Still, it’s no excuse for you not to read what’s out there, and to wait for the second revision of Book I, as well as the remaining books.

In the meantime, this blog post will have to serve to convey my astonishment with the book, my astonishment with the speed of response of the author, and with his magical gift in form of a PDF file. Thanks, mr Sutton, and may the book be a success it deserves to be!

And finally, a small but memorable quote from one of the non-historical, “religious” intros (yes, not all are “future history”):

Every question is a ghost; every answer a chimera. But believe in your feelings, for there is your truth, And be reassured: ‘at length the truth will out.’

GLDM – login manager based on SDL, OpenGL and whatever else

I’ve started writing some code today for GLDM. It’s something I’ve wanted to do for many months now, and well, I feel like I gotta start.

See, GDM and KDM … they’re beautiful pieces of code, I’m sure. But I just don’t feel like studying them. And yet, I want a nice graphical login. I want framework that’ll allow me to design whatever interface I want.

Y’know, because after Compiz, Metacity ain’t smooth enough. Same about GDM and KDM.

Since I’m too lazy to actually take time to look for one such, I’ve decided to take these ideas whirling in my head and scrap something up. Who knows, maybe it turns up popular. If you’re interested in some basic code, I applied for Sourceforge project today and it was already approved. So hop on here: http://sf.net/projects/gldm and tell me if you want to work on something around GLDM. I promise I won’t reject proposals… at least those I like 😉

Edited October 7th 2010.

Some preview videos:

September 19th 2009: Luna Lunatic

November 27th 2010: Luna

Star Trek XI

Watched the movie yesterday. Loved it, except for:

  • shaky camera. I actually felt nauseaus after watching the movie.
  • black hole range. A planet is being swallowed by a black hole, and we happily watch it go from a nearby world. The planet appears larger than Earth’s Moon on the sky.
  • Nero the action Hero. You’ll know what I mean. Boy, when he jumps, he knows where to land!
  • stardates. Apparently, JJ doesn’t appreciate all the little things that aretightly knit into the concept of a stardate. Instead, stardate is just an Earth year. I remember 2233 and 2386 being mentioned. And 2386 shouldn’t be 100+ years in the future; dates should be around 50000 or more.
There’s a few more things I find flawed, but I can’t remember them, and even if I could you’d be thankful for less spoilers. Less spoilers – more fun, in case of this movie.

SSH server owners, beware

In case you haven’t noticed yet, your machine may be under attacks from botnets. Go check your /var/log/auth.log (at least under Debian) and see for yourself. Botnets are attempting to crack your passwords using brute-force.

Recommended strategies:
  • Change port. I’ve picked 2022.
  • Disable password logins. Use only authentication using secure keys. Too much of a hassle for me, especially on a server I share with others, since we’d have to carry our key files around.

Backspace on Firefox on Ubuntu and Iceweasel on Debian

A friend pointed this out to me:
http://kb.mozillazine.org/Browser.backspace_action

In short, if you’re a GNU/Linux user of Firefox (e.g. Firefox on Ubuntu and Iceweasel on Debian) you may want to get backspace to actually go back one page, like many browsers do (did?):

  1. In addressbar, type about:config
  2. If asked, confirm you want to change settings
  3. In search, type browser.backspace_action
  4. Set the value of browser.backspace_action to 0 (that is zero, not letter O) Zero is Windows default and makes pressing backspace go back in history; One is old Linux default and scrolls page up; Two is new Linux default and, like any other integer, simply unmaps the backspace key.

Now, enjoy pressing backspace to go back!

Image source