Difference between revisions of "SLiM (正體中文)"

From ArchWiki
Jump to: navigation, search
(雙螢幕設定)
(PolicyKit: out of date)
(11 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
[[Category:正體中文]]
 
[[Category:正體中文]]
[[Category:顯示管理員]]
+
[[Category:顯示管理員 (正體中文)]]
{{translateme}}
+
[[cs:SLiM]]
 +
[[en:SLiM]]
 +
[[es:SLiM]]
 +
[[fr:SLiM]]
 +
[[hu:SLiM]]
 +
[[it:SLiM]]
 +
[[ko:SLiM]]
 +
[[pt:SLiM]]
 +
[[ru:SLiM]]
 +
[[sk:SLiM]]
 +
[[tr:SLiM]]
 +
[[zh-CN:SLiM]]
 +
{{Translateme}}
 
{{Article summary start|摘要}}
 
{{Article summary start|摘要}}
 
{{Article summary text|提供 Simple Login Manager 概觀。}}
 
{{Article summary text|提供 Simple Login Manager 概觀。}}
{{Article summary heading|可用語系}}
 
{{i18n_entry|English|SLIM}}
 
{{i18n_entry|正體中文|SLiM (正體中文)}}
 
{{i18n_entry|简体中文|SLiM (简体中文)}}
 
{{i18n_entry|Italiano|SLiM (Italiano)}}
 
{{i18n_entry|Türkçe|SLIM(Türkçe)}}
 
{{i18n_entry|Русский|SLIM(Русский)}}
 
{{i18n_entry|한국어|SLiM (한국어)}}
 
 
{{Article summary heading|相關文章}}
 
{{Article summary heading|相關文章}}
{{Article summary wiki|Automatic login manager startup}}
+
{{Article summary wiki|Display Manager}}
 
{{Article summary end}}
 
{{Article summary end}}
 
[http://slim.berlios.de/ SLiM] is an acronym for Simple Login Manager. SLiM is simple, lightweight and easily configurable.  SLiM is used by some because it does not require the dependencies of [[GNOME]] or [[KDE]] and can help make a lighter system for users that like to use lightweight desktops like [[Xfce]], [[Openbox]], and [[Fluxbox]].
 
[http://slim.berlios.de/ SLiM] is an acronym for Simple Login Manager. SLiM is simple, lightweight and easily configurable.  SLiM is used by some because it does not require the dependencies of [[GNOME]] or [[KDE]] and can help make a lighter system for users that like to use lightweight desktops like [[Xfce]], [[Openbox]], and [[Fluxbox]].
Line 29: Line 33:
 
=== 啟用 SLiM ===
 
=== 啟用 SLiM ===
  
SLiM can be loaded on startup by entering it in your daemons array in {{Filename|rc.conf}} or by modifying {{Filename|inittab}}. 詳見 [[Display Manager]] 以得到詳細指示。
+
藉由修改 {{ic|rc.conf}} daemon 陣列或 {{ic|inittab}},可於啟動時載入 SLiMa。詳見 [[Display Manager]] 取得細節。
  
 
=== 單一環境 ===
 
=== 單一環境 ===
  
若要設定 SLiM 載入特定環境,編輯 {{Filename|~/.xinitrc}} 以載入您的桌面環境:
+
若要設定 SLiM 載入特定環境,編輯 {{ic|~/.xinitrc}} 以載入您的桌面環境:
  
 
<pre>
 
<pre>
Line 47: Line 51:
 
</pre>
 
</pre>
  
SLiM 讀取本地 {{Filename|~/.xinitrc}} 設定,並根據檔案內容啟動桌面。若您沒有 {{Filename|~/.xinitrc}} 檔案,可參考此框架文件:
+
SLiM 讀取本地 {{ic|~/.xinitrc}} 設定,並根據檔案內容啟動桌面。若您沒有 {{ic|~/.xinitrc}} 檔案,可參考此框架文件:
  
 
  $ cp /etc/skel/.xinitrc $HOME
 
  $ cp /etc/skel/.xinitrc $HOME
  
將 {{Codeline|[session-command]}} 取代為合適的 session 指令。一些不同桌面啟動指令範例:
+
將 {{Ic|[session-command]}} 取代為合適的 session 指令。一些不同桌面啟動指令範例:
  
 
  exec openbox-session
 
  exec openbox-session
Line 65: Line 69:
 
=== PolicyKit ===
 
=== PolicyKit ===
  
若您使用 PolicyKit 遇到問題,使用 ConsoleKit 的 {{Codeline|ck-launch-session}}:
+
{{Out of date|ConsoleKit is deprecated, see [https://www.archlinux.org/news/consolekit-replaced-by-logind/] and [[General Troubleshooting#Session permissions]].}}
 +
 
 +
若您使用 PolicyKit 遇到問題,使用 ConsoleKit 的 {{Ic|ck-launch-session}}:
  
 
<pre>
 
<pre>
Line 83: Line 89:
 
To be able to choose from multiple desktop environments, SLiM can be setup to log you into whichever you choose.
 
To be able to choose from multiple desktop environments, SLiM can be setup to log you into whichever you choose.
  
Put a case statement similar to this one in your {{Filename|~/.xinitrc}} file and edit the sessions variable in {{Filename|/etc/slim.conf}} to match the names that trigger the case statement. You can choose the session at login time by pressing F1.  Note that this feature is experimental.
+
Put a case statement similar to this one in your {{ic|~/.xinitrc}} file and edit the sessions variable in {{ic|/etc/slim.conf}} to match the names that trigger the case statement. You can choose the session at login time by pressing F1.  Note that this feature is experimental.
  
 
<pre>
 
<pre>
Line 117: Line 123:
 
=== 佈景主題 ===
 
=== 佈景主題 ===
  
安裝 {{Package Official|slim-themes}} 套件:
+
安裝 {{Pkg|slim-themes}} 套件:
  
 
  # pacman -S slim-themes archlinux-themes-slim
 
  # pacman -S slim-themes archlinux-themes-slim
  
{{Package Official|archlinux-themes-slim}} 套件包含數個不同佈景主題。目錄 {{Filename|/usr/share/slim/themes}} 尋找可用佈景主題。在 {{Filename|/etc/slim.conf}} 找到 'current_theme',輸入佈景主題名稱:
+
{{Pkg|archlinux-themes-slim}} 套件包含數個不同佈景主題。目錄 {{ic|/usr/share/slim/themes}} 尋找可用佈景主題。在 {{ic|/etc/slim.conf}} 找到 'current_theme',輸入佈景主題名稱:
  
 
  #current_theme      default
 
  #current_theme      default
Line 147: Line 153:
 
  input_panel_y          325
 
  input_panel_y          325
  
若您的佈景主題包含背景圖片,您可使用 background_style 設定('stretch'、'tile'、'center' 或 'color')使其正確顯示。觀看 [http://slim.berlios.de/themes_howto.php very simple and clear official documentation about slim themes] 取得更多詳情。
+
若您的佈景主題包含背景圖片,您可使用 background_style 設定('stretch'、'tile'、'center' 或 'color')使其正確顯示。觀看 [http://slim.berlios.de/themes_howto.php very simple and clear official documentation about slim themes] 取得更多細節。
  
 
== 其它選項 ==
 
== 其它選項 ==
  
A few things you might like to try.
+
您可能會想試試的一些選項。
  
 
=== 變更鼠標 ===
 
=== 變更鼠標 ===
  
If you want to change the default X cursor to a newer design, the {{Package AUR|slim-cursor}} package is available.
+
若您想將預設 X 鼠標改為較新的設計,有 {{AUR|slim-cursor}} 套件可用。
  
安裝完成後,編輯 {{Filename|/etc/slim.conf}} 取消註解此行:
+
安裝完成後,編輯 {{ic|/etc/slim.conf}} 取消註解此行:
  
 
  cursor  left_ptr
 
  cursor  left_ptr
  
This will give you a normal arrow instead. This setting is forwarded to {{Codeline|xsetroot -cursor_name}}. You can look up the possible cursor names [http://cvsweb.xfree86.org/cvsweb/*checkout*/xc/lib/X11/cursorfont.h?rev=HEAD&content-type=text/plain here] or in {{Filename|/usr/share/icons/<your-cursor-theme>/cursors/}}.
+
This will give you a normal arrow instead.
 
+
To change the cursor theme being used at the login screen, make a file named {{Filename|/usr/share/icons/default/index.theme}} with this content:
+
 
+
[Icon Theme]
+
Inherits=<your-cursor-theme>
+
 
+
將 <your-cursor-theme> 取代為您要使用的鼠標佈景主題名稱(例:whiteglass)。
+
 
+
=== Match SLiM and Desktop Wallpaper ===
+
 
+
To share a wallpaper between SLiM and your desktop, rename the used theme background, then create a link from your desktop wallpaper file to the default SLiM theme:
+
 
+
# mv /usr/share/slim/themes/default/background.jpg{,.bck}
+
# ln -s /path/to/mywallpaper.jpg /usr/share/slim/themes/default/background.jpg
+
 
+
=== 從 SLiM 關機、重新開機、暫停、結束、啟動終端機 ===
+
 
+
您可從 SLiM 登入畫面關機、重新開機、暫停、結束甚或啟動終端機。To do so, use the values in the username field, and the root password in the password field:
+
 
+
* 若要啟動終端機,輸入 '''console''' 做為使用者名稱 (defaults to xterm which must be installed separately... edit {{Filename|/etc/slim.conf}} to change terminal preference)
+
* 若要關機,輸入 '''halt''' 做為使用者名稱
+
* 若要重新開機,輸入 '''reboot''' 做為使用者名稱
+
* 若要結束回到 bash,輸入 '''exit''' 做為使用者名稱
+
* 若要暫停,輸入 '''suspend''' 做為使用者名稱(suspend 預設已停用,以 root 身分開啟 {{Filename|/etc/slim.conf}} 取消註解 {{Filename|suspend_cmd}} 這一行,必要時修改原有暫停指令(例:將 {{Codeline|/usr/sbin/suspend}} 改為 {{Codeline|sudo /usr/sbin/pm-suspend}}))
+
 
+
=== Power-off error with Splashy ===
+
 
+
If you use Splashy and SLiM, sometimes you can't power-off or reboot from menu in GNOME, Xfce, LXDE or others.  Check your {{Filename|/etc/slim.conf}} and {{Filename|/etc/splash.conf}}; set the DEFAULT_TTY=7 same as xserver_arguments vt07.
+
 
+
=== Login information with SLiM ===
+
 
+
By default, SLiM fails to log logins to utmp and wtmp which causes who, last, etc. to misreport login information. To fix this edit your {{Filename|slim.conf}} as follows:
+
 
+
  sessionstart_cmd    /usr/bin/sessreg -a -l $DISPLAY %user
+
  sessionstop_cmd    /usr/bin/sessreg -d -l $DISPLAY %user
+
 
+
=== Setting DPI with SLiM ===
+
 
+
The Xorg server generally picks up the DPI but if it doesn't you can specify it to SLiM.  If you set the DPI with the argument -dpi 96 in {{Filename|/etc/X11/xinit/xserverrc}} it will not work with SLiM. To fix this change your {{Filename|slim.conf}} from:
+
 
+
  xserver_arguments  -nolisten tcp vt07
+
 
+
to
+
 
+
  xserver_arguments  -nolisten tcp vt07 -dpi 96
+
 
+
=== 使用隨機主題 ===
+
 
+
Use the current_theme variable as a comma separated list to specify a set to randomly choose from.
+
 
+
== 資源 ==
+
 
+
* [http://slim.berlios.de/ SLiM homepage]
+
* [http://slim.berlios.de/manual.php SLiM documentation]
+

Revision as of 19:50, 29 November 2013

Tango-preferences-desktop-locale.pngThis article or section needs to be translated.Tango-preferences-desktop-locale.png

Notes: please use the first argument of the template to provide more detailed indications. (Discuss in Talk:SLiM (正體中文)#)
Template:Article summary start

Template:Article summary text Template:Article summary heading Template:Article summary wiki Template:Article summary end SLiM is an acronym for Simple Login Manager. SLiM is simple, lightweight and easily configurable. SLiM is used by some because it does not require the dependencies of GNOME or KDE and can help make a lighter system for users that like to use lightweight desktops like Xfce, Openbox, and Fluxbox.

安裝

安裝 SLiM:

# pacman -S slim

設定

How to load at startup, start your desktop environment, add themes...

啟用 SLiM

藉由修改 rc.conf daemon 陣列或 inittab,可於啟動時載入 SLiMa。詳見 Display Manager 取得細節。

單一環境

若要設定 SLiM 載入特定環境,編輯 ~/.xinitrc 以載入您的桌面環境:

#!/bin/sh

#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
#

exec [session-command]

SLiM 讀取本地 ~/.xinitrc 設定,並根據檔案內容啟動桌面。若您沒有 ~/.xinitrc 檔案,可參考此框架文件:

$ cp /etc/skel/.xinitrc $HOME

[session-command] 取代為合適的 session 指令。一些不同桌面啟動指令範例:

exec openbox-session
exec fluxbox (or exec startfluxbox)
exec startxfce4
exec gnome-session
exec startkde
exec fvwm2
exec awesome

若您的環境未在此處列出,參照合適的 wiki 頁面。

PolicyKit

Tango-view-refresh-red.pngThis article or section is out of date.Tango-view-refresh-red.png

Reason: ConsoleKit is deprecated, see [1] and General Troubleshooting#Session permissions. (Discuss in Talk:SLiM (正體中文)#)

若您使用 PolicyKit 遇到問題,使用 ConsoleKit 的 ck-launch-session

#!/bin/sh

#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
#

exec ck-launch-session [session-command]

多重環境

To be able to choose from multiple desktop environments, SLiM can be setup to log you into whichever you choose.

Put a case statement similar to this one in your ~/.xinitrc file and edit the sessions variable in /etc/slim.conf to match the names that trigger the case statement. You can choose the session at login time by pressing F1. Note that this feature is experimental.

# The following variable defines the session which is started if the user doesn't explicitly select a session
# Source: http://svn.berlios.de/svnroot/repos/slim/trunk/xinitrc.sample

DEFAULT_SESSION=twm

case $1 in
kde)
	exec startkde
	;;
xfce4)
	exec startxfce4
	;;
icewm)
	icewmbg &
	icewmtray &
	exec icewm
	;;
wmaker)
	exec wmaker
	;;
blackbox)
	exec blackbox
	;;
*)
	exec $DEFAULT_SESSION
	;;
esac

佈景主題

安裝 slim-themes 套件:

# pacman -S slim-themes archlinux-themes-slim

archlinux-themes-slim 套件包含數個不同佈景主題。目錄 /usr/share/slim/themes 尋找可用佈景主題。在 /etc/slim.conf 找到 'current_theme',輸入佈景主題名稱:

#current_theme       default
current_theme       archlinux-simplyblack

To preview a theme run if no instance of the Xorg server is running by:

$ slim -p /usr/share/slim/themes/<theme name>

若要關閉,於登入處鍵入 "exit" 後按下 Enter。

附加佈景主題套件可於 AUR 找到。

雙螢幕設定

您可在 /usr/share/slim/themes/<your-theme>/slim.theme 自訂 slim 佈景主題,將原有百分比值:

input_panel_x           50%
input_panel_y           50%

改為像素值:

# These settings set the "archlinux-simplyblack" panel in the center of my 1440x900 left screen
input_panel_x           495
input_panel_y           325

若您的佈景主題包含背景圖片,您可使用 background_style 設定('stretch'、'tile'、'center' 或 'color')使其正確顯示。觀看 very simple and clear official documentation about slim themes 取得更多細節。

其它選項

您可能會想試試的一些選項。

變更鼠標

若您想將預設 X 鼠標改為較新的設計,有 slim-cursorAUR 套件可用。

安裝完成後,編輯 /etc/slim.conf 取消註解此行:

cursor   left_ptr

This will give you a normal arrow instead.