Difference between revisions of "LXDE"

From ArchWiki
Jump to navigation Jump to search
m (+ related article)
(add general trouble shoot: lxappearance, add tips and trick: enable compositing)
 
(125 intermediate revisions by 23 users not shown)
Line 8: Line 8:
 
[[ru:LXDE]]
 
[[ru:LXDE]]
 
[[sr:LXDE]]
 
[[sr:LXDE]]
[[tr:LXDE_Masaüstü_Ortamı]]
+
[[zh-hans:LXDE]]
[[uk:LXDE]]
+
[[zh-hant:LXDE]]
[[zh-CN:LXDE]]
 
[[zh-TW:LXDE]]
 
 
{{Related articles start}}
 
{{Related articles start}}
 
{{Related|Desktop environment}}
 
{{Related|Desktop environment}}
Line 20: Line 18:
 
{{Related|LXDM}}
 
{{Related|LXDM}}
 
{{Related|LXQt}}
 
{{Related|LXQt}}
 +
{{Related|File manager functionality#Mounting}}
 
{{Related articles end}}
 
{{Related articles end}}
  
 
From project [http://lxde.org/ home page]:
 
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 you have considerable choice over which packages you need to install. The minimum required packages which you have to install to run LXDE are {{Pkg|lxde-common}} and {{Pkg|openbox}} (or another 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.
  
Most users will wish to install the full desktop which can be installed by installing the {{Grp|lxde}} group from the [[official repositories]]. The LXDE desktop is comprised of the following packages (plus any dependencies):
+
=== GTK 3 version ===
  
* {{Pkg|gpicview}} - Lightweight image viewer
+
An experimental GTK 3 build of LXDE can be installed with the {{Grp|lxde-gtk3}} group.
* {{Pkg|libfm}} - Library for file management (also contains lxshortcut, a small program used to edit application shortcuts)
+
 
* {{Pkg|lxappearance}} - Utility to configure themes, icons and fonts for GTK+ applications
+
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|lxappearance-obconf}} - Plugin for LXAppearance to configure Openbox
 
* {{Pkg|lxde-common}} - Default settings for integrating different LXDE components
 
* {{Pkg|lxde-icon-theme}} - Icon theme for LXDE
 
* {{Pkg|lxdm}} - Lightweight display manager
 
* {{Pkg|lxinput}} - Small program to configure keyboard and mouse for LXDE
 
* {{Pkg|lxlauncher}} - Application launcher mainly for netbooks
 
* {{Pkg|lxmenu-data}} - Collection of files intended to adapt freedesktop.org menu specification
 
* {{Pkg|lxmusic}} - Lightweight XMMS2 client
 
* {{Pkg|lxpanel}} - Desktop panel for LXDE
 
* {{Pkg|lxpolkit}} - Simple polkit authentication agent for LXDE
 
* {{Pkg|lxrandr}} - Screen manager
 
* {{Pkg|lxsession}} - Standard-compliant X11 session manager with shutdown, reboot and suspend support
 
* {{Pkg|lxtask}} - Lightweight task manager
 
* {{Pkg|lxterminal}} - Lightweight terminal emulator
 
* {{Pkg|menu-cache}} - Daemon which automatically generates the menu for LXDE
 
* {{Pkg|openbox}} - Lightweight, standard-compliant and highly-configurable window manager typically used with LXDE
 
* {{Pkg|pcmanfm}} - Default lightweight file manager for LXDE which also provides desktop integration
 
  
 
== Starting the desktop ==
 
== Starting the desktop ==
 +
 
=== Graphical log-in ===
 
=== Graphical log-in ===
[[LXDM]] is the default display manager for LXDE and is installed as part of the {{Grp|lxde}} group. It is still in the early stages of development.
 
  
Other [[Display manager|display managers]] such as [[LightDM]] and [[GDM]] also work well with LXDE.
+
[[LXDM]] is the default display manager for LXDE and is installed as part of the {{Grp|lxde}} group. See also [[Display manager]].
  
 
=== Console ===
 
=== Console ===
To use '''startx''', you will need to define LXDE in your {{ic|~/.xinitrc}} file:
 
  
exec startlxde
+
To use ''startx'', add to [[xinitrc]]:
  
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.
+
{{hc|~/.xinitrc|exec startlxde}}
  
See [[xinitrc]] for details, such as preserving the logind session.
+
See also [[Start X at login]].
  
 
== Tips and tricks ==
 
== Tips and tricks ==
Line 72: Line 53:
 
=== Application menu editing ===
 
=== 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}}
+
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..
  
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.
+
=== Autostart ===
  
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:
+
Applications can be automatically started in a couple of ways:
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 will not work, you can add ShowOnlyIn=XFCE.
 
  
=== Auto mount ===
+
* With {{ic|.desktop}} files
Please consult the [[File_manager_functionality#Auto-Mount_Removable_Media]] article for information regarding automounting.
 
  
=== Autostart programs ===
+
LXDE implements [[XDG Autostart]].
  
There are a number of different ways to autostart applications in LXDE as described below.
+
* Via LXsession
==== Openbox autostarting ====
 
By default, Openbox is the window manager for LXDE, so Openbox autostarting affects LXDE as well. See the main article for more details: [[Openbox#autostart]].
 
  
==== Desktop files ====
+
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:
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 files ====
 
You can also autostart applications by using 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.
+
{{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 ===
 
=== 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 {{ic|~/.config/openbox/lxde-rc.xml}}.
+
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 {{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:
+
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
 
  $ obkey ~/.config/openbox/lxde-rc.xml
  
More information on obkey is [http://code.google.com/p/obkey/ here].
+
See [http://code.google.com/p/obkey/] for more information.
  
 
=== Cursors ===
 
=== Cursors ===
  
Main article: [[Cursor Themes]].
+
{{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]].
 
 
{{Pkg|lxappearance}} provides functionality to change 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 {{man|3|strftime}} for details.
  
%I:%M
+
=== Font settings ===
  
And in YYYY/MM/DD HH:MM:SS format:
+
{{Pkg|lxappearance-obconf}} configures [[Openbox]] settings. See also [[Font configuration]].
  
%Y/%m/%d %H:%M:%S
+
=== Keyboard layout ===
  
If you wish to display standard time with and AM/PM:
+
{{pkg|lxpanel}} includes a keyboard layout applet. See [[Keyboard configuration in Xorg]] for generic instructions and [[#Autostart]] to automatically start ''setxkbmap'' in LXDE.
  
%I:%M %p
+
=== Screen locking ===
  
See the man page on {{ic|strftime (3)}} for more options.
+
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.
  
=== Font settings ===
+
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.
  
To set the main font, you can use {{Pkg|lxappearance}}. For other fonts you will need to use the '''Openbox configuration tool''' {{Pkg|obconf}}.
+
{{ic|/etc/xdg/lxsession/LXDE/autostart}} (from the {{Pkg|lxde-common}} package) lists [[XScreenSaver]] which will be launched automatically.
  
=== Keyboard layout ===
+
See [[DPMS]] on how to control the screen saver without external programs.
  
See [[Keyboard configuration in Xorg]] for generic instructions.
+
=== LXPanel icons ===
  
See [[#Autostart programs]] for a way to automatically start ''setxkbmap'' in LXDE.
+
{{Accuracy|Intentions not clear. See [https://askubuntu.com/a/1028108].}}
  
==== Add the “Keyboard Layout Switcher” to the panel ====
+
Default icons used by LXpanel are stored in {{ic|/usr/share/pixmaps/}} and any custom icons should be saved there as well.
  
# Right-click on your taskbar
+
To change default icons for applications, see [[Desktop entries#Icons]].
# Choose “Add/Remove panel items”
 
# Choose “Add”
 
# Choose “Keyboard layout switcher”
 
  
=== Screen locking ===
+
=== LXPanel menus ===
It is recommended that you use {{Pkg|xscreensaver}} for screen locking in LXDE. To start it click on the {{ic|Screensaver}} option in the settings section of the LXDE menu and when asked if you want to run the daemon click {{ic|yes}}. Xscreensaver will be added to the {{ic|/etc/xdg/lxsession/LXDE/autostart}} file automatically meaning that it will be started every time you log in with no manual intervention required. Please consult the [[Xscreensaver]] wiki article for more information on configuration.
 
  
=== Disabling screen blanking without installing a graphical screensaver ===
+
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.
  
If you do not want to install a graphical screensaver you can still disable screen blanking by adding these lines below to {{ic|~/.xinitrc}} before the exec command.
+
=== Use a different window manager ===
xset s off &
 
xset -dpms &
 
  
=== lxpanel icons ===
+
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.
  
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.
+
Replace {{ic|openbox-lxde}} in either file with a window manager of your choice:
  
You can change default icons for applications by taking the following steps:
+
For metacity:
# 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}}.
 
# Change
 
Icon=/default/icon/.png
 
to:
 
Icon=/name/of/new/icon/added/to/pixmaps/.png
 
  
=== Network Management ===
+
window_manager=metacity
It is recommended that you use [[NetworkManager]] for connecting to and managing networks in LXDE.
 
  
=== PCManFM ===
+
For compiz:
  
[[PCManFM]] is the standard file manager in LXDE.
+
window_manager=compiz
  
=== Replacing the default window manager ===
+
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]].
  
[[Openbox]], the default window manager of LXDE, can be easily replaced by other [[Window manager|window managers]], such as ''fvwm'', ''icewm'', ''dwm'', ''metacity'', ''xfwm4'', ''compiz'', etc.
+
=== Using a composite manager ===
  
LXDE will attempt to use the window manager defined in the user lxsession configuration file {{ic|~/.config/lxsession/LXDE/desktop.conf}}. If it does not exist, it will then attempt to use the window manager defined in the global configuration file {{ic|/etc/xdg/lxsession/LXDE/desktop.conf}}.
+
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.  
 
 
Within one of these files replace the openbox-lxde command with the window manager of your choice. For example:
 
[Session]
 
window_manager=openbox-lxde
 
For metacity:
 
window_manager=metacity
 
For compiz:
 
window_manager=compiz ccp
 
 
 
=== Shutdown, reboot, suspend and hibernate options (LXSession-logout) ===
 
Ensure that the package {{Pkg|upower}} is installed. Then simply choose the required option from the logout dialogue which can be accessed from the panel.
 
  
 
== Troubleshooting ==
 
== Troubleshooting ==
  
=== SSH key management ===
+
=== Some apps unable to start ===
  
A very lightweight solution to ssh key management can be found by using keychain. See the [[Using_SSH_Keys#Keychain|using keychain]] article for details.
+
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 ===
 
=== NTFS with Chinese characters ===
 +
 +
{{Merge|NTFS-3G|This has been flagged since 2014 [[special:diff/346266]]}}
  
 
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:
  
 
Create a new {{ic|/usr/local/bin/mount.ntfs-3g}} with a new Bash script containing:
 
Create a new {{ic|/usr/local/bin/mount.ntfs-3g}} with a new Bash script containing:
 +
 
  #!/bin/bash
 
  #!/bin/bash
 
  /usr/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 /usr/local/bin/mount.ntfs-3g
 
  # chmod +x /usr/local/bin/mount.ntfs-3g
  
=== KDM and LXDE Session ===
+
=== 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}}.
  
As of KDE 4.3.3, KDM will not recognize the LXDE desktop session. To fix it:
+
=== LXPanel Task Bar icon size ===
# cp /usr/share/xsessions/LXDE.desktop /usr/share/apps/kdm/sessions/
 
  
=== GTK+ warnings with lxsession 0.4.1 ===
+
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''.
  
When starting GTK+2 programs you may get the following message:
+
=== Fake transparency in LXTerminal ===
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:
+
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.
* {{ic|/usr/share/lxde/config}}
 
* {{ic|~/.config/lxde/config}}
 
into
 
* {{ic|/etc/xdg/lxsession/LXDE/desktop.conf}}
 
* {{ic|~/.config/lxsession/LXDE/desktop.conf}}
 
Alternatively, you can use lxappearance from the community repository to fix this.
 
  
 
== See also ==
 
== See also ==
  
* [http://wiki.lxde.org/en/ArchLinux LXDE wiki entry related to Arch Linux]
+
* [http://lxlinux.com/ Linux LXDE Guide]
* [http://lxde.sourceforge.net LXDE project (Sourceforge)]
+
* [http://lxde.sourceforge.net LXDE (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]
 

Latest revision as of 14:17, 12 October 2019

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, add to xinitrc:

~/.xinitrc
exec startlxde

See also Start X at login.

Tips and tricks

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

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

Reason: Intentions not clear. See [2]. (Discuss in Talk:LXDE#)

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.

See also