LXDE: Difference between revisions

From ArchWiki
(add template:poor writing)
Line 178: Line 178:


=== 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:

Revision as of 14:28, 25 November 2014

zh-CN:LXDE zh-TW:LXDE

This article or section needs language, wiki syntax or style improvements. See Help:Style for reference.

Reason: Use concise writing, see Help:Style (Discuss in Talk:LXDE)

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 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 lxde-common and openbox (or another window manager).

Most users will wish to install the full desktop which can be installed by installing the lxde group from the official repositories.

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

This article or section is a candidate for merging with Desktop entries.

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.

Auto mount

See File manager functionality#Mounting.

Autostart programs

There are a number of different ways to autostart applications in LXDE as described below.

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

First you can link a program's .desktop in /usr/share/applications/ file to ~/.config/autostart/. For example, to execute lxterminal automatically at startup:

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

Once .desktop files have been added you can manipulate them with the GUI configuration tool lxsession-editAUR.

Autostart files

You can also autostart applications by using a ~/.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:

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

There is also a global autostart file at /etc/xdg/lxsession/LXDE/autostart. If both files are present, all entries in both files will be executed.

Note: Versions before lxsession 0.4.9.X execute both files when present. Later versions only execute only the local file if both files are present.

Bindings

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

An optional GUI for editing the key bindings is obkeyAUR 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

More information on obkey is here.

Cursors

See Cursor Themes.

lxappearance provides functionality to change 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. For example, to display standard time instead of military time in the format of HH:MM:SS:

%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 strftime (3) for more options.

Font settings

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

Keyboard layout

See Keyboard configuration in Xorg for generic instructions.

See #Autostart programs for a way to automatically start setxkbmap in LXDE.

Add the “Keyboard Layout Switcher” to the panel

  1. Right-click on your taskbar
  2. Choose “Add/Remove panel items”
  3. Choose “Add”
  4. Choose “Keyboard layout switcher”

Screen locking

LXDE does not come with a screen locker of its own; see List of applications/Security#Screen lockers for alternatives.

/etc/xdg/lxsession/LXDE/autostart from lxde-common lists XScreensaver, which will be launched automatically. See #Autostart programs for other lockers. 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:

  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

Replace the default window manager

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

LXDE will attempt to use the window manager defined in the user lxsession configuration file ~/.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 /etc/xdg/lxsession/LXDE/desktop.conf.

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

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

This requires installation of upower.

Troubleshooting

NTFS with Chinese characters

This article or section is a candidate for merging with NTFS-3G.

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

See also