Gentoo-WiKi

본문 바로가기
사이트 내 전체검색


Gentoo Linux >> System Administration for Gentoo Linux
[목차]
제3장 System Administration

    1. X 윈도우 설치 및 설정

1. X 윈도우 설치하기


  젠투 패키지로 설치할 수 있는 X윈도우 매니저는 여러 가지가 있습니다. GNOME, KDE가 가장 많이 알려졌으나, 사용시 시스템이 무거워 실행시 늦은 속도를 많은 사용자들이 경험하였을 것입니다. 그러므로 여기서는 시스템에 부하를 주지 않으면서 사용하기 편한 xfce4를 설치하겠습니다.

  이미 설치된 GNOME를 아래의 명령으로 삭제합니다.

# emerge -C gnome


  아래 아래 명령으로 xface4를 설치합니다.

# emerge -av xfce4

....

생략

.................................(yes/no) y [엔터]


  콘솔화면에서 startxfce4를 실행하면 X윈도우를 실행됩니다.

# startxfce4


2. X윈도우 설정하기


  젠투리눅스에서는 X윈도우 설정명령으로 xorgconfig를 제공합니다. xfce4를 설치하고 startxfce4를 실행했을 때 X윈도우 화면이 제대로 나온다면 이과정을 생략해도 됩니다.

# xorgconfig

This program will create a basic xorg.conf file, based on menu selections you

make.

The xorg.conf file usually resides in /usr/X11R6/etc/X11 or /etc/X11. A sample

xorg.conf file is supplied with Xorg; it is configured for a standard

VGA card and monitor with 640x480 resolution. This program will ask for a

pathname when it is ready to write the file.

You can either take the sample xorg.conf as a base and edit it for your

configuration, or let this program produce a base xorg.conf file for your

configuration and fine-tune it.

Before continuing with this program, make sure you know what video card

you have, and preferably also the chipset it uses and the amount of video

memory on your video card. SuperProbe may be able to help with this.

 

Press enter to continue, or ctrl-c to abort. [엔터]


First specify a mouse protocol type. Choose one from the following list:

 

 1.  Auto

 2.  SysMouse

 3.  MouseSystems

 4.  PS/2

 5.  Microsoft

 6.  Busmouse

 7.  IMPS/2

 8.  ExplorerPS/2

 9.  GlidePointPS/2

10.  MouseManPlusPS/2

11.  NetMousePS/2

12.  NetScrollPS/2

13.  ThinkingMousePS/2

14.  AceCad

 

The recommended protocol is Auto. If you have a very old mouse

or don't want OS support or auto detection, and you have a two-button

or three-button serial mouse, it is most likely of type Microsoft.

 

Enter a protocol number: 7[엔터]


If your mouse has only two buttons, it is recommended that you enable

Emulate3Buttons.

 

Please answer the following question with either 'y' or 'n'.

Do you want to enable Emulate3Buttons? n[엔터]


Now give the full device name that the mouse is connected to, for example

/dev/tty00. Just pressing enter will use the default, /dev/mouse.

 

Mouse device: /dev/psaux[엔터]


Please select one of the following keyboard types that is the better

description of your keyboard. If nothing really matches,

choose "Generic 104-key PC"

 

  1  Generic 101-key PC                               

  2  Generic 102-key (Intl) PC                        

  3  Generic 104-key PC                               

  4  Generic 105-key (Intl) PC                        

  5  Dell 101-key PC                                  

  6  Everex STEPnote                                  

  7  Keytronic FlexPro                                

  8  Microsoft Natural                                

  9  Northgate OmniKey 101                            

 10  Winbook Model XP5                                

 11  Japanese 106-key                                 

 12  PC-98xx Series                                   

 13  Brazilian ABNT2                                  

 14  Acer AirKey V                                    

 15  ACPI Standard                                    

 16  Azona RF2300 wireless Internet Keyboard          

 

Enter a number to choose the keyboard.

 

Press enter for the next page

4[엔터]

  1  U.S. English                                     

  2  U.S. English w/ ISO9995-3                        

  3  U.S. English w/ deadkeys                         

  4  Albanian                                         

  5  Arabic                                           

  6  Armenian                                         

  7  Azerbaijani                                      

  8  Belarusian                                       

  9  Belgian                                          

 10  Bengali                                          

 11  Bosnian                                          

 12  Brazilian                                        

 13  Bulgarian                                        

 14  Burmese                                          

 15  Canadian                                         

 16  French Canadian                                  

 17  Croatian                                         

 18  Croatian (US)                                    

 

Enter a number to choose the country.

Press enter for the next page

 

1[엔터]

Please enter a variant name for 'us' layout. Or just press enter

for default variant

 

us[엔터]

Please answer the following question with either 'y' or 'n'.

Do you want to select additional XKB options (group switcher,

group indicator, etc.)? n[엔터]

Now we want to set the specifications of the monitor. The two critical

parameters are the vertical refresh rate, which is the rate at which the

the whole screen is refreshed, and most importantly the horizontal sync rate,

which is the rate at which scanlines are displayed.

 

The valid range for horizontal sync and vertical sync should be documented

in the manual of your monitor. If in doubt, check the monitor database

/usr/share/doc/xorg-x11-6.8.2-r2/Monitors to see if your monitor is there.

 

Press enter to continue, or ctrl-c to abort.[엔터]

You must indicate the horizontal sync range of your monitor. You can either

select one of the predefined ranges below that correspond to industry-

standard monitor types, or give a specific range.

 

It is VERY IMPORTANT that you do not specify a monitor type with a horizontal

sync range that is beyond the capabilities of your monitor. If in doubt,

choose a conservative setting.

 

    hsync in kHz; monitor type with characteristic modes

 1  31.5; Standard VGA, 640x480 @ 60 Hz

 2  31.5 - 35.1; Super VGA, 800x600 @ 56 Hz

 3  31.5, 35.5; 8514 Compatible, 1024x768 @ 87 Hz interlaced (no 800x600)

 4  31.5, 35.15, 35.5; Super VGA, 1024x768 @ 87 Hz interlaced, 800x600 @ 56 Hz

 5  31.5 - 37.9; Extended Super VGA, 800x600 @ 60 Hz, 640x480 @ 72 Hz

 6  31.5 - 48.5; Non-Interlaced SVGA, 1024x768 @ 60 Hz, 800x600 @ 72 Hz

 7  31.5 - 57.0; High Frequency SVGA, 1024x768 @ 70 Hz

 8  31.5 - 64.3; Monitor that can do 1280x1024 @ 60 Hz

 9  31.5 - 79.0; Monitor that can do 1280x1024 @ 74 Hz

10  31.5 - 82.0; Monitor that can do 1280x1024 @ 76 Hz

11  Enter your own horizontal sync range

 

Enter your choice (1-11): 7[엔터]


You must indicate the vertical sync range of your monitor. You can either

select one of the predefined ranges below that correspond to industry-

standard monitor types, or give a specific range. For interlaced modes,

the number that counts is the high one (e.g. 87 Hz rather than 43 Hz).

 

 1  50-70

 2  50-90

 3  50-100

 4  40-150

 5  Enter your own vertical sync range

 

Enter your choice: 2[엔터]

You must now enter a few identification/description strings, namely an

identifier, a vendor name, and a model name. Just pressing enter will fill

in default names.

 

The strings are free-form, spaces are allowed.

Enter an identifier for your monitor definition: [엔터]

Now we must configure video card specific settings. At this point you can

choose to make a selection out of a database of video card definitions.

Because there can be variation in Ramdacs and clock generators even

between cards of the same model, it is not sensible to blindly copy

the settings (e.g. a Device section). For this reason, after you make a

selection, you will still be asked about the components of the card, with

the settings from the chosen database entry presented as a strong hint.

 

The database entries include information about the chipset, what driver to

run, the Ramdac and ClockChip, and comments that will be included in the

Device section. However, a lot of definitions only hint about what driver

to run (based on the chipset the card uses) and are untested.

 

If you can't find your card in the database, there's nothing to worry about.

You should only choose a database entry that is exactly the same model as

your card; choosing one that looks similar is just a bad idea (e.g. a

GemStone Snail 64 may be as different from a GemStone Snail 64+ in terms of

hardware as can be).

 

Do you want to look at the card database? y[엔터]

  0  * Generic VESA compatible                         -

  1  * Generic VGA compatible                          -

  2  * Unsupported VGA compatible                      -

  3  ** 3DLabs, TI (generic)               [glint]     -

  4  ** 3Dfx (generic)                     [tdfx]      -

  5  ** ATI (generic)                      [ati]       -

  6  ** ATI Radeon (generic)               [radeon]    -

  7  ** ATI Rage 128 based (generic)       [r128]      -

  8  ** Alliance Pro Motion (generic)      [apm]       -

  9  ** Ark Logic (generic)                [ark]       -

 10  ** Chips and Technologies (generic)   [chips]     -

 11  ** Cirrus Logic (generic)             [cirrus]    -

 12  ** Cyrix MediaGX (generic)            [cyrix]     -

 13  ** DEC TGA (generic)                  [tga]       -

 14  ** Intel i740 (generic)               [i740]      -

 15  ** Intel i810 (generic)               [i810]      -

 16  ** Linux framebuffer (generic)        [fbdev]     -

 17  ** Matrox Graphics (generic)          [mga]       -

 

Enter a number to choose the corresponding card definition.

Press enter for the next page, q to continue configuration.

 

[엔터]

 18  ** NVIDIA (generic)                   [nv]        -

 19  ** NeoMagic (generic)                 [neomagic]  -

 20  ** Number Nine I128 (generic)         [i128]      -

 21  ** Rendition (generic)                [rendition] -

 22  ** S3 (not ViRGE or Savage) (generic) [s3]        -

 23  ** S3 Savage (generic)                [savage]    -

 24  ** S3 ViRGE (generic)                 [s3virge]   -

 25  ** SiS (generic)                      [sis]       -

 26  ** Silicon Motion (generic)           [siliconmotion]-

 27  ** Trident (generic)                  [trident]   -

 28  ** Tseng Labs (generic)               [tseng]     -

 29  ** VMWare guest OS (generic)          [vmware]    -

 30  2 the Max MAXColor S3 Trio64V+                    -

 31  2-the-Max MAXColor 6000                           ET6000

 32  3DLabs Oxygen GMX                                 PERMEDIA 2

 33  928Movie                                          S3 928

 34  AGX (generic)                                     AGX-014/15/16

 35  ALG-5434(E)                                       CL-GD5434

 

Enter a number to choose the corresponding card definition.

Press enter for the next page, q to continue configuration.

 

18[엔터]



Your selected card definition:

 

Identifier: ** NVIDIA (generic)                   [nv]

Chipset:    -

Driver:     nv

 

Press enter to continue, or ctrl-c to abort.[엔터]

Now you must give information about your video card. This will be used for

the "Device" section of your video card in xorg.conf.

 

It is probably a good idea to use the same approximate amount as that detected

by the server you intend to use. If you encounter problems that are due to the

used server not supporting the amount memory you have, specify the maximum

amount supported by the server.

 

How much video memory do you have on your video card:

 

 1  256K

 2  512K

 3  1024K

 4  2048K

 5  4096K

 6  8192K

 7  16384K

 8  32768K

 9  65536K

10  131072K

11  262144K

12  Other

 

Enter your choice: 7[엔터]


You must now enter a few identification/description strings, namely an

identifier, a vendor name, and a model name. Just pressing enter will fill

in default names (possibly from a card definition).

 

Your card definition is ** NVIDIA (generic)                   [nv].

 

The strings are free-form, spaces are allowed.

Enter an identifier for your video card definition: [엔터]

For each depth, a list of modes (resolutions) is defined. The default

resolution that the server will start-up with will be the first listed

mode that can be supported by the monitor and card.

Currently it is set to:

 

"1280x1024" "1024x768" "800x600" "640x480" for 8-bit

"1280x1024" "1024x768" "800x600" "640x480" for 16-bit

"1280x1024" "1024x768" "800x600" "640x480" for 24-bit

 

Modes that cannot be supported due to monitor or clock constraints will

be automatically skipped by the server.

 

 1  Change the modes for 8-bit (256 colors)

 2  Change the modes for 16-bit (32K/64K colors)

 3  Change the modes for 24-bit (24-bit color)

 4  The modes are OK, continue.

 

Enter your choice: 2[엔터]

Select modes from the following list:

 

 1  "640x400"

 2  "640x480"

 3  "800x600"

 4  "1024x768"

 5  "1280x1024"

 6  "320x200"

 7  "320x240"

 8  "400x300"

 9  "1152x864"

 a  "1600x1200"

 b  "1800x1400"

 c  "512x384"

 d  "1400x1050"

 

Please type the digits corresponding to the modes that you want to select.

For example, 432 selects "1024x768" "800x600" "640x480", with a

default mode of 1024x768.

 

Which modes? 4[엔터]

You can have a virtual screen (desktop), which is screen area that is larger

than the physical screen and which is panned by moving the mouse to the edge

of the screen. If you don't want virtual desktop at a certain resolution,

you cannot have modes listed that are larger. Each color depth can have a

differently-sized virtual screen

 

Please answer the following question with either 'y' or 'n'.

Do you want a virtual screen that is larger than the physical screen? n[엔터]

For each depth, a list of modes (resolutions) is defined. The default

resolution that the server will start-up with will be the first listed

mode that can be supported by the monitor and card.

Currently it is set to:

 

"1280x1024" "1024x768" "800x600" "640x480" for 8-bit

"1024x768" for 16-bit

"1280x1024" "1024x768" "800x600" "640x480" for 24-bit

 

Modes that cannot be supported due to monitor or clock constraints will

be automatically skipped by the server.

 

 1  Change the modes for 8-bit (256 colors)

 2  Change the modes for 16-bit (32K/64K colors)

 3  Change the modes for 24-bit (24-bit color)

 4  The modes are OK, continue.

 

Enter your choice: 4[엔터]


Please specify which color depth you want to use by default:

 

  1  1 bit (monochrome)                               

  2  4 bits (16 colors)                               

  3  8 bits (256 colors)                              

  4  16 bits (65536 colors)                           

  5  24 bits (16 million colors)                      

 

Enter a number to choose the default depth.

 

5[엔터] 

I am going to write the xorg.conf file now. Make sure you don't accidently

overwrite a previously configured one.

 

Shall I write it to /etc/X11/xorg.conf? y[엔터]

File has been written. Take a look at it before running 'startx'. Note that

the xorg.conf file must be in one of the directories searched by the server

(e.g. /etc/X11) in order to be used. Within the server press

ctrl, alt and '+' simultaneously to cycle video resolutions. Pressing ctrl,

alt and backspace simultaneously immediately exits the server (use if

the monitor doesn't sync for a particular mode).

 

For further configuration, refer to the xorg.conf(5) manual page.

# startxfce4

3. X윈도우의 한글화


  한글폰트와 한글 입력기가 기본적으로 포함되어 있지 않으므로, 백묵폰트와 아미를 설치해야 합니다. 아래 방법으로 백묵폰트를 설치합니다.

# emerge baekmuk-fonts


  그리고, /etc/X11/xorg.conf 파일의 Section "Files" 부분에 아래와 같이 추가합니다.

FontPath "/usr/share/fonts/baekmuk-fonts"


  이제 한글 입력기 아미 및 GTK의 한글 입력기 설정과 함께 한글 로케일 설정을 합니다.

# emerge nabi


  LANG옵션을 사용하기 위해 아래의 로케일을 설정해야 합니다. /usr/lib/locale/하위의 디렉토리명을 확인 후 아래를 수정하시기 바랍니다.

# vi /etc/env.d/02locale

LANG="ko_KR.euckr"

LC_ALL="ko_KR.euckr"


# vi /usr/share/locale/locale.alias

... 생략

ko_KR           ko_KR.euckr

ko               ko_KR.euckr

... 생략


  glibc을 이용할 때 사용하기 위해 아래를 추가합니다.

# vi /etc/locales.build

ko_KR.euckr/EUC-KR

ko_KR.utf8/UTF-8

ko_KR/EUC-KR

... 생략

  X윈도우를 콘솔화면에서 실행 할때는 아래의 파일을 수정합니다.

# vi ~/.xinitrc

setkeycodes 71 122

setkeycodes 72 123

 

export LANG=ko_KR.euckr

export LC_ALL=ko_KR.euckr

export XMODIFIERS="@im=nabi"

 

exec nabi &

exec startxfce4

 

# startx


  그리고 한영키와 한자키를 맵핑(mapping)하기 위한 /root/.Xmodmap 또는 /etc/X11/Xmodmap 파일의 내용을 아래와 같이 수정합니다.


  X윈도우 상에서 xev을 실행하고 한자키와 한영키를 클릭하면 keycode을 확인할 수 있습니다. 한자키는 209, 한영키는 210으로 나타났다면, 아래와 같이 설정합니다.

# vi ~/.Xmodmap

keycode 209=Hangul_Hanja

keycode 210=Hangul


  재부팅하거나 X윈도우를 재시작하면 한자 및 한영키를 사용할 수 있습니다.


  이제 MS의 바탕체와 굴림체를 사용할 수 있는 설정을 알아보겠습니다.

  윈도우즈의 폰트디렉토리(C:\WINDOWS\FONTS)에서 batang.ttc  gulim.ttc를 서버에 Upload하고, /usr/share/fonts/ms-fonts 디렉토리에 복사합니다.

# ls

batang.ttc  gulim.ttc

# mkdir /usr/share/fonts/ms-fonts

# cp * /usr/share/fonts/ms-fonts

# mkfontscale

# mkfontdir

# vi /etc/X11/xorg.conf

... 생략

Section "Files"

FontPath   "/usr/share/fonts/ms-fonts/"

FontPath "/usr/share/fonts/baekmuk-fonts"



4. 그래픽 로그인화면 사용하기


  XDM(X Display Manager, 텍스트 로그인 프롬프트를 대체하는 그래픽 환경의 로그인 애플리케이션) 또한 이용할 수 있습니다. 부팅을 한 후, 바로 그래픽 로그인 화면이 나오면서 GNOME이나 KDE, Xfce4 등으로 실행이 가능합니다.

# vi /etc/rc.conf

... 생략

# What display manager do you use ?  [ xdm | gdm | kdm | entrance ]

DISPLAYMANAGER="xdm"

... 생략

XSESSION="Xfce-4"


  실행레벨(runlevel)에 추가합니다.

# rc-update add xdm default

  재부팅을 하면 이제 그래픽 로그인 화면이 뜰 것입니다.


  그리고 한영키와 한자키를 맵핑(mapping)하기 위한 /root/.Xmodmap 또는 /etc/X11/Xmodmap 파일의 내용을 아래와 같이 수정합니다.

# vi /etc/X11/Xmodmap

keycode 209=Hangul_Hanja

keycode 210=Hangul


  xdm을 통해 부팅시 자동으로 X윈도우를 실행하고, xfce4를 실행하려면, 아래의 파일을 수정합니다.

# vi /etc/X11/Sessions/Xfce-4

setkeycodes 71 122

setkeycodes 72 123

nabi &

startxfce4

 

# reboot


  노트북일 경우 한영키는 113, 한자키는 109로 확인되었습니다. 한영키가 인식되지 않을 때는 X윈도우 상에서 xev을 실행하고 한자키와 한영키를 클릭하면 keycode값을 확인할 수 있습니다.

5. 휠마우스 사용하기


  PS/2 휠마우스를 사용할 경우 아래파일을 수정하면 사용할 수 있습니다.

# vi /etc/X11/xorg.conf

... 생략

Section "InputDevice"

 

# Identifier and driver

 

    Identifier  "Mouse1"

    Driver      "mouse"

    Option "Protocol"    "IMPS/2"

    Option "Device"      "/dev/psaux"

 

    Option "ZAxisMapping"       "4 5"

... 생략



6. 파이어폭스 웹브라우저 설치하기


  파이어폭스 웹브라우저를 설치하기 위해 아래 명령을 실행합니다. emerge mozilla-firefox를 실행하면 1.0버전이 설치되므로 최신버전을 설치하려면, Portage 디렉토리에 들어가서 실행하던지, 아래와 같이 전체 경로를 붙여서 실행하면 지정된 버전이 설치됩니다.

# emerge -av /usr/portage/www-client/mozilla-firefox-bin/mozilla-firefox-bin-1.5-r1.ebuild


  젠투리눅스에서 제공되지 않는 프로그램은 제작사에서 직접 바이너리 버전을 다운받아서 설치하여 사용하면 됩니다. 예를 들어, 파이어폭스를 설치할 경우 아래 사이트에서 리눅스용으로 다운로드 합니다.

http://www.mozilla.com/firefox/all.html


  다운로드 한 파일을 압축을 풀고, /usr/local/디렉토리로 이동시킵니다.

# tar xvfz firefox-1.5.tar.gz

# mv firefox /usr/local/


  X윈도우를 실행시키고, 터미널 화면에서 /usr/local/firefox/firefox를 실행하면 파이어폭스 웹브라우저가 실행됩니다.

# /usr/local/firefox/firefox

  바탕화면에 바로가기링크를 만들어 이용하면 다음에 쉽게 시작할 수 있습니다.

7. 웹브라우저에서 플래시 플레이어 설치하기


  플래시 플레이어를 아래 사이트에서 다운로드 합니다.

http://www.macromedia.com/kr/shockwave/download/alternates/


  다운로드한 파일을 압축을 풀고 설치파일을 실행합니다.

# tar xvfz install_flash_player_7_linux.tar.gz

# cd install_flash_player_7_linux

# ./flashplayer-installer

Copyright(C) 2002-2003 Macromedia, Inc.  All rights reserved.

Macromedia Flash Player 7 for Linux

Macromedia Flash Player 7 will be installed on this machine.

You are running the Macromedia Flash Player installer as the "root" user.

Macromedia Flash Player 7 will be installed system-wide.

Support is available at http://www.macromedia.com/support/flashplayer/

To install Macromedia Flash Player 7 now, press ENTER.

To cancel the installation at any time, press Control-C.

[엔터]

NOTE: Macromedia Flash Player requires two font packages

      to be installed, ttfonts and urw-fonts.

 

Press ENTER to continue...

[엔터]

NOTE: Please exit any browsers you may have running.

 

Press ENTER to continue...

[엔터]

Please enter the installation path of the Mozilla, Netscape,

or Opera browser (i.e., /usr/lib/mozilla): /opt/firefox [엔터]

  바이너리로 설치하였을 경우, /usr/local/firefox를 입력합니다.


WARNING: An older version of the Macromedia Flash Player has been detected in

         /opt/firefox/plugins.

         The installer will overwrite this existing binary.

----------- Install Action Summary -----------

Macromedia Flash Player 7 will be installed in the following directory:

Browser installation directory = /opt/firefox

Proceed with the installation? (y/n/q): y [엔터]

Installation complete.

Perform another installation? (y/n): n [엔터]

 

Please log out of this session and log in for the changes to take effect.

The Macromedia Flash Player installation is complete.


  이제 웹브라우저를 다시 시작하면 플래시 화면을 볼 수 있습니다.



8. 한텀(hanterm) 설치하기


  X콘솔화면에서 한글을 사용하기 위해서는 한텀을 이용하는 것이 편리합니다. 아래와 같은 방법으로 설치합니다.

# emerge -av hanterm


한텀의 설정 파일은 /usr/X11R6/lib/X11/app-defaults/Hanterm 입니다만 굳이 이 파일을 수정할 필요없이 홈 디렉토리의 .Xresources 파일에 다음의 두 줄을 추가합니다.

# vi ~/.Xresources

Hanterm*hangulFont: -ms-gulimche-medium-r-normal-*-16-*-*-*-c-*-ksc5601.1987-0

Hanterm*Font: -ms-gulimche-medium-r-normal-*-16-*-*-*-m-*-iso8859-1


위의 것은 한글이고 아래 것은 영문 폰트셋입니다. 글꼴 이름은 "gulim"이 아닌 고정폭 "gulimche"입니다. 이렇게 갱신한 .Xresources를 즉시 적용하는 명령은 다음과 같습니다.


# xrdb -load .Xresources


[목차]

개인정보취급방침 서비스이용약관 모바일 버전으로 보기 상단으로

TEL. 063-469-4551 FAX. 063-469-4560 전북 군산시 대학로 558
군산대학교 컴퓨터정보공학과

Copyright © www.leelab.co.kr. All rights reserved.