User:Spip

From ArchWiki
Revision as of 11:43, 31 July 2010 by Spip (talk | contribs) (Font Settings)
Jump to: navigation, search

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی


Cet article va vous guider dans l'installation et la configuration de divers composants de l'environnement de bureau LXDE (Lightweight X11 Desktop Environment). LXDE est conçu pour être capable de tourner sur des ordinateurs de faible puissance et demande peu de dépendances. La philosophie de LXDE est d'être léger mais fonctionnel.

Fonctionnalités

Quelques fonctionnalités de LXDE sont :

  • La légèreté - LXDE fonctionne avec une utilisation de mémoire raisonnable (après que le serveur d'affichage Xorg et LXDE soient lancés, la consommation totale de mémoire est d'environ 45 MB sur une machine i686)
  • La rapidité - LXDE fonctionne très bien sur de vieilles machines datant de 1999 (La configuration matérielle minimale est équivalente à celle de windows 98)
  • Un design fonctionnel - LXDE utilise une interface en gtk2 et les standard GNOME HIG
  • De l'indépendance - Les composants peuvent être utilisés sans LXDE
  • Le respect des standard - LXDE suit les spécifications du projet Freedesktop.


Composants

Informations à propos de divers composants :

  • PCManFM : Gestionnaire de fichier, de fonctionnalités du bureau et du fond d'écran.
  • LXPanel : Barre des tâches avec gestionnaire d'application, menu et de nombreux applets.
  • LXSession: Standard-compliant X11 session manager with shutdown/reboot/suspend support (requires HAL).
  • LXAppearance: Editeur de thème capable de changer des thèmes GTK+, des icones et des fonts pour les applications GTK.
  • Openbox: Gestionnaire de fenêtre léger, respecteueux des standards, et hautement configurable (Gestionnaire de fenêtre recommandé mais non développé par le projet LXDE).
  • Obconf - Outil de configuration du thème d'Openbox.
  • GPicView: Une visionneuse d'images simple et légère.
  • Leafpad: Un éditeur texte simple et léger (non développé par le projet LXDE).
  • XArchiver: Gestionnaire d'archive léger (non développé par le projet LXDE).
  • LXNM Gestionnaire de connexion réseau pour le wifi en cours de développement. Vous pouvez trouver Template:Package AUR dans AUR.

Installation

LXDE est modulaire ce qui vous permet de choisir les paquets que vous souhaitez. Certains paquets sont expérimentaux et vous aurez besoin d'utiliser AUR pour les installer.

Les paquets requis au minimum pour lancer LXDE sont Template:Package Official, Template:Package Official, Template:Package Official et un gestionnaire de fenêtre.

Installer LXDE par

# pacman -S lxde

Ce qui va vous installer les paquets suivants :

  • gpicview
  • lxappearance
  • lxde-common
  • lxde-icon-theme
  • lxlauncher
  • lxmenu-data
  • lxpanel
  • lxrandr
  • lxsession-lite
  • lxtask
  • lxterminal
  • menu-cache
  • openbox
  • pcmanfm

Vous aurez aussi besoin d'installer Gamin. Gamin is a file and directory monitoring tool designed to be a subset of the FAM. It runs on demand for programs that have support for it so does not require a daemon like fam does. Si fam est installé, enlevez-le de la liste des démons dans Template:Filename et arrêtez le démon avant d'installer gamin.

pacman -S gamin

Autres paquets léger dont vous pouvez avoir l'envie d'installer :

pacman -S leafpad xarchiver obconf epdfview

Pour en trouver d'avantage, lisez Lightweight_Applications.

Démarrer le bureau

Vous pouvez démarrer LXDE de divers manières. Si vous utilisez un gestionnaire d'affichage tel que SLiM, GDM, ou KDM, ouvrez l'option de session et choisissez LXDE. Pour faire ceci à partir d'une console, plusieurs possibilités existent.

Pour utiliser startx, vous devez définir LXDE dans votre fichier [[Beginners'_Guide#C:_Test_X|Template:Filename]]

exec ck-launch-session startlxde


Ceci lancera LXDE avec le support HAL qui fournit la possibilité de redémarrer ou éteindre votre ordinateur depuis la fenêtre de déconnexion. Si vous ne souhaitez pas utiliser HAL :


exec startlxde

Pour lancer LXDE depuis la ligne de commande sans Template:Filename (si un fichier Template:Filename existe déjà, ceci ne fonctionnera pas):

$ xinit /usr/bin/startlxde
  • Ou depuis une session console-kit :
$ xinit /usr/bin/ck-launch-session startlxde

Si vous voulez lancer startxautomatiquement au démarrage de la machine, regardez starting X at boot

Conseils et résolutions de bugs

Lancement automatique de programmes

.desktop files

Une première méthode consiste à faire un lien d'un fichier Template:Filename dans Template:Filename

Les programmes installés mettent leur fichier Template:Filename dans Template:Filename

Par exemple :

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

Une fois que le fichier Template:Filename a été ajouté, vous pouvez le manipuler avec l'interface graphique de d'outil de configuration Template:Package AUR.

autostart file

Une deuxième méthode est d'utiliser le fichier Template:Filename.

$ touch ~/.config/lxsession/LXDE/autostart

et d'ajouter le programme que vous souhaitez démarrer sur une nouvelle ligne avec le préfixe @ et sans & à la fin :


@lxterminal
@leafpad
Global autostart

Une troisième méthode consiste à utiliser le fichier de configuration global Template:Filename.

Ce fichier n'est pas un script shell, mais chaque ligne représente une commande différente qui va être exécutée. Si une ligne de commande commence par un @, la commande qui suit ce @ sera automatiquement ré-exécutée si elle crash. Si les deux fichiers Template:Filename et Template:Filename sont présents, toutes les entrées des deux fichiers seront exécutées.

Digital Clock Applet Time

To get standard time (not military time) use for hh:mm and hh:mm:ss format respectively (Template:Codeline for more options):

%I:%M
%I:%M:%S

Application Menu Editing

The application menu works by resolving files with program start information in them (called Template:Filename files) located in Template:Filename. 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.

To add a program to the menu (or edit a menu item), create or link to the Template:Filename file in Template:Filename.

To remove items from the menu, you'll have to edit the Template:Filename files and describe that the program shouldn't be displayed. First, copy the files from your global list location to your local user's menu location.

cp /usr/share/applications/example.desktop ~/.local/share/applications

Then add to 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 it's menu editor. For every item that you do not want displayed, check the 'Show only in KDE' option.

My Documents name

The folder on the Desktop named 'My Documents' is hard-coded into pcmanfm. At this time there is no ability to be able to rename it.

Font

La pluspart des utilisateurs de LXDE essayent d'utiliser les programmes GTK puisque GTK est utilisé pour LXDE. Pour changer les fonts, vous pouvez utiliser Template:Package Official et modifier la font proncipale mais pour les autres fonts, vous aurez besoin d'utiliser le logiciel fournit par Gnome :

pacman -S gnome-control-center

Après avoir ajusté vos préférences, vous pouvez enlever les programmes et la configuration restera inchangée.

Auto Mount

If you want a removable storage device to mount automatically with PCManFM, you must install HAL and add your user to hal group:

# gpasswd -a your_username hal

Then pmount is required for mounting removable devices without root access:

pacman -S pmount

Now logout and back in again to so that your user is recognized as part of the hal group.

NTFS with Chinese Characters

For a storage device that has an NTFS filesystem, you will need to install the NTFS-3G package. Generally, PCManFM works well, however there is one bug affecting NTFS users that if you have files or folders on an NTFS filesystem, the names of which contain non-latin characters (ie: Chinese Characters) may disappear when opening (or automounting) the NTFS volume. This happens because the lxsession (or lxsession-lite) mounthelper is not correctly parsing the policies and locale option. There is a workaround for this:

  • Remove the "/sbin/mount.ntfs-3g" which is a symlink.
rm /sbin/mount.ntfs-3g
  • Create a new "/sbin/mount.ntfs-3g" with a new bash script containing:
#!/bin/bash
/bin/ntfs-3g $1 $2 -o locale=en_US.UTF-8
  • Make it executable:
chmod +x /sbin/mount.ntfs-3g 
  • Add "NoUpgrade = sbin/mount.ntfs-3g" to pacman.conf under the "[options]"

LXNM

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 the AUR.

The main script will need to be run as root. If you plan on consistently using it, put it in your Template:Filename. LXNM works with the Network Status Monitor of the Lxpanel so you'll need to add that too the panel. LXNM works well most of the time, though at times it can take awhile to get a connection.

KDM and LXDE session

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

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

lxpanel Add Launcher (application)

lxpanel comes with a launcher applet by default and all you need to do to add new apps to it is:

  1. Make sure launch bar applet is enabled:
    • 1a. right click the panel
    • 1b. select "add/remove panel items"
    • 1c. make sure "application launch bar" is listed (if it's not, select "add" and add it)
  2. Right click anywhere on the launch bar applet
  3. Choose "application launch bar settings"
  4. Choose "add"
  5. Direct it to the .desktop file of whatever application you want to add (found in usr/share/applications)

lxpanel Add Launcher (location)

To add a launcher to a specific location such as a media hard drive or folder you need to create a .desktop file and save it in /usr/share/applications. You can then add it the same way as adding an application to the panel.

Here is a custom .desktop file as an example, edit lines "Exec" and "Icon" as needed:

[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=media
Exec=pcmanfm /mnt/xbox (basically you're telling pcmanfm to open a specific location - /mnt/xbox in this case)
Icon=xbmc.png (this should be the name of an icon in /usr/share/pixmaps)
Terminal=false
X-MultipleArgs=false
Type=Application
Categories=Application
StartupNotify=true

Icons/Cursors

Setting up icons and cursors.

Cursors

LXDE has no preference panel to choose your mouse pointer. To do so, you will have to define your cursor in your Template:Filename file. See X11_Cursors#Configuring_Cursor_Themes.

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

mkdir /usr/share/icons/default

Then you can specify to add to the icon theme the cursor. This will use the Template:Package Official pointer theme:

echo '[icon theme]
Inherits=Bluecurve' > /usr/share/icons/default/index.theme

lxpanel Icons

Default icons used by lxpanel are stored in Template:Filename 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 (.desktop files can be found in /usr/share/applications)
  3. Change
Icon=/default/icon/.png 

to

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

My Documents Icon

The desktop entry for "My Documents" cannot be removed. It is compiled directly into pcmanfm, file src/desktop/desktop-window.c. The icon that is used is gnome-fs-home, with folder-home as fallback. If the chosen icon theme does not have this icon, it needs to be created, or else the desktop entry will have no icon associated with it.

Replace Window Manager

OpenBox, the default window manager of LXDE, can be easily replaced by any one you like, such as fvwm, icewm, dwm and awesome... etc..

The window manager LXDE will attempt to use is defined this file:

/etc/xdg/lxsession/LXDE/config

Per default this is defined as

[Session]
window_manager=openbox-lxde

Replace openbox-lxde with the window manager of your choice.

It might be also worth looking at:

/etc/xdg/lxsession/LXDE/default

These default settings however appear to be deprecated, as there is this note in the file:

! This file is kept for backward compatibility.
! Only used by obsolete lxsession, not lxsession-lite.

Anyhow, for example, somebody's /etc/xdg/lxsession/LXDE/default looks like this:

smproxy
openbox
lxpanel

smproxy is a program provided in xorg. It provides session management support for programs which don't know X11 R6 session management protocol. It is highly recommended you include this line in your desktop.

Shutdown and Reboot from LXDE

To be able to shutdown, reboot, suspend and so on from lxde make sure that DBus and HAL are running. Then add your user to the power group.

# gpasswd -a <USERNAME> power

If you still encounter problems, add inbetween the <config></config> tags in /etc/PolicyKit/PolicyKit.conf the folowing lines:

<match action="org.freedesktop.hal.power-management.shutdown">
 <return result="yes"/>
</match>
<match action="org.freedesktop.hal.power-management.reboot">
 <return result="yes"/>
</match>
<match action="org.freedesktop.hal.power-management.suspend">
 <return result="yes"/>
</match>
<match action="org.freedesktop.hal.power-management.hibernate">
 <return result="yes"/>
</match>

Then restart HAL.

Problems when updating to Version 0.4.1 of lxsession

When starting GTK2 programs you get:

 GTK+ icon them is not properly set
 This usually means you don't have an XSETTINGS manager running. Desktop environment like GNOME or XFCE automatically execute
 their XSETTING managers like gnome-settings-daemon or xfce-mcs-manager.


Functionality/Config files of lxde-settings-daemon was recently merged into lxsession. If you made customizations to 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

You can also use lxappearance from the community repository to fix this.

LXsession full

There are some bugs in lxsession related to session management. lxsession-lite is a version of lxsession which does not have the session management capability. The stability of lxsession-lite is better than lxsession, however it can not save and restore sessions. Thus it is recommended to use lxsession-lite till the problems in lxsession are fixed.

Using KDEmod3 applications under LXDE

As older versions of KDEmod[-legacy] are still installed under /opt/kde/bin, they are not automatically recognized by LXDE. To use them, you can either edit your PATH with the following command:

echo 'PATH=$PATH:/opt/kde/bin' >> /etc/rc.local

or you can add the following script to /etc/profile.d:

#!/bin/sh
PATH=$PATH:/opt/kde/bin

Save it as "kde3path.sh" and make it executable:

chmod +x /etc/profile.d/kde3path.sh

Resources