Both sides previous revisionPrevious revisionNext revision | Previous revision |
dcore:migrating_from_flwm_to_lxde [2018/07/15 16:38] – various edits sm8ps | dcore:migrating_from_flwm_to_lxde [2018/07/15 17:30] (current) – +[quick shutdown button] sm8ps |
---|
==== LXPanel menu entries and buttons for suspending to RAM or disk ==== | ==== LXPanel menu entries and 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]]. | 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. |
| |
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. | 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. |
| |
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''. |
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. | 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 ===== | ===== Openbox settings ===== |
| |