Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 3728 Details for
Bug 7622
Updated desktop guide for 1.4
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Updated desktop guide
desktop.xml (text/plain), 38.43 KB, created by
John Davis (zhen) (RETIRED)
on 2002-09-07 11:08:27 UTC
(
hide
)
Description:
Updated desktop guide
Filename:
MIME Type:
Creator:
John Davis (zhen) (RETIRED)
Created:
2002-09-07 11:08:27 UTC
Size:
38.43 KB
patch
obsolete
><?xml version='1.0'?> > ><!DOCTYPE guide SYSTEM "../dtd/guide.dtd"> > ><guide link="/doc/desktop.html"> ><title>Gentoo Linux Desktop Configuration Guide</title> ><author title="Editor"><mail link="davisjp@muc.edu">John P. Davis</mail></author> > ><abstract> > This guide shows you configure Gentoo Linux to be a full-purpose > desktop system. Specifically, we walk through installing and > configuring X, KDE, GNOME, OSS and alsa (sound), postfix (electronic mail), > and samba (unix/windows interoperability). ></abstract> > ><version>0.3</version> ><date>05 September 2002</date> > ><chapter> ><title>Preliminaries</title> ><section> ><body> ><p>Needless to say, you first need to have Gentoo Linux installed >(<uri>http://www.gentoo.org/doc/build.html</uri>). Having finished >that rather enjoyable process, you also need to download the <e>Portage</e> >tree. You really should read the Portage User Guide >(<uri>http://www.gentoo.org/doc/portage-user.html</uri>), but if you're >in a hurry you just need to type: ></p> ><pre># <i>emerge sync</i></pre> ><p>A quick note is in order about the packages that I have chosen to >discuss here. Gentoo Linux has a considerable wealth of window managers, >mail transport agents, etcetera that can easily be installed. The specific >packages that I have chosen to cover are not preferred by Gentoo Linux, they >are simply packages that the author likes and/or knows how to configure. >In other words, they're the packages on the author's own desktop.</p> ></body> ></section> ></chapter> > ><chapter> ><title>X and KDE</title> > ><section> ><title>Installation</title> ><body> ><p> >Having installed Gentoo Linux and updated Portage, >my first task is generally to install X >and a desktop manager. X takes forever to compile, and KDE takes even longer, >so I highly recommend doing this right before going to bed. ></p> ><p> >It's always useful to use the <c>--pretend</c> flag before doing >an <c>emerge</c> to see what dependencies are going to be installed, and in our >case it's quite a lot. ></p> > ><pre> ># <i>emerge --pretend kde</i> ># <i>emerge kde</i> ></pre> > ><note> >Be careful when using <i>emerge kde-base</i>. This will only install the base KDE packages >and none of KDE's helper applications. ></note> > ><note> >If you plan to use CUPS for printing then you probably want "cups" >in your USE variables in <path>/etc/make.conf</path> before emerging >KDE. This can also be done from the command line by doing a ><i>USE="cups" emerge kde </i>. >Please reference the Gentoo Print Guide for a complete CUPS install >explanation. ></note> > ><p>Have a nice nap!</p> > ><note>If you have a Gentoo Linux binary CD, then you can install >the packages directly off of the CD.</note> ><pre caption="Installing binary packages from the CD"> ># <c>export PKGDIR=/mnt/cdrom/gentoo/packages</c> ><comment>Normally Portage expects packages to be in /usr/portage/packages ></comment> ># <c>emerge --usepkg /mnt/cdrom/gentoo/packages/All/kdebase-x.y.z.tbz2</c> ><comment>The <c>--usepkg</c> flag makes sure that binary packages are used >for the dependencies (if available).</comment> ></pre> > ></body> ></section> > ><section> ><title>Configuring</title> ><body> > ><note>If you are using a USB mouse, please use the USB mouse configuration >found below. </note> > ><p> >I like using the console-based <c>xf86config</c> program to configure X, >although the generated <path>/etc/X11/XF86Config</path> file is not very >elegant -- see <uri link="http://www-105.ibm.com/developerworks/education.nsf/linux-onlinecourse-bytitle/3100FF4795B3F31F86256AF70056FDB3?OpenDocument"> >this tutorial</uri> >for an alternative and more thorough X configuration. >Before you start, you'll need to know the horizontal and vertical refresh >rates of your monitor (my viewsonic G773 has Horizontal: 30-69 KHz, >Vertical: 55-90 KHz), the type and amount of ram (in KB) of your video card >(a 32768 KB GeForce card, in my case), and the type and device of your >mouse (an intellimouse plugged into the ps/2 port <path>/dev/psaux</path>). ></p> > ><pre># <c>/usr/X11R6/bin/xf86config</c></pre> > ><p>Because I have a three-button mouse I choose not to enable >3-button emulation. Don't forget to add XKB support if you have an internation keyboard or need multiple language support. >You'll have to guess at a screen resolution and pixel depth that you'll like. I happen >to like 1280x1024 at 24bpp on my viewsonic, but that's only because it >doesn't work at a higher resolution. If you've never done this before, >don't be surprised if you end up running <c>xf86config</c> multiple >times.</p> > ><note>If you don't know the refresh rates of your monitor, try doing a >google search, <uri>http://www.google.com</uri>, on the model number and >manufacturer of your monitor. The refresh rates are generally given as >part of the monitor specs.</note> > ><p>If you're an X-configuring veteran, you may be used to making >a symbolic link from your mouse device to <path>/dev/mouse</path>. >Such symlinks used to be problematic with devfs, since they tended to go >away after a reboot. Gentoo Linux now handles symbolic links in ><path>/dev</path> correctly. Just make the <path>/dev/mouse</path> symlink >using <c>ln -s</c> and it <e>will</e> be preserved upon rebooting. ></p> > ><pre># <i>startx</i></pre> ><p>If you configured X properly, running <c>startx</c> should start an >amazingly ugly X window manager (twm, to be specific). If X comes up, >you're good to go. Hit <c><ctrl><alt><backspace></c> >to kill the X server.</p> > ><p>If you have a wheel mouse you'll want to edit the XF86Config file >by hand:</p> ><pre> ># <i>cp /etc/X11/XF86Config /etc/X11/XF86Config.working</i> ># <i>nano -w /etc/X11/XF86Config</i></pre> ><pre caption="Pointer section of XF86Config"> >Section "InputDevice" > ># Identifier and driver > > Identifier "Mouse1" > Driver "mouse" > <i>Option "Protocol" "IMPS/2" </i> > Option "Device" "/dev/psaux" > <i>Option "ZAxisMapping" "4 5"</i> > ></pre> ><p>Because I have an intellimouse I changed the "Protocol" from >"PS/2" to "IMPS/2". Getting the wheel to scroll just requires >adding the 'Option "ZAxisMapping" "4 5"' line, where '4' and '5' >correspond to mouse wheel up and mouse wheel down. ></p> ><note>Netscape 4.x won't scroll with the wheel by default; you'll need >to create an .Xdefaults file first. Go ><uri link="http://www-sop.inria.fr/koala/colas/mouse-wheel-scroll/">here</uri> >for instructions. Better yet, use <c>konqueror</c>, <c>opera</c>, ><c>mozilla</c>, <c>galeon</c>, or some other real browser.</note> > ><p>Run <c>startx</c> again just to make sure X still comes up. >If you happen to have an NVIDIA card, now would be a good time to >install the NVIDIA accelerated drivers.</p> ><pre caption="NVIDIA owners only"> ># <c>emerge nvidia-glx</c> ># <c>emerge nvidia-kernel</c> ># <c>nano -w /etc/X11/XF86Config</c> ></pre> ><pre caption="Turning on GLX in /etc/X11/XF86Config"> >Section "Module" > ># This loads the GLX module ># Load "glx" <comment>(Uncomment this line)</comment> ></pre> ><pre caption="Tell X to use the nvidia driver in /etc/X11/XF86Config"> >Section "Device" > Identifier "NVIDIA GeForce" > #Driver "nv" > Driver "nvidia" > #VideoRam 32768 > # Insert Clocks lines here if appropriate >EndSection ></pre> > ><p>Run <c>startx</c> one more time to make sure that X still comes up >(this time with the NVIDIA splash screen, if you have installed the >nvidia drivers). >Assuming that it does, kill X and we'll start a real window manager >instead. >Thanks to Achim, Danarmak and Verwilst, Gentoo's KDE packagers, the >KDE ebuild configures KDE quite well all by itself. The KDM display >manager should work just by starting it.</p> ><pre># <i>kdm</i></pre> ><p>You should be able to log in and see KDE in full working order. >Of course sound shouldn't be working yet, so you'll miss the annoying >KDE start-up sound, but we'll fix that in a moment. Open a >konsole, type <c>ls /usr/bin</c> (or anything else that more than fills >the konsole window), and see if the mouse wheel lets >you scroll up and down in the konsole window. It really should >work!</p> > ><p>All that's left is to make sure that X comes up when Gentoo boots. >Edit <path>/etc/rc.conf</path> so that ><e>DISPLAYMANAGER="kdm"</e>. ></p> ><pre> ># <i>nano -w /etc/rc.conf</i> ></pre> ><pre caption="/etc/rc.conf -- setting DISPLAYMANAGER"> ># What display manager do you use ? [ xdm | gdm | kdm ] > >DISPLAYMANAGER=kdm ></pre> ><p> >Now we just need to make sure that the ><e>xdm</e> start-up script is read when booting. ></p> ><pre> ># <i>rc-update add xdm default</i> ></pre> ><p>Reboot, and see if X comes up!</p> ><impo>The <c>rc-update</c> command is Gentoo Linux's improved version of >the venerable <c>chkconfig</c> command for managing init scripts. Type ><c>rc-update</c> by itself for a list of options. ></impo> > ></body> ></section> ></chapter> > ><chapter> ><title>X and GNOME</title> > ><section> ><title>Installation</title> ><body> > ><p>First, we have to install the necessary GNOME packages. </p> > ><pre> ># <c>emerge --pretend gnome</c> ># <c>emerge gnome</c> ></pre> > ><p>This will take a good while to do, so kick back and watch a movie. </p> > ><p>GNOME configuration is basically the same as KDE from this point forward. >It is still necessary to edit <i>XF86Config</i> and set up the NVIDIA drivers and >default desktop manager. Please consult above for these procedures. </p> > ></body> ></section> > ><section> ><title>USB Mouse Configuration</title> ><body> > ><p>A USB mouse is your friend on a high resolution screen. The kernel takes care >of the scaling so you don't have to move your mouse five times across the pad to make it >across the screen. </p> > ><p>The first thing that has to be done is the installation of the kernel modules. The modules that >will be needed for a USB mouse to work are <i>usbmouse</i>, <i>mousedev</i>, <i>hid</i>, <i>usbcore</i>, >and <i>input</i>. After the necessary kernel configuration is done, <i>insmod</i> the modules. </p> > ><note>When configuring the Input Core support for the mouse, make sure to enter the screen >resolution that you will be using in X. This makes the scaling all pretty and correct. </note> > ><p>Now, unplug the mouse, and plug it back in, and check your kernel log for a message that >looks something like this </p> > > ><pre> >hub.c: USB new device connect on bus1/1, assigned device number 2 >input0,hiddev0: USB HID v1.00 Mouse [Microsoft Microsoft IntelliMouse Optical] on usb1:2.0 ></pre> > ><p>Now that the mouse is detected, check <path>/dev/input</path> to make sure that your mouse >is there and working. </p> > ><pre> ># <c>cd /dev/input</c> ># <c>cat mouse0</c> ><comment>Move your mouse when you <i>cat</i> the device, you should see a lot >of garbage. </comment> ></pre> > ><p>Once the mouse is properly detected and installed, now we have to tell X to use the >USB mouse. All that is required here is a slight change to what device X uses >for the mouse. </p> > ><pre> ># <i>cp /etc/X11/XF86Config /etc/X11/XF86Config.working</i> ># <i>nano -w /etc/X11/XF86Config</i> ></pre> > ><pre caption="Pointer section of XF86Config"> >Section "InputDevice" > ># Identifier and driver > > Identifier "Mouse1" > Driver "mouse" > <i>Option "Protocol" "IMPS/2" </i> > Option "Device" "/dev/input/mouse0" > <i>Option "ZAxisMapping" "4 5"</i> > ></pre> > ><p>Okay, restart X, and the mouse should be working! </p> ><p>Don't forget to add the modules that your mouse uses to <i>modules.autoload</i>. </p> > ><pre> ># <c>echo $'/n'usbmouse $'/n'mousedev $'/n'hid #'/n'usbcore $'/n'input >> /etc/modules.autoload</c> ></pre> > ></body> ></section> ></chapter> ><chapter> > ><title>Sound</title> ><section> ><title>Alsa</title> ><body> > ><p>Gentoo Linux supports Alsa for sound using the default kernel. Alsa can >be run with or without <e>devfs</e>. One note; if you've installed a new ><path>sys-kernel/linux-sources</path> package, make sure that your Linux kernel >has sound support enabled.</p> > ><pre> ># <i>emerge alsa-driver</i> ></pre> ><p> >I am going to assume >here that you have <e>devfs</e> enabled; if you don't then please >see the Gentoo FAQ: ><uri>http://www.gentoo.org/doc/faq.html</uri>. ></p> ><p>Now we set up the <e>kerneld</e> aliases.</p> ><pre> ># <i>nano -w /etc/modules.d/alsa</i> ># <i>update-modules</i> ></pre> ><pre caption="Near the top of /etc/modules.d/alsa"> >## >## IMPORTANT: >## You need to customise this section for your specific sound card(s) >## and then run `update-modules' command. >## Read alsa-driver's INSTALL file in /usr/share/doc for more info. >## >## ALSA portion ><i>alias snd-card-0 snd-emu10k1</i> ><i>alias snd-card-1 snd-emu10k1</i> ><i>alias snd-card-2 snd-emu10k1</i> ><i>alias snd-card-3 snd-emu10k1</i> ><i>alias snd-card-4 snd-emu10k1</i> ><i>alias snd-card-5 snd-emu10k1</i> ><i>alias snd-card-6 snd-emu10k1</i> ><i>alias snd-card-7 snd-emu10k1</i> ></pre> ><p> >You'll want to replace <e>snd-card-emu10k1</e> with >your sound card. ></p> ><p>You should also verify that <path>/etc/devfsd.conf</path> >has the alsa devices and permissions correctly registered.</p> ><pre> ># <i>nano -w /etc/devfsd.conf</i> ># <i>rc-update add alsasound boot</i> ></pre> ><pre caption="middle of devfsd.conf file with Alsa/oss stuff"> ># ALSA/OSS stuff ># Comment/change these if you want to change the permissions on ># the audio devices >LOOKUP snd MODLOAD ACTION snd >LOOKUP dsp MODLOAD >LOOKUP mixer MODLOAD >LOOKUP midi MODLOAD >REGISTER sound/.* PERMISSIONS root.audio 660 >REGISTER snd/.* PERMISSIONS root.audio 660 ></pre> ><note>Notice that devfsd.conf sets <path>/dev/sound</path> >permissions to be <c>root.audio</c>. Thus, for non-root users to >use audio they will have to be part of the <c>audio</c> group. ></note> ><warn>Note that the alsasound script should be added to the "boot" runlevel, not >the "default" runlevel. ></warn> ><p> >At this point the simplest method is to reboot. You still won't >be able to hear any sound, though, because alsa keeps all sound channels >muted by default. ></p> ><pre> ># <i>emerge alsa-utils</i> ># <i>amixer</i> > >Group 'Input Gain',0 > Capabilities: volume mute jointly-mute > Channels: Front-Left Front-Right > Limits: min = 0, max = 15 > Front-Left: 11 [73%] [mute] [---] > Front-Right: 11 [73%] [mute] [---] >Group 'Master Mono',0 > Capabilities: volume mute capture exclusive-capture > Capture exclusive group: 1 > Channels: Front-Left Front-Right > Limits: min = 0, max = 31 > Front-Left: 23 [74%] [mute] [---] > Front-Right: 23 [74%] [mute] [---] >Group 'Headphone',0 > Capabilities: volume mute jointly-mute > Channels: Front-Left Front-Right > Limits: min = 0, max = 31 > Front-Left: 0 [0%] [mute] [---] > Front-Right: 0 [0%] [mute] [---] >Group 'Master',0 > Capabilities: volume mute jointly-mute capture exclusive-capture > Capture exclusive group: 1 > Channels: Front-Left Front-Right > Limits: min = 0, max = 63 > Front-Left: 50 [79%] [mute] [---] > Front-Right: 50 [79%] [mute] [---] ><comment>[chopped for brevity]</comment> > ># <i>amixer set Master 100 unmute</i> ># <i>amixer set PCM 100 unmute</i> ># <i>aplay /usr/kde/3/share/sounds/pop.wav</i> <comment>(pop.wav is part of KDE)</comment> ></pre> ><p> >After installing the alsa utilities we use <c>amixer</c> to >unmute the Master and PCM sound channels and to set their volume >to 100%. We check to see if sound is working by using the ><c>aplay</c> (alsa play) command. If you hear a pop, then sound >is indeed working. Then, adjust the volume settings to your liking; >the ncurses-based <c>alsamixer</c> is a great way to get them "just so". ></p> > ><p>You may want to emerge <i>alsa-xmms</i> as that will provide ALSA >support for XMMS. ></p> > ><p> >When you reboot your system, the <e>alsasound</e> init >script will properly save and restore your volume settings. ></p> ></body> ></section> ><section> ><title>Standard Kernel Sound Modules</title> ><body> ><p>For standard kernel sound, you will have to recompile the >kernel if you didn't compile your sound module when you installed >gentoo. >If you chose to compile the sound driver as a module (not >compile it directly into the kernel), they you need to add >the module name (without the .o extension) to <path>/etc/modules.autoload</path>. >Reboot the machine if you compiled the sound module into the kernel, >or just <c>modprobe drivername</c> if you compiled the sound module as a module. >With any luck the appropriate sound driver >should now be loaded. To actually produce sound, a few more steps >are required. ></p> ><pre caption="non-devfs users only"> ># <i>cd /dev</i> ># <i>/usr/sbin/MAKEDEV audio</i> ></pre> ><pre> ># <i>cat /usr/kde/2/share/sounds/pop.wav > /dev/dsp</i> ># <i>emerge media-sound/sox</i> ># <i>play /usr/kde/2/share/sounds/pop.wav</i> ></pre> ><p> >If any sound at all results from cat'ing the .wav file to ><path>/dev/dsp</path>, then sound is probably working. >By emerge'ing sox one can use the <c>play</c> command to >play .wav files (and, unlike using <c>cat</c>, the .wav file >should actually sound good when using <c>play</c>). ></p> ><!-- >found that when running <e>devfs</e> the /dev/MAKEDEV script >would be missing. Help? Well, you shouldn't need to run MAKEDEV if you're >using devfs (maybe to get /dev/dsp created?), but if you need it, its real home is in /usr/sbin (/dev/MAKEDEV is >a symlink. I changed the text to reflect this. [drobbins] >--> ></body> ></section> ><section> ><title>Sound and KDE</title> ><body> ><p> >KDE has some nice sound utilities, including the KDE sound mixer ><c>kmix</c>. ></p> ><pre> ># <i>emerge --search kdemultimedia</i> >[ Results for search key : kdemultimedia ] >[ Applications found : 1 ] > >* kde-base/kdemultimedia > Latest version Available: 2.2.2 > Latest version Installed: 2.2.2 > Description: ${DESCRIPTION}Multimedia ># <i>kmix</i> ></pre> ><note>If kmix cannot find a mixer, then it probably thinks you don't >have sound support. Log out and remove <path>~/.kde/share/config/kmixrc</path> >and <path>~/.kde/share/config/kmix:*</path> >then log in again. This time it should find >the sound mixer properly. ></note> ></body> ></section> ></chapter> > ><chapter> ><title>Mail</title> ><section> ><title>Postfix -- Install and Configure</title> ><body> ><p> >I happen to like the <c>postfix</c> mail system because it emulates ><c>sendmail</c> without the considerable nightmare of having to >configure <c>sendmail</c>. While we're at it we'll also install ><c>mutt</c>, a mail reader, so that we can test out our ><c>postfix</c> configuration. ></p> ><pre> ># <i>emerge postfix mutt</i> ></pre> ><p> >If you only intend to use your mail server for sending mail, >then postfix is already set up for you. Otherwise, you'll >want to edit <path>/etc/postfix/main.cf</path>. The ><path>main.cf</path> file is reasonably well documented, and >the defaults are reasonable for a standalone machine. If >your workstation is directly on the internet (i.e., having >its own non-private IP address and DNS name) then the only >change you will probably have to make is enabling postfix to receive >mail. ></p> ><pre caption="Turning on mail reception in main.cf"> ># RECEIVING MAIL > ># The inet_interfaces parameter specifies the network interface ># addresses that this mail system receives mail on. By default, ># the software claims all active interfaces on the machine. The ># parameter also controls delivery of mail to user@[ip.address]. ># >#inet_interfaces = all >#inet_interfaces = $myhostname >#inet_interfaces = $myhostname, localhost ><i>inet_interfaces = $myhostname, localhost</i> ><i>mydestination = $myhostname, localhost.$mydomain</i> ></pre> > > ></body> ></section> ><section> ><title>Postfix Testing (with Mutt)</title> ><body> ><p> >Let's see if it works. ></p> ><pre> ># <i>postfix check</i> ><!-- >postfix-script: warning: creating missing Postfix pid directory >postfix-script: warning: creating missing Postfix incoming directory >postfix-script: warning: creating missing Postfix active directory >postfix-script: warning: creating missing Postfix bounce directory >postfix-script: warning: creating missing Postfix defer directory >postfix-script: warning: creating missing Postfix deferred directory >postfix-script: warning: creating missing Postfix flush directory >postfix-script: warning: creating missing Postfix saved directory >postfix-script: warning: creating missing Postfix corrupt directory >postfix-script: warning: creating missing Postfix public directory >postfix-script: warning: creating missing Postfix private directory >--> ># <i>newaliases</i> ># <i>postfix start</i> >postfix-script: starting the Postfix mail system ># <i>mutt -x root</i> >/root/.maildir does not exist. Create it? ([y]/n): <comment>[answer y]</comment> >To: <root> >Subject: test >(End message with a . on a line by itself) >test >. > ># <i>mutt</i> ><comment>[You should see your message]</comment> ></pre> ><p> >By using <c>postfix check</c> we make sure that <path>main.cf</path> >parses properly and a number of important directories are created. >Running <c>newaliases</c> sets up the system mail aliases, and ><c>postfix start</c> then starts the mailer. I then used ><c>mutt</c> (in <c>mailx</c>, or old-fashioned <c>mail</c>, mode) >to send a message to myself on the local machine. Along the way ><c>mutt</c> creates the user's (root's, in this case) mail spool >directory, <path>~/.maildir</path>. Running <c>mutt</c> in >full interactive mode then showed me my message, so at least local >sending and delivery is working. I then sent mail to one of my >non-local email addresses (not shown) and verified that the mail >did, indeed, get there. ></p> ><warn>If you send mail to an account using the default ><path>main.cf</path> from a machine on a private network, then >it is possible you will never see it. Many mail servers automatically >reject mail coming from a source that can't be reached by reverse-DNS. ></warn> ><p> >Assuming everything is working, then it's time to set up postfix >so that it starts at boot time. ></p> ><pre> ># <i>postfix stop</i> >postfix-script: starting the Postfix mail system ># <i>rc-update add postfix default</i> > * postfix added to runlevel default... > * Caching service dependencies... [ ok ] > * rc-update complete. ># <i>/etc/init.d/postfix start</i> >Starting postfix...... [ ok ] ></pre> ><impo>Veteran <c>sendmail</c> or <c>postfix</c> junkies may >be more used to storing mail in ><path>/var/spool/mail</path> instead of in the user directories, >and that mail is then stored in <e>mbox</e> format instead of >in <e>maildir</e> format. It is not all that hard to reconfigure ><c>postfix</c> and <c>mutt</c> to use the standard unix mailbox >system (<e>mbox</e>) format instead. Edit <path>/etc/postfix/main.cf</path> >to comment out <i>home_mailbox</i> and uncomment ><i>mail_spool_directory = /var/spool/mail</i>. >Make the mail spool directory with ><c>mkdir -p /var/spool/mail</c> and restart <c>postfix</c>. >That will take care of the mailer, for <c>mutt</c> you just >have to edit <path>/etc/mutt/Muttrc</path> to use <e>mbox</e> >with <i>set mbox_type = mbox</i> >and the <path>/var/spool/mail</path> directory >with <i>set spoolfile=/var/spool/mail</i>. ></impo> ><p> >If you would prefer a GUI mail client, we install a web-based mail server, >Squirrelmail, later in this guide. Alternatively, Daniel Robbins highly >recommends a combination of IMAP (which we install below as a prerequisite to >Squirrelmail) and KDE's <c>kmail</c> client. The kmail program is part of ><path>kde-base/kdenetwork</path>: ></p> ><pre> > # <i>emerge --search kdenetwork</i> >[ Results for search key : kdenetwork ] >[ Applications found : 1 ] > >* kde-base/kdenetwork > Latest version Available: 3.0.3 > Latest version Installed: 3.0.3 > Description: ${DESCRIPTION}Network ></pre> ><p> >Also below we will install Ximian's <e>Evolution</e> as our Personal Information Management >software of choice, complete with Palm pilot support. It, too, can serve as an >excellent mail client. ></p> ></body> ></section> ></chapter> > ><chapter> ><title>Samba</title> ><section> ><body> ><p> >Samba is a remarkable package that lets your linux box share files >and printers with MS Windows machines. For more detailed information read >the Samba articles by Daniel Robbins at ><uri>http://www.ibm.com/developerworks</uri>. ></p> ><pre> ># <i>emerge samba</i> ># <i>rc-update add samba default</i> ># <i>cd /etc/samba</i> ># <i>cp smb.conf.example smb.conf</i> ># <i>nano -w smb.conf</i> ></pre> ><pre caption="smb.conf -- workgroup"> ># workgroup = NT-Domain-Name or Workgroup-Name, eg: REDHAT4 > workgroup = MYGROUP <comment>[change to match your workgroup]</comment> ></pre> ><pre caption="smb.conf -- printing with cups"> ># It should not be necessary to specify the print system type unless ># it is non-standard. Currently supported print systems include: ># bsd, sysv, plp, lprng, aix, hpux, qnx >; printing = bsd > printing = cups ></pre> ><pre caption="smb.conf -- encryption"> ># You may wish to use password encryption. Please read ># ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation. ># Do not enable this option unless you have read those documents > encrypt passwords = yes ></pre> ><p> >I have fairly minimal Samba needs. I just want to be able to share >files between my linux and windows machines, and I want to use my >linux box as a print server (using <c>cups</c>). After installing, >it suffices to make a few minor edits to the <path>/etc/samba/smb.conf</path> >file. Specifically, the <e>workgroup</e> variable needs to match the >workgroup for the windows network (I usually use "OLYMPUS", but "WORKGROUP" >is the default on windows if I >remember correctly), <e>printing</e> needs to be <e>cups</e> >instead of <e>bsd</e>, and the <e>encrypt passwords = yes</e> line needs >to be uncommented. Windows machines use encrypted passwords by default, >so that last change is essential unless you want to hack the Windows >registry on all of your windows machines <comment>[not recommended]</comment>. >Unfortunately, Windows uses a different encryption method for passwords than >does Linux, so you have to maintain a separate password file for samba. ></p> ><pre> ># <i>smbpasswd -a grant</i> <comment>[Replace "grant" with your user name]</comment> >New SMB password: >Retype new SMB password: >Added user grant. ></pre> ><note> >Before adding a user to samba's password list that user must first be >listed in <path>/etc/passwd</path>. ></note> ><p> >For each user that you want to be able to use samba from a windows machine >you need to run the <c>smbpasswd</c> command. Samba stores passwords in ><path>/etc/samba/private/smbpasswd</path>, which will be created for you >the first time you run the <c>smbpasswd</c> command. ></p> ><pre> ># <i>/etc/init.d/samba start</i> >Starting samba... [ ok ] ></pre> ><p> >Start samba, and you should be able to connect to your Gentoo Linux >box from any of your windows machines and see the home directory for >whatever user you connect as and also whatever printers you have set up. >If you can't connect, take a look at ><path>/usr/share/doc/samba-2.2.5-r1/full_docs/textdocs/DIAGNOSIS.txt.gz</path> >for additional help. ></p> ></body> ></section> ></chapter> > ><chapter> ><title>Apache and Squirrelmail webmail</title> ><section> ><title>Apache with SSL and PHP</title> ><body> ><p>Assuming that you have a static IP address (or you use a service >such as dyndns with your dynamic IP address), then you might want an >effective way to check your e-mail when you're out of town. The >solution that I have chosen is to set up a webmail server, >Squirrelmail, that I can access remotely using any web browser.</p> ><p>The first step is to install a web server. Most of the >rest of the world uses Apache; we will too. We will also >install PHP (PHP4, actually) at the same time, since Squirrelmail >is a PHP program. The version numbers shown in the code listing >below might be different by the time you read this. Please >adjust them accordingly. Don't just copy and paste the commands >into your terminal!</p> ><pre> ># <i>emerge apache php mod_php mod_ssl</i> ># <i>ebuild /var/db/pkg/dev-php/mod_php-4.2.2-r1/mod_php-4.2.2-r1.ebuild config</i> ># <i>ebuild /var/db/pkg/net-www/mod_ssl-2.8.10/mod_ssl-2.8.10.ebuild config</i> ></pre> ><impo>You want to make sure that you install mod_ssl if you want >Apache to have SSL support. If you want to check your e-mail >remotely without sending your password across the internet unencrypted, >then you <e>do</e> want SSL!.</impo> ><p>You should take a good look at <path>/etc/apache/conf/apache.conf</path>, >since Apache is very customizable. By default the Apache document root >(where it first looks for html files when you connect to >http://www.servername.foo or http://localhost) is <path>/home/httpd/htdocs</path>; >feel free to relocate it if you wish.</p> ><pre caption="/etc/apache/conf/apache.conf"> ># Do NOT add a slash at the end of the directory path. ># >DocumentRoot "/home/httpd/htdocs" <comment>(edit this line if desired)</comment> > ></pre> ><pre> ># <i>rc-update add apache default</i> > * apache added to runlevel default... > * Caching service dependencies... [ ok ] > * rc-update complete. ># <i>nano -w /etc/conf.d/apache</i> ></pre> ><p>Use <c>rc-update</c> to add Apache to the default runlevel, and then >edit <path>/etc/conf.d/apache</path> to add the following lines so that Apache >automatically loads the SSL and PHP modules at start-up.</p> ><pre caption="/etc/conf.d/apache"> >APACHE_OPTS="-D SSL -D PHP4" ></pre> ><pre> ># <i>/etc/init.d/apache start</i> > * Starting Apache... [ OK ] ># <i>lynx localhost</i> ></pre> ><p>You can check to make sure your Apache web server is working >by using any browser to connect to localhost. To make sure that SSL support >is functional, use a browser to connect to <uri>http<comment>s</comment>://localhost</uri>. >The <c>https</c> prefix tells the browser to make a <e>secure</e> connection >to the server using SSL. Graphical browsers will have a padlock icon somewhere >indicating the secure connection.</p> ><note>When making a secure connection to your server, you will most likely receive >a warning that the site's security certificate is not recognized. The mod_ssl ebuild >installs a self-signed security certificate, which is intended to be used for >testing purposes only. See the <c>mod_ssl</c> manual: ><path>/usr/share/doc/mod_ssl-2.8.10</path>. For personal use a self-signed >certificate is just fine.</note> ><p>Now we need to make sure that PHP is working correctly. The first step >is to create a simple PHP file and put it in the Apache DocumentRoot directory.</p> ><pre> ># <i>echo "<? phpinfo(); ?>" > /home/httpd/htdocs/test.php</i> ># <i>lynx http://localhost/test.php</i> ></pre> ><pre caption="working Apache + PHP"> > phpinfo() (p1 of 26) > PHP Logo > > PHP Version 4.0.6 > > System Linux my.server.edu 2.4.10 #1 Tue Oct 9 16:33:50 Local > time zone must be set--see zic manuali686 i686 unknown > Build Date Oct 16 2001 ></pre> ><p>If you see something like the above, then Apache is successfully >processing PHP code.</p> ><warn>If you look at the full output of the above, you'll find out that >the <path>test.php</path> script gives out a <e>lot</e> of information >about your system. You should probably get rid of it once you know that >php is working. (Or you can do what I do, and just <c>mv test.php test.phps</c>. >Apache will display <path>test.phps</path> as a PHP source file instead >of executing the script.)</warn> ></body> ></section> ><section> ><title>Courier IMAP</title> ><body> ><p>Squirrelmail is a PHP application, but it relies on an IMAP server >as the glue between the web server and e-mail. Since Gentoo linux >uses Maildir mail folders by default, Courier IMAP is a good choice.</p> ><pre> ># <i>emerge courier-imap</i> ># <i>rc-update add courier-imapd default</i> > * courier-imapd added to runlevel default... > * Caching service dependencies... [ ok ] > * rc-update complete. ># <i>nano -w /etc/courier-imap/authdaemonrc</i> ># <i>/etc/init.d/courier-imapd start</i> ># <i>telnet localhost 143</i> >Trying 127.0.0.1... >Connected to localhost.localdomain. >Escape character is '^]'. >* OK Courier-IMAP ready. Copyright 1998-2001 Double Precision, Inc. >See COPYING for distribution information. >1 LOGIN grant passwd <comment>(<-- replace "grant" w/ your username > and "passwd" w/ your password)</comment> >1 OK LOGIN OK ><comment>(Hit <ctrl>-"]" and type "quit" to exit)</comment> ></pre> ><pre caption="Correct authorization in /etc/courier-imap/authdaemonrc"> >##NAME: authmodulelist:0 ># ># The authentication modules that are linked into authdaemond. The ># default list is installed. You may selectively disable modules simply ># by removing them from the following list. The available modules you ># can use are: authcustom authcram authuserdb authpam > >#authmodulelist="authcustom authcram authuserdb authpam" >authmodulelist="authpam" ></pre> ><impo>Courier IMAP usually hardwires the name of the user's Maildir-type >inbox directory that is used in its rc start-up script, ><path>/usr/lib/courier-imap/imapd.rc</path>, to be <path>$HOME/Maildir</path>. >Gentoo linux, however, uses $HOME/.maildir instead, so the courier-imap ebuild >modifies the <path>imapd.rc</path> script to use <e>$MAILDIR</e>, which it obtains >from the Gentoo init script <path>/etc/init.d/courier-imap</path>. If you choose >to use a home user's mailbox other than <path>.maildir</path>, you'll need to modify >the <e>MAILDIR=.maildir</e> entry in courier-imap's init script.</impo> ><p> >If you want Courier IMAP to have SSL support you just need to make >the IMAP SSL certificate (and tell courier-imap where to find it), ></p> ><pre> ># <i>/usr/sbin/mkimapdcert</i> ></pre> ><p>and then start up imap-ssl.</p> ><pre> ># <i>rc-update add courier-imapd-ssl default</i> ># <i>/etc/init.d/courier-imapd-ssl start</i> ></pre> ><p>You can verify that imap is working by using any >IMAP-enabled mail client, such as netscape, kmail, >or mutt.</p> ><pre> ># <i>mutt -f imap://localhost</i> ></pre> ></body> ></section> ><section> ><title>Squirrelmail</title> ><body> ><p>Fortunately, installing and configuring >Squirrelmail, once all of the components are in >place, is straightforward.</p> ><pre> ># <i>emerge squirrelmail</i> ># <i>cd /home/httpd/htdocs</i> ># <i>cd squirrelmail</i> ># <i>./configure</i> ></pre> ><note>If your Apache DocumentRoot is not <path>/home/httpd/htdocs</path>, >you will want to edit the <path>net-mail/squirrelmail</path> ebuild >to point there.</note> ><p>For squirrelmail to work correctly, you need to make sure that >all of the files are owned by the user that Apache runs >as (the squirrelmail ebuild assumes that user is "apache"). >Use <c>./configure</c> to select option <e>2</e>.</p> ><pre caption="Squirrelmail configuration -- Server settings"> >SquirrelMail Configuration : Read: config.php >--------------------------------------------------------- >Server Settings >1. Domain : my.server.edu >2. IMAP Server : localhost >3. IMAP Port : 143 >4. Use Sendmail/SMTP : SMTP >6. SMTP Server : localhost >7. SMTP Port : 25 >8. Authenticated SMTP : false >9. Server : courier >10. Invert Time : false >11. Delimiter : detect > >R Return to Main Menu >C. Turn color off >S Save data >Q Quit > >Command >> ></pre> ><p>Make sure that <e>Server</e> is set to <e>courier</e>. >Return to the main menu and select option <e>4</e>, General >Options.</p> ><pre caption="Squirrelmail configuration -- General options"> >SquirrelMail Configuration : Read: config.php >--------------------------------------------------------- >General Options >1. Default Charset : iso-8859-1 >2. Data Directory : ../data/ >3. Attachment Directory : /tmp/ >4. Default Left Size : 150 >5. Usernames in Lowercase : false > >R Return to Main Menu >C. Turn color off >S Save data >Q Quit > >Command >> ></pre> ><p>I use the data directory in the package, although it would be >better security to use one outside the Apache document tree. I >also use <path>/tmp</path> as my directory to store attachments.</p> > ><p>Now we just need to restart Apache, and we will be ready to go! </p> ><pre> ># <i>/etc/init.d/apache restart</i> ></pre> > ><p>Now you can browse to <uri>https://localhost/squirrelmail/src/login.php</uri>, and it should work!</p> ><pre> ># <i>lynx https://localhost/squirrelmail/</i> ></pre> ><pre caption="Squirrelmail login page"> > SquirrelMail - Login > [sm_logo.jpg] > > SquirrelMail version 1.2.0 [rc2] > By the SquirrelMail Development Team > > SquirrelMail Login > > Name: ____________________ > Password: ____________________ > > Login ></pre> ><p>(I don't really suggest using lynx with Squirrelmail, but you could!)</p> ></body> ></section> ></chapter> > ><chapter> ><title>Personal Information Management</title> ><section> ><title>Evolution with Palm support</title> ><body> ><p>Evolution is an exceptionally nice Personal Information Management >tool that syncs with a Palm pilot quite well. The first step is >to emerge evolution. If you do intend to use evolution with a >Palm pilot, make sure "pda" is in your USE variables in ><path>/etc/make.conf</path> before emerging evolution. ></p> > ><pre> ># <i>emerge --pretend evolution</i> ># <i>emerge evolution</i> ></pre> > ><p> >Unfortunately, the evolution build takes slightly longer than forever >(notice that <c>mozilla</c> is a dependency!); have several gallons of >coffee/tea while you wait. ></p> > ><p> >While building <c>evolution</c> the necessary Palm pilot tools should have been >built as well. To make sure that regular users can sync a pilot we need to make >a couple of changes to the serial port permissions. I'll assume your Palm cradle >plugs into the first serial port (/dev/ttyS0, or /dev/tts/0 in "devfs" notation). ></p> > ><pre> ># <i>groupadd serial</i> ># <i>chown root.serial /dev/tts/0</i> ># <i>chmod g+rw /dev/tts/0</i> ># <i>ls -l /dev/tts/0</i> >crw-rw---- 1 root serial 4, 64 Dec 31 1969 /dev/tts/0 ># <i>ln -s /dev/tts/0 /dev/pilot</i> ># <i>nano -w /etc/group</i> <comment>(add appropriate users to the serial group)</comment> ></pre> > ><p> >We've added a "serial" group to the system, and you should add any users who need >to use the serial port (any Palm pilot users) to the serial group. We've given >the serial group "rw" permissions on <path>/dev/tts/0</path>, and for future >reference we have made a <path>/dev/pilot</path> symbolic link to ><path>/dev/tts/0</path>. Thanks to recent changes in how devfs is handled on >Gentoo these changes will persist after rebooting. ></p> > ><note> >Users of pre-rc6-r13 can either upgrade <path>sys-apps/baselayout</path> >and <path>sys-apps/devfsd</path> (and merge in any "._cfg*" files in ><path>/etc</path> that result), or simply add the appropriate permissions >and symlink in <path>/etc/devfsd.conf</path>. ></note> > ><p> >Users will want to use the <path>tools/Pilot settings</path> menu option in evolution >to set up the Gnome pilot software. Don't forget to set up the "Pilot Conduits" as >well as the "Pilot Link" in the Gnome Control Center. ></p> > ></body> ></section> ></chapter> ></guide>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 7622
: 3728