Difference between revisions of "LXDE"

From ArchWiki
Jump to: navigation, search
(Installation: - General cleanup)
m (corrected typo at light-locker application)
 
(165 intermediate revisions by 29 users not shown)
Line 1: Line 1:
 +
[[Category:Desktop environments]]
 
[[cs:LXDE]]
 
[[cs:LXDE]]
 
[[es:LXDE]]
 
[[es:LXDE]]
Line 7: Line 8:
 
[[ru:LXDE]]
 
[[ru:LXDE]]
 
[[sr:LXDE]]
 
[[sr:LXDE]]
[[tr:LXDE_Masaüstü_Ortamı]]
+
[[tr:LXDE Masaüstü Ortamı]]
 
[[uk:LXDE]]
 
[[uk:LXDE]]
 
[[zh-CN:LXDE]]
 
[[zh-CN:LXDE]]
 
[[zh-TW:LXDE]]
 
[[zh-TW:LXDE]]
[[Category:Desktop environments]]
+
{{Related articles start}}
{{Article summary start}}
+
{{Related|Desktop environment}}
{{Article summary text|LXDE is a GPL-licensed open source desktop environment for Unix and other POSIX-compliant platforms, such as Linux. This article covers its installation, configuration, and troubleshooting.}}
+
{{Related|Display manager}}
{{Article summary text|LXDE uses the [[GTK+]] toolkit.}}
+
{{Related|Window manager}}
{{Article summary heading|Overview}}
+
{{Related|Openbox}}
{{Article summary text|{{Graphical user interface overview}}}}
+
{{Related|PCManFM}}
{{Article summary end}}
+
{{Related|LXDM}}
 +
{{Related|LXQt}}
 +
{{Related|File manager functionality#Mounting}}
 +
{{Related articles end}}
  
From [http://lxde.org/ LXDE.org | Lightweight X11 Desktop Environment]:
+
From project [http://lxde.org/ home page]:
  
:''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.''
+
: ''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.''
  
 
== Installation ==
 
== Installation ==
  
LXDE is considered modular, meaning that choosing a specific package for a task is usually accomplishable; the minimal required packages which you have to install to run LXDE are {{Pkg|lxde-common}}, {{Pkg|lxsession}}, {{Pkg|desktop-file-utils}}, and a window manager.
+
LXDE requires at least {{Pkg|lxde-common}}, {{Pkg|lxsession}} and {{Pkg|openbox}} (or another window manager) to be [[install]]ed. The {{Grp|lxde}} group contains the full desktop.
  
Install the LXDE group by doing:
+
=== GTK+ 3 version ===
  
# pacman -S lxde
+
An experimental GTK+ 3 build of LXDE can be installed with the {{Grp|lxde-gtk3}} group.
  
In the group these are the packages make available:
+
While it works mostly, there are some known issues with [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] and [https://sourceforge.net/p/lxde/bugs/773/ lxpanel].
  
* {{Pkg|gpicview}}: A lightweight image viewer
+
== Starting the desktop ==
* {{Pkg|libfm}}: A library for file management
+
* {{Pkg|lxappearance}}: A utility to configure themes, icons and fonts for GTK+ applications
+
* {{Pkg|lxappearance-obconf}}: A plugin for LXAppearance to configure Openbox
+
* {{Pkg|lxde-common}}: The default settings for integrating different LXDE components
+
* {{Pkg|lxde-icon-theme}}: An icon theme for LXDE
+
* {{Pkg|lxdm}}: A lightweight display manager
+
* {{Pkg|lxinput}}: A small program to configure keyboard and mouse for LXDE
+
* {{Pkg|lxlauncher}}: An application launcher mainly for netbooks
+
* {{Pkg|lxmenu-data}}: A collection of files intended to adapt freedesktop.org menu specification
+
* {{Pkg|lxmusic}}: A lightweight XMMS2 client
+
* {{Pkg|lxpanel}}: A desktop panel for LXDE
+
* {{Pkg|lxrandr}}: A screen manager
+
* {{Pkg|lxsession}}: A standard-compliant X11 session manager with shutdown, reboot and suspend support
+
* {{Pkg|lxshortcut}}: A small program used to edit application shortcuts
+
* {{Pkg|lxtask}}: A lightweight task manager
+
* {{Pkg|lxterminal}}: A lightweight terminal emulator
+
* {{Pkg|menu-cache}}: A daemon which automatically generates the menu for LXDE
+
* {{Pkg|openbox}}: A lightweight, standard-compliant and highly-configurable window manager typically used with LXDE
+
* {{Pkg|pcmanfm}}: The default lightweight file manager for LXDE which also provides desktop integration
+
  
After the installation finishes, copy three files to the local configuration directory as instructed by pacman:
+
=== Graphical log-in ===
  
mkdir -p ~/.config/openbox
+
[[LXDM]] is the default display manager for LXDE and is installed as part of the {{Grp|lxde}} group. See also [[Display manager]].
cp /etc/xdg/openbox/{menu.xml,rc.xml,autostart} ~/.config/openbox
+
  
The program [[gamin|Gamin]] will need to be installed as well (a file and directory monitoring tool). It runs on demand of programs and therefore does not require a daemon like [[FAM]] does. If you already have FAM installed, remove it from the DAEMONS array in {{ic|/etc/rc.conf}} first and stop the daemon, then install gamin:
+
=== Console ===
  
# pacman -S gamin
+
To use '''startx''', you will need to define LXDE in [[xinitrc]]:
  
Also some lightweight applications typically used with LXDE are available in the repositories:
+
{{hc|~/.xinitrc|exec startlxde}}
  
# pacman -S leafpad obconf epdfview
+
See also [[Start X at login]].
  
== Starting the Desktop ==
+
== Tips and tricks ==
There are lots of ways to start a LXDE desktop.
+
=== 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.
+
  
Instructions for using [[LXDM]], an experimental display manager provided by the LXDE project, are included in [[LXDM]] page.
+
=== Application menu editing ===
  
If not using a display manager you would like to add
+
{{Merge|Desktop entries}}
  
export DESKTOP_SESSION=LXDE
+
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}}
  
to your ~/.bash_profile in order xdg-open to function properly.
+
To add or edit a menu item, create or link to the {{ic|.desktop}} file in {{ic|/usr/share/applications}}, {{ic|/usr/local/share/applications}}, or {{ic|~/.local/share/applications}}. (The latter two have the advantage of putting your application outside of directories governed by {{ic|pacman}}.) Consult [http://standards.freedesktop.org/desktop-entry-spec/latest/ the desktop entry specification] on freedesktop.org for structures of {{ic|.desktop}} files.
  
=== Console ===
+
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 be able to start the desktop from the console, several other options exist.
+
NoDisplay=true
  
To use '''startx''', you will need to define LXDE in your {{ic|~/.xinitrc}} file:
+
To expedite the process for a good number of files you can put it in a loop. For example:
  
  exec startlxde
+
  $ 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
  
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.
+
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 its menu editor. For every item that you do not want displayed, check the 'Show only in KDE' option. If adding NoDisplay=True will not work, you can add ShowOnlyIn=XFCE.
  
For other tasks you'll want to be sure that dbus is running as a daemon.
+
=== Autostart ===
  
See [[xinitrc]] for details, such as preserving the logind (and/or consolekit) session.
+
Applications can be automatically started in several ways.
  
== Tips and tricks ==
+
==== Desktop files ====
=== 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}}
+
  
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.
+
{{Tip|{{ic|.desktop}} files can be manipulated with the {{AUR|lxsession-edit}}{{Broken package link|{{aur-mirror|lxsession-edit}}}} package.}}
  
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:
+
See [[Desktop entries#Autostart]].
NoDisplay=true.
+
To expedite the process for a good number of files you can put it in a loop. For example:
+
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
+
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.
+
  
=== Auto Mount ===
+
==== Lxsession ====
[[PCManFM#Volume_handling]]
+
  
=== Autostart Programs ===
+
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:
; .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/
 
Once {{ic|.desktop}} files have been added you can manipulate them with the GUI configuration tool {{AUR|lxsession-edit}}.
 
 
; 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:
 
 
{{hc|~/.config/lxsession/LXDE/autostart|
 
{{hc|~/.config/lxsession/LXDE/autostart|
 
@lxterminal
 
@lxterminal
 
@leafpad
 
@leafpad
 
}}
 
}}
{{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 ===
+
{{Note|Unlike Openbox, these commands do ''not'' end with a {{ic|&}} symbol.}}
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
+
  
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:
+
There is also a global autostart file at {{ic|/etc/xdg/lxsession/LXDE/autostart}}.
  
$ obkey ~/.config/openbox/lxde-rc.xml
+
{{Note|If both files are present, lxsession only executes the local file as of v0.4.9}}
  
More information on obkey is [http://code.google.com/p/obkey/ here].
+
=== Bindings ===
  
=== Cursors ===
+
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}}.
Main article: [[X11 Cursors]].
+
  
The latest {{AUR|lxappearance2-git}} 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 {{ic|~/.Xdefaults}} file. See [[X11_Cursors#Choosing_and_Configuring_Cursor_Themes|Configuring Cursor Themes]].
+
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:
  
A basic way is to add the cursor to the default theme. First you will need to make the directory:
+
  $ obkey ~/.config/openbox/lxde-rc.xml
  # mkdir /usr/share/icons/default
+
Then you can specify to add to the icon theme the cursor. This will use the {{Pkg|xcursor-bluecurve}} pointer theme:
+
{{hc|/usr/share/icons/default/index.theme|2=
+
[icon theme]
+
Inherits=Bluecurve
+
}}
+
  
==== Custom folder icons in $HOME ====
+
See [http://code.google.com/p/obkey/] for more information.
  
Currently it looks like PCmanFM doesn't support this:
+
=== Cursors ===
  
https://bbs.archlinux.org/viewtopic.php?pid=851397#p851397
+
LXAppearance, provided  by the {{pkg|lxappearance}} package, is a graphical tool that can determine a number of aspects of the user interface including the cursor theme. Settings configured using 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 ===
 
=== 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:
+
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 [http://linux.die.net/man/3/strftime man strftime] for details.
 
+
%I:%M
+
 
+
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 {{Ic|strftime (3)}} for more options.
+
=== Font settings ===
  
=== Font Settings ===
+
See [[Font configuration]]. {{Pkg|lxappearance-obconf}} configures LXDE-specific 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 {{Pkg|lxappearance}} and set the main font. For other fonts you will need to use the '''Openbox configuration tool''' ObConf:
+
# pacman -S obconf
+
  
 
=== Keyboard layout ===
 
=== Keyboard layout ===
====Using udev====
 
  
When you use [[udev]], the default input configuration is written to {{ic|/etc/X11/xorg.conf.d/10-evdev.conf}} under {{ic|Section "InputClass"}}. You can edit it or create a new file {{ic|/etc/X11/xorg.conf.d/10-keyboard.conf}} following the example below, using a generic ''swiss'' keyboard, with a ''french'' variant.
+
See [[Keyboard configuration in Xorg]] for generic instructions. A keyboard layout applet is included with ''lxpanel''.
Section "InputClass"
+
    Identifier        "evdev keyboard catchall"
+
    MatchIsKeyboard  "on"
+
    MatchDevicePath  "/dev/input/event*"
+
    Driver            "evdev"
+
    Option            "XkbModel" "pc104"
+
    Option            "XkbLayout" "fr"
+
    Option            "XknVariant" "ch"
+
EndSection
+
You can find a list of all layout and variant options in {{ic|/usr/share/X11/xkb/rules/base.lst}}.
+
  
====Other way====
+
See [[#Autostart]] for a way to automatically start ''setxkbmap'' in LXDE.
  
1 way:
+
=== Screen locking ===
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]
+
Version=1.0
+
Encoding=UTF-8
+
Name=Fix keyboard settings
+
Exec=setxkbmap -rules xorg -layout "us,ru" -variant ",winkeys" -option "grp:alt_shift_toggle"
+
Terminal=false
+
Type=Application
+
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 [http://fbxkb.sourceforge.net/ fbxkb] from [[AUR]]
+
  
6 way:
+
LXDE does not come with a screen locker of its own; see [[List of applications/Security#Screen lockers]] for alternatives.
[[Xorg#Switching_Between_Keyboard_Layouts]]
+
  
==== Add the “Keyboard Layout Switcher” to our taskbar ====
+
Shipped script {{ic|/usr/bin/lxlock}}, called by default from the ScreenLock icon, searches for these applications in this order: {{Pkg|light-locker}}, {{Pkg|xscreensaver}}, {{Pkg|gnome-screensaver}}, {{Pkg|slock}}, {{Pkg|xlockmore}}, {{Pkg|i3lock}} and {{Pkg|xdg-utils}}.
  
# Right-click on your taskbar
+
{{ic|/etc/xdg/lxsession/LXDE/autostart}} from {{Pkg|lxde-common}} lists [[XScreenSaver]], which will be launched automatically. See [[#Autostart]] when using a different locker. See [[DPMS]] on how to control the screen saver without external programs.
# Choose “Add / Remove Panel Items”
+
# Choose “Add”
+
# Choose “Keyboard Layout Switcher”
+
  
=== Gnome-screensaver with LXDE ===
+
=== LXPanel icons ===
  
Install the needed packages:
+
{{Accuracy|{{ic|.local/share/}} preferred}}
pacman -S gnome-screensaver gnome-session
+
  
Create a simple launcher for gnome-session to allow the screensaver to work in {{ic|~/.config/autostart/gnome-session.desktop}}
 
 
[Desktop Entry]
 
Exec=/usr/bin/gnome-session
 
 
Now logout and log back in to enjoy gnome-screensaver.
 
 
=== Disabling screen blanking without installing GUI screensaver ===
 
If you do not want to install GUI screensaver, to disable screen blanking add these lines below to {{ic|~/.xinitrc}} before exec command.
 
xset s off &
 
xset -dpms &
 
 
=== lxpanel Icons ===
 
 
Default icons used by lxpanel are stored in {{ic|/usr/share/pixmaps}} and any custom icons you want lxpanel to use need to be saved there as well.
 
Default icons used by lxpanel are stored in {{ic|/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:
 
You can change default icons for applications by taking the following steps:
 +
 
# Save the new icon to /usr/share/pixmaps
 
# Save the new icon to /usr/share/pixmaps
 
# Use a text editor to open the {{ic|.desktop}} file of the program whose icon you want to change in {{ic|/usr/share/applications}}.
 
# Use a text editor to open the {{ic|.desktop}} file of the program whose icon you want to change in {{ic|/usr/share/applications}}.
 
# Change
 
# Change
 +
 
  Icon=/default/icon/.png
 
  Icon=/default/icon/.png
to
 
Icon=/name/of/new/icon/added/to/pixmaps/.png
 
  
=== LXNM ===
+
to:
{{Note|LXNM is no longer under active development. It's [http://wiki.lxde.org/en/LXNM 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 {{ic|/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.
+
  
=== [[PCManFM]] ===
+
Icon=/name/of/new/icon/added/to/pixmaps/.png
 
+
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:
+
  
OnlyShowIn=GNOME;XFCE;
+
=== LXPanel menus ===
  
[http://wiki.lxde.org/en/LXDE:PCManFM_build_and_setup_guide#Setup_Runtime_Environment_Correctly PCManFM @ LXDE wiki]
+
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.
  
To read/write NTFS file system don't forget to install [[ntfs-3g]]:
+
=== Replace Openbox ===
  
pacman -S ntfs-3g
+
''lxsession'' uses the [[window manager]] defined in {{ic|~/.config/lxsession/LXDE/desktop.conf}}. If this file does not exist, it searches in {{ic|/etc/xdg/lxsession/LXDE/desktop.conf}} instead.
  
=== Replacing Window Managers ===
+
Replace {{ic|openbox-lxde}} in either file with a window manager of choice:
[[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 {{ic|~/.config/lxsession/LXDE/desktop.conf}}. If it does not exist, it will then attempt to use the global configuration file {{ic|/etc/xdg/lxsession/LXDE/desktop.conf}}.
 
 
Replace the openbox-lxde command with the window manager of your choice:
 
 
  [Session]
 
  [Session]
 
  window_manager=openbox-lxde
 
  window_manager=openbox-lxde
 +
 
For metacity:
 
For metacity:
 +
 
  window_manager=metacity
 
  window_manager=metacity
 +
 
For compiz:
 
For compiz:
window_manager=compiz ccp --indirect-rendering
 
  
=== Shutdown, Reboot, Suspend and Hibernate Options ( LXSession-logout) ===
+
window_manager=compiz
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
+
Alternatively, you can autostart {{ic|wm --replace}} using the method defined in [[#Lxsession]] where ''wm'' is the name of the window manager executable being started. This method does mean that Openbox will be started first on each login and will then immediately be replaced by the autostarted window manager.
  
See [[xinitrc#Preserving the session]] for details on avoiding breaking the logind/consolekit session.
+
Note that since openbox dispatches the desktop-wide keyboard shortcuts in LXDE, users who want to replace it and still use these shortcuts will need to reimplement this functionality themselves. A good option is [[xbindkeys]].
 +
 
 +
=== Shutdown, reboot, suspend and hibernate options (LXSession-logout) ===
 +
 
 +
This requires installation of {{Pkg|upower}}.
  
 
== Troubleshooting ==
 
== Troubleshooting ==
=== SSH Key Management ===
 
A very lightweight solution to ssh key management can be found by using keychain. See the [https://wiki.archlinux.org/index.php/Using_SSH_Keys#Keychain using keychain] article for details.
 
  
=== NTFS with Chinese Characters ===
+
=== NTFS with Chinese characters ===
 +
 
 +
{{Merge|NTFS-3G}}
 +
 
 
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:
 
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 {{ic|/sbin/mount.ntfs-3g}} which is a symbolic link.
+
Create a new {{ic|/usr/local/bin/mount.ntfs-3g}} with a new Bash script containing:
# rm /sbin/mount.ntfs-3g
+
 
Create a new {{ic|/sbin/mount.ntfs-3g}} with a new bash script containing:
+
 
  #!/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
 +
 
 
And then make it executable:
 
And then make it executable:
# chmod +x /sbin/mount.ntfs-3g
 
Add or edit the following line to {{ic|/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 ===
+
# chmod +x /usr/local/bin/mount.ntfs-3g
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/
+
=== LXPanel crashes with some themes or browsing particular web pages ===
 +
 
 +
With some gtk themes ([[AUR]] - {{AUR|gtk-theme-greybird}}{{Broken package link|{{aur-mirror|gtk-theme-greybird}}}}), launch lxpanel will get errors below.
 +
 
 +
lxpanel: cairo-scaled-font.c:459: _cairo_scaled_glyph_page_destroy: Assertion `!scaled_font->cache_frozen' failed.
 +
 
 +
Try install {{Pkg|ttf-dejavu}} in this case.
 +
 
 +
If lxpanel crashes when browsing particular unicode web pages, try install {{Pkg|ttf-droid}}.
 +
 
 +
=== LXPanel uses a smaller icon size for the Task Bar  ===
 +
 
 +
The icons of running applications do not match the set Icon size in Panel Settings > Geometry - they are 4px smaller which is making 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 constitute a single continuous looking panel by adjusting the Alignment and Margin in Panel Settings > Geometry.
  
=== GTK+ Warnings with lxsession 0.4.1 ===
+
== See also ==
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
+
into
+
* etc/xdg/lxsession/LXDE/desktop.conf
+
* ~/.config/lxsession/LXDE/desktop.conf
+
Alternatively, you can use lxappearance from the community repository to fix this.
+
  
== Resources ==
+
* [http://lxlinux.com/ Linux LXDE Guide]
* [http://wiki.lxde.org/en/ArchLinux LXDE wiki entry related to Arch Linux]
+
* [http://lxde.sourceforge.net LXDE (Sourceforge)]
* [http://lxde.sourceforge.net LXDE Project (Sourceforge)]
+
* [http://forum.lxde.org LXDE forum]
* [http://forum.lxde.org LXDE Forum]
+
* [https://sourceforge.net/project/showfiles.php?group_id=180858 The Latest lx* Packages]
+
* [https://sourceforge.net/project/showfiles.php?group_id=156956 PCMan File Manager]
+

Latest revision as of 07:58, 22 July 2016

From project home page:

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.

Installation

LXDE requires at least lxde-common, lxsession and openbox (or another window manager) to be installed. The lxde group contains the full desktop.

GTK+ 3 version

An experimental GTK+ 3 build of LXDE can be installed with the lxde-gtk3 group.

While it works mostly, there are some known issues with gpicview, lxappearance-obconf, lxlauncher and lxpanel.

Starting the desktop

Graphical log-in

LXDM is the default display manager for LXDE and is installed as part of the lxde group. See also Display manager.

Console

To use startx, you will need to define LXDE in xinitrc:

~/.xinitrc
exec startlxde

See also Start X at login.

Tips and tricks

Application menu editing

Merge-arrows-2.pngThis article or section is a candidate for merging with Desktop entries.Merge-arrows-2.png

Notes: please use the second argument of the template to provide more detailed indications. (Discuss in Talk:LXDE#)

The application menu works by resolving the .desktop files located in /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 - lxmedAUR

To add or edit a menu item, create or link to the .desktop file in /usr/share/applications, /usr/local/share/applications, or ~/.local/share/applications. (The latter two have the advantage of putting your application outside of directories governed by pacman.) Consult the desktop entry specification on freedesktop.org for structures of .desktop files.

To remove items from the menu, instead of deleting the .desktop files, you can edit the file and add the following line in the file:

NoDisplay=true

To expedite the process for a good number of files you can put it in a loop. For example:

$ 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

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 its menu editor. For every item that you do not want displayed, check the 'Show only in KDE' option. If adding NoDisplay=True will not work, you can add ShowOnlyIn=XFCE.

Autostart

Applications can be automatically started in several ways.

Desktop files

Tip: .desktop files can be manipulated with the lxsession-editAUR[broken link: archived in aur-mirror] package.

See Desktop entries#Autostart.

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: Unlike Openbox, 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, provided by the lxappearance package, is a graphical tool that can determine a number of aspects of the user interface including the cursor theme. Settings configured using 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 man strftime for details.

Font settings

See Font configuration. lxappearance-obconf configures LXDE-specific settings.

Keyboard layout

See Keyboard configuration in Xorg for generic instructions. A keyboard layout applet is included with lxpanel.

See #Autostart for a way 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 for alternatives.

Shipped script /usr/bin/lxlock, called by default from the ScreenLock icon, searches for these applications in this order: light-locker, xscreensaver, gnome-screensaver, slock, xlockmore, i3lock and xdg-utils.

/etc/xdg/lxsession/LXDE/autostart from lxde-common lists XScreenSaver, which will be launched automatically. See #Autostart when using a different locker. See DPMS on how to control the screen saver without external programs.

LXPanel icons

Tango-inaccurate.pngThe factual accuracy of this article or section is disputed.Tango-inaccurate.png

Reason: .local/share/ preferred (Discuss in Talk:LXDE#)

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
Icon=/default/icon/.png

to:

Icon=/name/of/new/icon/added/to/pixmaps/.png

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.

Replace Openbox

lxsession uses the window manager defined in ~/.config/lxsession/LXDE/desktop.conf. 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 choice:

[Session]
window_manager=openbox-lxde

For metacity:

window_manager=metacity

For compiz:

window_manager=compiz

Alternatively, you can autostart wm --replace using the method defined in #Lxsession where wm is the name of the window manager executable being started. This method does mean that Openbox will be started first on each login and will then immediately be replaced by the autostarted window manager.

Note that since openbox dispatches the desktop-wide keyboard shortcuts in LXDE, users who want to replace it and still use these shortcuts will need to reimplement this functionality themselves. A good option is xbindkeys.

Shutdown, reboot, suspend and hibernate options (LXSession-logout)

This requires installation of upower.

Troubleshooting

NTFS with Chinese characters

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

Notes: please use the second argument of the template to provide more detailed indications. (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 themes or browsing particular web pages

With some gtk themes (AUR - gtk-theme-greybirdAUR[broken link: archived in aur-mirror]), launch lxpanel will get errors below.

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

Try install ttf-dejavu in this case.

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

LXPanel uses a smaller icon size for the Task Bar

The icons of running applications do not match the set Icon size in Panel Settings > Geometry - they are 4px smaller which is making 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 constitute a single continuous looking panel by adjusting the Alignment and Margin in Panel Settings > Geometry.

See also