So...rather than wasting internet bandwith to download a new Ubuntu ISO to test out the new Unity features, I decided to try to make it work under Arch Linux. It took a whole lot longer than I expected to get it even partially working. So, here's my story:

Knowing that Unity isn't in the main repositories, I went the AUR's website and looked for a user created Unity package. That didn't go too well. The Unity package hasn't been updated for 6 months. D'oh! I decided to download the existing PKGBUILD and modify it to work with the Unity 4.xx series. After changing the version number, I tried to "makepkg" it, and was greeted with a message about installing Compiz 0.9.x. I thought it would be an easy install. It was quite the opposite. Compiz's install prefix was set to /opt/unity, but FindCompiz cmake build file expected Compiz to be in /usr, so none of the Compiz packages, except for compiz-core would compile. Then, I tried reinstalling compiz-core, but this time, changing the prefix to /usr. The compiled package ended up being only a few kilobytes big. I guess the mouse wheel was invented for a reason. I looked at the PKGBUILD again, only to find that there was a line at the very bottom that ran "rm -rf ${pkgdir}/usr". That explains a lot! I ended up adopting all the compiz*-git packages and fixing them so they would compile and install.

So, now that Compiz is working (restarted and tested just to make sure I didn't waste my time with something that didn't work), I went on to install the rest of the dependencies listed in the Unity PKGBUILD file. That went relatively well. I was so happy after seeing the progress counter go up after running "makepkg", but at about 8%, gcc spat out an error about an undeclared function (sorry, I forgot what the function was). Natually, I went to Google and searched the name of the function. 0 results! Exactly was I was looking for! I ended up downloading the Ubuntu 11.10 Alpha 3 ISO and running "find -type f /usr/lib | xargs objdump -T | grep the_function". The problem lied in the libindicator package. There was a newer version available which contained that function. I have no idea why a package that's only 0.02 versions ahead of the AUR package would contain new functions...

Next! Utouch...ugh...great memories! Not! I was so glad that I had fixed the utouch packages earlier (for touchegg to work). I was too frustrated from compiz and libindicator to try to compile more stuff.

Cmake. Whoever created the CMakeLists.txt file didn't list all the dependencies required. So after running "makepkg" 10 billion times, waiting for "somebodydidntputthisincmake.h not found" errors to appear, I finally got all the dependencies I needed installed...or so I thought. After installing and compiling all these dependencies, the cmake only continues 3% further before encountering another cryptic gcc error. This time, there no error about a file not being found. So not knowing what dependency was missing, I headed over to http://packages.ubuntu.com and downloaded the Unity DEB source to find the dependencies in then debian/control file. After install those few dependencies that I missed, I ran "makepkg" again, hoping that it would finally compile successfully. CMake went a little further--5% further to be exact--before running into another error. It complained about DndSourceDragBegin() having two return types. Sure, enough "./plugins/unityshell/src/ResultViewGrid.h" had the return type as boolean and "/usr/include/Nux-1.0/Nux/InputArea.h" had the return type as void. WTF? How the heck does this even compile under 11.10???

After changing void to bool in "/usr/include/Nux-1.0/Nux/InputArea.h", I ran "makepkg" once again anxiously waiting to the see the line "Finished making: unity 4.10.2". CMake compiled about 35% before running into error about an undeclared gtk function. Nooooooooooooo!!! I wasn't brave enough to install the git version of gtk3, so I created a chroot, installed the base packages, and installed all of those dependencies fairly quickly (it gets a lot easier after doing it so many times).

Moving on to gtk3. After cloning the ~200MB git repository, autotools spits out an error about cairo-gl missing. So, I proceeded to install the cairo-gl-git package, which failed to compile (it compiled successfully outside of the chroot...). GREAT. So, Unity fails to compile because GTK version is too old, and GTK failed to compile because cairo-gl is missing, and cairo-gl fails to compile because I'm in a chroot. GAHHH!!! While thinking about throwing the computer out of the window, I searched the AUR for other GTK3 packages. I just happened to find a package named "GTK3-UBUNTU"! That package was still at version 3.0, but it was pretty easy to get the patches and source code for 3.1 from the Ubuntu GTK source package.

So, FINALLY, Unity compiles. I was so darn happy, I didn't even care if it ran or not. I logged out and logged back into the GNOME 3 fallback mode, and entered the chroot. After running "xhost +SI:localuser:chenxiaolong" to run X11 apps in the chroot, I crossed my fingers and ran "DISPLAY=:0.0 unity --replace". It failed with python 3 complaining about missing modules. That's okay, since the Unity launch script is written in python 2. I changed the shebang line in "/usr/bin/unity" to point to python 2 and ran "DISPLAY=:0.0 unity --replace". It didn't necessarily fail, but it didn't succeed either. It didn't print out any error messages. Weird... I thought I'd try enabling Unity from the compiz settings manager then. I ran "DISPLAY=:0.0 compiz --replace" and "DISPLAY=:0.0 ccsm" and enabled the Unity plugin. Unity runs! Although nothing shows on the screen, it runs! It shows up in the process list! Woohoo!

And that's about how far I got. There were quite a few Vala errors during the compiling process (I forgot which package it was), which is probably why Unity won't appear. I'll try again later with the vala-devel or vala-git package and hopefully Unity will work then. Here are screenshots of what I've gotten working so far:

Re: Progress on Unity under Arch Linux!

Also, we have rules about the size of screenshots: please read them and resize your pics - not everyone has unlimited bandwidth and/or is using a standard device.

+1 and +1 - some mod is highly likely to nuke your pics

Yep.

Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael FaradayYou assume people are rational and influenced by evidence. You must not work with the public much. -- Trilby----How to Ask Questions the Smart Way

Re: Progress on Unity under Arch Linux!

Congrats on all the progress and thanks for the hard work. I for one can't wait to try it when its ready. I know Unity hasn't exactly been wildly popular, but I wonder if a lot of the annoyances would be solved by running on top of Arch rather than Ubuntu. After spending a good week playing with Unity I kind of like the simplicity and how out of your way everything gets.

Re: Progress on Unity under Arch Linux!

xunil9025: Thanks for the link! That guide is a little bit old, since Unity now requires >GTK 3.1, but at least it has a nice list of the dependencies needed

Awebb:

Glew 1.5 was something I forgot to mention in the original post. Glew is currently at version 1.6 in arch, which apparently isn't capable with version 1.5 needed by clutk. I downloaded the glew 1.5 source code, but I'm not sure how to make clutk compile using headers not in /usr/include. If someone could help me there, that would be great. For now, I've updated the AUR clutk package to download the DEBs from the Ubuntu repository and install those.

Also, I'll try compiling Unity in Virtualbox today. Hopefully, that will work better.

Has anyone tried the ayatana repo https://wiki.archlinux.org/index.php/Un … positories - it don't seem to be outdated.(I don't actually know what's the relation between Unity and ayatana, I only saw 'ayatana' in the contact info posted by jcastro, so please disregard this if I mixed things up)

@chenxiaolong: great work! I also experienced the build error of Unity with DndSourceDragBegin(), but I couldn't fix that yet, so I'll try your solution. And I think that clutk is not a dependency of Unity. Clutk is an old library which was required until Unity used Mutter instead of Compiz.

@karol: I'm planning to update wiki page about Ayatana, but first I need to build the remaining packages. And Unity is part of Ubuntu's Ayatana project along with Notify-OSD, indicators, overlay scrollbar and appmenu.

Re: Progress on Unity under Arch Linux!

City-busz wrote:

@karol: I'm planning to update wiki page about Ayatana, but first I need to build the remaining packages. And Unity is part of Ubuntu's Ayatana project along with Notify-OSD, indicators, overlay scrollbar and appmenu.

I got that impression from reading the Introduction in the wiki, but didn't know if it's still the case, as the page was marked out of date (by you ;P). Thanks for the explanation!

Re: Progress on Unity under Arch Linux!

City-busz: I'm getting a ton of Vala errors when I compile libunity (AUR version) with vala or vala-devel. libunity fails to compile with vala-git. I'll try your packages in a virtual machine and see how they work on 64 bit.

In the meantime, Unity still fails to show up: http://i.imgur.com/btPwo.png I'll try out your PKGBUILDS and see how that works. I'm glad there are people who want to port Unity to Arch Linux

EDIT: City-busz: Just to let you know, Unity will fail to compile at around 45% with GTK 3.0. Here's my source packaage for Ubuntu's GTK 3.1: http://ubuntuone.com/p/1EzX/ It contains all of the patches in the Ubuntu source package. I'm not sure if all the patches are needed, but GTK compiles fine with all of them.

EDIT2: Right now, I'm trying to compile Vala 0.10.4, then version used in Ubuntu 11.10. Hopefully that will eliminate some of the Vala errors.

EDIT3: Vala 0.10 is too old. 0.12 and 0.14 are also in the Ubuntu repository. Trying those...

EDIT5: Okay...so VirtualBox "helpfully" became slow enough that I could read the error messages. The Vala error messages aren't actually error messages, but rather warnings about unused methods. I wonder what prevents Unity from running then...

Re: Progress on Unity under Arch Linux!

More progress! If I add "--indirect-rendering" to line 115 of /usr/bin/unity, Virtualbox looks like this: link. I'm starting to think that Unity is running fine, but Compiz is not working with VirtualBox.

Re: Progress on Unity under Arch Linux!

@jiyuu: I turned on the 3D acceleration option and have the graphics memory slider to 128 MB. I'm not sure why Compiz won't run correctly...maybe because it's the latest git version? I'll test again on an actual computer once a find a spare external hard drive I can use. (I like your interpretation of "tfyp. itualipw." I have no idea what it means either)

EDIT: Just tried installing Arch on an external hard drive and then compiling Unity. Unity still won't show up. No more compiz errors though. I'll try compiling all of the Unity dependencies with the versions used in Ubuntu. Hopefully, that'll make Unity run. I can't think of anything else that would affect Unity.