Skip to content

Instantly share code, notes, and snippets.

@thedod
Created March 18, 2012 08:16
Show Gist options
  • Save thedod/2069900 to your computer and use it in GitHub Desktop.
Save thedod/2069900 to your computer and use it in GitHub Desktop.
Occupy Ubuntu Unity (regain control over "open with")

Ubuntu used to be a respectable linux distro, but Unity is their attempt to join the coming war on general computation and turn my personal computer into an impersonal "appliance". I could theoretically use gnome shell, but due to developer politics (and I don't care who's to blame here), the thing is buggy on Ubuntu.

One of the things that are crucial to my freedom as the person who actually paid for this hardware is to associate shell scripts like ~/bin/my-very-own-script to various mime-types as open with (running woofs in a terminal is a good example).

When you go to open with tab at properties, you can no longer specify a path. It's all WYGIWYD (what you get is what you deserve) now. Like Apple and politics :)

Hell, even windows lets you do that (at least used to. I'm too lazy to find a friend with windows to check whether it's still true).

The trick is to create (for each script you want to use) a .desktop file at ~/.local/share/applications.

Once you save it, you'll be able to see its Name= at the open with tab of the properties dialog:

Power to the people doesn't come with a standard plug

It's quite easy (once you know how to say "pretty please" in the right dialect :) )

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Exec='/home/me/bin/my-very-own-script' %f
Name=Do what I want
Comment=Whatever man
NoDisplay=true
@thedod
Copy link
Author

thedod commented Mar 8, 2013

As for alt+f2, I recommend to apt-get install gmrun and then make alt+f2 its shortcut. I've tried various alternatives, this is the least bothersome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment