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

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Lovechild
Prole
Posts: 9
Joined: Wed Mar 07, 2012 4:13 am

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

Post 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 208 times
Last edited by Lovechild on Fri Mar 09, 2012 12:00 pm, edited 2 times in total.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

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

Post 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.
Lovechild
Prole
Posts: 9
Joined: Wed Mar 07, 2012 4:13 am

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

Post 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.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

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

Post by T-Bone »

Totally works. Awesomesauce!
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

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

Post 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.
Lovechild
Prole
Posts: 9
Joined: Wed Mar 07, 2012 4:13 am

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

Post by Lovechild »

T-Bone wrote:Totally works. Awesomesauce!
Would I ever post something that didn't?
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests