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

From ArchWiki
Jump to: navigation, search
(simplification and beautification of wikilinks, fixing whitespace, capitalization and section fragments (https://github.com/lahwaacz/wiki-scripts/blob/master/link-checker.py (interactive)))
 
(7 intermediate revisions by 3 users not shown)
Line 4: Line 4:
 
[[en:SLiM]]
 
[[en:SLiM]]
 
[[es:SLiM]]
 
[[es:SLiM]]
 +
[[fi:SLiM]]
 
[[fr:SLiM]]
 
[[fr:SLiM]]
 
[[hu:SLiM]]
 
[[hu:SLiM]]
Line 18: Line 19:
 
{{Related articles end}}
 
{{Related articles end}}
 
{{translateme}}
 
{{translateme}}
{{警告|目前 SLiM 尚未和 [[Systemd]] 完全相容,第二次登入會引發各種問題。詳情參閱[[Display Manager (正體中文)#與 systemd 不相容|顯示管理員#與 systemd 不相容]]。}}
+
{{警告|目前 SLiM 尚未和 [[Systemd]] 完全相容,第二次登入會引發各種問題。詳情參閱[[Display manager (正體中文)#與 systemd 不相容|顯示管理員#與 systemd 不相容]]。}}
  
 
[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 34: Line 35:
 
=== 啟用 SLiM ===
 
=== 啟用 SLiM ===
  
藉由修改 {{ic|rc.conf}} daemon 陣列或 {{ic|inittab}},可於啟動時載入 SLiMa。詳見 [[Display Manager]] 取得細節。
+
藉由修改 {{ic|rc.conf}} daemon 陣列或 {{ic|inittab}},可於啟動時載入 SLiMa。詳見 [[Display manager]] 取得細節。
  
 
=== 單一環境 ===
 
=== 單一環境 ===
Line 51: Line 52:
 
exec [session-command]
 
exec [session-command]
 
</pre>
 
</pre>
 
SLiM 讀取本地 {{ic|~/.xinitrc}} 設定,並根據檔案內容啟動桌面。若您沒有 {{ic|~/.xinitrc}} 檔案,可參考此框架文件:
 
 
$ cp /etc/skel/.xinitrc $HOME
 
  
 
將 {{Ic|[session-command]}} 取代為合適的 session 指令。一些不同桌面啟動指令範例:
 
將 {{Ic|[session-command]}} 取代為合適的 session 指令。一些不同桌面啟動指令範例:
Line 67: Line 64:
  
 
若您的環境未在此處列出,參照合適的 wiki 頁面。
 
若您的環境未在此處列出,參照合適的 wiki 頁面。
 
=== PolicyKit ===
 
 
{{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>
 
#!/bin/sh
 
 
#
 
# ~/.xinitrc
 
#
 
# Executed by startx (run your window manager from here)
 
#
 
 
exec ck-launch-session [session-command]
 
</pre>
 
  
 
=== 多重環境 ===
 
=== 多重環境 ===
Line 162: Line 141:
 
=== 變更鼠標 ===
 
=== 變更鼠標 ===
  
若您想將預設 X 鼠標改為較新的設計,有 {{AUR|slim-cursor}} 套件可用。
+
若您想將預設 X 鼠標改為較新的設計,有 {{AUR|slim-cursor}}{{Broken package link|{{aur-mirror|slim-cursor}}}} 套件可用。
  
 
安裝完成後,編輯 {{ic|/etc/slim.conf}} 取消註解此行:
 
安裝完成後,編輯 {{ic|/etc/slim.conf}} 取消註解此行:

Latest revision as of 11:53, 30 April 2016

相關文章

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 (正體中文)#)
警告: 目前 SLiM 尚未和 Systemd 完全相容,第二次登入會引發各種問題。詳情參閱顯示管理員#與 systemd 不相容

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]

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

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

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

多重環境

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[broken link: archived in aur-mirror] 套件可用。

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

cursor   left_ptr

This will give you a normal arrow instead.