Skip to content

Replacing Gnome with XBMC

May 31, 2009

So you can sift backwards to see that I run XBMC on my lone Linux box now. My work requires Windows of me and a while back T donated her laptop to a friend of ours in some college courses. So I wiped my Debian install and put Windows on that one.

But I love me some Linux. And XBMC rocks. It has the perfect compliment of features and stability for me.

It has taken a while to get things exactly the way I like it. Mostly it’s because I can’t leave well enough alone(which is why I like Linux so much). But now all I do with this box is play media. So Gnome instead of being my backup is now just a resource hog. And if I don’t use it, why keep it?

So I did some hunting and found out how to replace Gnome with XBMC for my desktop manager.

Let me first point out that once you do this, you will not have easy access to a command prompt. Yes there is Ctrl-Alt-f(x), but that is a pain in the ass. So I prepped my system for ssh. Make sure it works correctly, nothing like trying to troubleshoot a system when you are having troubles getting to a local command prompt.

I also reset a few other options. I killed unneeded processes and shut the sound off on the login screen for GDM. Nothing like having a random crash in Ubuntu and hearing that stupid bongo sound at full speaker volume. Startles the fuck outta me and T when it happens.

But once you have set up a way to get into the system when local access is gone, you need to tell GDM to go to XBMC.

So let’s do this…

First off, I like being in the directory where I want to do my work. It just makes it easier to copy and edit, not long-assed command lines here.

The main files are over in /usr/share/xsessions let’s go there.
cd /usr/share/xsessions

Now let’s see what we have…
ls

You should see an entry for Gnome (if you are using standard Ubuntu, that is). It is going to say, gnome.desktop.

Just to make life easy, let’s grab a copy and rename it.
sudo cp gnome.desktop xbmc.desktop

Not so tough was it?
Great, we now have two entries, fat lotta good it does. You now have to items that start up Gnome. Let’s do some file editing. Since we are in the root stuff, we need to use sudo here. I really wish that Ubuntu would let me just su into here without having to do other stuff to get it working, but I am not annoyed enough to do it. So let’s start editing.
sudo nano xbmc.desktop

Now you should see this…
[Desktop Entry]
Encoding=UTF-8
Name=GNOME
Comment=This session logs you into GNOME
Exec=/usr/bin/gnome-session
# no icon yet, only the top three are currently used
Icon=
Type=Application
X-Ubuntu-Gettext-Domain=gnome-session-2.0

We got some stuff to change now. First change Name to something that will let you know you are going into XBMC. I used XBMC, damn where do I come up with stuff like that? Next we need to change the Exec line to fire up XBMC. The actual executable is /usr/bin/xbmc. While you are at it, I would advise changing the Comment line also. Comments are damned helpful. Once you have made the needed edits, do a Ctrl-x and save the file. Did I mention you can use Vi, Vim, Emacs, or any other editing program? You can, I am just using nano because it is so stupidly simple and it isn’t like I need the features other editors have, Just write the crap and save.

Here is what you should have…
[Desktop Entry]
Encoding=UTF-8
Name=XBMC
Comment=This session logs you into XBMC
Exec=/usr/bin/xbmc
# no icon yet, only the top three are currently used
Icon=
Type=Application

Fuckin A, we got it. Log off, and at the login screen switch your user session(the spot to do that is at the lower left-hand corner).

You should be presented with XBMC, in full screen without any other miscellaneous garbage. So fucking sweet. You also save a shit ton of resources that Gnome needs to run, so things suddenly get a bit snappier. And if you have set up the computer for auto login, you can just boot straight into XBMC from this point. Also, if you set XBMC to Quit when you shut it down, you can go back to the login manager and switch desktops too.

Advertisements
Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: