Is it possible (and recommended) to install KDE as second desktop environment on Freya? I want to test it, but don't want to reinstall everything.
About testing one desktop environment (DE) along another.
It will not give you a real experience of any of them.
Some DE are related to each other and may work together better than others.
As a general idea there is the Gnome-GTK family and the Qt-KDE family of DE.
KDE is one of its kind and I would not mix it with others.
But elementary OS-Pantheon, although GTK-based and Gnome-related, has become so specialized and special that I would never think installing a different DE on top of that. And even less would I install KDE, which is in itself so different.
About testing a desktop environment by itself.
Even installing a secondary DE and removing the first is a worst idea than installing in the first place an operating system having as default the very DE that you want to test. A default DE is already streamlined, adjusted, better put together, harmonized, complete.
If you want to test Pantheon, install elementary OS. If you want Unity, try Ubuntu. If you want to test KDE, try Kubuntu, Manjaro KDE, or even better Linux Mint KDE (my favorite KDE, considering what I said above).
About testing a different DE when I want to keep elementary OS.
There are a few options for testing a new OS or DE without touching your main elementary OS installation:
Use a virtual environment, through VirtualBox or VMWare inside elementary OS (as mentioned by a previous answer). CPU and RAM power is needed for comfortable use.
For the short term: make a live USB of the testing system and boot from that. Download the ISO and use a tool like Mintstick or UNetbootin. That USB can also be 'persistent' to remember changes made to the system. (After a while such persistent live installations may become instable, but they can work fine for enough time to satisfy your testing goals. A good tool that I tried for that is LiLi in Windows.) -- It is a very good idea for any Linux user to have a few OSes at hand on live USB sticks for testing and emergency purposes.-- A live environment on USB (or even CD) is the ideal environment for testing in the sense of just taking a look at a system or desktop, especially for assessing the compatibility with your hardware.
For the long term: do a separate installation on a new partition.
A separate partition of about 20-30 GB can be created for the tested OS/DE. That's what I do, and that means using a multiple boot.
I find more easy to "test" a new Linux or desktop in this way than installing a DE on top of my favorite OS because I find it easier to get rid of it if I don't like it by formating the partition altogether than by removing the dependencies installed with the second DE.
Using Gparted from a live USB to shrink an old partition and than create a new one is not very difficult, but be sure you know what you do when you do that, and back-up your important data from your machine.
All this may seem tricky and indeed it needs some experience (which may come by small catastrophic occurrences :) but on the whole this will represent a much better and sane Linux experience than mixing elementary OS and KDE.
(If you select the new-separate-partition solution and need help, create a specific question on U&L, post the link under here and I will gladly try to give you a detailed answer.)
It should be possible (haven't tested it personally) since Pantheon and KDE don't actually share a lot of packages. I don't think you'll run into issues into which you would run into if you're running Pantheon and GNOME (they share a lot of packages, but not the same versions of the packages).
Is it recommended? No. Testing any other desktop environment defeats the whole purpose of using elementary OS. Also, you might not get the support you're looking for if you do this since you're kind of "powerusing" elementary OS by doing this.
If you're in for a ride, try searching for how to install KDE in Ubuntu 14.04 and follow the instructions. Note that it's crucial that you search for 14.04-specific instructions.
Installing KDE might cause Elementary OS to behave unexpectedly. In addition, the Elementary apps weren't designed for KDE, so you won't get the "full" KDE experience.
If you'd like to try KDE, I'd recommend downloading copy of Kubuntu and either booting it from a USB drive or running it inside a virtual machine such as VirtualBox.
I decided to try it. Although not just KDE, but KDE Neon. I added the ppa, updated cache, upgraded many packages and was that close to installing neon-desktop. Then I decided to try that in virtualbox first. Glad I did.
It was a disaster. At first the desktop didn't want to install, I received error about dpkg-divert that elementary-default-settings somehow conflicted with neon-settings, so I decided to remove that package and installation was successful. I got the plasma desktop eventually and it worked, but pantheon was destroyed. It became ugly and barely usable after all.
So, these two don't mix together. If you want KDE, you'll have to remove pantheon. Given how many things can go wrong in the process, you should prefer clean installation.
I could install Xubuntu XFCE desktop on my elementary OS laptop using
sudo apt-get install xubuntu-desktop --no-install-recommends. KDE may be different but should work