Dedicated to my late brave, beautiful and silly mummy, Debra Ross. I love you mumster.

Skip navigation

You're either viewing an archived story, or an archived story. To view the latest posts, fling yourself over to the home page, or you can view the complete post index.
Whatever you do, don't go here.

X11, FreeBSD, Parallels Desktop, xorg.conf

If you’re in a hurry and just want the damned xorg.conf file, you can download mine here ;).

FreeBSD! If you’ve read any of my blog by now you know I use FreeBSD 6.2 in Parallels Desktop on my MacBook Pro. I’ve recieved two emails from people asking how I got X11 working, so for the benefit of those fabulous people and anyone else who’s interested I thought I’d post a quick how-to.

Essentially configuring X on FreeBSD in Parallels Desktop is the same as a normal machine but with a few quirks, especially if you’re running a widescreen MacBook or MacBook Pro.

Firstly after you’ve installed FreeBSD (I just download the ISOs and mount them directly in Parallels), log on as root and run the X11 configuration script, which will dump an xorg.conf.new file into your /root directory:

Xorg -configure

Next open the xorg.conf.new in a text editor. If you’re fairly new to UNIX and FreeBSD the Easy Editor is probably your best bet:

ee /root/xorg.conf.new

Most of the heavy lifting has been done for you; from my experience FreeBSD in Parallels Desktop detects the virtual keyboard and mouse just fine. We need to add some more information though for our widescreens.

Scroll down until you see Section "Monitor" and add the following lines (make sure each Modeline is on one line though, not wrapped like this):

HorizSync 31.5 - 100.0
VertRefresh 59.0 - 75.0
Modeline "1440x900_60.0" 106.47 1440 1520 1672 1904 900 901 904 932 -HSync +Vsync
Modeline "1280x800" 83.46 1280 1344 1480 1680 800 801 804 828

The modelines allow X11 to use the widescreen displays of the MacBook Pro and MacBook respectively. Even though I have a MacBook Pro I tend to use the “1280×800″ because it fits nicely in a window on my OS X desktop.

Next under Section "Device" add the VideoRam line followed by the amount of VRAM you allocated your virtual machine in kilobytes (ie: multiply by 1024). The default is 16MB, which would be 16384:

VideoRam 16384

Really unless you’re using an external monitor there is no point at the moment allocating more than this to your VM; Parallels Desktop takes this from your host machine’s normal RAM not video memory and uses it to increase supported resolutions.

Now scroll down to Section "Screen". You should see several SubSection "Display" configurations with different colour depths. Scroll down to the last one and add the appropriate Modes line:

SubSection "Display"
Viewport 0 0
Depth 24
Modes "1280x800" (for MacBook) OR
Modes "1440x900" (for MacBook Pro)
EndSubSection

FreeBSD should auto-detect under most circumstances the highest colour depth the VM supports, but I usually put a DefaultDepth line in right under Section "Screen" for good measure:

Section "Screen"
DefaultDepth 24

Now you’re all set! All that’s left to do now is rename and move the changed file over to the X11 configuration directory:

mv /root/xorg.conf.new /etc/X11/xorg.conf

Now the moment of truth: testing if it works!

startx

And that’s all there is to it. To return to the command line, just type ctrl alt delete/backspace.

The next step would be to go to your ports tree and install your favourite window mananger or desktop environment. For example if you want KDE, as root:

cd /usr/ports/x11/kde3
make install clean

Or if you if you’d prefer not to wait two days for the entire desktop to be compiled ;):

pkg_add -rv kde

Then add exec startkde to your .xinitrc in your home directory (create it if it doesn’t exist).

Haruhi KDE FreeBSD

Don’t forget to read the FreeBSD Handbook chapter on X11 Configuration as well.

5 Comments

  1. Posted 2007.04.27 at 16.42 | Permalink

    Thanks for the Modeline, I used it with VMware Fusion and it works fine. However, the touchpad does not work :(

  2. Tom
    Posted 2007.05.08 at 14.21 | Permalink

    I’ve got the same setup (OS X/Parallels on a MacBook running FreeBSD 6.2 Xorg 6.9) but I could not get it to work. startx still reports “Fatal error: no screens found”, though I did things exactly as explained by you. :/

  3. Salvo M.
    Posted 2007.05.11 at 06.53 | Permalink

    I’ve got 6.2 working, but with no audio. Is there a manner to enable it, please?
    TIA :)

  4. Posted 2007.09.07 at 13.01 | Permalink

    Two things:

    1) Don’t open the xorg.conf file linked above in your web browser, copy the text, and paste it into a file then scp it over to your BSD install. It won’t work. Some funky characters in there. Definitely save-link-as.

    2) as it stands, the xorg.conf file above did work for me except for two things:

    A) Resolution was wrong.

    Had to change the Section “Screen”
    last entry:

    SubSection “Display”
    Viewport 0 0
    Depth 24
    Modes “1440×900″
    EndSubSection

    B) The mouse did not work. In the InputDevice section, I had to change the protocol:

    Option “Device” “/dev/psm0″

    Even with that, I don’t exactly have a two-button mouse on the MacBook Pro, but I have a feeling it will work perfectly with an external two-button mouse. Will let ya know….

    Even with that, tho … thank you SO MUCH for posting your article. I got FreeBSD up and running in Paralles easily, and then X11 was only a matter of maybe 15 minutes of debugging the xorg.conf file (and googling).

    Add in DoubleCommand so I can have the command key be the meta key in my X11 session and I am in sheer bliss … Mac OS X, FreeBSD, X11, emacs …. Aaaaah.

  5. Posted 2007.09.07 at 13.59 | Permalink

    > but I could not get it to work. startx
    > still reports “Fatal error: no screens
    > found”

    I had the same problem. If you look closely, you will see there’s a syntax problem in the ‘vesa’ entry for the display.

    That’s probably because you did a copy / paste of the content of the xorg.conf file. As I posted earlier … DON’T DO THAT! :c)

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*
RichardDawkins.net