LXDE:Domande

Da LXDE.org.

Indice

Generali

Cosa significa il nome LXDE?

  • LXDE è l'abbreviazione delle parole inglesi Lightweight X11 Desktop Environment (Anbiente grafico X11 leggero), ma LX sta anche per LinuX.

Why do you develop another desktop environment? Aren't there already KDE, GNOME, XFCE, and a lot of well-made DEs? Why reinventing the wheel?

There are several reasons for developing LXDE.

  • Though other desktop environments are well-made and powerful, they are in some ways big and slow, and eat up our RAMs. LXDE aims to reduce the resource hunger.
  • Not everyone on this earth is rich. There must be a nice desktop environment for those who can't afford new fancy hardware, and we have the ability to help them.
  • Other desktop environments are too integrated, meaning reusing each part of them requires installing lots of dependencies.
  • If Windows 98 and xp work quite well on old machines, why my Linux desktop needs a 1.0 GHz CPU + 1GB RAM? We don't believe building such a usable desktop environment requires that much resource usage, so we try it ourselves.
  • Because reinventing the wheel is cool, and we love it! (Simply the best reason)

I don't want a full DE, I only need XXX in LXDE, how can I do?

  • Each component of LXDE can run independently, so you don't need to install the whole DE, if you don't like it. We deliberately keep all components desktop-independent and loosely-coupled. This is the main difference between LXDE and other projects.

Does LXDE automount plugged in removable devices (USB drives, Flash disks, etc)?

Yes, it does. It mounts devices from /etc/fstab automatically, others - removable and such - get mounted through HAL software.

I'm interested in developing a plugin for LXPanel. Are there any development docs I might be able to read?

There's no documentation for writing plugins at the moment, but feel free to look at the relevant source code: PluginClass struct from LXPanel's panel.h header file and an Example plugin.

How do I make an application autostart on LXDE launch?

For system wide you edit the file /etc/xdg/lxsession/LXDE/autostart, for user specific application launches (the more common way) you just add a .desktop file to ~/.config.

Browser

How do I change my default browser?

  • As root:

Template:Sh

  • Choose the browser of choice.
  • LXDE simply uses the application "x-www-browser", which in fact is a symbolic link to whatever browser the admin chooses. Same goes for x-terminal-emulator .
  • You can also use xdg-mime.

Keyboard/Mouse

How do I change the hotkeys?

Edit ~/.config/openbox/lxde-rc.xml with your favorite text editor

  <keybind key="W-l">
    <action name="Execute">
      <execute>xscreensaver-command -lock</execute>
    </action>
  </keybind>

The W in "keybind key" stands for the Windows key on a keyboard, the l for the L key. For the changes to have effect you either have to restart the session or execute Template:Sh

How do I modifiy mouse/keyboard bindings?

Unfortunately, they are only configurable by hand, ie by editing the Openbox's rc.xml file.

Multimedia

Any suggestions for a lightweight audio/video player?

  • LXDE already has a minimalist XMMS2 based music player included, called LXMusic.

As for video, there is no player included so far - although lxine is being worked on - so you have to resort to third-party applications.

  • One of such is gnome mplayer. It uses MPlayer libraries, so it is capable of playing a broad range of formats. Its GUI is light, uncluttered and efficient for an undemanding user. With its small dependency footprint and an option of integration with internet browsers it is the perfect choice.
  • Another similar program is Whaaw! Media Player. It also has clean and straightforward interface (see for yourself), is written in Python and based on gstreamer multimedia framework.
  • The third alternative would be gxine, an easy frontend of Xine libraries with wide variety of supported media files.

Network

Which network manager is provided by LXDE?

What other network managers can I use besides LXNM?

Screen resolution

Which tool is used for configuring screen resolution in LXDE?

Window Manager

How can I use a window manager other than Openbox with LXDE?

  • Simply edit /etc/xdg/lxsession/LXDE/default with a text editor, and replace openbox with your favorite window manager.

Right click on the desktop renders a weird menu (aka where did my desktop icons go?)

You have (by accident?) chosen to show the right click menu from the window manager (or vice versa as you'll see). This is a feature in PCManFM.

  • Open the Preference dialog (click preferences in the edit menu)
  • Pick the desktop tab
  • Mark (or unmark) the checkbox next to "Show menus provided by WM when desktop is clicked" or, if this checkbox is not present, tick "Manage the desktop and show file icons"
  • Press OK and you should be done.

Top window bar is under the panel so I can't reach it, but I would like to move/close/minimize/etc window.

Make sure you have ticked "Reserve space,and not covered by maximized windows" property in settings (right click on panel, which is over the window -> Panel settings), then Alt+Tab to switch focus to the same window, press Alt+Space to get window menu, hover over "Layer" and in the popup menu choose "Always on top".

Where do I copy Openbox themes to?

Copy them to ~/.themes directory or /usr/share/themes.

LXLauncher

How do I change LXLauncher background/tab bar appearance?

LXLauncher uses (SVN revision 1128) three ways of defining it's GUI:

- for tab bar, GTK+'s own Resource file
- for dashboard (notebook) background color, hardcoded RGB color setting
- for border type and auxiliary buttons - ie "Go back", Appearance tool

First two are the toughest to change, so I will focus on them.

First, the resource file. To find lxlauncher's gtkrc file, look into "/usr/local/lxlauncher/" folder, where it is installed by default, and be sure you can see hidden files. If it is not there, look for it in all folders with "lxlauncher" in its name. When you get hold of it, open it in text editor, but with super user privileges, or you won't be able to save it. Making backup is advisable. With the file opened, you can start The important parts are the the color codes which can be changed. The color format is six digit hexadecimal - ie #344529 (for more information about GTK theming format, go here). There are three sections in the file.

1. style section. This one has only one color setting; it's the one that changes the color of tab bar background:

What changing this color does (just an example):

Tabbarbackgroundone.jpg Original Tabbarbackgroundtwo.jpg Changed

2. second style section. It has two color options.

The first causes change of text color on currently chosen tab in tabbar, application names on "notebook" surface and subpage location (here, green): Tabbartwo.jpgOriginal

Tabbarone.jpgChanged

The second color changes the look of application text on mouseover:

Mouseoverone.jpgOriginal

Mouseovertwo.jpgChanged

3. style section. It has three - just the uncommented - options.

First one changes background of currently selected tab, background of subpage location, and the border of "notebook" surface:

Tabselectedbackone.jpgOriginal

Tabselectedbacktwo.jpgChanged

Second one changes text color of unselected tabs:

Unselectedtabsonlyone.jpgOriginal

Unselectedtabsonlytwo.jpgChanged

The last one changes the background color of currently unslected tabs:

Backunselone.jpgOriginal

Backunseltwo.jpgChanged

A nice point&click online color chooser (with gtkrc hex color format) is located here.

Second, the background defined in the source code. This manages the "notebook" foreground (where application icons are stationed). In the LXLauncher lxlauncher.c source file search for this string:

 cairo_set_source_rgb(cr, 184.0/256, 215.0/256, 235.0/256);

The fractions are the corresponding RGB values from 0 - 255 (here normalized to 1). The default color looks like this: Foreground.jpg

If we change the values to this:

 cairo_set_source_rgb(cr, 0.0/256, 214.0/256, 0.0/256);

we get the following view:

Foregroundnew.jpg

LXMusic

How do I pass arguments to LXMusic in terminal (eg add a file to playlist, play file, etc)?

You can't do that directly. LXMusic is only a frontend to XMMS2 client-server audio player; instead you should use the CLI client, which comes bundled with the package by default.

basic cli commands: Template:Sh Template:Sh

LXPanel

How do I add custom sub-menu and/or launcher to LXDE's main menu?

For editing the menu you can use third-party program called Alacarte. It is written in python and makes use of python-xdg library. However, if you don't want to use it and make changes to the menu manually, you'll have to edit per-user menu configuration file. Usually, it resides in ~/.config/menus, under the name of "lxde-applications.menu". It should be something like (if empty or does not exist, just copy & paste the following text):

<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd">
<Menu>
      <Name>Applications</Name>
      <MergeFile type="parent">/etc/xdg/menus/lxde-applications.menu</MergeFile>
</Menu>

Now, if you wan't to add, say the file README.desktop launcher under Accesories menu, change the upper text to the following:

<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd">
<Menu>
	<Name>Applications</Name>
        <MergeFile type="parent">/etc/xdg/menus/lxde-applications.menu</MergeFile>
        <Menu>
	      <Name>Accessories</Name>
	      <Include>
                        <Filename>README.desktop</Filename>
	      </Include>
       </Menu>
</Menu>

To add, say, README.desktop to a "Accessories" sub-menu "MyMenu", change to the following:

<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd">
<Menu>
	<Name>Applications</Name>
        <MergeFile type="parent">/etc/xdg/menus/lxde-applications.menu</MergeFile>
        <Menu>
			<Name>Accessories</Name>
                        <Menu>
			           <Name>MyMenu</Name>
                                   <Directory>MyMenu.directory</Directory>
			           <Include>
			                       <Filename>README.desktop</Filename>
			           </Include>
                        </Menu>
        </Menu>
</Menu>

To add it to other LXDE provided menus, change "Accessories" accordingly. Note the "MyMenu.directory" line. This is the file that provides the directory name, icon, comment and other properties. If the file does not exist, you'll have to create one; copy it to "~/.local/share/desktop-directories" directory, with the (minimal) content of:


          [Desktop Entry]
          Encoding=UTF-8
          Icon=/path/to/icon
          Name=MyMenuOrSimilarString

For more information on creating/editing menus and fine grained settings, please read Freedesktop's Desktop file and Menu specification.

How do I edit my application launch icons?

  • As of SVN revision 975 you are able to right click on desktop shortcut entry in the LXPanel menu, and click "Properties". This invokes LXShortcut desktop file editor; with it you can then edit the file to your needs, or
  • You can edit the <app name>.desktop files in the /usr/share/applications folder or in the "application" subfolder of folders defined by "$XDG_DATA_DIRS" environment variable (to see what they are invoke command "echo $XDG_DATA_DIRS" from terminal). In the Icon line put the path and the icon name as you like.(eg. Icon=/usr/share/pixmaps/<icon.png> the icon file can be .svg also)

How do I edit the colour of the tasks in the panel?

  • Just right click on the panel -> panel preferences -> panel extensions -> choose panel/taskbar, then click on edit.

There you can change different preferences, activate flat Buttons. It will look better. Custom colours of the tasks would require gtkrc editing.

The tray clock numbers color is black, my wallpaper is also very dark and panel is transparent and the time is not seen clearly. Where do I change color of DC's numbers?

Do right click on LXPanel -> Panel settings -> tick "Custom color" and preferably choose brighter color with the color chooser next to it.

I would like to change the LXDE icon in the start menu. How do I do it?

By default, it is usually enough to replace icon "lxde-icon.png" in /usr/share/lxde/images/ folder with your own. If the aformentioned icon does not exist, locate the panel's config file (just "panel") - most likely location is "/home/USER_NAME/.config/lxpanel/LXPANEL_PROFILE/panels/" directory. In it, look for line "type = menu" and underneath the location of the icon it is being used in the menu.

Since SVN version 969, there is an easier way to do it - now you can change menu icon on right clicking it, choosing "Menu properties" and selecting it in icon browser or by manually typing in the location of the wanted icon:

Menu icon change.png

LXShortcut

What do I do, if launching it in terminal doesn't show anything?

You must provide LXShortcut with at least one of two arguments:

"-i <input>" - stands for which .desktop file you want to edit or
"-o <output>" - to which file you would like to create a new desktop shortcut

If providing these two arguments still doesn't show anything, try another: "--display=DISPLAY" where DISPLAY is in form of {hostname}:display_number{.screen_number}.

PCmanFM

Does PCmanFM support ftp/sftp/other protocols for remote folder browsing?

Yes, this is supported in 0.4 branch of PCmanFM. Unfortunately, most Linux distributions include the 0.5 branch, which, albeit it's stability, does NOT have such capability. Furthermore, the released packages are quite old; usage of SVN version is preffered.

How do I make PCManFM work with multiple monitors?

Separate X screens

You should modify startup scripts to run pcmanfm on second display. See the example:

Template:Sh

You also should start some window-manager on the second screen. See the example:

Template:Sh

Starting a separate X server and use PCManFM on it

   #!/bin/sh
   # start Xnest
   Xnest :1 -name "LXDE:test" -geometry 800x600 &
   export DISPLAY=:1
   export HOME=/home/test
   export LANG=en_US.utf8
   export SHELL=/bin/bash
   export TMPDIR=/tmp/
   export PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core:/opt/qt/bin
   # No core files by default
   ulimit -S -c 0 > /dev/null 2>&1
   export USER="`id -un`"
   export LOGNAME=$USER
   export HOSTNAME=archtower
   export HISTSIZE=1000
   # Keyboard, bell, display style: the readline config file:
   if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
       INPUTRC=/etc/inputrc
   fi
   export PS1="[\u@\h \W]\$ "
   # load the keymap, change to your needs
   loadkeys /usr/share/kbd/keymaps/i386/qwertz/de-latin1-nodeadkeys.map.gz
   
   # set the new X server and start a session
   xsetroot -display :1 -solid black &
   # this will run pcmanfm as user test
   exec sudo -u test pcmanfm &

Development

How do you justify calling LXDE "lightweight" and "fast" when it uses Gtk 2? This toolkit is among the fattest and slowest available. Why not FLTK or FOX?

  • Nobody wants to use it if there are better toolkits which really fit the need. Using gtk+ 2 is a hard choice. The i18n support of other toolkits is not very good. Apart from lightweight & fast, usability is important at the same time.
  • For English users, there is no problem, but can FLTK and FOX handle bi-directional text rendering? I know they already supported utf-8, but utf-8 is only the minimal requirement to be internationalized.
  • Simply supporting rendering utf-8 strings is far from being internationalized. Bi-di, input methods, and many other issues should be properly-handled.
  • So, the only toolkits with really good i18n supports are gtk+ 2 and Qt among which gtk+ 2 is lighter.
  • FLTK and FOX unfortunately are not the right toolkits currently. Hopefully FLTK and FOX can have better i18n support, and we can start using them. I know FOX 1.7 has improved i18n support, but that's not complete yet. Besides, these toolkits lacks some advanced features and supports to freedesktop.org standards.
  • In some restricted environments, like embedded systems, competent C++ compilers are not available, and programs with C++ toolkits cannot be used. So gtk+ is a better choice if portability is important. Writing programs with gtk+ is really a pain, though.