Professional Information Technology-Programming Book part 129 pptx

5 266 0
Professional Information Technology-Programming Book part 129 pptx

Đang tải... (xem toàn văn)

Thông tin tài liệu

requirements. It also makes a great development platform for practically any modern computer programming language. You definitely want the Ports tree installed for a desktop operating environment because you'll probably be installing a relatively large number of programs. 6.1. Configuring X.org There is no clean way to install X.org after OpenBSD has been installed. The best (and officially supported) way to do it is during installation. If you did not install X.org and want to install it now, it would be easiest to reinstall OpenBSD. Configuring X.org is simple. Just run this command from a root terminal: X -configure The preceding command is reasonably competent when it comes to auto-detecting your hardware and settings. The best way to test it is to use it with the window manager or desktop environment that you plan on being in most often. The configuration file will be saved to /root/xorg.conf.new. Go ahead and move it over to the proper directory with this command: mv /root/xorg.conf.new /etc/X11/xorg.conf If you want to test the configuration right away, you can do so with the default OpenBSD window manager, fvwm. The startx script is already configured to use it, so just type startx and press Enter to test out the settings. When you want to leave fvwm, you can press Ctrl-Alt-Backspace to kill the X session. If you see some X.org settings that need to be changed, or if X fails to start with the startx script, you can edit /etc/X11/xorg.conf and make any necessary changes. Configuring X.org is a subject unto itself, so here are a few basic pointers:  If the scroll wheel does not work on your mouse, add this line to the mouse's InputDevice section:  Option ZAxisMapping "4 5"  If you get no display at all, go to the Device section for the video card and change the Driver line from its current setting (it's probably something like ati, nv or fbdev) to vesaa generic setting that should work with any video card, but won't force you into a low resolution or color depth. Since OpenBSD can't do 3-D acceleration anyway, you've got nothing to lose.  If the color depth and/or screen resolution are not to your liking, you need to adjust the Screen section. Since the default configuration doesn't show you the options you need, here is a good example that you can copy and paste into your xorg.conf file (be sure to completely replace any existing Subsection "Screen" section):  Section "Screen"  Identifier "Screen0"  Device "Card0"  Monitor "Monitor0"  SubSection "Display"  Viewport 0 0  Depth 24  Modes "1280x1024" "1024x768" "800x600"  Virtual 0 0  EndSubSection  EndSection In the above sample configuration, Depth is color depth in bits (24 is the highest you can go), and Modes are the resolutions you want to be able to use. The first resolution is the default startup resolution; it is perfectly acceptable to list only one resolution here. Leave Virtual and Viewport alone; they set screen parameters that you usually don't need to touch. At this point, you've configured X.org as much as you can without installing your preferred window manager or desktop environment. 6.2. Installing a Desktop Environment or Window Manager Now that you have X.org reasonably well configured, it's time to install the window manager or desktop environment that you prefer to work from. Here's where to find them:  KDE: /usr/ports/x11/kde  GNOME: /usr/ports/x11/gnome  Xfce: /usr/ports/x11/xfce4  Enlightenment (E16): /usr/ports/x11/enlightenment  Fluxbox: /usr/ports/x11/fluxbox  Blackbox: /usr/ports/x11/blackbox  IceWM: /usr/ports/x11/icewm  Windowmaker: /usr/ports/x11/windowmaker If your window manager of preference isn't listed here, take a look through /usr/ports/x11 and see if you can find it there. There is currently no support for Enlightenment E17 through Ports, but it very well may compile from source. There are many extras and add-ons for various desktop environments and window managers in the /usr/ports/x11 directory, so you should definitely take a look through it to make sure you've got everything you need. Lastly, you can hack the Makefile for many of these packages if you want only certain components installed. 6.3. Starting X.org The /usr/X11R6/bin/xinit script is the default method of starting the X server from a user account, though you can also use startx or the GNOME desktop manager (GDM) or KDE desktop manager (KDM) if you have either one of those desktop environments installed. Only the root user can run the gdm or kdm binaries from the command line, so unless you want to run this service as root (a security risk), you will have to either configure xinit to start KDE or GNOME, or set GDM or KDM to start as a boot service. Theoretically you could start your window manager of preference by adding it as a command-line argument to xinit, but realistically you'll probably just want to have one graphical environment. The default X.org login manager is the old, traditional, and relatively boring XDM. There are two good things about XDM in OpenBSD: it is easily started as a boot service, and it is fairly easy to configure. XDM is configured through the /usr/X11R6/lib/X11/xdm/xdm-config file, though that file draws on other config files in the same directory. By default, XDM starts the plain-old fvwm window manager, which most people will probably want to change. To do this, edit the /usr/X11R6/lib/X11/xdm/Xsession file and look for this line: /usr/X11R6/bin/fvwm Change this path and executable to the one for your window manager or desktop environment of choice. If you aren't sure what the executable is, just take a look through the /usr/X11R6/bin and /usr/local/bin directories. GNOME and KDE are tricky; you have to use these executables to start them outside of GDM and KDM: /usr/local/bin/gnome-session /usr/local/bin/startkde To make OpenBSD start XDM by default (instead of going to the terminal login screen), edit /etc/rc.conf, and in the following line, change NO to empty double quotes "": xdm_flags=NO # for normal use: "" If you want to use GDM or KDM instead of XDM, you have to go through /etc/rc.local instead of /etc/rc.conf. At the end of the rc.local file, insert one of these lines: /usr/local/bin/gdm /usr/local/bin/kdm If you don't want to log in graphically and will be using X.org only part-time, it makes more sense to use the xinit script instead of a login manager. You could edit the /etc/X11/xinit/xinitrc script directly, but it would be better to copy it to the home directories of the users who need to use X.org and rename it ~/.xinitrc. This is the local user override for the global xinitrc. Edit it as you prefer, replacing the #Start some nice programs section with your own preferred applications (or just type the path and executable for your favorite window manager or desktop environment as explained above, and don't start any desktop applications by default). To start xinit, just type xinit and press Enter. By default, X.org looks in the current user's home directory for a .xinitrc file, and if there isn't one, the default settings are used. 6.4. Finding and Installing Desktop-Oriented Programs This part is tricky because desktop programs are hidden all over the place in the OpenBSD Ports tree. You have to think about the programs you want and what categories they might fit into, and then browse the Ports tree and see if you can find them. Some of the more common programs and their locations are listed here:  OpenOffice.org: /usr/ports/editors/openoffice (OpenOffice.org is broken in OpenBSD 4.0, but it does work in the development branch, which a later section will show you how to convert to if you wish.)  AbiWord: /usr/ports/editors/abiword  LyX: /usr/ports/print/lyx  Vim: /usr/ports/editors/vim  Emacs: /usr/ports/editors/emacs21  XEmacs: /usr/ports/editors/xemacs21  Eclipse (you need to install a JDK first; see the section on Java for instructions): /usr/ports/devel/eclipse  Gnumeric: /usr/ports/math/gnumeric  Firefox: /usr/ports/www/mozilla-firefox  Opera: /usr/ports/www/opera (this is the GNU/Linux edition, so Linux binary compatibility is required)  Adobe Flash Player/Plugin: /usr/ports/www/opera-flashplugin (this is the GNU/Linux edition, so Linux binary compatibility is required)  Adobe Acrobat Reader/Plugin: /usr/ports/print/acroread (this is the GNU/Linux edition, so Linux binary compatibility is required)  Evolution: /usr/ports/mail/evolution  Bluefish: /usr/ports/www/bluefish  The GIMP: /usr/ports/graphics/gimp  Grip: /usr/ports/audio/grip  XMMS: /usr/ports/audio/xmms  AmaroK: /usr/ports/audio/amarok  Rhythmbox: /usr/ports/audio/rhythmbox  Audacity: /usr/ports/audio/audacity 6.5. Font Configuration Now for the tricky part, achieving antialiased fonts. Most desktop operating systems have elaborate software frameworks and predefined configuration files so that you don't ever have to give any thought to the smoothness of your fonts, but OpenBSD makes you work for your reward. . /usr/local/bin/kdm If you don't want to log in graphically and will be using X.org only part- time, it makes more sense to use the xinit script instead of a login manager. You could edit. one, the default settings are used. 6.4. Finding and Installing Desktop-Oriented Programs This part is tricky because desktop programs are hidden all over the place in the OpenBSD Ports tree /usr/ports/audio/rhythmbox  Audacity: /usr/ports/audio/audacity 6.5. Font Configuration Now for the tricky part, achieving antialiased fonts. Most desktop operating systems have elaborate software frameworks

Ngày đăng: 07/07/2014, 03:20

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan