Gentoo, KDE, Soundcards and Video… under VMWare

I made it. I setup KDE, I configured the video and the audio. I ran Hydrogen. All under gentoo, all under VMWare, all under Windows XP.

Thanks to Benoît, Patrice, Vincent and Stefan for their help!!

On of my old friends, Benoît St-André (which I kind of had lost track of for quite a few years), was talking to be about Hydrogen, a linux-based drum machine.

I was curious and am still learning the rudiments of Gentoo (mostly for web service work). So why not setup a working gentoo desktop under VMWare?

So I installed Gentoo, using all the possible shortcuts possible. Then I emerge hydrogen, only to realize I needed KDE. So I figured out how to emerge kdebase, only to realize I needed to setup my sound card. So I figured out how to emerge my nVidia drivers… only to realize that VMWare was supplying an ensoniq-compliant driver as well as their own flavor of a video card.

Here`s a recap of the problems I encountered (search engines love this):

  • Hydrogen needs KDE (not really a problem)
  • KDE won’t allow you to log under root (when using it through xdm). You’ll end up geting dcopserver errors if the user you’re logging under doesnt have a home directory set.
  • KDE needs sound drivers to play sound (makes sense)
  • ALSA sounds like the way to go for sound drivers. So I installed it.
  • KDE doesn’t care too much about ALSA, just like that. So I learned about aRts (thanks, Wayne!)
  • KDE still doesn’t like my sound setup. It crashes all the time. Turns out Gentoo`s genkernel comes with ALSA built-in. (you were right, Stefan!)
  • KDE still doesn`t like my sound setup. Looks like I needed ‘kdemultimedia’
  • Setting up video card doesnt come naturally. VMWare tools needed to be compiled. xorg needed to be configured.
  • Recompiling the !”$)/&!”$ kernel is very, very time consuming.
  • It would all have been easier if I had figured out the proper files.

I finally succeeded. Here are the basic steps and resources used.

  • Setting your USE flags. If I could’ve figured out the flags required for this, I could’ve compiled KDE and friends only once. There’s flags for file formats, for using aRts, for using ALSA, etc.

Here are the USE flags I added to my /etc/make.conf file:

flac audiofile alsa arts mp3 vorbis

  • Setting up ALSA. Follow the steps in that guide. Don`t go the driver way. It doesn`t seem time consuming. But it is. Unknown symbol snd_unregister_oss_device errors will happen if you used the default genkernel. That’s because the sucker is already compiled in the kernel.

If you end up with a dual install, read the troubleshooting section of the guide.

I don’t know if you really need to recompile the kernel. I think I had to, just to incorporate the flag changes and make sure it was compiled with the current version of GCC (I think my gentoo setup used a precompiled kernel, but dont take my word for it).

NB VMWare uses the ens1371 driver.

  • In the end KDE required two packages to be emerged.

emerge kdebase kdemultimedia

Without the multimedia you ain’t going anywhere. Without kdebase you’ll go even less far. Before you emerge, you should emerge -pv kdebase kdemultimedia, just to see if you want to add more USE flags (either in /etc/make.conf or, less globally, in /etc/portage/package.use).

  • Then, I needed to setup the VMWare stuff. That was a challenge all in itself. Basically, you’ll need to mount the “”linux.iso”” file that comes with VMWare as your CD (its on your harddrive. find it.) Then you expand what’s on the disk and run the install script. Its actually almost straightforward. The only catchy things were as follow:

I had to make a few folders (/etc/rc0.d /etc/rc1.d /etc/rc2.d /etc/rc3.d /etc/rc4.d /etc/rc5.d /etc/rc6.d) and supply the /etc folder where required.

Other than that, the default options were fine. You should do the compile from console, or it will complain.

The first time I ran it, it complained that my kernel was not compiled with the same compiler installed on my machine. On a later attempt, it did not complain (I had recompiled my kernel). So if it complains, you might have to recompile your kernel to make it happy.

Why this package? Basically for the VMWare video drivers.

The setup will try to configure your XORG settings and will fail. Hence the next step.

  • Don’t look in KDE’s control panels on how to change the display drivers. Get out of KDE. Go back to prompt. Run the following:

xorgconfig

Run throught the options, you should be able to figure out what to say most of the way.

Two catches:

  1. The mouse is actually under /dev/input/mouse0
  2. The video card is the VMWare card. I don’t know how much memory it has. I chose the one in the middle.

And that’s basically it. You can either

startx

Which is easy, won’t require you to log on again and allows for root to be in there (gasp!).

Or you can

/etc/init.d/xdm start

Which will show a nice login screen where root is not allowed.

From there I could use the KDE control panel and set my audio to ALSA and configure my desktop to my tastes.

emerge hydrogen

Gave me the hydrogen software. I toyed with it a little. Its nice and reminds me of Fruity Loops, with which I am accustomed.

Before you rush in and follow in my footsteps, take some time to read this VMWare setup guide for additional wisdom.

Thanks to Benoît, Patrice, Vincent and Stefan for their help!!

1 thought on “Gentoo, KDE, Soundcards and Video… under VMWare

Comments are closed.