Installing two Unity versions side by side?

Hi,

I have made my project run well on an older Linux release. Can I install the newest release side by side, without touching my functioning version (the same as on Windows)?

Rename the /opt/Unity directory, then install the new version.

Sorry if this is a basic Linux question, but how do I inform Unity that the directory changed?

You can launch Unity directly in /opt/Unity/Editor/Unity.

If you want a shortcut for it, you can copy the /usr/share/applications/unity-editor.desktop file (either to the same location, however that will require root previligies, or) to ~/.local/share/applications, then edit the first 4 lines of the file:
[Desktop Entry]
Version=[change the version]
Name=Unity (old) (you should probably change the name so you know which is which)
Exec=/opt/Unity/Editor_old/Unity %F (change the path)
Exec=/opt/Unity/Editor_old/Unity %U (change the path)
Icon=unity-editor-icon
Terminal=false
Type=Application
StartupNotify=true
Categories=Utility;Application;
MimeType=x-scheme-handler/com.unity3d.kharma;

Then, make the file executable by running this in a terminal (change the path if necessary):
chmod +x ~/.local/share/applications/unity-editor.desktop
(chmod +x grants the file permission to be executed as a program. Similarly, -x will revoke those permissions.)

You may have to log out before the file shows up in the dash.

Hey LukaKotar,

thank you, I did that ad your steps make sense how to change the Unity directory and adapt the .desktop files to point in the right direction.

I am currently using Unity 5.4.0b13 (uploaded April 7th), and I want to make sure that this keeps woring. I downloaded the latest build 5.3.5f1 (May 25th), which seems to have fixed WebGL issues everyone I have been experiencing. However, when I double click the unity-editor-5.3.4f1 deb file, I am told that A later version is is already installed. Can you help me install this build side by side with my old build, which I have already moved to /opt/Unity/Editor_540b13/Unity . Any help would be appreciated.

Try running sudo dpkg -i /path/to/deb/file to install it through terminal instead.

Not a good idea, this is not the way to install side by side. dpkg -i recognised the fact that that I moved my Editor directory, and automatically upgraded (in this case downgraded) my Unity, without any query:

$ sudo dpkg -i unity-editor-5.3.4f1+20160503_amd64.deb
[sudo] password:
dpkg: warning: downgrading unity-editor from 5.4.0b13 to 5.3.4f1
(Reading database … 453234 files and directories currently installed.)
Preparing to unpack unity-editor-5.3.4f1+20160503_amd64.deb …
Unpacking unity-editor (5.3.4f1) over (5.4.0b13) …
Setting up unity-editor (5.3.4f1) …
Setting permissions on chrome-sandbox…
Done.
Processing triggers for gnome-menus (3.10.1-0ubuntu5) …
Processing triggers for desktop-file-utils (0.22-1ubuntu3) …
Processing triggers for bamfdaemon (0.5.1+15.04.20150202-0ubuntu1) …
Rebuilding /usr/share/applications/bamf-2.index…
Processing triggers for mime-support (3.58ubuntu1) …
Processing triggers for hicolor-icon-theme (0.14-0ubuntu1) …
Processing triggers for libc-bin (2.21-0ubuntu4) …

Let’s hope the new version works at least as well as the old one.

You could try copying your Unity installations to a different drive or location, and then put them back once you’ve installed the version you want to install. I didn’t know it could detect that you moved it, but I’m pretty sure it won’t look for it in your home directory or a different drive.

No worries, my first impressions with this downgrade (however from beta to a final release) are very positive, I may not have to do that.