From 4b977cf90d74bd4d0a9c7ca7f1dc33b6d875c8f5 Mon Sep 17 00:00:00 2001 From: Murray Stokely Date: Sun, 24 Jun 2001 04:25:29 +0000 Subject: [PATCH] Add more information about using KDE2. - Anti-aliased fonts - KDM - Setting up X to choose between GNOME and KDE Submitted by: Rahul Siddharthan --- .../books/handbook/x11/chapter.sgml | 250 +++++++++++++++--- 1 file changed, 213 insertions(+), 37 deletions(-) diff --git a/en_US.ISO8859-1/books/handbook/x11/chapter.sgml b/en_US.ISO8859-1/books/handbook/x11/chapter.sgml index 35a70ec4b0..aea03b1713 100644 --- a/en_US.ISO8859-1/books/handbook/x11/chapter.sgml +++ b/en_US.ISO8859-1/books/handbook/x11/chapter.sgml @@ -1,7 +1,7 @@ @@ -1343,49 +1343,49 @@ For further configuration, refer to /usr/X11R6/lib/X11/doc/README.Config. For XFree86 3.3.X you will need - to run a separate TrueType font - server. Xfstt is commonly used for this - purpose. To install Xfstt on your - FreeBSD system simply install the port from - /usr/ports/x11-servers/Xfstt + to run a separate TrueType font + server. Xfstt is commonly used for + this purpose. To install Xfstt on + your FreeBSD system simply install the port from + /usr/ports/x11-servers/Xfstt You should now make a directory for your TrueType fonts - (e.g. /usr/X11R6/lib/X11/fonts/TrueType) and - copy all of your TrueType fonts into this directory. Keep in mind - that you can not take TrueType fonts directly from a Macintosh; - they must be in Unix/DOS/Windows format for use by - XFree86. Once you have copied the files - into this directory you need to use - ttmkfdir to create a - fonts.dir file so that the X font renderer - knows that you've installed these new files. There is a FreeBSD - port for ttmkfdir in - /usr/ports/x11-fonts/ttmkfdir. + (e.g. /usr/X11R6/lib/X11/fonts/TrueType) + and copy all of your TrueType fonts into this directory. Keep in + mind that you can not take TrueType fonts directly from a + Macintosh; they must be in Unix/DOS/Windows format for use by + XFree86. Once you have copied the + files into this directory you need to use + ttmkfdir to create a + fonts.dir file so that the X font renderer + knows that you've installed these new files. There is a FreeBSD + port for ttmkfdir in + /usr/ports/x11-fonts/ttmkfdir. &prompt.root; cd /usr/X11R6/lib/X11/fonts/TrueType &prompt.root; ttmkfdir > fonts.dir Now you need to add your TrueType directory to your fonts - path. The easiest way to do this is to add the following entries - into your ~/.xinitrc file. + path. The easiest way to do this is to add the following entries + into your ~/.xinitrc file. &prompt.user; xset fp+ /usr/X11R6/lib/X11/fonts/TrueType &prompt.user; xset fp rehash That's it. Now Netscape, Gimp, StarOffice, and all of your - other X applications should now recognize your installed TrueType - fonts. Extremely small fonts (as with text in a high resolution - display on a web page) and extremely large fonts (within - StarOffice) will look much better now. + other X applications should now recognize your installed + TrueType fonts. Extremely small fonts (as with text in a high + resolution display on a web page) and extremely large fonts + (within StarOffice) will look much better now. - Anti-aliasing: Starting with XFree86 4.0.2, XFree86 does now - support antialiased fonts. As of now, a lot of software does not - take advantage of it, but Qt (the toolkit for the KDE desktop) does; - so if you are running this version of XFree86 (or higher), Qt 2.3 - (or higher) and KDE, all your KDE/Qt applications will use - anti-aliased fonts. + Starting with version 4.0.2, XFree86 supports antialiased + fonts. Currently, most software has not been updated to take + advantage of this new functionality. However, Qt (the toolkit + for the KDE desktop) does; so if you are running XFree86 4.0.2 + (or higher), Qt 2.3 (or higher) and KDE, all your KDE/Qt + applications will use anti-aliased fonts. @@ -1655,6 +1655,23 @@ DisplayManager.requestPort: 0 That's it. Now just type 'startx' and you will be in the GNOME desktop environment. + Note: if you're running a display manager like xdm, + this will not work. Instead, you should create an + executable .xsession file with the same + command in it. To do this, edit your file (if you already + have one) and replace the existing wm command with + /usr/X11R6/bin/gnome-wm; or + else, + + &prompt.root; echo "#!/bin/sh" > ~/.xsession +&prompt.root; echo "/usr/X11R6/bin/gnome-wm" >> ~/.xsession +&prompt.root; chmod +x ~/.xsession + + Another option is to configure your display manager to + allow choosing the window manager at runtime; the section on + KDE2 details + explains how to do this for kdm, the + display manager of KDE. @@ -1692,24 +1709,183 @@ DisplayManager.requestPort: 0 Installing KDE2 At the time this was written, a package for kde2 doesn't - exist yet. No problem! We'll just use the ports to install - it. To install KDE2, do this: + exist yet. No problem! The ports tree hides all the + complexity of building a package from source. To install + KDE2, do this : &prompt.root; cd /usr/ports/x11/kde2 &prompt.root; make install clean - That fetched all the necessary files from the internet, - compiled kde2, installed kde2, and cleaned up after itself - after the install. + This command will fetch all the necessary files from the + Internet, configure and compile KDE2, install the + applications, and then clean up after itself. Now you're going to have to tell the X server to launch - kde2 instead of a default window manager. Do this by typing + KDE2 instead of a default window manager. Do this by typing this: &prompt.root; echo "/usr/X11R6/bin/startkde" > ~/.xinitrc - Now everytime you go into X-Windows, kde2 will be your - desktop. + Now everytime you go into X-Windows, KDE2 will be your + desktop. (Note: this will not work if you're logging in via + a display manager like xdm. In that + case you have two options: create an + .xsession file as described in the + section on GNOME, but + with the /usr/X11R6/bin/startkde + command instead of the gnome-wm + command; or, configure your display manager to allow + choosing a desktop at login time. Below it is explained how + to do this for kdm, KDE's display + manager. + + + + More details on KDE2 + + Now that KDE2 is installed on your system, you'll find + that you can learn a lot from its help pages, or just by + pointing and clicking at various menus. Windows or Mac + users will feel quite at home. + + The best reference for KDE is the on-line documentation. + KDE comes with its own web browser, Konqueror, dozens of + useful applications, and extensive documentation. This + section only discusses somewhat technical things which are + difficult to learn just by random exploration. + + + The KDE desktop manager + + If you're an administrator on a multi-user system, you + may like to have a graphical login screen to welcome users. + You can use xdm, as + described earlier. However, KDE includes an alternative, + kdm, which is designed to look more attractive and include + more login-time options. In particular, users can easily + choose (via a menu) which desktop environment (KDE2, GNOME, + or something else) to run at runtime. If you're slightly + adventurous and you want this added flexibility and visual + appeal, read on. + + To begin with, run the KDE2 control panel, + kcontrol, as root. Note: it is + generally considered unsafe to run your entire X environment + as root. Instead, run your window manager as a normal user, + open a terminal window (such as xterm + or KDE's konsole, become root with + su (you need to be in the "wheel" + group in /etc/group for this), and then + type kcontrol. + + Click on the icon on the left marked "System", then on + "Login manager". On the right you'll see various + configurable options, which the KDE manual will explain in + greater detail. Click on "sessions" on the right. + Depending on what window managers or desktop environments + you have currently installed, you can type their names in + "New type" and add them. (These are just labels so far, not + commands, so you can write "KDE" and "GNOME" rather than + "startkde" or "gnome-wm".) Include a label + "failsafe". + + Play with the other menus as you like (those are mainly + cosmetic and self-explanatory). When you're done, click on + "Apply" at the bottom, and quit the control center. + + To make sure kdm understands what your above labels + (KDE, GNOME etc) mean, you need to edit some more files: the + same ones used by xdm. In your + terminal window, as root, edit the file + /usr/X11R6/lib/X11/xdm/Xsession. You + will come across a section in the middle looking like this + (by default): + +case $# in +1) + case $1 in + failsafe) + exec xterm -geometry 80x24-0-0 + ;; + esac +esac + + You will need to add a few lines to this section. + Assuming the labels you gave earlier were KDE2 and GNOME, + the following will do: + +case $# in +1) + case $1 in + KDE2) + exec /usr/X11R6/bin/startkde + ;; + GNOME) + exec /usr/X11R6/bin/gnome-wm + ;; + failsafe) + exec xterm -geometry 80x24-0-0 + ;; + esac +esac + + + To make sure your KDE choice of a login-time desktop + background is also honored, you will need to add the + following line to + /usr/X11R6/lib/X11/xdm/Xsetup_0: + + /usr/X11R6/bin/kdmdesktop + + + Now, you need only to make sure kdm is started at the + next bootup. To learn how to do this, read the section on + xdm, and do the same thing + replacing references to the xdm program + by kdm. + + That's it. Your next login screen should have a pretty + face and lots of menus. + + + + Anti-aliased fonts + + Tired of blocky staircase edges to your fonts under X11? + Tired of unreadable text in web browsers? Well, no + more. + + Starting with version 4.0.2, XFree86 supports + anti-aliasing via its "RENDER" extension, and starting with + version 2.3, Qt (the toolkit used by KDE) supports this + extension. So if you're running up-to-date software, + anti-aliasing is possible on your KDE2 desktop. Just go to + your KDE2 menu, go to Preferences -> Look and Feel -> Style, + and click on the checkbox "Use Anti-Aliasing for Fonts and + Icons". That's all. + + A caveat: anti-aliasing works by replacing sharp + black/white borders of fonts by shades of grey, in effect + finely blurring them. This makes very small fonts more + readable, and improves the appearance of very large fonts, + but normal-sized fonts when anti-aliased can strain the eyes + over long periods of time. It is possible to configure the + X font server to anti-alias only certain fonts and only for + certain (ranges of) font sizes; this involves editing the + file /usr/X11R6/lib/X11/Xftconfig. For + details, consult, for instance, the tutorial + by Keith Packard (who introduced the "RENDER" + extension). + + Anti-aliasing is still new to the FreeBSD/XFree86 world, + but configuring it should become much easier with time. It + is also available with the GNOME desktop using patches to + the gtk+ toolkit; since these patches break + internationalisation support, they are not officially + included at present. +