Page 1 of 1

[Ubuntu 11.10+] Open-with entries (once and for all!)

Posted: Thu Mar 08, 2012 6:55 am
by Lovechild
In the future, this may be fixed if the developers of the respective software are pushed hard enough. If this problem has been resolved, then this information is no longer relevant and can safely be ignored.

I found it! The fix for GNOME 3's open with dialog!

I learned something brilliant today. And I am going to obsolete the first two posts I made about this ever since figuring it out.

The reason Love doesn't show up ANYWHERE in "Open with" Is because the %U entry isn't in the desktop files stored in /usr/share/applications. Copy the following; and paste in a terminal; I uploaded the modified files just for you folk.

Clarification: The reason Love (unstable) doesn't show up as a listed application is because %U isn't amended to love.desktop's Exec line. This modification can be done by hand or the first wget in the terminal command can be used to do it without having to bother going into gedit as root.

This assumes you also have love-unstable installed. If not, then the original love installation already sets this stuff up by default so no need to follow this guide. But the command below will allow them to be listed as selectable programs in the Open With dialog.

sudo wget http://ompldr.org/vY3l4Mw -O /usr/share/applications/love.desktop && sudo wget http://ompldr.org/vY3l4NA -O /usr/share/applications/love-unstable.desktop && nautilus -q

When finished, right-click on a .love file and set which version of love to use as default! If not, then log out, and log back in.
5f12H.png
5f12H.png (45.88 KiB) Viewed 320 times

Re: [Ubuntu 11.10+] Open-with entries (once and for all!)

Posted: Thu Mar 08, 2012 7:24 am
by bartbes
Do note that the love-unstable builds explicitly lack any kind of integration, exactly because it's not supposed to destroy your stable install, I'll make sure I'll add it to the stable .desktop, though.

Re: [Ubuntu 11.10+] Open-with entries (once and for all!)

Posted: Thu Mar 08, 2012 8:37 am
by Lovechild
Well, see, it doesn't. They both come up as two separate entities, and all the %U in the executable line is telling GNOME is to list this program. I don't know what it explicitly means, but I have seen it in multiple desktop files for Ubuntu so it must be there for good reason. All I know is that it means to list the item.

Both files can safely co-exist with love stable being the superior option. Nothing will get "Destroyed" or altered beyond repair like my kludgey solutions earlier. Which by the way if someone actually did follow the steps to replace /etc/alternatives/love and /usr/bin/love from my first post, then the solution is to delete them and reinstall love stable so dpkg isn't being a dick.

EDIT: I see the confusion. I set unstable as default. For someone doing this to their default install this will not set any default program, just list them so that they can both be switched around. This also adds them into the right-click menu so that makes my second posting earlier totally obsolete. The screenshot shows that after the proscribed modifications, one CAN set unstable as default.

Re: [Ubuntu 11.10+] Open-with entries (once and for all!)

Posted: Thu Mar 08, 2012 9:41 am
by T-Bone
Totally works. Awesomesauce!

Re: [Ubuntu 11.10+] Open-with entries (once and for all!)

Posted: Thu Mar 08, 2012 5:11 pm
by bartbes
The %U is a replacement pattern for a URI. As for love-unstable lacking integration, it is a packaging error that it actually shipped a menu entry, it wasn't supposed to.

Re: [Ubuntu 11.10+] Open-with entries (once and for all!)

Posted: Fri Mar 09, 2012 12:05 pm
by Lovechild
T-Bone wrote:Totally works. Awesomesauce!
Would I ever post something that didn't?