Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dcore:migrating_from_flwm_to_lxde [2018/07/10 07:54] – [Installing] + obconf sm8psdcore:migrating_from_flwm_to_lxde [2018/07/15 17:30] (current) – +[quick shutdown button] sm8ps
Line 1: Line 1:
 ====== Migrate from FLWM to LXDE ====== ====== Migrate from FLWM to LXDE ======
  
-FIXME This page is being over-hauled as of 20180710 with slightly changed focus.+[[http://en.wikipedia.org/wiki/LXDE|LXDE]] is a light-weight [[http://en.wikipedia.org/wiki/Desktop_environment|Desktop Environment]] based on the Window Manager [[http://en.wikipedia.org/wiki/Openbox|OpenBox]]. It includes, among other things, comfortable panel and a set of [[https://en.wikipedia.org/wiki/LXDE#Software_components_of_LXDE|helper applications]], the most prominent being its file manager [[http://en.wikipedia.org/wiki/PCManFM|PCManFM]], terminal LXPanel and editor [[http://en.wikipedia.org/wiki/Leafpad|Leafpad]].
  
-[[http://en.wikipedia.org/wiki/LXDE|LXDE]] is a [[http://en.wikipedia.org/wiki/Desktop_environment|Desktop Environment]] based on the [[http://en.wikipedia.org/wiki/Openbox|OpenBox]] Window Manager. It includes, among other things, a comfortable panel and a set of helper applications, the most prominent being it's file manager [[http://en.wikipedia.org/wiki/PCManFM|PCManFM]] and editor [[http://en.wikipedia.org/wiki/Leafpad|Leafpad]]. +The full of LXDE desktop environment does not work out of the box on dCore. For among other things, it contains session management tools which are unnecessary on dCore. The approach chosen here is to create a functionally equivalent set-up by adding the necessary tools from LXDE to a regular Openbox environment. A bonus will be that the mechanisms for dealing with *Core'OnDemand applications will work nicely.
- +
-The full of LXDE desktop environment does not work out of the box on dCore. Among many other things, it conatins session management tools which are unnecessary on dCore and even cause trouble. The approach chosen here is to create a functionally equivalent set-up by adding the necessary tools from LXDE to a regular Openbox environment. A bonus will be that the mechanisms for dealing with OnDemand applications will work nicely with dCore.+
  
 ===== Version ===== ===== Version =====
 +
 These instructions are known to work on ... These instructions are known to work on ...
   * dCore-bionic64 --- //[[sm8ps-tcl1@yahoo.com|sm8ps]]  2018/07/10//   * dCore-bionic64 --- //[[sm8ps-tcl1@yahoo.com|sm8ps]]  2018/07/10//
  
-Older version are available for ... +An older version with a focus towards a full integration of LXDE is available for [[http://wiki.tinycorelinux.net/dcore:migrating_from_flwm_to_lxde?rev=1531215558|dCore-trusty]]--- //[[sm8ps-tcl1@yahoo.com|sm8ps]]  2015/07/21//
-  * [[http://wiki.tinycorelinux.net/dcore:migrating_from_flwm_to_lxde?rev=1531215558|dCore-trusty]] --- //[[sm8ps-tcl1@yahoo.com|sm8ps]]  2015/07/21//+
  
 =====Installing===== =====Installing=====
  
-We shall split the installation into two extensions; the base packages shall be loaded upon boot whereas additional tools shall be made available on demand. The distinction depends on personal taste and so one may want to include frequently used or even all packages into the base extensions. Optionally, the selection of tools may be split in two separate extensions.+We shall split the installation into two extensions. The base packages shall be loaded upon boot whereas additional tools shall be made available on demand. The distinction depends on personal taste and so one may want to include frequently used or even all packages into the base extensions.
  
-For Ubuntu, create a list file 'lxde-base-LIST', containing +Create a list file 'lxde-base-LIST', containing ...
 <code> <code>
 openbox openbox
Line 25: Line 23:
 </code> </code>
  
-and 'lxde-tools-LIST', containing (cf. [[https://packages.ubuntu.com/bionic/lxde]])+... and 'lxde-tools-LIST', containing (cf. [[https://packages.ubuntu.com/bionic/lxde]] for short descriptions...
 <code> <code>
 lxterminal lxterminal
Line 31: Line 29:
 gpicview gpicview
 leafpad leafpad
-lxrandr+arandr
 clipit clipit
 </code> </code>
  
-Then ''sce-import'' these two extension lists, having the first one depend upon the X-server extension and the latter on the first. Make sure that the entry "lxde-base-LIST" is present in 'tce/sceboot.lst'. +Then ''sce-import'' these two extension lists, having the first one depend upon the X-server extension and the latter on the first. Include the entry "lxde-base-LIST" in 'tce/sceboot.lst' so as to have it loaded at boot-time.
-=====First run=====+
  
-Setting the ''desktop'' boot-code to "openbox" in your boot-loader will boot into functional LXDE desktop+In order to have LXPanel show, create file '~/.X.d/lxde-base.sh', containing 
 +<code> 
 +#!/bin/sh 
 +lxpanel & 
 +</code>
  
-FIXME+Setting the ''desktop'' boot-code to "openbox" in your boot-loader will boot into a regular Openbox desktop with a LXPanel. 
  
-After some time of use, however, one will recognize that the concept of ondemand-applications is not integrated into the menu system.+===== Menus =====
  
-This is no big dealindeedprovided one is willing to load each needed extension from the terminal by 'sce-load'In the long run, this is getting tiresomethough. Fortunately, getting LXDE to understand the ondemand-concept is simple, thanks to the already existing mechanisms for Openbox.+The *Core main menucontaining the Ondemand sub-menu, is available through right-clicking on the desktopThere is another "start" menu available through LXPanelalso containing the System Tools sub-menu but not any other *Core-menu.
  
-==== Re-booting ==== +For the interaction with the *Core main menu, maximized windows must leave a tiny bit of the desktop visibleLaunch "Openbox Configuration Manager" from the "System" menu and set the left margin to 1 pixel.
-The *Core exit menu is available via the LXPanel menu under System ToolsAlternatively it can be reached by right-clicking the desktop which opens the Openbox menu. The log-off icon in LXPanel closes the graphical deskop and brings one back to the command line. From there one can reboot or shut down the system by ''sudo reboot'' or ''sudo poweroff'', respectively. Notice that 'backup.sh' must be manually invoked beforehand if needed+
  
-=====Compatibility tweaks=====+====Usage====
  
-There are several steps necessary in order to make Openbox visible and provide the demanded mechanisms.+An entry in the OnDemand sub-menu will call the respective script under 'ondemand/' in the tce-folder; its default content being a call to ''ondemand -e'' for the selected extension. The menu entries correspond to the file names which may be chosen at will. Loaded applications can be found in the Applications sub-menu as well as in the categorized sub-menus of the "start" menu in LXPanel.
  
 +===Comment===
 +
 +The procedure for loading ondemand-applications may seem a bit round-about; however it is more convenient, indeed, than having to load them from the terminal. Of course, one would [[dcore:contributing|wish]] for a fully automated process.
 +
 +==== Accessing the menus via keyboard ====
 +
 +It is useful to have access to either menu via a keyboard short-cut. This is especially helpful in case that LXPanel should become invisible due to different monitor sizes.
 +
 +Add the following to the ''<keyboard>''-section of '~/.config/openbox/rc.xml':
 +<code>
 +    <keybind key="C-Escape">
 +      <action name="ShowMenu">
 +        <menu>root-menu</menu>
 +      </action>
 +    </keybind>
 +    <keybind key="C-F1">
 +      <action name="Execute">
 +        <command>lxpanelctl menu</command>
 +      </action>
 +    </keybind>
 +</code>
 +This will bind Ctrl-Escape to the Openbox main menu and Ctrl-F1 the "start" menu of LXPanel.
  
-====Compatibility with FLWM====+===== Compatibility with FLWM =====
  
-=== Wbar, Trayer, setbackground, mouse_config === 
 In case one has followed the [[dcore:basic_desktop_installation|instructions]] for setting up a basic desktop installation, a Wbar window will pop up and possibly Trayer will be running in the background. For the moment, use ''killall wbar trayer'' to get rid of them.  In case one has followed the [[dcore:basic_desktop_installation|instructions]] for setting up a basic desktop installation, a Wbar window will pop up and possibly Trayer will be running in the background. For the moment, use ''killall wbar trayer'' to get rid of them. 
  
-dCore sets the desktop background on FLWM through '~/.setbackground', configures the mouse through '~/.mouse_config' and runs any shell script under '~/.X.d/', among others the starter script for Wbar. These scripts are unnecessary as LXDE provides the functionality itself.+dCore runs any shell script under '~/.X.d/', among others the starter scripts for Wbar and Trayer. These scripts are unnecessary as Openbox provides the functionality by itself. 
  
-Wrap  all these up scripts with the following if-clause so that they do not get executed unless FLWM is used.+Either remove these scripts together with their respective extensions or wrap the respective commands with the following if-clause so that they do not get executed unless FLWM is used.
  
 <code> <code>
 #!/bb/sh  #!/bb/sh 
-if [ $(cat /etc/sysconfig/desktop) = flwm +if [ $(cat /etc/sysconfig/desktop) = openbox 
 then  then 
         <original script>         <original script>
Line 77: Line 98:
 /etc/alternatives/x-terminal-emulator & /etc/alternatives/x-terminal-emulator &
 </code> </code>
- 
-====Boot-code desktop ==== 
- 
-Change the boot-code to ''desktop=openbox'' and re-boot once so as to have Openbox set up the necessary configuration files. The desktop will remain empty but upon right-click, the familiar *Core-menu will show up through which one can reboot. 
- 
-That boot-code is necessary and will remain in place. Booting into an LXDE-desktop needs to be forced by changing or adding, respectively, the following lines in '~/.xinitrc'. 
- 
-<code> 
-#"$DESKTOP" 2>/tmp/wm_errors & 
-startlxde 2>/tmp/wm_errors & 
-</code> 
- 
-====Openbox-menu==== 
- 
-The main menu contains settings for the desktop whose extended section allows for having the menu of the window manager show upon (right-)clicking the desktop. This is the key for making ondemand-applications available through Openbox. 
- 
-In its standard setting, that menu does not contain much. Its content is defined in the file '~/.config/openbox/lxde-rc.xml'. Search for <nowiki>"<file>"</nowiki> to find the line where the menu-file is included. 
- 
-<code> 
-    <file>/usr/share/lxde/openbox/menu.xml</file> 
-</code> 
-Replace that line by the following, including the *Core-menus that have been set up by Openbox. 
- 
-<code> 
-    <file>/usr/local/tce.openbox.xml</file> 
-    <file>ondemand.xml</file> 
-    <file>system-tools.xml</file> 
-    <file>menu.xml</file> 
-</code> 
-Take note that the //order// of these entries //matters// as far as 'menu.xml' must be the last one! 
- 
- 
-====Usage==== 
- 
-After selecting **Reconfigure Openbox** from the Openbox-menu for a first time, it will show a sub-menu for ondemand-applications afterwards. Selecting any one of them will run the respective script under 'ondemand/' in the tce-folder; its default content being a call to ''ondemand -e'' for the selected extension. 
- 
-For that matter it may be useful to reserve one pixel at some border in order to always have the desktop available even when a window is maximized. This can be set through the Openbox configuration manager from the settings menu. 
- 
-The menu does //not// show all installed applications; instead, the list of loaded application will show in the main LXDE-menu which will dynamically update. 
- 
-In principle, it should be possible to have the Openbox-menu also show the full list of applications (cf. an [[http://pclosmag.com/html/Issues/201310/page10.html|article]] from the [[http://pclosmag.com/index.html|PCLinuxOS magazine]]) but this is beyond our scope here. 
- 
- 
-===Comment=== 
- 
-The procedure for loading ondemand-applications may seem a bit round-about; however it is more convenient, indeed, than having to load them from the terminal. Of course, one would wish for a fully automated process like for Openbox itself. 
- 
  
 ===Special cases=== ===Special cases===
Line 137: Line 111:
 </code> </code>
  
-===Menu entries===+===== LXPanel settings =====
  
-The names of the ondemand-menu entries are taken from the file names under 'ondemand/' which may be chosen at will.+By right-clicking on the panel, on gains access to the panel settings. From there, one may choose to add, remove or configure panel items.
  
 +==== Log-out ====
  
-====Exit button==== +The Logout entry in the "start" menu can be set to *Core'exit in the advanced settings to "/usr/local/bin/exittc".
- +
-The button for log-out provided by LXDE should be replaced by the exit button by *Core. The LXDE log-out dialogue will remain available through the main LXDE-menu+
- +
-  *Right-click on the taskbar and choose to add or remove panel items. +
-  *Add an application launch bar and edit its content to be the exit-command from the system tools menu. +
- +
-One probably wants to delete the application launch bar containing the screen-lock and LXDE-exit buttons.+
  
 ====Localization==== ====Localization====
Line 162: Line 130:
 export G_FILENAME_ENCODING=@locale export G_FILENAME_ENCODING=@locale
 </code> </code>
-=====Further settings===== 
  
-Some sporadic notes about useful settings for the LXDE-desktop.+==== Resource monitor, LXTask ====
  
-==== LXDE-settings ==== +LXPanel provides a resource-monitor add-in which is quite useful by itself. Furthermore, its standard action upon clicking is to launch LXTask which give a quite complete over-view of running processes. It is installed through the ''lxtask'' package. Alternatively, one may want to link the clicking action to the System Stats entry from *Core's main menu. This is achieved by adding "/usr/local/bin/stats" in the settings.
-The [[http://lxlinux.com|LXDE-Openbox Guide]] is a pretty useful reference for many scenarios.+
  
-==== Openbox settings ==== +==== LXPanel menu entries and buttons for suspending to RAM or disk ====
-Since LXDE is based on Openbox, it may be helpful to consider the [[https://urukrama.wordpress.com/openbox-guide|Openbox guide]] by urukrama.+
  
 +If [[dcore:suspending|suspending to RAM or disk]] works then one may want to make it easily available through a panel button. For that matter, one must first create suitable menu entries.
  
-====Function keys==== +First, create the directory '~/.local/share/pixmaps/' and download a [[http://wiki.tinycorelinux.net/_media/dcore:exittc_green.png|green]] and [[http://wiki.tinycorelinux.net/_media/dcore:exittc_red.png|red]] variant of the original blue icon file for the exit button into it.
- +
-LXDE intercepts ''F11'' before any application and interprets it as command to maximize and un-decorate the window. It is more common to have this function key interpreted by the application itself. +
- +
-The key binding can be changed in '~/.config/openbox/lxde-rc.xml'. Unfortunately the respective section comes as quite an unordered muddle which makes XML particularly hard to read. Nevertheless, the following will lay the binding to Ctrl+Shift+F11 instead. (Searching for "ToggleFullscreen" will get you to the right place.) +
- +
-<code> +
-<keybind key="C-S-F11"><action name="ToggleFullscreen"/></keybind> +
-</code> +
- +
-==== Resource monitor, LXTask ==== +
-The LXDE-panel provides a resource-monitor add-in which is quite useful by itself. Furthermore, its standard action upon clicking is to launch LXTask which give a quite complete over-view of running processes. It is installed through the ''lxtask'' package. +
-==== Screen settings and external monitor ==== +
-The built-in 'lxrandr' does not seem to work on all machines. Occasionally, it only proclaims its inability to find information about the monitor. [[http://christian.amsuess.com/tools/arandr/|Arandr]] is an even better substitute which can be imported and loaded without any issues. It installs an entry in the settings menu. +
- +
-In case that Lxpanel should become invisible due to different monitor sizes, the main menu can still be accessed by pressing Ctrl+Esc. +
- +
-==== Menu entries and panel buttons for suspending to RAM or disk ==== +
-If [[dcore:suspending|suspending to RAM or disk]] works then one may want to make it easily available through a panel button. For that matter, one must first create suitable menu entries after which it is a trivial task of adding them to the application starter containing already the [[dcore:migrating_from_flwm_to_lxde#exit_button|exit button]]. +
- +
-First, create the directory '~/.local/share/pixmaps/' and download a [[http://wiki.tinycorelinux.net/_media/dcore:exittc_green.png|green]] and [[http://wiki.tinycorelinux.net/_media/dcore:exittc_green.png|red]] variant of the original blue icon file for the exit button into it.+
  
 Then create two files ''~/.local/share/applications/pm-{suspend,hibernate}.desktop'' with the following content, respectively. Adapt the path if a different user name applies. If applicable, one may want to use ''pm-suspend-hybrid'' instead of simple ''pm-suspend''. Then create two files ''~/.local/share/applications/pm-{suspend,hibernate}.desktop'' with the following content, respectively. Adapt the path if a different user name applies. If applicable, one may want to use ''pm-suspend-hybrid'' instead of simple ''pm-suspend''.
Line 210: Line 156:
 Categories=System;</code> Categories=System;</code>
  
-LXDE should automatically recognize the changes and show the new menu entries. If not so, then ''lxpanelctl restart'' will force the panel to re-read its configuration files.+LXPanel should automatically recognize the changes and show the new menu entries. If not so, then ''lxpanelctl restart'' will force the panel to re-read its configuration files
 + 
 +Afterwards, it is a trivial task of adding an application starter to the LXPanel items with these menu entries. 
 + 
 +==== LXPanel button for quick shutdown with automatic backup ==== 
 + 
 +In the same light, one may want to creat a blue exit button in the panel that performs a backup of 'mydata.tgz' and shuts the machine down. 
 + 
 +First, create an //executable// file '~/.local/bin/backup-exittc.sh' with the following content: 
 +<code> 
 +#!/bin/sh 
 +filetool.sh -b  
 +exitcheck.sh shutdown 
 +</code> 
 + 
 +Then create a menu entry via '~/.local/share/applications/backup-exittc.desktop', again adapting the path to the home folder if applicable. 
 +<code> 
 +[Desktop Entry] 
 +Name=Exit w/ Backup 
 +Exec=/home/tc/.local/bin/backup-exittc.sh 
 +Icon=/usr/local/share/pixmaps/exittc.png 
 +Type=Application 
 +Categories=System; 
 +</code> 
 + 
 +Finally, add the menu entry to the application launcher in LXPanel. 
 +===== Openbox settings ===== 
 + 
 +It may be helpful to consider one of the many Openbox guides available over the internet. As usual, the [[https://wiki.archlinux.org/index.php/openbox|Arch Wiki]] features a very complete over-view.
  
 ==== Disabling the scroll wheel switching desktops ==== ==== Disabling the scroll wheel switching desktops ====
-Although strictly speaking an issue of Openbox, this quick guide is included here nevertheless. Scrolling on the desktop with either mouse wheel or (inadvertedly) the touchpad is interpreted as a command to switch desktops. This can be changed by commenting out (enclose by ''<!--'' and ''-->'') or deleting the following lines from the section <context name="Desktop"> of '~/.config/openbox/lxde-rc.xml'.+ 
 +Scrolling on the desktop with either mouse wheel or (inadvertedly) the touchpad is interpreted as a command to switch desktops. This can be changed by commenting out (enclose by ''<!--'' and ''-->'') or deleting the following lines from the section <context name="Desktop"> of '~/.config/openbox/lxde-rc.xml'.
 <code> <code>
       <mousebind button="Up" action="Click">                                    <mousebind button="Up" action="Click">                             
Print/export
QR Code
QR Code dcore:migrating_from_flwm_to_lxde (generated for current page)