Difference between revisions of "LXDE (简体中文)"

From ArchWiki
Jump to navigation Jump to search
m (rem double redir)
(编辑)
 
(37 intermediate revisions by 15 users not shown)
Line 1: Line 1:
[[Category:简体中文]]
+
[[Category:Desktop environments (简体中文)]]
[[Category:桌面环境]]
+
[[cs:LXDE]]
[[Category:HOWTOs (简体中文)]]
+
[[en:LXDE]]
 +
[[es:LXDE]]
 +
[[fr:LXDE]]
 +
[[it:LXDE]]
 +
[[ja:LXDE]]
 +
[[pl:LXDE]]
 +
[[ru:LXDE]]
 +
[[sr:LXDE]]
 +
[[zh-hant:LXDE]]
 +
{{Translateme  (简体中文)|部分段落未翻译,小提示部分英文页面已经增加了不少内容,需要同步过来并翻译。}}
 +
摘自 [http://lxde.org/ LXDE.org | LXDE官方主页]:
  
{{i18n_links_start}}
+
:''The "Lightweight X11 Desktop Environment" is an extremely fast-performing and energy-saving desktop environment. Maintained by an international community of developers, it comes with a beautiful interface, multi-language support, standard keyboard short cuts and additional features like tabbed file browsing. LXDE uses less CPU and less RAM than other environments. It is especially designed for cloud computers with low hardware specifications, such as, netbooks, mobile devices (e.g. MIDs) or older computers.''
{{i18n_entry|English|LXDE}}
 
{{i18n_entry|简体中文|LXDE (简体中文)}}
 
{{i18n_entry|Español|LXDE (Español)}}
 
{{i18n_entry|Italiano|LXDE (italiano)}}
 
{{i18n_links_end}}
 
  
== 什么是LXDE? ==
+
== 安装 ==
LXDE,即 Lightweight X11 Desktop Environment 的缩写,通常也称之为LX (意思是LinuX)。在LX中,你会很容易发现他和别的桌面环境最大的不同,那就是他的任何一个组件都可以完全独立的应用而不依赖于其他组件.
 
  
LXDE 项目致力于提供一个新的桌面环境,并且在保证易用性的前提下尽可能的减少资源的占用。易用性、速度、内存使用是作为开发者首要考虑的因素。
+
使用LXDE最少需要安装 {{Pkg|lxde-common}}, {{Pkg|lxsession}}, {{Pkg|openbox}}(或者其他窗口管理器)。{{Grp|lxde}}包含完整的桌面。
  
== 为什么要选用 LXDE? ==
+
=== GTK+ 3 版本 ===
我们为什么要选用LXDE呢,因为他有一些令人惊叹的特性。如下:
 
* '''轻便''', 合理的内存资源占用(在X11和LXDE启动后,在i386处理器平台上,内存占用大约45 MB。)
 
* '''高效''', 哪怕在1999年生产的机器上也能很好的运行(LXDE对硬件的要求和Windows 98差不多)
 
* '''美观''', 使用国际化的 gtk+ 2用户界面
 
* '''易用''', 用户界面既简单但却不失易用性
 
* '''自由'''  所有组件都可以在LXDE外独立使用(惊奇吧!)
 
* '''兼容''', 完全符合freedesktop.org指定的桌面标准
 
* '''节省''' (LXDE自身对硬件的要求不高,不过其他的X下的应用程序可能有点要求。比如说Firefox和OpenOffice.org2可能比较耗内存,所以建议你的内存容量不低于128 MB.)
 
  
== LXDE包含了哪些组件? ==
+
你可以安装 {{Grp|lxde-gtk3}} 软件包组来试用这个尚在实验阶段的版本.
* '''[http://pcmanfm.sourceforge.net/ PCManFM]''': 是一个快速且轻巧的档案管理器,其特点如支援拖曳、分页浏览(类似 Firefox),内建档案搜寻工具、快速读取大型目录、应用程式关联支援(默认开启程式)、显示影像缩图、支援书签、正确处理非 UTF-8 编码的档案名称等。
 
* '''[http://www.gnomefiles.org/app.php/LXPanel LXPanel]''': 桌面面板,它可以从 *.desktop 档案自动制造出选单,也有 GUI 的偏好设定对话框(因此不需要手动修改设定档)。这个元件也提供拥有自动完成选单的“执行”对话框。
 
* '''[http://wiki.lxde.org/zh/index.php?title=LXSession&variant=zh-cn LXSession]''': 作业阶段管理器,当使用者启动作业阶段时,建立桌面环境并自动启动程式的工具。另外,作业阶段管理器可以记住您登出时所开启的程式,并在使用者再度登入时启动。
 
: (原本 LXSession 支援 X11 作业阶段管理,但是这项实做臭虫相当多,因此很少使用,而且由于 X11 作业阶段管理的架构相当复杂,问题并不能一夜改善。 现在没有实做该功能的 LXSession Lite 已经正式取代 LXSession 成为了默认的作业阶段管理器。 )
 
* '''[http://www.gnomefiles.org/app.php/LXAppearance LXAppearance]''': LXAppearance是一个新的很有特色的GTK+ 主题更换和调节工具,他可以修改GTK+的主题、图表主题以及应用程序使用的字体等。
 
* '''[http://icculus.org/openbox/index.php/Main_Page Openbox]''': 轻量级的符合国际标准的窗口管理器,具备高度的自定义特性(此组件并非LXDE Project所开发,但是作为默认的窗口管理器组件被包含).当然如果你喜欢也可以用其他的比如icewm, fluxbox, metacity等等来替换他。
 
* '''[http://lxde.sourceforge.net/gpicview/ GPicView]''': 非常简单、快速的轻量级图片查看工具
 
* '''[http://tarot.freeshell.org/leafpad/ Leafpad]''': 轻量级的简单的文本编辑器(也不是我们开发的,但是我们建议你将它作为默认的编辑器).
 
* '''[http://xarchiver.xfce.org/ XArchiver]''': 轻量级、快速的与桌面环境无关的基于gtk+的文件归档管理工具(同样不是由LXDE项目开发,但是同样建议你使用)。
 
* '''[http://lxde.sourceforge.net/about.html LXNM]''' 轻量级网络连线管理工具,可调校无线网络连线。(仅限 Linux)
 
* '''[http://wiki.lxde.org/zh/index.php?title=LXSession_Edit&variant=zh-cn LXSession Edit]''', LXDE 可以改变的视窗管理员,有能力打开失效的应用程式。
 
*'''[http://wiki.lxde.org/zh/index.php?title=LXTerminal&variant=zh-cn LXTerminal]''', 终端机模拟器。
 
*'''[http://wiki.lxde.org/zh/index.php?title=LXTask&variant=zh-cn LXTask]''', 工作管理员/系统监控。
 
*'''[http://wiki.lxde.org/zh/index.php?title=LXRandr&variant=zh-cn LXRandr]''', 支援设定萤幕分辨率与多萤幕的显示管理器。
 
*'''[http://wiki.lxde.org/zh/index.php?title=LXShortCut&variant=zh-cn LXShortCut]''', 一种简单的方法来编辑修改应用程式的捷径。
 
*'''[http://wiki.lxde.org/zh/index.php?title=LXMusic&variant=zh-cn LXMusic]''', 以 xmms2 为基础的极简音乐播放器。
 
  
== 怎么安装 LXDE? ==
+
它几乎可以正常工作,但是可能会有一些问题,包括: [https://sourceforge.net/p/lxde/bugs/769/ gpicview], [https://sourceforge.net/p/lxde/bugs/768/ lxappearance-obconf], [https://sourceforge.net/p/lxde/bugs/803/ lxlauncher] [https://sourceforge.net/p/lxde/bugs/773/ lxpanel].
LXDE 是模块化的. 你可以从下面的列表中挑选你需要的包,所有的包都可以通过pacman下载安装得到.他们大多数都在extra和community仓库中。如果你要安装像 LXAppearance LXNM,这样的报,你就需要仓库AUR了。
 
  
当然,只要你要运行LXDE桌面环境,那你就最少要安装Lxde-common, Lxsession-lite,和Openbox这些组件. operbox可以用别的窗口管理器替代。
+
== 运行 LXDE ==
 +
 
 +
=== 显示管理器 ===
 +
 
 +
[[LXDM]]是LXDE的默认显示管理器,并作为{{Grp|lxde}}组的一部分。另请参见[[Display manager]]。
 +
=== 命令行 ===
 +
 
 +
使用 "startx",你需要在你的[[xinitrc]]文件最后添加
 +
 
 +
{{hc|~/.xinitrc|exec startlxde}}
 +
 
 +
另见[[Start X at login]]
 +
 
 +
== 小提示 ==
  
LXDE在arch中已经有一个软件包组. 所以你可以简单的像下面这样安装LXDE桌面环境:
+
=== Application menu editing ===
  
# pacman -S lxde
+
The application menu works by resolving the {{ic|.desktop}} files located in {{ic|/usr/share/applications/}} and {{ic|~/.local/share/applications/}}. To add or edit a menu item, see [[desktop entries]]. Third party menu editors can be found in the [[AUR]] (e.g. {{AUR|lxmed}}). There also official ones like {{Pkg|alacarte}} (gnome), {{Pkg|mozo}} (mate)
 +
, etc..
  
这样就会下载Lxde软件包组中的软件包:
+
=== Autostart ===
* gpicview
 
* lxappearance
 
* lxde-common
 
* lxde-settings-daemon
 
* lxlauncher
 
* lxmenu-data
 
* lxpanel
 
* lxrandr
 
* lxsession-lite
 
* lxtask
 
* lxterminal
 
* menu-cache
 
* openbox
 
* pcmanfm
 
当然了,您或许也会对这些软件包感兴趣:leafpad(一款小巧的编辑器), xarchiver(轻量级的压缩工具), obconf(Openbox的窗口设定工具), [[gamin|gamin]]
 
  
安装它们:
+
Applications can be automatically started in a couple of ways:
# pacman -S leafpad xarchiver obconf
 
  
# pacman -S gamin
+
* With {{ic|.desktop}} files
如果您已经安装了fam,那么就请您先移除fam,并从/etc/rc.conf里的daemon中删去fam,因为gamin会与fam会发生冲突:
 
# pacman -Rd fam
 
  
== 运行 LXDE ==
+
LXDE implements [[XDG Autostart]].
# 如果您正在使用像GDM或者KDM等这样的登录管理器,您可以直接用它们选择LXDE来登录。
+
 
# 如果您使用的是SLIM这样的登录管理器,或者,如果您没安装显示管理器,希望从控制台启动lxde,把下面这一行添加到~/.xinitrc中:
+
* Via LXsession
 +
 
 +
Each line in {{ic|~/.config/lxsession/LXDE/autostart}} represents a command to be executed. If a line starts with {{ic|@}}, and the command following it crashes, the command is automatically re-executed. For example:
 +
 
 +
{{hc|~/.config/lxsession/LXDE/autostart|
 +
@lxterminal
 +
@leafpad
 +
}}
 +
 
 +
{{Note|These commands do ''not'' end with a "&" symbol.}}
 +
 
 +
There is also a global autostart file at {{ic|/etc/xdg/lxsession/LXDE/autostart}}.
 +
 
 +
{{Note|If both files are present, LXsession only executes the local file as of v0.4.9}}
 +
 
 +
=== Bindings ===
 +
 
 +
Mouse and key bindings (i.e. keyboard shortcuts) are implemented with Openbox. LXDE users should follow the [http://openbox.org/wiki/Help:Bindings Openbox wiki] to edit {{ic|~/.config/openbox/lxde-rc.xml}}.
 +
 
 +
An optional GUI for editing the key bindings is provided by the {{AUR|obkey}} package. Whle it edits {{ic|rc.xml}} by default, you can direct it to the LXDE configuration as follows:
 +
 
 +
$ obkey ~/.config/openbox/lxde-rc.xml
 +
 
 +
See [http://code.google.com/p/obkey/] for more information.
 +
 
 +
=== Cursors ===
 +
 
 +
{{pkg|lxappearance}} is a graphical tool to set [[GTK]] look and feel, including the cursor theme. Settings configured with LXAppearance are written to {{ic|~/.gtkrc-2.0}}, {{ic|~/.config/gtk-3.0/settings.ini}} and {{ic|~/.icons/default/index.theme}}. See also [[Cursor themes]].
 +
 
 +
=== Digital clock applet time ===
 +
 
 +
You can right click on the digital clock applet on the panel and set how it displays the current time using the strftime format. See {{man|3|strftime}} for details.
 +
 
 +
=== Font settings ===
 +
 
 +
{{Pkg|lxappearance-obconf}} configures [[Openbox]] settings. See also [[Font configuration]].
 +
 
 +
=== Keyboard layout ===
 +
 
 +
{{pkg|lxpanel}} includes a keyboard layout applet. See [[Keyboard configuration in Xorg]] for generic instructions and [[#Autostart]] to automatically start ''setxkbmap'' in LXDE.
 +
 
 +
=== Screen locking ===
 +
 
 +
LXDE does not come with a screen locker of its own. See [[List of applications/Security#Screen lockers]] and [[#Autostart]] on how to start them.
 +
 
 +
The ''Screen Lock'' icon executes a script (located at {{ic|/usr/bin/lxlock}}) which searches for a number of well known screen lockers and uses the first one it finds to lock the screen. See [https://github.com/lxde/lxsession/blob/master/lxlock/lxlock lxlock] on GitHub.
 +
 
 +
{{ic|/etc/xdg/lxsession/LXDE/autostart}} (from the {{Pkg|lxde-common}} package) lists [[XScreenSaver]] which will be launched automatically.
 +
 
 +
See [[DPMS]] on how to control the screen saver without external programs.
 +
 
 +
=== LXPanel icons ===
 +
 
 +
Default icons used by LXpanel are stored in {{ic|/usr/share/pixmaps/}} and any custom icons should be saved there as well.
 +
 
 +
To change default icons for applications, see [[Desktop entries#Icons]].
 +
 
 +
=== LXPanel menus ===
 +
 
 +
The panel's menus can be configured in {{ic|/etc/xdg/menus/lxde-applications.menu}} as per the [[xdg-menu]] format to work with applications from other sessions (notably [[MATE]]) to add some of the function-ability that LXDE lacks.
 +
 
 +
=== Use a different window manager ===
 +
 
 +
LXsession uses the [[window manager]] defined in {{ic|~/.config/lxsession/LXDE/desktop.conf}} ([[Openbox]] by default). If this file does not exist, it searches in {{ic|/etc/xdg/lxsession/LXDE/desktop.conf}} instead.
 +
 
 +
Replace {{ic|openbox-lxde}} in either file with a window manager of your choice:
 +
 
 +
For metacity:
 +
 
 +
window_manager=metacity
 +
 
 +
For compiz:
 +
 
 +
window_manager=compiz
 +
 
 +
Alternatively use {{ic|''WM'' --replace}} as defined in [[#Autostart]], where ''WM'' is the name of the window manager executable being started. This means that ''openbox'' will be started first on each login and will then immediately be replaced. Note that Openbox and LXDE do not share the same {{ic|rc.xml}} and keyboard shortcuts may differ. See [[xbindkeys]].
 +
 
 +
=== Using a composite manager ===
 +
 
 +
LXDE doesnt enable compositing by default that leads to screen tearing problem. If you not okay with this, you can sacrifice a little bit more resources to enable window compositing either by installing compositing manager or you can also subtitute lxde with another window manager that support compositing.
 +
 
 +
== Troubleshooting ==
 +
 
 +
=== Some apps unable to start ===
  
  exec ck-launch-session startlxde
+
Recent shift of LXDE to gtk3 introduce some bugs that may cause segmentation fault and preventing application to start (most notably the customize look and fell settings or known as lxappearance). Until this problem fully fixed, you can try using JWM to bypass gtk3 segfault:
 +
*install JWM
 +
$ sudo pacman -S jwm
 +
*subtitute LXDE with jwm, open terminal and run:
 +
$ jwm
 +
*this may cause a little glitch but now you should be able to open segfault app normally
 +
*after you are done, relogin to refresh LXDE desktop
  
这样您就可以在[[HAL]]的陪伴下开启LXDE,并且,您还可以在“注销”对话框中重启或关闭您的电脑。当然了,倘若您不用HAL,您只要在~/.xinitrc中这样写就行了:
+
  exec startlxde
+
=== NTFS with Chinese characters ===
  
== 小提示 ==
+
{{Merge|NTFS-3G|This has been flagged since 2014 [[special:diff/346266]]}}
=== 自动挂载 ===
 
如果你希望移动USB设备在[http://pcmanfm.sourceforge.net/ PCManFM]中自动挂载,你需要安装好[[HAL]]. 如果你的移动设备使用NTFS文件系统,你最好也安装上[[NTFS Write Support (简体中文)|NTFS-3G]]支持.
 
  
通常情况下 PCManFM 能很好的和[HAL]一起工作,除非你的USB设备是使用NTFS文件系统,并且包含非拉丁文字母的文件名的时候。 (比如:中文). 这些文件可能会出现乱码或者根本就不可见. 这是因为lxsession(或者lxsession-lite)的mounthelper不能正确的解析本地化选项导致的。这里有一种解决方法:
+
For a storage device with an NTFS filesystem, you will need to install the [[NTFS-3G]] package. Generally, PCManFM works well with NTFS filesystems, however there is one bug affecting NTFS users that if you have files or directories on an NTFS filesystem, the names of which contain non-latin characters (e.g. Chinese characters) may disappear when opening (or auto-mounting) the NTFS volume. This happens because the lxsession mount-helper is not correctly parsing the policies and locale options. There is a workaround for this:
  
 +
Create a new {{ic|/usr/local/bin/mount.ntfs-3g}} with a new Bash script containing:
  
1) 移除符号链接 "/sbin/mount.ntfs-3g";
 
rm /sbin/mount.ntfs-3g
 
2) 创建新的 "/sbin/mount.ntfs-3g" 脚本(而不是符号链接):
 
 
  #!/bin/bash
 
  #!/bin/bash
  /bin/ntfs-3g $1 $2 -o locale=en_US.UTF-8
+
  /usr/bin/ntfs-3g $1 $2 -o locale=en_US.UTF-8
3) 增加可执行权限:
+
 
  chmod +x /sbin/mount.ntfs-3g  
+
And then make it executable:
4) 将 "NoUpgrade=sbin/sbin/mount.ntfs-3g" 添加到pacman.conf的"[options]"节
+
 
 +
  # chmod +x /usr/local/bin/mount.ntfs-3g
 +
 
 +
=== LXPanel crashes ===
 +
 
 +
With some [[GTK]] themes, launching ''lxpanel'' will lead to the following error:
 +
 
 +
lxpanel: cairo-scaled-font.c:459: _cairo_scaled_glyph_page_destroy: Assertion `!scaled_font->cache_frozen' failed.
 +
 
 +
In this case install {{Pkg|ttf-dejavu}}.
  
=== 设置开机自动启动的程序 ===
+
If lxpanel crashes when browsing particular unicode web pages, install {{Pkg|ttf-droid}}.
用你喜欢的编辑器打开/etc/xdg/lxsession/LXDE/autostart,然后在其中添加你要开机自动启动的程序,就像这样:
 
@xscreensaver -no-splash
 
@lxpanel --profile LXDE
 
@pcmanfm -d
 
@fcitx
 
@xcompmgr -Ss -n -Cc -fF -I-10 -O-10 -D1 -t-3 -l-4 -r4 &
 
=== 更换GTK主题 ,开启阴影和透明效果===
 
如果您对您现在的GTK主题不太满意,您可以通过Lxappearance来改换。LXDE支持部分Gnome的GTK主题,您可以从GnomeLook这样的网站下载,然后通过Lxappearance来安装。您个人的主题一般放在您用户目录下的.themes文件夹中。
 
如果非常不幸,您的Lxappearance似乎不能拿来安装主题,那么,您可以试着安装 gtk-theme-switch2来安装GTK主题:
 
# pacman -S gtk-theme-switch2
 
这是一个极简易的小程序,并且您只能从终端输入switch2来启动它:
 
# switch2
 
安装,选择好您的GTK主题后,别忘了点选“Apply”,以使其生效。
 
至于开启阴影效果,您可以通过安装xcompmgr来实现:
 
# pacman -S xcompmgr
 
xcompmgr是命令行的工具,没有图形化的界面来供您设置,因此,您只能从终端里设置并开启。有许多人认为,这样设置最适合:
 
# xcompmgr -Ss -n -Cc -fF -I-10 -O-10 -D1 -t-3 -l-4 -r4 &
 
您可以在/etc/xdg/lxsession/LXDE/autostart中将其设置为自启动的,比如:
 
@xcompmgr -Ss -n -Cc -fF -I-10 -O-10 -D1 -t-3 -l-4 -r4 &
 
这样,您每次开机就会自动开启阴影效果了。
 
如果您希望您的窗口有透明的效果,您可以安装transset-df来实现:
 
# pacman -S transset-df
 
安装完后,您可以在终端下键入transset-df,回车后,鼠标指针会变成十字形,然后在您希望得到透明效果的程序界面上,单击鼠标左键,您就能得到透明效果了。
 
当然,您也可以采用Keybind(键绑定)的方式来开启透明效果。有人给出了这样的方案,即用您喜欢的编辑器打开您用户目录下的.config/openbox/lxde-rc.xml文件,在该配置文件的Titlebar那一行下面添上:
 
<!-- User Add -->
 
<!-- Use TransSet -->
 
<mousebind button="Up" action="Click">
 
<action name="Execute">
 
<execute>transset-df -p -x 1.0 --inc 0.1 </execute>
 
</action>
 
</mousebind>
 
<mousebind button="Down" action="Click">
 
<action name="Execute">
 
<execute>transset-df -p -m 0.1 --dec 0.1</execute>
 
</action>
 
</mousebind>
 
<!-- User Add End -->
 
完成后,保存退出。这样,当您将鼠标悬停到某个程序界面的标题栏时,您就可以用鼠标滚轮来开启并调控透明效果了。
 
=== 更换鼠标指针主题 ===
 
目前,LXDE还没有提供一个程序来直接调整鼠标指针主题,因此,您只能通过对X Cursor的配置来调整。参见[[X11 Cursors|X11 Cursors]]。
 
  
=== 更换窗口管理器 ===  
+
=== LXPanel Task Bar icon size ===
根据个人喜好,你可以很容易的更换LXDE默认的窗口管理器,比如fvwm, icewm, dwm,awesome等等
 
  
你窗口管理器的设置保存在下面这个文件中:
+
The icons of running applications do not match the set ''Icon size'' in ''Panel Settings'' > ''Geometry'' but are 4px smaller which makes some of them blurry. To have clear looking 32px icons in the Task Bar the set ''Icon size'' has to be 36px which would blur the icons of the rest of your active Panel Applets. To get around this create additional panel(s) and have them collectively make a single continuous looking panel by adjusting the Alignment and Margin in ''Panel Settings'' > ''Geometry''.
::/etc/xdg/lxsession/LXDE/default
 
比如说,你的/etc/xdg/lxsession/LXDE/default可能是这个样子的:
 
smproxy
 
openbox
 
lxpanel
 
smproxy 是一个由xorg提供的程序. 他可以为那些不支持X11 R6会话管理机制的程序提供会话管理支持
 
  
所以强烈要求你保留此行。
+
=== Fake transparency in LXTerminal ===
  
openbox是当前的窗口管理器,你可以用你自己喜欢的来替代之。
+
The latest version of [https://wiki.gnome.org/Apps/Terminal/VTE VTE terminal widget library] requires a compositing window manager for background transparency. The unmaintained, legacy GTK 2 version of VTE has fake transparency, where the desktop background image will show through the terminal. It you prefer fake transparency, the GTK 2 version of LXTerminal can be installed with the {{AUR|lxterminal-gtk2}} package.
  
 
== 相关资源 ==
 
== 相关资源 ==

Latest revision as of 03:26, 19 February 2020

Tango-preferences-desktop-locale.png本页面需要更新翻译,内容可能已经与英文脱节。要贡献翻译,请访问简体中文翻译组Tango-preferences-desktop-locale.png

附注: 部分段落未翻译,小提示部分英文页面已经增加了不少内容,需要同步过来并翻译。

摘自 LXDE.org | LXDE官方主页:

The "Lightweight X11 Desktop Environment" is an extremely fast-performing and energy-saving desktop environment. Maintained by an international community of developers, it comes with a beautiful interface, multi-language support, standard keyboard short cuts and additional features like tabbed file browsing. LXDE uses less CPU and less RAM than other environments. It is especially designed for cloud computers with low hardware specifications, such as, netbooks, mobile devices (e.g. MIDs) or older computers.

安装

使用LXDE最少需要安装 lxde-common, lxsession, openbox(或者其他窗口管理器)。lxde包含完整的桌面。

GTK+ 3 版本

你可以安装 lxde-gtk3 软件包组来试用这个尚在实验阶段的版本.

它几乎可以正常工作,但是可能会有一些问题,包括: gpicview, lxappearance-obconf, lxlauncherlxpanel.

运行 LXDE

显示管理器

LXDM是LXDE的默认显示管理器,并作为lxde组的一部分。另请参见Display manager

命令行

使用 "startx",你需要在你的xinitrc文件最后添加

~/.xinitrc
exec startlxde

另见Start X at login

小提示

Application menu editing

The application menu works by resolving the .desktop files located in /usr/share/applications/ and ~/.local/share/applications/. To add or edit a menu item, see desktop entries. Third party menu editors can be found in the AUR (e.g. lxmedAUR). There also official ones like alacarte (gnome), mozo (mate) , etc..

Autostart

Applications can be automatically started in a couple of ways:

  • With .desktop files

LXDE implements XDG Autostart.

  • Via LXsession

Each line in ~/.config/lxsession/LXDE/autostart represents a command to be executed. If a line starts with @, and the command following it crashes, the command is automatically re-executed. For example:

~/.config/lxsession/LXDE/autostart
@lxterminal
@leafpad
Note: These commands do not end with a "&" symbol.

There is also a global autostart file at /etc/xdg/lxsession/LXDE/autostart.

Note: If both files are present, LXsession only executes the local file as of v0.4.9

Bindings

Mouse and key bindings (i.e. keyboard shortcuts) are implemented with Openbox. LXDE users should follow the Openbox wiki to edit ~/.config/openbox/lxde-rc.xml.

An optional GUI for editing the key bindings is provided by the obkeyAUR package. Whle it edits rc.xml by default, you can direct it to the LXDE configuration as follows:

$ obkey ~/.config/openbox/lxde-rc.xml

See [1] for more information.

Cursors

lxappearance is a graphical tool to set GTK look and feel, including the cursor theme. Settings configured with LXAppearance are written to ~/.gtkrc-2.0, ~/.config/gtk-3.0/settings.ini and ~/.icons/default/index.theme. See also Cursor themes.

Digital clock applet time

You can right click on the digital clock applet on the panel and set how it displays the current time using the strftime format. See strftime(3) for details.

Font settings

lxappearance-obconf configures Openbox settings. See also Font configuration.

Keyboard layout

lxpanel includes a keyboard layout applet. See Keyboard configuration in Xorg for generic instructions and #Autostart to automatically start setxkbmap in LXDE.

Screen locking

LXDE does not come with a screen locker of its own. See List of applications/Security#Screen lockers and #Autostart on how to start them.

The Screen Lock icon executes a script (located at /usr/bin/lxlock) which searches for a number of well known screen lockers and uses the first one it finds to lock the screen. See lxlock on GitHub.

/etc/xdg/lxsession/LXDE/autostart (from the lxde-common package) lists XScreenSaver which will be launched automatically.

See DPMS on how to control the screen saver without external programs.

LXPanel icons

Default icons used by LXpanel are stored in /usr/share/pixmaps/ and any custom icons should be saved there as well.

To change default icons for applications, see Desktop entries#Icons.

LXPanel menus

The panel's menus can be configured in /etc/xdg/menus/lxde-applications.menu as per the xdg-menu format to work with applications from other sessions (notably MATE) to add some of the function-ability that LXDE lacks.

Use a different window manager

LXsession uses the window manager defined in ~/.config/lxsession/LXDE/desktop.conf (Openbox by default). If this file does not exist, it searches in /etc/xdg/lxsession/LXDE/desktop.conf instead.

Replace openbox-lxde in either file with a window manager of your choice:

For metacity:

window_manager=metacity

For compiz:

window_manager=compiz

Alternatively use WM --replace as defined in #Autostart, where WM is the name of the window manager executable being started. This means that openbox will be started first on each login and will then immediately be replaced. Note that Openbox and LXDE do not share the same rc.xml and keyboard shortcuts may differ. See xbindkeys.

Using a composite manager

LXDE doesnt enable compositing by default that leads to screen tearing problem. If you not okay with this, you can sacrifice a little bit more resources to enable window compositing either by installing compositing manager or you can also subtitute lxde with another window manager that support compositing.

Troubleshooting

Some apps unable to start

Recent shift of LXDE to gtk3 introduce some bugs that may cause segmentation fault and preventing application to start (most notably the customize look and fell settings or known as lxappearance). Until this problem fully fixed, you can try using JWM to bypass gtk3 segfault:

  • install JWM
$ sudo pacman -S jwm
  • subtitute LXDE with jwm, open terminal and run:
$ jwm
  • this may cause a little glitch but now you should be able to open segfault app normally
  • after you are done, relogin to refresh LXDE desktop


NTFS with Chinese characters

Merge-arrows-2.pngThis article or section is a candidate for merging with NTFS-3G.Merge-arrows-2.png

Notes: This has been flagged since 2014 special:diff/346266 (Discuss in Talk:LXDE (简体中文)#)

For a storage device with an NTFS filesystem, you will need to install the NTFS-3G package. Generally, PCManFM works well with NTFS filesystems, however there is one bug affecting NTFS users that if you have files or directories on an NTFS filesystem, the names of which contain non-latin characters (e.g. Chinese characters) may disappear when opening (or auto-mounting) the NTFS volume. This happens because the lxsession mount-helper is not correctly parsing the policies and locale options. There is a workaround for this:

Create a new /usr/local/bin/mount.ntfs-3g with a new Bash script containing:

#!/bin/bash
/usr/bin/ntfs-3g $1 $2 -o locale=en_US.UTF-8

And then make it executable:

# chmod +x /usr/local/bin/mount.ntfs-3g

LXPanel crashes

With some GTK themes, launching lxpanel will lead to the following error:

lxpanel: cairo-scaled-font.c:459: _cairo_scaled_glyph_page_destroy: Assertion `!scaled_font->cache_frozen' failed.

In this case install ttf-dejavu.

If lxpanel crashes when browsing particular unicode web pages, install ttf-droid.

LXPanel Task Bar icon size

The icons of running applications do not match the set Icon size in Panel Settings > Geometry but are 4px smaller which makes some of them blurry. To have clear looking 32px icons in the Task Bar the set Icon size has to be 36px which would blur the icons of the rest of your active Panel Applets. To get around this create additional panel(s) and have them collectively make a single continuous looking panel by adjusting the Alignment and Margin in Panel Settings > Geometry.

Fake transparency in LXTerminal

The latest version of VTE terminal widget library requires a compositing window manager for background transparency. The unmaintained, legacy GTK 2 version of VTE has fake transparency, where the desktop background image will show through the terminal. It you prefer fake transparency, the GTK 2 version of LXTerminal can be installed with the lxterminal-gtk2AUR package.

相关资源