LXDE: Difference between revisions
(→Application menu editing: rw, rm fluff and questionable content, rm merge, link) |
(→Autostart: rename to #Application autostart, list, rm tip) |
||
Line 55: | Line 55: | ||
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 editor can be found in the [[AUR]] (e.g. {{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 editor can be found in the [[AUR]] (e.g. {{AUR|lxmed}}). | ||
=== | === Application autostart === | ||
Applications can be automatically started in | Applications can be automatically started in a couple of ways: | ||
* With {{ic|.desktop}} files | |||
LXDE implements [[XDG Autostart]]. | LXDE implements [[XDG Autostart]]. | ||
* 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: | 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: | ||
Line 74: | Line 72: | ||
}} | }} | ||
{{Note| | {{Note|These commands do ''not'' end with a "&" symbol.}} | ||
There is also a global autostart file at {{ic|/etc/xdg/lxsession/LXDE/autostart}}. | There is also a global autostart file at {{ic|/etc/xdg/lxsession/LXDE/autostart}}. | ||
{{Note|If both files are present, | {{Note|If both files are present, LXsession only executes the local file as of v0.4.9}} | ||
=== Bindings === | === Bindings === |
Revision as of 06:58, 4 November 2018
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
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 editor can be found in the AUR (e.g. lxmedAUR).
Application 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
There is also a global autostart file at /etc/xdg/lxsession/LXDE/autostart
.
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 strftime(3) for details.
Font settings
See Font configuration. lxappearance-obconf configures Openbox 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 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 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
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:
- Save the new icon to
/usr/share/pixmaps/
. - Use a text editor to open the
.desktop
file of the icon you want to change in/usr/share/applications/
. - Change
Icon=path_to_new_icon.png
.
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 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.
Troubleshooting
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:
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.