发新话题
打印

The X Window System

The X Window System

怎样在xfree中使用鼠标?

    假定你使用默认的wscons控制台驱动,请确认你正确调整了xf86config中的pointer段里关于鼠标的协议和设备:

    Section "Pointer"
       ###Protocol       "PS/2"                    # Linux
       ###Device         "/dev/mouse"              # Linux
       ##Protocol        "busmouse"                # NetBSD 1.4.x
       ##Device          "/dev/pms0"               # NetBSD 1.4.x
       Protocol          "wsmouse"                 # NetBSD 1.5 or later
       Device            "/dev/wsmouse"            # NetBSD 1.5 or later
    EndSection

    如果没有使用wscons(1.4中就是),请使用/dev/pms0和busmouse协议(针对ps/2鼠标)

    Protocol "PS/2" is still supported for older kernels, you'll have to use Device "/dev/pms0" with the opms mouse driver in the kernel for that, though. Useful for X-Servers that don't support the wscons protocol (like XFree V4 or Linux/FreeBSD X server binaries).

keyboard mapping
   
    xfree3.x默认使用english的keyboard map.更改为german,在XF86Config中使用下面的一段:

        #       XkbDisable
        #       XkbKeymap   "xfree86(us)"

            XkbModel        "pc102"
               XkbLayout       "de" XkbVariant      "nodeadkeys"

    而在xfree4.x中使用german 的keyboard map.则在XF86Config的inputdevices中放置如下:

        Options        "XkbLayout"    "de"


    关于在wscons中keyboard的配置,你可以看看http://www.netbsd.org/Documentation/wscons/#keyboard-maps


How do I make the Caps key another Control key(使用caps键)

         For XFree 3.x (as shipped with NetBSD 1.l5), add ``XkbOptions "ctrl:nocaps"'' if you want the caps-lock key become a second control-key. If you want to use the "Windows" keys on your keyboard, you can get some useful keysyms for them by using ``XkbModel "pc105"'' instead.

        XFree 4.x uses a different config file format. For it, put

            Option "XkbOptions" "ctrl:nocaps"

        into the "InputDevice" section of your XF86Config file.


找不到startx?

    你需要改变path路径.即加入/usr/x11R6/bin到你的~/.cshrc中.如果使用sh,就加入到~/.profile中.

找不到xinit?

    同上,root用户,set path= ( $path /usr/X11R6/bin )到/etc/csh.cshrc,然后新开一个shell.


tartx fails -'X connection to: 0.0 broken'

    查看error 信息.如果是csh:
   
    startx > & ~/x.log

    如果是sh,ksh:

    startx > ~/x.log 2 > &1
   
    仔细看x.log

怎样使用鼠标滚轮(使其工作)??


        If you use a Microsoft IntelliMouse, Logitech Wheel Mouse (cordless our not) or something similar that has a scroll wheel, and you want to use the wheel under NetBSD, first make a kernel that includes the "pmsi" driver, and make sure "wsmouse" uses it. Something like this should occur in your dmesg(1) output:

            pmsi0 at pckbc0 (aux slot)
            wsmouse0 at pmsi0

        If you are running XFree86 3.x (as shipped with NetBSD 1.5.2 and earlier), ensure your /etc/XF86Config contains:

            Section "Pointer"
                Protocol    "wsmouse"
                Device      "/dev/wsmouse"
                ZAxisMapping 4 5
        EndSection


    如果是用xfree4.x,查看/etc/X11/XF86Config:

        Section "InputDevice"
            Identifier  "Mouse0"
            Driver      "mouse"
            Option      "Protocol"      "wsmouse"
            Option      "Device"        "/dev/wsmouse"
            Option      "Buttons"       "5"
            Option      "ZAxisMapping"  "4 5"
        EndSection
   

Which version of XFree86 am I running?

        $ xdpyinfo | grep release


How to setup anti-aliased fonts on NetBSD with XFree86 4(字体反锯齿功能)


    NOTE: The paths below should be adjusted appropriately if using xpkgwedge

       1. Install the following packages from pkgsrc://从pkgsrc安装需要的字体
          * ms-ttf
          * mkfontscale
          * fontconfig
       2. Setup the font hints://设置hints
          * mkfontscale /usr/X11R6/lib/X11/fonts/TrueType
          * mkfontdir /usr/X11R6/lib/X11/fonts/TrueType
              There should now be a 'fonts.dir' and 'fonts.scale' in the TrueType font directory.
       3. Configure the X server://使用freetype
          * In the "Module" section, make sure that the following exists:


        Load "type1"
        Load "freetype"

          * In the "Files" section, verify the order of the font paths. Verify that the TrueType and Type1 font paths are before the rest://设置字体路径,注意truetype和type1应该在最前面


        FontPath   "/usr/X11R6/lib/X11/fonts/local/"
        FontPath   "/usr/X11R6/lib/X11/fonts/TrueType/"
        FontPath   "/usr/X11R6/lib/X11/fonts/Type1/"
        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/75dpi/"
        FontPath   "/usr/X11R6/lib/X11/fonts/100dpi/"


       4. Configure Xft -- an example /usr/X11R6/lib/X11/XftConfig follows://配置xftconfig文件


        ##### Example XftConfig//下面是例子
        dir "/usr/X11R6/lib/X11/fonts/TrueType"
        dir "/usr/X11R6/lib/X11/fonts/Type1"
        # Uncomment the following line if using an LCD display
        #match edit rgba = rgb;
        match any family == "fixed"             edit family =+ "mono";
        includeif       "~/.xftconfig"
        match any family == "Times"             edit family += "Times New Roman";
        match any family == "Helvetica"         edit family += "Verdana";
        match any family == "Courier"           edit family += "Courier New";
        match any family == "serif"             edit family += "Times New Roman";
        match any family == "sans"              edit family += "Verdana";
        match
                any family == "mono"
                all slant == roman
                all weight < bold
        edit
                family += "monotype.com";
        match any family == "mono"              edit family += "Courier New";
        match any family == "Charter"           edit family += "Bitstream Charter";
        match any family == "Bitstream Charter" edit family =+ "Charter";
        match any family == "Lucidux Serif"     edit family += "LuciduxSerif";
        match any family == "LuciduxSerif"      edit family =+ "Lucidux Serif";
        match any family == "Lucidux Sans"      edit family += "LuciduxSans";
        match any family == "LuciduxSans"       edit family =+ "Lucidux Sans";
        match any family == "Lucidux Mono"      edit family += "LuciduxMono";
        match any family == "LuciduxMono"       edit family =+ "Lucidux Mono";
        match any family == "Comic Sans"        edit family += "Comic Sans MS";
        match any family == "Comic Sans MS"     edit family =+ "Comic Sans";
        match any family == "Trebuchet"         edit family += "Trebuchet MS";
        match any family == "Trebuchet MS"      edit family =+ "Trebuchet";
            match any family == "Monotype"          edit family =+ "Monotype.com";
        match any family == "Andale Mono"       edit family += "Monotype.com";
        match any family == "Monotype.com"      edit family =+ "Andale Mono";
        ##### End of XftConfig


       5. Rebuild the font cache for applications that use fontconfig://重建字体数据缓存


        fc-cache -v

          This will take a very long time (~20 minutes on a PII 366), so be patient.
       6. That's it! Restart the X server, and test the configuration://重新启动x


        xterm -ls -fg gray -bg black -ls -fa "Courier New Bold" -fs 10

        This Anti-Aliased-Fonts-Mini-Howto was written by Jared D. McNeill.
   


How do I change the default window manager?//怎样改变默认窗口管理器


        *  If you are using startx(1), edit the ~/.xinitrc file and append the following line to it:

            exec twm


            * If you are using xdm(1), edit the ~/.xsession file and append the following line to it:

TOP

发新话题