GNOME (简体中文)

From ArchWiki

Jump to: navigation, search
i18n
English
Español
Czech
简体中文
Português do Brasil
ไทย
Nederlands
Italiano
Türkçe
Русский

Contents

什么是 GNOME?

GNOME 项目为您提供两个东西:GNOME桌面环境,为用户提供易用且有吸引力的桌面;和GNOME开发平台,用于开发应用程序的多功能开发环境,由此开发的程序可集成于GNOME桌面中。

如何安装 GNOME 桌面

在安装GNOME之前,请务必确认pacman已升级到最新版本,要升级pacman,请执行

pacman -Syu 

接着

pacman -Syy

升级后,你就不会遇到在安装gnome-media包时出现的错误,所以,在安装GNOME前升级pacman是很有必要的。


您可以键入以下命令,安装 GNOME 基本桌面:

pacman -S gnome

键入下面命令安装 GNOME 桌面的余下部分(强烈推荐):

pacman -S gnome-extra

在系统启动时要起用合适的进程,需要修改/etc/rc.conf,在DAEMONS=()这一行里,加入“portmap”,“fam”,“hal”。(hal 会自动启动 dbus, 所以没有必要再添加 dbus 到 DAEMONS)

运行 GNOME 桌面

要从命令行环境启动 GNOME,可运行:

gnome-session

如果您在$HOME/.xinitrc中加入这一行:(必须保证该文件中只此一行以“exec”打头)

exec gnome-session


注意:当你使用gnome 2.14, gnome 2.16时,请使用如下参数:

exec dbus-launch --exit-with-session /opt/gnome/bin/gnome-session

GNOME 将会由此命令启动。

startx


GDM (GNOME Display Manager, GNMOE 显示管理器)

您需要安装 GDM 来使用图形登录界面。要安装GDM,您需要在命令行环境下发出下面命令:

pacman -S gdm

To make the graphical login the default method of logging into the system, add gdm to your list of daemons in /etc/rc.conf 修改 /etc/inittab ,以使系统默认采用图形登录方式:

  1. 修改此行 (若没有,就加上它)
    id:3:initdefault:
    to
    id:5:initdefault:
  2. 修改此行 (若没有,就加上它)
    x:5:respawn:/usr/X11R6/bin/xdm -nodaemon
    to
    x:5:respawn:/opt/gnome/sbin/gdm -nodaemon

如果您习惯使用 $HOME/.xinitrcxmodmap 或是 xsetroot 这些文件来配置启动X,您就应该把这些文件中的配置用的命令放入 $HOME/.xprofile里。我的 .xprofile 文件是这样的:

If you are used to using the $HOME/.xinitrc file to pass arguments to the x server when it is started, such as xmodmap or xsetroot, you should note that you can add the same commands to the $HOME/.xprofile file. My .xprofile looks like this:


#!/bin/sh

#
# ~/.xprofile
#
# Executed by gdm at login
#

xmodmap -e "pointer = 1 2 3 6 7 4 5"  #set mouse buttons up correctly
xsetroot -solid black                 #sets the background to black

You can configure GDM (for changing default theme for example) in System->Administration->Login Window. Or you can use this command (as root) :

gdmsetup 


要了解更多关于图形登录的信息,请参阅 这个很棒的网页

其它提示和小技巧

在登录 GNOME 时,打开数字键盘锁

  1. 安装 numlockx
    pacman -Sy numlockx
  2. 在登录时启动 numlockx
    1. 选择 Desktop -> Preferences -> Sessions
    2. 选择“启动程序”标签栏 (如果您发现没有“启动程序”这个栏,请直接修改本文)
    3. 点击“添加”按钮
    4. 在启动命令选择框里,加入 /usr/bin/numlockx
    5. 把次序设为 55

获得 系统->屏幕锁定 功能

  1. 进入 系统->锁住屏幕
  2. 开启一个或多个屏幕保护程序
  3. 现在点击屏幕锁定,将会启动屏幕保护程序,并提示要求输入密码。

Nautilus

打开地址栏

control + L

browser mode

不喜欢Nautilus默认的spatial模式? 那么打开gconf-editor,编辑apps/nautilus/preferences,将always_use_browser的值改为“true”。


常见问题

电脑崩溃了,gnome启动不来

解决办法: delete ~/.gnome2/session

面板不能正常工作

Sourced from this forum page

Solution: Clean out your gnome config with the command. THIS WILL REMOVE ALL YOUR GNOME CONFIGS.

rm -rf .gnome* .gconf*

GDM 启动不了

如果你收到这个错误信息: "The greeter application appears to be crashing. Attempting to use a different one"

一个可能的原因是 /tmp 权限设置有问题。用root权限,输入命令:

chmod 1777 /tmp


GNOME lags

If opening programs in GNOME takes an unusual long time. You may be able to fix this by editing /etc/hosts and adding your host name.

 nano /etc/hosts

Now, you should add the host name you have defined in /etc/rc.conf or your network profile if you have one (if you don't know, you probably don't).

The /etc/hosts file usually looks like this:

 #
 # /etc/hosts: static lookup table for host names
 #
 
 #<ip-address>   <hostname.domain.org>   <hostname>
 127.0.0.1               localhost.localdomain   localhost
 
 # End of file

Add your host name (in this example the host name `example_hostname' was picked) to the end of the line which starts with `127.0.0.1'. Now it looks like this:

 #
 # /etc/hosts: static lookup table for host names
 #
 
 #<ip-address>   <hostname.domain.org>   <hostname>
 127.0.0.1               localhost.localdomain   localhost example_hostname
 
 # End of file

Done.

一些关于 GNOME 链接

Arch Wiki 链接

外部链接

Personal tools