OpenBSD Journal

setting X up in openbsd

Contributed by jose on from the gui dept.

Dave writes:
"I very recently installed openbsd on a spare computer - I couldnt find any articles on how to get X running and configured with a windowmanager (windowmaker) - I have written up an article on how I set up X with windowmaker on my openbsd install - I hope this will help any people trying to migrate to openbsd and use X. The URL is http://shintara.net/xonopenbsd.htm ."
I followed the same steps, too, when I first set up X on my -current laptop, but I know they can't be right. Why would you have to do this in a working, tested product? What are the correct steps?

(Comments are closed)


Comments
  1. By Anonymous Coward () on

    xf86cfg -textmode
    startx

    have a look at /etc/fbtab also.

    Comments
    1. By Anonymous Coward () on

      I never had any problem with X in OpenBSD. Only in some Linux distrobutions, but never OpenBSD.

      Comments
      1. By Anonymous Coward () on

        same here.

        what is it people claim make things more difficult in openbsd?

        Comments
        1. By Jeffrey () on

          Same here.
          Never had a single problem.

          In fact, setting up X on OpenBSD is easier than on any other system where I've done this.

          Comments
          1. By Ray () on

            In any case, this is a good piece of documentation for those who have trouble setting up X. It can give someone a few ideas to try before flooding the mailing lists with these kinds of questions.

    2. By X11R6 () on

      ... and then tweak the XF86Config by hand, restarting the X server (if you can) between tweaks.

      This is not a complaint, really. I've just come to accept that setting up a "free" X11 server on any *NIX box (other than Mac OS X) requires a fair amount of tweaking.

      It really depends on your hardware.

    3. By Shane () on

      Just a note of caution, xf86cfg and xf86config don't spit out the same config file. Back around 3.1, I was tearing my hair out trying to figure out why xdm wasn't working. A simple 'startx' was working fine, but xdm would get into an endless cycle of blanking my screen, returning to the command line, blanking the screen, returning to the command line...

      I was using xf86cfg, which worked fine for 'startx' but not for xdm. I googled around and found someone mention xf86config and figured I'd try it. xdm worked fine after that. Strange stuff.

  2. By methodic () on

    usually running "X - configure" works good enough to get you a template XF86Config file you can later tweak (esp. screen resolution).

  3. By Anonymous Coward () seti0@email.si on mailto:seti0@email.si

    does *anyone* know exactly how to get the i810 integrated gfx chip (i have one of those HP vectra computers heh) to work on X? it works in linux, it sorta (640x480x8) works in freebsd, but i just cant get it to work in openbsd.

    help?

    Comments
    1. By Motley Fool () motleyfool@dawgstar.org on mailto:motleyfool@dawgstar.org

      XFree86 -configure

      man XFree86

      snippet

      -configure
      When this option is specified, the X server loads
      all video driver modules, probes for available
      hardware, and writes out an initial XF86Config(5)
      file based on what was detected. This option cur­
      rently has some problems on some platforms, but in
      most cases it is a good way to bootstrap the con­
      figuration process. This option is only available
      when the server is run as root (i.e, with real-uid
      0).


    2. By Anonymous Coward () on

      Try adding

      Option "NoAccel" "true"

      in Section "Device". You won't get any hardware acceleration (which sucks) but at least X should start. Also, a recent version of xfree86 from their CVS tree will help.

    3. By Anonymous Coward () on

      it may need one of those ( from experiences with my 740)

      gart driver (ie OpenBSD 3.2+)

      xf86cfg -textmode

      http://www.xfree86.org/4.2.1/i810.html

      rebuild if i810 driver (or build) (check for
      /usr/X11R6/lib/modules/drivers/i810_drv.o), i do not appear to have one after install

      vesa driver module is most extreme step back, which gives almost no performace, makes X super-stable, and sometimes requires newer VGA BIOS even on recent cards)

      you can display your X apps on remote display using working X-server

    4. By Anonymous Coward () on

      not that this is really a true answer to your problem, but you can get 8mb agp/pci ATI cards stupid cheap (like less than 30 USD) that work great with every flavor of Xfree86 i've ever thrown at them (3.3.x and 4.x, on linux and obsd and fbsd). searching for "xpert 98" on pricewatch.com should bring up multiple results.
      They'll pump out 1280x1024 24bit color at high enough refresh rates to satisfy most (enough to eliminate moniter flicker anyway), but don't plan on getting much in the way of OpenGL performance from them (they're really a 2D card with 3D performance that was "average" in 1998).

      Comments
      1. By Anonymous Coward () on

        matrox behaves same way at the same price FYI

      2. By Motley Fool () motleyfool@dawgstar.org on mailto:motleyfool@dawgstar.org

        http://www.geeks.com/ <br> <br> just picked up some G400 AGP Matrox cards for US$18.00. <br> <br> The only reason I had to get i810 working is a had a motherboard that had no PCI/AGP slots on.

    5. By margarida () on

      Here's a working XF86Config with i810:

      http://www.devilness.org/XF86Config.i810

    6. By Ed-0x1b () on

      24 bit resolution is your friend - see also BSDvault.net for an older article - I also think 3.2 worked cleanly for me on i810e - mutch better than 3.1 - it was also important to get the ram used correct. now for Gnome or KDE, or anything beyond raw X....

      X in general is somewhat obscure - good luck

  4. By Anonymous Coward () on

    suppose you install an obsd machine and
    say no to the "are you going to be running an X server on this machine?" install question. suppose you later go on to change your mind.
    what (if anything) would you have to do to reverse your eariler decision? (in other words, what does that question do to your system, exactly?)

    Comments
    1. By James A. Peltier () james@site-fx.net on http://www.site-fx.net

      Change a value in /etc/sysctl.conf. I'm sure if you look in the file you can figure out which one to change.

      Comments
      1. By Shane () on

        Would it have killed you to be more specific? Does OpenBSD even include the machdep.allowaperture setting in sysctl.conf if you say you aren't running X? You might be sending him on a wild goose chase. Just point him to the FAQ entry: Finishing up . He might also need to know how to add a file set after installing .

        Comments
        1. By Anonymous Coward () on

          ah, ok cool... I knew of that sysctl and i'd added a file set post-install before, I was just wondering if it did any file permissions voodoo or similar things under the hood... Thanks! (And oddly enough I had never seen that entry in the FAQ even though I've read the FAQ... I guess my eyes glided right over it or something.)

  5. By Anonymous Coward () on

    I have used OpenBSD since 2.9, mainly for routers, so I did not worry about X functionality much and still do not. But I have had issues with X11 on openbsd. I have what is recognized by OpenBSD to be nvidia Vanta cards on my client machines. If I do a clean install of 3.0 from the CD, run xf86cfg, within 30 I can have xdm up and running with no problem. With 3.2, I had issues that I could not explain such as the whole system locking up, only to accessed by ssh remotely so that I could reboot the machine. Or when I started up xdm, the video system would endlessly cycle. Only when I changed the permissions of /dev/wsmouse0 to 666 would xdm work. If I follow the same exact procedures in the install of 3.0 and 3.2, only on 3.0 will X11 be functional. I was using OpenBSD on my laptop but for some reason the drivers for chips 65550 seem to have not been compiled into the 3.2 X11 subsystem so I had to go with SuSE Linux.

    Comments
    1. By Anonymous Coward () on

      my guess is the drivers are your problem. openbsd adopted xfree86 4.x in there, but the 3.3.x server is still around. that may be your solution.

    2. By Anonymous Coward () on

      I have a toshiba 110cs laptop that HAD slack 3.4 and was running X relatively well for a p100/24meg/780hdd. However, I too am having some difficulties with ct65548 (in XFree86-4) on oBSD 3.2 (tho, my problems may be pot related). I am going to install an older version of X (3 branch) tonight. I will respond with my results later this evening, on this thread.

      StatiK76

  6. By Anonymous Coward () on

    Is the 32MB ATI Radeon Mobility that comes with the Nov.'02 IBooks (800 MHz) supported by the accelerated ati server? I've only been successful running it in framebuffer mode on my IBook, and that only seems to support 8bpp mode, which isn't so great at all :(

    Comments
    1. By PeterIH () on

      I've had that problem with my Dell lattitude C640 running NetBSD. I solved the problem by removing
      "agp* at pchb?"
      from the kernel. I've never tried this with OpenBSD, but perhaps the problem is similar there.

  7. By Anonymous Coward () on

    someone ought to write the first and last word on configuring XFree86 to work on BSD...and then think of something else to write about.

    Comments
    1. By Anonymous Coward () on

      I agree. Set the whole thing up successfully the way XFree86 said to, and still wouldn't run. oBSD should make their own step-by-step guide.

      Comments
      1. By Anonymous Coward () on

        XFree86 is written mostly by and for Linux people, including the documentation. Cleaning up after them is just too much trouble, so you just have to figure a lot of things out for yourself.

        Comments
        1. By Chicky () on

          Well, XFree86 is even i386-centric, so for example Debian GNU/Linux with it's 11 architectures is doing insane amount of work to make it work on all of them. These patches of course eventualy come back into official XFree86 tree.

  8. By Ed-0x1b () on

    I may be wrong, but isn't X discouraged on OpenBSD because it is a security risk?

    Given an X installation, what can be done to increase such a box's security. Any PF ports to block, can you configure X to specific ports?

    Comments
    1. By bengt () eleberg@cbe.ericsson.se on mailto:eleberg@cbe.ericsson.se

      unless you want to run x over the network, you can start it with a flag (was it --no-tcp?, i am having trouble with the online man pages at openbsd.org), so that it never opens any ports.


      bengt

      Comments
      1. By Anonymous Coward () on

        -nolisten tcp

  9. By Anonymous Coward () on


    I use openbsd as my webserver, but nowadays im
    thinking of use it as my main OS in my laptop.

    Has anybody run it on a Dell Inspiron 8200
    laptop with 1400x1050 screen resolution and
    a nvidia GeForce440 succesfully?
    Could anyone show me his XF86Config file?

    Sorry for my poor english and thanks a lot

    Comments
    1. By Anonymous Coward () on

      I believe you have to wait for the next version of XFree86 for this card to be supported.

    2. By Anonymous Coward () on

      Dell inspiron 8200. I'm having a little trouble with my keyboard, but here's what I've got.

      In xf86config, selections were:

      -wsmouse protocol
      -emulate3buttons: yes
      -wheel: no
      -device=/dev/wsmouse0

      -keyboard: 105-key (pc105), US English
      -didn't set up extra xkb options (though maybe I should have)

      Monitor:
      -hsync: 31.5-64.3 kHz
      -vsync range: 50-70

      Card:
      -type: * Generic VESA compatible
      -video memory: 4096K
      -default depth 16 bits

      Here's the XF86Config (minus comment lines). If you use it, please let me know how it woks out for you. Also let me know if you see anything in there that I really shouldn't have set, or anything that might explain odd sporadic keyboard problems.
      ================
      Section "Module"
      Load "dbe" # Double buffer extension
      SubSection "extmod"
      Option "omit xfree86-dga" # don't initialise the DGA extension
      EndSubSection
      Load "type1"
      Load "freetype"
      EndSection

      Section "Files"
      RgbPath "/usr/X11R6/lib/X11/rgb"
      FontPath "/usr/X11R6/lib/X11/fonts/local/"
      FontPath "/usr/X11R6/lib/X11/fonts/misc/"
      FontPath "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
      FontPath "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
      FontPath "/usr/X11R6/lib/X11/fonts/Type1/"
      FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"
      FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
      FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"
      EndSection

      Section "ServerFlags"
      EndSection

      Section "InputDevice"
      Identifier "Keyboard1"
      Driver "Keyboard"
      Option "Device" "/dev/wskbd0"
      Option "AutoRepeat" "500 30"
      Option "XkbRules" "xfree86"
      Option "XkbModel" "pc105"
      Option "XkbLayout" "us"
      EndSection

      Section "InputDevice"
      Identifier "Mouse1"
      Driver "mouse"
      Option "Protocol" "wsmouse"
      Option "Device" "/dev/wsmouse0"
      Option "Emulate3Buttons"
      EndSection

      Section "Monitor"
      Identifier "My Monitor"
      HorizSync 31.5 - 64.3
      VertRefresh 50-70
      EndSection

      Section "Device"
      Identifier "Standard VGA"
      VendorName "Unknown"
      BoardName "Unknown"
      Driver "vga"
      EndSection

      # Device configured by xf86config:
      Section "Device"
      Identifier "* Generic VESA compatible"
      Driver "vesa"
      #VideoRam 4096
      # Insert Clocks lines here if appropriate
      EndSection

      Section "Screen"
      Identifier "Screen 1"
      Device "* Generic VESA compatible"
      Monitor "My Monitor"
      DefaultDepth 16

      Subsection "Display"
      Depth 8
      Modes "640x480" "800x600" "1024x768" "1280x1024"
      ViewPort 0 0
      EndSubsection
      Subsection "Display"
      Depth 16
      Modes "1280x1024" "640x480" "800x600"
      ViewPort 0 0
      EndSubsection
      Subsection "Display"
      Depth 24
      Modes "640x480" "800x600" "1024x768" "1280x1024"
      ViewPort 0 0
      EndSubsection
      EndSection

      Section "ServerLayout"
      Identifier "Simple Layout"
      Screen "Screen 1"
      InputDevice "Mouse1" "CorePointer"
      InputDevice "Keyboard1" "CoreKeyboard"
      EndSection

      Comments
      1. By Anonymous Coward () on

        right, forgot to mention that I switched the order of the modes for depth 16, so that it would default to 1280x1024 instead of 640x480. I'm pretty sure that 1400x1050 had problems.

  10. By Erik Magnusson () on

    When I purchased OpenBSD I intended to use it on my desktop computer. I've used it for almost half a year and havn't had any problem so far. Actually it's the other way around. It's working great for me. I only use Windows XP for playing games.

    Have there been much problem using OpenBSD as one's desktop OS?

    Comments
    1. By Anonymous Coward () on

      no

  11. By neo () neostage@netcabo.pt on mailto:neostage@netcabo.pt

    hummm ... there are some other things to keep in mind when you go for X set in NIX's that that web page doesn't cover ... so i hope that apart of the portuguese comments, the sequence of commands can help a little bit.

    http://openbsd-pt.ath.cx/forum/viewtopic.php?t=43

    greetings all, speacialy the 'deadly team' :-)

Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]