[Ubuntu 11.04+] Double-click to run for love-unstable

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.04+] Double-click to run for love-unstable

Post by Lovechild »

(There's an easier way to resolve this issue. Click me!)

OBSOLETE -- DO NOT READ; FOLLOW ABOVE LINK

[version 0.6 "noobs++" with formatting + vital corrections 1]
Changelog:
FIXED uninstall procedure.

(tl:dr; Run this command in a terminal for a one-line solution. The "And if successful (&&)" property is used in case there is something missing. Run at your own peril:

sudo apt-add-repository ppa:bartbes/love-unstable && sudo apt-get update && sudo apt-get install love love-unstable && sudo rm -rf /usr/bin/love && sudo rm -rf /etc/alternatives/love && sudo ln /usr/bin/love-unstable /etc/alternatives/love && sudo ln /etc/alternatives/love /usr/bin/love && love

If it worked [0.8.0 "Rubber Piggy" shows up instead of 0.7.2 "Game Slave"], yay! if it didn't awww... reply with what went wrong!

Removal is just as complicated. Why you would want to, I don't know, but this I know will work.

sudo rm -rf /usr/bin/love && sudo rm -rf /etc/alternatives/love && sudo apt-get install --reinstall love && sudo apt-get remove --purge love love-unstable && sudo apt-get autoremove && sudo rm -rf /etc/apt/sources.list.d/bartbes-love* && sudo apt-get update

We hope to see you again soon! Remember, love is always in the air!)

Most people who are new to love and love-unstable won't quite understand why their games and applications requiring 0.8.0 won't open or run after installing the love-unstable package from bartbes' launchpad PPA. Here's what's going on:

When love-unstable is installed, it installs another executable in /usr/bin. Doesn't make sense? Think of it like the Program Files (x86) folder in Windows; Everything the computer needs to cue up to make stuff work is there. All of the base programs required for other programs to function are placed in /usr/bin.

While there are also special folders for Linux, our main concern is making 0.8.0 function like a Love 0.7.2 install before it's committed as a stable. And if the same system of files persist for future versions, then this guide may be good for quite awhile.

This is all going to be done in the terminal. I will explain the steps as they follow. Don't be afriad, just copy the underlined text and paste in a terminal (Control+Shift+V). As an alternative, GUI steps will be included in italics, for those deathly afraid of the terminal (of potential doom and death and destruction and all things of sadness).

OPTIONAL: Enable root access (Remember to ignore and exclude use of "sudo" or "gksu" afterward)
sudo su -
Enter your password when prompted

OPTIONAL: Install Synaptic for a package manager GUI. Only applies to Ubuntu 11.10+
sudo apt-get install synaptic
Say yes, run it, and follow everything in italics from this point on.

Install love
sudo apt-get install love
GUI>Run synaptic
GUI>Enter password when prompted
GUI>Find love and install


OPTIONAL: Confirm version of love by seeing what it is. At this time of writing, stable build is "Game Slave"
love

Add the Ubuntu PPA for love-unstable
sudo apt-add-repository ppa:bartbes/love-unstable
...and press Enter if prompted
GUI>Run synaptic
GUI>Enter password when prompted
GUI>Pick Settings, then Repositories
GUI>Go into the "Other Software" tab
GUI>Click the "Add..." button
GUI>Copy the PPA archive specified above, and copy it in the APT Line field.
GUI>Add source.


Refresh available software
sudo apt-get update
GUI>Exit the repositories window, then click on the "Reload" button on the synaptic interface

Install love-unstable
sudo apt-get install love-unstable
GUI>Look up love-unstable in synaptic
GUI>Install love-unstable, when finished, exit


OPTIONAL: Current unstable at the time of writing is Rubber Piggy. If the issue this guide covers has been fixed, then the rest of this guide is irrelevent and you can enjoy love 0.8.0 and all the stuff that works with it! Yay!
love

Now at this point, confirm everything is as follows by navigating to /usr/bin
cd /usr/bin
GUI>Open a terminal, then run Nautilus as root
gksu nautilus
GUI>Click on File System, then navigate to /usr/bin


OPTIONAL: List files only with the term "love" in their filenames (Terminal only hereon; GUI followers skip down)
ls love*

From here, output should show a cyan-colored filename and two green filenames. The versioned stable love and the unversioned love-unstable. That cyan-colored filename is the file link, which if viewed in nautilus, would tell you it links to yet ANOTHER link in /etc/alternatives. You're going to delete both of these. For the sake of simplicity, full file paths are specified.

Delete love 0.7.2 symbolic links
sudo rm -rf /usr/bin/love
sudo rm -rf /etc/alternatives/love


Alternatively, if you are completely uncertain, use the file paths (cd into them) and use this command in both of the folders specified above:
sudo rm -rf love

GUI>Navigate to /usr/bin and delete the love symlink
GUI>Navigate to /etc/alternatives and delete the love symlink


Now recreate the links. Again for simplicity, full paths are specified
ln /usr/bin/love-unstable /etc/alternatives/love
ln /etc/alternatives/love /usr/bin/love

GUI>Right-click on love-unstable, and make a link.
GUI>Right-click, cut the just-created link and nagivate to /etc/alternatives
GUI>Paste, Rename link to love
GUI>Right click the just-rename love link
GUI>Make link yet again
GUI>Right click on the newly-made link, cut, and navigate to /usr/bin
GUI>Paste, and rename the link to love


Alternatively, cd into each target directory, and specify only the full destination directory when using the ln command.

Run love again to confirm the love alias runs 0.8.0 instead of 0.7.2.
love

If it did, you're done!

Uninstallation and completely resetting everything
If for any reason you screwed up or are not sure what you are doing, and simply want to quit part-way (REAL users don't do that!), then depending on how far you went, do the following:

Removing love-unstable
sudo apt-get remove --purge love-unstable
GUI>Open synaptic
GUI>Type in your password when prompted
GUI>Find and COMPLETELY remove love-unstable


Deleting tampered files for dpkg
sudo rm -rf /usr/bin/love
sudo rm -rf /etc/alternatives/love

GUI>Open terminal
gksu nautilus
Enter password when prompted
GUI>Navigate to /usr/bin and delete the love symlink
GUI>Navigate to /etc/alternatives and delete the love symlink


Reinstalling love to fix missing entries for a complete removal
sudo apt-get install --reinstall love
GUI>Look up and reinstall love

Deleting love for good *sniff sniff*
sudo apt-get remove --purge love
GUI>Right click and COMPLETELY remove love

Cleaning up after love
sudo apt-get autoremove
GUI>For complete removal, right-click and choose to completely remove what love requires. Not completely removing love and related files (which will show up as bright red will retain configuration settings, if applicable.

Cleaning up after apt
sudo rm -rf /etc/apt/sources.list.d/bartbes-love*
sudo apt-get update

GUI>In Synaptic, navigate to Settings, then to Repositories, and under "Other software" find bartbes' love-unstable PPA and detete it. Don't forget to hit reload before closing Synaptic!

If you are leaving Love 2D, then we hope to see you again soon! We'll always be here. ;)
Last edited by Lovechild on Thu Mar 08, 2012 6:58 am, edited 5 times in total.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: [Ubuntu 11.04+] Double-click to run for love-unstable

Post by T-Bone »

Ah, I miss the good old times, when you could right click on a .love file, choose "open with other application", and then simply write the command of the app you want to open the file with (in this case, love-unstable). This would then allow you to choose between LÖVE and love-unstable by right-clicking on any .love file. Why this feature was taken away from Ubuntu has always blown my mind.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: [Ubuntu 11.04+] Double-click to run for love-unstable

Post by Robin »

T-Bone wrote:Ah, I miss the good old times, when you could right click on a .love file, choose "open with other application", and then simply write the command of the app you want to open the file with (in this case, love-unstable). This would then allow you to choose between LÖVE and love-unstable by right-clicking on any .love file. Why this feature was taken away from Ubuntu has always blown my mind.
It has?

I'm still on 10.10, so I wouldn't know. :P
Help us help you: attach a .love.
Lovechild
Prole
Posts: 9
Joined: Wed Mar 07, 2012 4:13 am

Re: [Ubuntu 11.04+] Double-click to run for love-unstable

Post by Lovechild »

T-Bone wrote:Ah, I miss the good old times, when you could right click on a .love file, choose "open with other application", and then simply write the command of the app you want to open the file with (in this case, love-unstable). This would then allow you to choose between LÖVE and love-unstable by right-clicking on any .love file. Why this feature was taken away from Ubuntu has always blown my mind.
I don't think it's a Ubuntu thing more than a GNOME thing. Remember, despite the fact that Unity is in direct competition with GNOME-shell, it still has to rely on GTK3 tools.

Talk about it on #ubuntu @ Freenode IRC. Might get a better answer.

EDIT: If the love developers could somehow register LÖVE so it shows up in the program list, and if bartbes' is able to fix his install up to do the same thing, then that "Feature" would be back in Ubuntu, where it should have never been removed.

The right-click to run function exists. My guide modifies how it works by shuffling around symlinks, mostly. It's a minor annoyance for the harcore terminal fanboy, major one for the GUI'ers that rely on GNOME.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], slime and 4 guests