Updated: To include or remove some items I missed or that have changed sense I first installed MATE. I have installed MATE on three of my systems. All of these systems required me to use slightly different approaches to complete the process. It wasn't tough but it wasn't without it's challenges either. If anyone knows of ways to improve this How-To please PM me so I can make any necessary changes.

Caution: This How-To involves using the --depclean option of emerge. Don't randomly run the command without inspecting every package prior to removing any package or serious breakage may occur. Use this How-To at your own risk.

First install layman if you don't already have it installed. Add to "/etc/portage/package.use"

Code:

app-portage/layman subversion git
dev-vcs/subversion

Then run

Code:

emerge -av layman

You may need to run

Code:

etc-update <----after installing the above packages

Add the next line someplace in "/etc/portage/make.conf", make sure it is on its own line

Code:

source /var/lib/layman/make.conf <---This is the default location

Then run

Code:

layman -a mate

You can verify the MATE overlay was installed by navigating to "/var/lib/layman/"

Now lets prep for the MATE desktop install.

Unmask MATE. Add the next list of files to "/etc/portage/package.keywords" or "/etc/portage/accept_keywords" <---- Which ever form you may be using. I believe both are correct

Switching Profiles: I missed this as I have always used the "default/linux/amd64/13.0" profile in combination with the USE FLAGS I required. Thanks to other posts in this thread for pointing this out.
This example is for an amd64 system. If you use the "default/linux/amd64/13.0/desktop/gnome" profile switch to either "default/linux/amd64/13.0" or "default/linux/amd64/13.0/desktop". You can do this with eselect

Code:

eselect profile list
Then
eselect profile set [number you wish to use]

Check the USE="section" in "/etc/portage/make.conf" and remove any flag you added that may be gnome specific. At the very least add.

Code:

-gnome
mate <---- Not a valid use flag at this time, but I expect it will be if MATE gets added to the main portage tree sometime in the future.

If you use a "xinitrc" file to start your desktop rename it to .bak

If you use a login manager like "gdm", stop the service with

Code:

/etc/init.d/[login manager] stop

I also recommend you remove your login manager from the default run level or you could have problems later on.

Code:

rc-update del [login manager] default

Because you will be removing your active desktop, log out of Gnome and drop to a CLI console.
Log into the console as your root user.
I used ssh from a working box on my network to do most of this tedious work.

Read "man emerge" especially the "--depclean" section. Always run these commands with the "--pretend" or "--ask" option before committing to any changes. The "--verbose" option is also very helpful. Use the "--exclude" option to exclude any package you do not want to remove. Thanks to alexdu for this helpful hint.

The idea here is to remove Gnome and all of its dependencies. Ignore the "emerge @preserved-rebuild" messages until you complete the cleaning of gnome or packages you want removed may get pulled back in. Gnome is huge and depending on your use flags and installed packages this process will take the most time to complete in a safe manner. The tool "equery" can help in determining your installed package dependencies. Read "man equery" for a complete list of options.

Note Mate is a fork of Gnome2 and installing MATE will pull some GNOME stuff back in. You still want to clean GNOME completely and let MATE pull back in the necessary packages so they get added to your world properly.

Remove GNOME.
The next command may need to be modified to match the gnome packages you have installed

The "p" is the pretend option and "C" is the clean or unmerge option. Once you are satisfied with the output remove the "p" option and execute the "C" option.

Do Not run "emerge --depclean" without the "--pretend" or "--ask" option on the entire list of packages in one shot or you will most likely remove something you don't want to remove. You have been warned!

Code:

emerge --pretend --depclean --exclude sys-kernel/*

Carefully examine the output before you commit to removing any package. Add any package you don't want removed using the "--exclude" option. Be sure to add sys-boot/* to "--exclude" if you started but haven't completed the migration to GRUB 2. Once you are satisfied you can remove the "--ask" or "--pretend" option to commit.

Continue the process until all the GNOME dependencies are removed. Some packages that you remove will require you to specify a version as there may be more then one version installed. This method takes some time to complete. Once your sure GNOME is gone you can run the "emerge @preserved-rebuild" command it's been asking for.

Install MATE.

Code:

emerge -av mate

Once all this is done, you have to verify your system isn't broke so run

Code:

revdep-rebuild

Then run
emerge --pretend --depclean --exclude sys-kernel/*

At this point "--depclean" shouldn't list any packages for removal.

MATE installs it's own start up scripts. in "/etc/X11/Sessions"
The last item is to edit "/etc/env.d/90xsession" so it reads

Code:

XSESSION=Mate

If you got this far without to much trouble and "revdep-rebuild" completes without any errors, reboot and you should return to a console. Log in as your normal user, run startx and MATE should start up.

You will have to configure your new desktop. None of your old GNOME settings will be there. Some menu items may need to be tweaked and you will most likely want to install more packages to get back the functionality you had in GNOME 2.
Removing GNOME won't clean out any left overs in your "/home/.*" directory (and there will be a lot), so you will have to do it yourself.

No default Media player. You can install Totem again if you wish, but that will pull in a lot of gnome stuff. I chose Parole. It has a couple of xfce4 dependencies but otherwise is fairly light and works well.
Other packages I installed were Asunder CD Ripper, Xfburn and of course Gnome-Games. If your favorite application worked in Gnome 2 it should work fine in Mate as well.

Gnome 3 has gone stable and it won't be long before Gnome 2 is removed from portage. The Dev's won't want to maintain two versions of GNOME and I don't blame them. At some point you will have to make a choice.

GOOD LUCK

Last edited by OldTango on Sun Dec 08, 2013 5:26 pm; edited 2 times in total

However, when I try to log on, I get the gdm greeter. Then when I enter my user name and password, the screen blanks and presents the greeter again.
Perhaps I have to symlink mate-session to gnome-session?

I am not positive of this but I have read several forms where folks have had problems using login managers with Mate. Mate comes with startup scripts. Edit /etc/env.d/90xsession so it reads

Code:

XSESSION=Mate

If you have a xinitrc file in your home directory rename it to .bak. Stop your login manager service with "/etc/init.d/<login manager> stop. Logout of your desktop which should drop yon in a consloe. Run startx and see if Mate starts up.

Edit: I have Mate working with "GDM". See my post below.

Last edited by OldTango on Sun Dec 08, 2013 5:35 pm; edited 2 times in total

OldTango, please post a HOW-TO on migrating to Mate. I'm in the process of doing this on one box, but I'm not done exorcizing Gnome3 yet.
I want to keep gdm if possible for compatibility with Xming. Have you any clues as to an ebuild for gdm-old. Also, shouldn't nautilus be replaced by caja?

How-To posted.

I am pretty sure Mate won't work with gdm properly at this point. It may work with slim but again I am not sure of this. I plan on looking into it latter this week. If I discover anything useful I'll post it here.
Edit: I have Mate working with "gnome-base/gdm-2.20.11-r1". See my post this thread.

Personally I have never used a login manager of any kind as I prefer to have the console readily available.

I would think that as Mate develops and more of gnome gets ported a login manager will be forth coming.

Yes caja has replaced nautilus. They are virtually identical except caja doesn't have any cd/dvd burning tools built in that I am aware of and the preview sound files don't function.

Last edited by OldTango on Sun Dec 08, 2013 5:41 pm; edited 1 time in total

This sucks. I can't use the mate howto, because I was using gnome-light so I could use xscreensaver instead of gnome screensaver. And now --depclean doesn't work because it wants me to update my system, which I can't do because it wants to install gnome 3. I tried the various mask lists in this thread, but it still pulls in a TON of crap on update, with several blocked packages.

Well, I had to uninstall a bunch of random stuff, and then updating caused it to reinstall, which removed the blocks without forcing a gnome 3 update. So now I can hopefully install the full gnome metapackage, so I can remove it and follow the --depclean process properly.

OK, I think I need some help. When I run "emerge -C gnome gdm metacity", it removes them, but then --depclean complains that metacity is required by gnome-control-center and that an update is required. Upon updating, emerge reinstalls metacity.

EDIT: OK, it was compiz that was causing it. But there's still nowhere near 114 packages being cleaned. I hope this is completely removing GNOME.

Last edited by Silent-Hunter on Sun Dec 08, 2013 2:24 am; edited 1 time in total

Did you change your profile? Run "eselect profile list" and post the results, including the asterisk that will be by one of the choices. Post the complete results of "emerge -p --depclean". I'll be back tomorrow afternoon. We've got your back. We were all noobs once.

GDM
Forgive my posts regarding MATE having issues with login managers. I have read several forums where folks have had problems getting login managers working with MATE including this very topic, but until today didn't I hadn't researched it. Today I migrated one of my systems having multiple users to MATE where a login manager is required.

The steps I took were to add to "/etc/portage/package.mask"

Code:

>=gnome-base/gdm-3.8.4-r3

Add to "/etc/portage/package.use"

Code:

gnome-base/gdm gnome-keyring

Installed "GDM"

Code:

emerge -av gdm

This pulled a lot of GNOME stuff back into my MATE install.

If you followed my How-To, to install MATE above you will need to add the login manager back to the default run level.

Code:

rc-update add xdm default

Reboot and you should be greeted with the "GDM" Display Manager. Be sure you select Mate as your session before logging in.

There are a few cases where you can't log in to "GDM"
Make sure to edit "/etc/env.d/90xsession" so it reads

Code:

XSESSION=Mate

Also if you used "GDM" before you migrated to MATE you will most likely have a "/home/your-user/.dmrc" file in your home directory. Either delete this file or edit it so it reads

Code:

session=mate

If you still can't login using "GDM" please post the exact error you are getting.

What will happen when GNOME 2 gets removed from Portage? Will it be put in MATE overlay so MATE will still work?

No it won't
If the DEV's decide to remove Gnome2 then someone else will have to make a Gnome2 overlay and maintain it or you will have to maintain your own local overlay and ebuilds.

Mate is in the Mate overlay and maintained right now. Assuming the development of MATE is continued, it is possible MATE may be introduced into the main portage tree. That assumes a Gentoo Dev wants to take the project on.

I did that already, I guess I'll have to ask elsewhere. But otherwise, MATE works perfectly now. Thanks for your help! Compiz and Emerald actually started working, but the CCSM is still messed up. Luckily it remembered my old preferences from GNOME 2.

Oh, ONE more question. How do I get the Crux window manager theme? It says it's missing, but I installed all the gnome theme stuff.

I did that already, I guess I'll have to ask elsewhere. But otherwise, MATE works perfectly now. Thanks for your help! Compiz and Emerald actually started working, but the CCSM is still messed up. Luckily it remembered my old preferences from GNOME 2.

Have you tried to reinstall those packages sense you installed MATE? You may have to remove them first and then reinstall them. Just a thought.

Also removing Gnome won't remove any old files, directories or settings from your /home directory. So it is possible that Compiz and Emerald are still getting their settings from there. Look for any signs of conflicts.

nano /etc/conf.d/xdm then change DISPLAYMANAGER from gdm to xdm.
nano /etc/env.d/90xsession set XSESSION=mate

You will get the ugly xdm greeter without gdm's autologin but it works.

You can also still login remotely from Windows with Xming. Instead of "Open session with XDMCP", choose "Start a Program" then set the program name to mate-session. Again, you will have to enter the password.

MATE has never worked as well for me as GNOME 2 does, which is surprising because especially the early versions were little more than a rebranding I think. As such, I've decided to stick with GNOME 2 for as long as I can. I guess I'll host the ebuilds and tarballs myself if it should be removed from portage. Here's the package.mask list I used to completely stop gnome 3.* from emerging. This list is based on earlier ones in this topic, minus some themes/icon stuff and including a few other gnome packages that I use.

So i followed the mate overlay instructions, and i see the mate install scripts in /etc/X11/Sessions. everything worked in the end, I did encounter some problems, but was able to resolve them.

I did have to run gcc-config to reinitialize my C compiler, and rebuild my toolchain after unemerging gnome. also had to manually uninstall the vala language.

I did have to create the /etc/env.d/90xsession file, and i placed XSESSION=mate in it, then rebooted, ran startx... and it failed. oh, it's calling gnome-session from .xinitrc. deleted that file... and startx gives me a basic Xsession... 3 terms and a clock.

did i miss something?

I apologize for not posting specifics, I'm posting from my phone after the fact and don't otherwise have internet just yet. (Phone was the internet for the operation)_________________<bocz> i think ill be stuck to getting 2 sticks of 128
<bocz> thats 310 mb for a server
<Guilty> Kudos on finding the elusive 54MB DIMM

@kingcoras: I certainly didn't have to go through any of this. I have no /etc/env.d/90xsession either. But I definitely deleted the ~/.dmrc file and re-selected the seesion type on the gdm login screen.

My system does have a few gnome2 and gnome3 components alongside mate. Basically, I've tried to keeps masks to a minimum and at the same time keep systemd out. Most importantly, I've masked gdm >= 3.0.