Difference between revisions of "LXDE (日本語)"

From ArchWiki
Jump to navigation Jump to search
Line 69: Line 69:
=== Display Managers ===
=== Display Managers ===
If you are using a [[Display Manager|display manager]] like [[GDM]], [[KDM]], or [[SLiM]], switch the session to LXDE. Please consult the display manager's wiki page for instructions.
もし[[GDM]][[KDM]][[SLiM]]のような[[Display Manager|display manager]]を使っている場合、セッションをLXDEに切り替えてください。その手順はDisplay Managerのページを参照してください。
Instructions for using [[LXDM]], an experimental display manager provided by the LXDE project, are included in [[LXDM]] page.
If not using a display manager you would like to add
もしディスプレイマネージャを使っていない場合はin order xdg-open to function properly
to your ~/.bash_profile in order xdg-open to function properly.
をあなたの ~/.bash_profile に追加してください。
=== Console ===
=== コンソール ===
To be able to start the desktop from the console, several other options exist.
To use '''startx''', you will need to define LXDE in your {{ic|~/.xinitrc}} file:
  exec startlxde
  exec startlxde
If you want to run '''startx''' at boot automatically, take a look at the [[Start X at Boot#Starting X as preferred user without logging in |Starting X at boot]] guide.
もし'''startx'''を起動時に自動的に実行したい場合、[[Start X at Boot#Starting X as preferred user without logging in |Starting X at boot]]を参照してください。
For other tasks you'll want to be sure that dbus is running as a daemon.
See [[xinitrc]] for details, such as preserving the logind (and/or consolekit) session.
== Tips and tricks ==
== Tips and tricks ==
=== Application Menu Editing ===
=== アプリケーションメニューの編集 ===
The application menu works by resolving the {{ic|.desktop}} files located in {{ic|/usr/share/applications}}. Many desktop environments run programs that supersede these settings to allow customization of the menu. LXDE has yet to create an application menu editor but you can manually build them yourself if you are so inclined. Third party menu editor can be found in [[AUR]] - {{aur|lxmed}}
アプリケーションメニューは{{ic|/usr/share/applications}}にある{{ic|.desktop}}を解決して動きます。多くのデスクトップ環境では、メニューのカスタマイズができるように、これらの設定を優先するプログラムを実行します。LXDEはアプリケーションメニューエディタを作成するためにまだ持っていますが、もしその気があれば、手動でそれらを自分で構築することができます。[[AUR]] - {{AUR| lxmed}}にサード製のメニューエディタがあります。
メニューの項目を追加や編集するには、{{ic|.desktop}}ファイルを{{ic|/usr/share/applications}}に作るかリンクするかしてください。 Consult [http://standards.freedesktop.org/desktop-entry-spec/latest/ the desktop entry specification] on freedesktop.org for structures of {{ic|.desktop}} files.
To add or edit a menu item, create or link to the {{ic|.desktop}} file in {{ic|/usr/share/applications}}. Consult [http://standards.freedesktop.org/desktop-entry-spec/latest/ the desktop entry specification] on freedesktop.org for structures of {{ic|.desktop}} files.
To remove items from the menu, instead of deleting the {{ic|.desktop}} files, you can edit the file and add the following line in the file:
To expedite the process for a good number of files you can put it in a loop. For example:
  cd /usr/share/applications
  cd /usr/share/applications
  for i in program1.desktop program2.desktop ...; do cp /usr/share/applications/$i \
  for i in program1.desktop program2.desktop ...; do cp /usr/share/applications/$i \
  /home/user/.local/share/applications/; echo "NoDisplay=true" >> \
  /home/user/.local/share/applications/; echo "NoDisplay=true" >> \
  /home/user/.local/share/applications/$i; done
  /home/user/.local/share/applications/$i; done
This will work for all applications except KDE applications. For these, the only way to remove them from the menu is to log into KDE itself and use it's menu editor. For every item that you do not want displayed, check the 'Show only in KDE' option. If adding NoDisplay=True won't work, you can add ShowOnlyIn=XFCE.
これはKDE以外のすべてのアプリケーションに対して働きます。KDEのものに関しては、まずKDEにログインし、KDEのメニューエディタを使ってください。表示したくないすべての項目に'Show only in KDE'のオプションをチェックしてください。NoDisplay=Trueが上手く動かない場合、ShowOnlyIn=XFCEを試してください。
=== Auto Mount ===
=== Auto Mount ===
=== Autostart Programs ===
=== プログラムの自動実行 ===
; .desktop files
; .desktop files
First you can link a program's {{ic|.desktop}} in {{ic|/usr/share/applications/}} file to {{ic|~/.config/autostart/}}. For example, to execute lxterminal automatically at startup:
  $ ln -s /usr/share/applications/lxterminal.desktop ~/.config/autostart/
  $ ln -s /usr/share/applications/lxterminal.desktop ~/.config/autostart/
Once {{ic|.desktop}} files have been added you can manipulate them with the GUI configuration tool {{AUR|lxsession-edit}}.
; autostart file
; autostart file
The second method is to use a {{ic|~/.config/lxsession/LXDE/autostart}} file. This file is not a shell script, but each line represents a command to be executed, if a line begins with a @ symbol, the command following the @ will be automatically re-executed if it crashes. For example, to execute lxterminal and leafpad automatically at startup:
{{Note|The commands do '''not''' end with a & symbol.}}
There is also a global autostart file at {{ic|/etc/xdg/lxsession/LXDE/autostart}}. If both files are present, all entries in both files will be executed.
=== Bindings ===
=== Bindings ===
Mouse and key bindings (i.e. keyboard shortcuts) are implemented with Openbox and are described in detail [http://openbox.org/wiki/Help:Bindings here]. LXDE users should follow these instructions to edit the file ~/.config/openbox/lxde-rc.xml
マウスとキーのバインド(キーボードショートカットのような)はOpenboxで実装されており、[http://openbox.org/wiki/Help:Bindings here]に詳細があります。LXDEユーザはファイルを実行するときにこれらを参考にすべきでしょう。
An optional GUI for editing the key bindings is {{AUR|obkey}} available in the AUR. The default edit for obkey is rc.xml, but you can direct it to the LXDE configuration as follows:
  $ obkey ~/.config/openbox/lxde-rc.xml
  $ obkey ~/.config/openbox/lxde-rc.xml
More information on obkey is [http://code.google.com/p/obkey/ here].
obkeyに関する更なる詳細は[http://code.google.com/p/obkey/ こちらを参照してください]
=== Cursors ===
=== Cursors ===

Revision as of 14:36, 14 February 2013

zh-CN:LXDE zh-TW:LXDE Template:Article summary start Template:Article summary text Template:Article summary text Template:Article summary heading Template:Article summary text Template:Article summary end

From LXDE.org | Lightweight X11 Desktop Environment:

LXDE、"Lightweight X11 Desktop Environment"は極めて高いパフォーマンスと省エネルギーなデスクトップ環境です。開発者たちの国際的なコミュニティにより管理され、美しいインタフェース、多言語対応、標準的なキーボードショートカットとタブファイラーのような追加機能を含みます。LXDEはCPUもRAMも他のデスクトップ環境に比べも消費が少ないです。特に、ネットブック、モバイル端末や、古い計算機などによるクラウドコンピューティングのためにデザインされています。


LXDEはあなたが必要とするパッケージを選択できるようによくモジュール化されています。あなたがLXDEを動かすために最小限必要なパッケージはlxde-common, lxsession, desktop-file-utilsです。 and a window manager.


# pacman -S lxde


  • gpicview: 軽量画像ビューワ
  • libfm: ファイル管理用ライブラリ
  • lxappearance: GTK+アプリケーションのテーマ、アイコン、フォントを設定するためのユーティリティ
  • lxappearance-obconf: LXAppearanceでOpenboxを設定するためのプラグイン
  • lxde-common: 異なるLXDEコンポーネントを統合するためのデフォルト設定
  • lxde-icon-theme: LXDEのアイコンテーマ
  • lxdm: 軽量ディスプレイマネージャ
  • lxinput: LXDEのキーボードとマウスを設定するためのプログラム
  • lxlauncher: ネットブック向けランチャ
  • lxmenu-data: freedesktop.orgのメニュー仕様を適応させるために意図されたファイルのコレクション
  • lxmusic: 軽量XMMS2クライアント
  • lxpanel: LXDE用デスクトップパネル
  • lxrandr: スクリーンマネージャ
  • lxsession: シャットダウン、再起動、サスペンドをサポートしたX11用セッションマネージャ
  • lxshortcut: アプリケーションショートカットを編集するためのプログラム
  • lxtask: 軽量タスクマネージャ
  • lxterminal: 軽量ターミナルエミュレータ
  • menu-cache: 自動的にLXDEのためのメニューを生成するデーモン
  • openbox: 軽量で、規格に準拠し、カスタマイズ性の高い、歴史的にLXDEと共に使われてきたウィンドウマネージャ
  • pcmanfm: デスクトップへの統合を提供するLXDE用軽量ファイラ


Place menu.xml, rc.xml and autostart in ~/.config/openbox
これらは /etc/xdg/openbox の中にあります。

As the user of interest

mkdir -p ~/.config/openbox
cp /etc/xdg/openbox/menu.xml /etc/xdg/openbox/rc.xml /etc/xdg/openbox/autostart ~/.config/openbox


# pacman -S gamin


# pacman -S leafpad obconf epdfview




Display Managers

もしGDMKDMSLiMのようなdisplay managerを使っている場合、セッションをLXDEに切り替えてください。その手順はDisplay Managerのページを参照してください。


もしディスプレイマネージャを使っていない場合はin order xdg-open to function properly


をあなたの ~/.bash_profile に追加してください。




exec startlxde

もしstartxを起動時に自動的に実行したい場合、Starting X at bootを参照してください。



Tips and tricks


アプリケーションメニューは/usr/share/applicationsにある.desktopを解決して動きます。多くのデスクトップ環境では、メニューのカスタマイズができるように、これらの設定を優先するプログラムを実行します。LXDEはアプリケーションメニューエディタを作成するためにまだ持っていますが、もしその気があれば、手動でそれらを自分で構築することができます。AUR - lxmedAURにサード製のメニューエディタがあります。 メニューの項目を追加や編集するには、.desktopファイルを/usr/share/applicationsに作るかリンクするかしてください。 Consult the desktop entry specification on freedesktop.org for structures of .desktop files.



という行を追加することで非表示にすることができます。 かなりの数のファイルの処理を早めるためにループ処理をすることができます。例えば:

cd /usr/share/applications
for i in program1.desktop program2.desktop ...; do cp /usr/share/applications/$i \
/home/user/.local/share/applications/; echo "NoDisplay=true" >> \
/home/user/.local/share/applications/$i; done

これはKDE以外のすべてのアプリケーションに対して働きます。KDEのものに関しては、まずKDEにログインし、KDEのメニューエディタを使ってください。表示したくないすべての項目に'Show only in KDE'のオプションをチェックしてください。NoDisplay=Trueが上手く動かない場合、ShowOnlyIn=XFCEを試してください。

Auto Mount



.desktop files


$ ln -s /usr/share/applications/lxterminal.desktop ~/.config/autostart/


autostart file


Note: これらのコマンドには&シンボルを付加しません






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



Main article: X11 Cursors.

The latest lxappearance2-gitAUR in AUR provides functionality to change cursor themes. If you do not want to install newer, experimental lxappearance2, you'll have to define your cursor in your ~/.Xdefaults file. See Configuring Cursor Themes.

A basic way is to add the cursor to the default theme. First you will need to make the directory:

# mkdir /usr/share/icons/default

Then you can specify to add to the icon theme the cursor. This will use the xcursor-bluecurve pointer theme:

[icon theme]

Custom folder icons in $HOME

Currently it looks like PCmanFM doesn't support this:


Digital clock applet time

You can right click on the digital clock applet on the panel and set how it displays the current time. For example, to display standard time instead of military time in the format of HH:MM:SS:


And in YYYY/MM/DD HH:MM:SS format:

%Y/%m/%d %H:%M:%S

If you wish to display standard time with and AM/PM:

%I:%M %p

See the man page on strftime (3) for more options.

Font Settings

Most users of LXDE usually try to use GTK+ programs because GTK+ is the backend for LXDE. To set the fonts, you can use lxappearance and set the main font. For other fonts you will need to use the Openbox configuration tool ObConf:

# pacman -S obconf

Keyboard layout

Using udev

When you use udev, the default input configuration is written to /etc/X11/xorg.conf.d/10-evdev.conf under Section "InputClass". You can edit it or create a new file /etc/X11/xorg.conf.d/10-keyboard.conf following the example below, using a generic swiss keyboard, with a french variant.

Section "InputClass"
    Identifier        "evdev keyboard catchall"
    MatchIsKeyboard   "on"
    MatchDevicePath   "/dev/input/event*"
    Driver            "evdev"
    Option            "XkbModel" "pc104"
    Option            "XkbLayout" "fr"
    Option            "XknVariant" "ch"

You can find a list of all layout and variant options in /usr/share/X11/xkb/rules/base.lst.

Other way

1 way: Add in /etc/xdg/lxsession/LXDE/autostart following line before @lxpanel --profile LXDE:

@setxkbmap -option grp:switch,grp:alt_shift_toggle,grp_led:scroll us,ru

or ~/.config/lxsession/LXDE/autostart (for separate user):

setxkbmap -option grp:switch,grp:alt_shift_toggle,grp_led:scroll us,ru

2 way: Create /etc/xdg/autostart/setxkmap.desktop as following:

[Desktop Entry]
Name=Fix keyboard settings
Exec=setxkbmap -rules xorg -layout "us,ru" -variant ",winkeys" -option "grp:alt_shift_toggle"

3 way: Edit ~/.Xkbmap for current user or /etc/X11/Xkbmap for all system add following line:

-option grp:alt_shift_toggle,grp_led:scroll us,ru

4 way: Add folowing line in /etc/X11/xinit/xinitrc or ~/.xinitrc:

setxkbmap -option grp:alt_shift_toggle,grp_led:scroll us,ru

5 way: Install fbxkb from AUR

6 way: Xorg#Switching_Between_Keyboard_Layouts

Add the “Keyboard Layout Switcher” to our taskbar

  1. Right-click on your taskbar
  2. Choose “Add / Remove Panel Items”
  3. Choose “Add”
  4. Choose “Keyboard Layout Switcher”

Gnome-screensaver with LXDE

Install the needed packages:

pacman -S gnome-screensaver gnome-session

Create a simple launcher for gnome-session to allow the screensaver to work in ~/.config/autostart/gnome-session.desktop

[Desktop Entry]

Now logout and log back in to enjoy gnome-screensaver.

lxpanel Icons

Default icons used by lxpanel are stored in /usr/share/pixmaps and any custom icons you want lxpanel to use need to be saved there as well.

You can change default icons for applications by taking the following steps:

  1. Save the new icon to /usr/share/pixmaps
  2. Use a text editor to open the .desktop file of the program whose icon you want to change in /usr/share/applications.
  3. Change




Note: LXNM is no longer under active development. It's suggested to use NetworkManager and nm-applet.

LXNM is a program based on scripts that attempts to manage the network connections. It is script-based and strives to make networking configuration as automatic as possible. It is not a full blown networking system like NetworkManager. If you want greater control, Wicd and Gnome's verions of NetworkManager works well with LXDE. You can install LXNM from [community] repository:

# pacman -S lxnm

The main script will need to be run as root. If you plan on consistently using it, put it in your /etc/rc.conf. LXNM works with the network status monitor applet in lxpanel. LXNM works well most of the time, though at times it can take a while to get a connection.


If you want to be able to access the Trash, mount volumes, and folder/file tracking you'll want gvfs support:

pacman -S polkit-gnome gvfs

polkit-gnome provides an authentication and will need to be started on login:

mkdir -p ~/.config/autostart
cp /etc/xdg/autostart/polkit-gnome-authentication-agent-1.desktop ~/.config/autostart

Arch's polkit-gnome-authentication-agent-1.desktop currently doesn't exempt certain desktops. If you have trouble launching it remove the line:


PCManFM @ LXDE wiki

To read/write NTFS file system don't forget to install ntfs-3g:

pacman -S ntfs-3g

Replacing Window Managers

Openbox, the default window manager of LXDE, can be easily replaced by other window managers, such as fvwm, icewm, dwm, metacity, compiz ...etc.

LXDE will attempt to use window manager from the user lxsession configuration file ~/.config/lxsession/LXDE/desktop.conf. If it does not exist, it will then attempt to use the global configuration file /etc/xdg/lxsession/LXDE/desktop.conf.

Replace the openbox-lxde command with the window manager of your choice:


For metacity:


For compiz:

window_manager=compiz ccp --indirect-rendering

Shutdown, Reboot, Suspend and Hibernate Options ( LXSession-logout)

To have all Shutdown, Reboot, Suspend and Hibernate Options working you need to have dbus running. You also need to have upower installed.

# pacman -S upower

See xinitrc#Preserving the session for details on avoiding breaking the logind/consolekit session.


SSH Key Management

A very lightweight solution to ssh key management can be found by using keychain. See the using keychain article for details.

NTFS with Chinese Characters

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:

Remove the /sbin/mount.ntfs-3g which is a symbolic link.

# rm /sbin/mount.ntfs-3g

Create a new /sbin/mount.ntfs-3g with a new bash script containing:

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

And then make it executable:

# chmod +x /sbin/mount.ntfs-3g

Add or edit the following line to /etc/pacman.conf under the [options] tag to prevent modification of this file in case of upgrading:

NoUpgrade = sbin/mount.ntfs-3g

KDM and LXDE Session

As of KDE 4.3.3, KDM will not recognize the LXDE desktop session. To fix it:

# cp /usr/share/xsessions/LXDE.desktop /usr/share/apps/kdm/sessions/

GTK+ Warnings with lxsession 0.4.1

When starting GTK+2 programs you get the following message:

GTK+ icon them is not properly set

This usually means you do not have an XSETTINGS manager running. Desktop environment like GNOME or XFCE automatically execute their XSETTING managers like gnome-settings-daemon or xfce-mcs-manager. This is caused by the migration of lxde-settings-daemon config files into lxsession. If you made customizations to these config files, you are in need of merging those config files:
  • /usr/share/lxde/config
  • ~/.config/lxde/config


  • etc/xdg/lxsession/LXDE/desktop.conf
  • ~/.config/lxsession/LXDE/desktop.conf

Alternatively, you can use lxappearance from the community repository to fix this.