Advertisement
Tritonio

LXDE config locations/paths

Mar 15th, 2021
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.10 KB | None | 0 0
  1. Installation
  2.  
  3. LXDE requires at least lxde-common and openbox (or another window manager) to be installed. The lxde group contains the full desktop.
  4. GTK+ 3 version
  5.  
  6. An experimental GTK+ 3 build of LXDE can be installed with the lxde-gtk3 group from the unofficial city repository. The packages are available also from the AUR: search for packages tagged with lxde-gtk3. lxde-common and lxde-icon-theme need to be installed from the official repositories, because these packages are independent from the GTK+ version.
  7.  
  8. While it works mostly, there are some known issues with gpicview, lxappearance-obconf, lxlauncher and lxpanel.
  9. Starting the desktop
  10. Graphical log-in
  11.  
  12. LXDM is the default display manager for LXDE and is installed as part of the lxde group. See also Display manager.
  13. Console
  14.  
  15. To use startx, you will need to define LXDE in xinitrc:
  16.  
  17. ~/.xinitrc
  18.  
  19. exec startlxde
  20.  
  21. See also Start X at login.
  22. Tips and tricks
  23. Application menu editing
  24.  
  25. Tango-two-arrows.png
  26.  
  27. Tango-two-arrows.png
  28.  
  29. This article or section is a candidate for merging with Desktop entries.
  30.  
  31. Notes: please use the second argument of the template to provide more detailed indications. (Discuss in Talk:LXDE#)
  32.  
  33. 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
  34.  
  35. 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.
  36.  
  37. 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:
  38.  
  39. NoDisplay=true
  40.  
  41. To expedite the process for a good number of files you can put it in a loop. For example:
  42.  
  43. $ cd /usr/share/applications
  44. $ for i in program1.desktop program2.desktop ...; do cp /usr/share/applications/$i \
  45. /home/user/.local/share/applications/; echo "NoDisplay=true" >> \
  46. /home/user/.local/share/applications/$i; done
  47.  
  48. 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.
  49. Autostart
  50.  
  51. Applications can be automatically started in several ways.
  52. Desktop files
  53. Tip: .desktop files can be manipulated with the lxsession-editAUR[broken link: archived in aur-mirror] package.
  54.  
  55. See Desktop entries#Autostart.
  56. Lxsession
  57.  
  58. 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:
  59.  
  60. ~/.config/lxsession/LXDE/autostart
  61.  
  62. @lxterminal
  63. @leafpad
  64.  
  65. Note: Unlike Openbox, these commands do not end with a & symbol.
  66.  
  67. There is also a global autostart file at /etc/xdg/lxsession/LXDE/autostart.
  68. Note: If both files are present, lxsession only executes the local file as of v0.4.9
  69. Bindings
  70.  
  71. 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.
  72.  
  73. 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:
  74.  
  75. $ obkey ~/.config/openbox/lxde-rc.xml
  76.  
  77. See [1] for more information.
  78. Cursors
  79.  
  80. 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.
  81. Digital clock applet time
  82.  
  83. 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 strftime for details.
  84. Font settings
  85.  
  86. See Font configuration. lxappearance-obconf configures LXDE-specific settings.
  87. Keyboard layout
  88.  
  89. See Keyboard configuration in Xorg for generic instructions. A keyboard layout applet is included with lxpanel.
  90.  
  91. See #Autostart programs for a way to automatically start setxkbmap in LXDE.
  92. Screen locking
  93.  
  94. LXDE does not come with a screen locker of its own; see List of applications/Security#Screen lockers for alternatives.
  95.  
  96. /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.
  97. lxpanel icons
  98.  
  99. Tango-emblem-important.png
  100.  
  101. Tango-emblem-important.png
  102.  
  103. The factual accuracy of this article or section is disputed.
  104.  
  105. Reason: .local/share/ preferred (Discuss in Talk:LXDE#)
  106.  
  107. 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.
  108.  
  109. You can change default icons for applications by taking the following steps:
  110.  
  111. Save the new icon to /usr/share/pixmaps
  112. Use a text editor to open the .desktop file of the program whose icon you want to change in /usr/share/applications.
  113. Change
  114.  
  115. Icon=/default/icon/.png
  116.  
  117. to:
  118.  
  119. Icon=/name/of/new/icon/added/to/pixmaps/.png
  120.  
  121. Replace Openbox
  122.  
  123. lxsession uses the window manager defined in ~/.config/lxsession/LXDE/desktop.conf. If this file does not exist, it searches in /etc/xdg/lxsession/LXDE/desktop.conf instead.
  124.  
  125. Replace openbox-lxde in either file with a window manager of choice:
  126.  
  127. [Session]
  128. window_manager=openbox-lxde
  129.  
  130. For metacity:
  131.  
  132. window_manager=metacity
  133.  
  134. For compiz:
  135.  
  136. window_manager=compiz
  137.  
  138. 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.
  139.  
  140. 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.
  141. Shutdown, reboot, suspend and hibernate options (LXSession-logout)
  142.  
  143. This requires installation of upower.
  144. Troubleshooting
  145. NTFS with Chinese characters
  146.  
  147. Tango-two-arrows.png
  148.  
  149. Tango-two-arrows.png
  150.  
  151. This article or section is a candidate for merging with NTFS-3G.
  152.  
  153. Notes: please use the second argument of the template to provide more detailed indications. (Discuss in Talk:LXDE#)
  154.  
  155. 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:
  156.  
  157. Create a new /usr/local/bin/mount.ntfs-3g with a new Bash script containing:
  158.  
  159. #!/bin/bash
  160. /usr/bin/ntfs-3g $1 $2 -o locale=en_US.UTF-8
  161.  
  162. And then make it executable:
  163.  
  164. # chmod +x /usr/local/bin/mount.ntfs-3g
  165.  
  166. lxpanel crashes with some themes or browsing particular web pages
  167.  
  168. With some gtk themes (AUR - gtk-theme-greybirdAUR[broken link: archived in aur-mirror]), launch lxpanel will get errors below.
  169.  
  170. lxpanel: cairo-scaled-font.c:459: _cairo_scaled_glyph_page_destroy: Assertion `!scaled_font->cache_frozen' failed.
  171.  
  172. Try install ttf-dejavu in this case.
  173.  
  174. If lxpanel crashes when browsing particular unicode web pages, try install ttf-droid.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement