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:suspending [2018/07/15 09:52] – [Adding menu entries to Openbox for suspending] sm8psdcore:suspending [2018/07/20 16:37] (current) – + [X-tweaks] sm8ps
Line 31: Line 31:
 Upon hibernating, dCore risks to over-write the hibernation image of a different installation. To overcome this issue, one can create a separate swap partition for dCore and selectively disable the other swap partitions by adding ''sudo swapoff <PARTITION>'' to '/opt/bootsync.sh'. Options for specifying the partition are listed by ''swapoff -h''. Upon hibernating, dCore risks to over-write the hibernation image of a different installation. To overcome this issue, one can create a separate swap partition for dCore and selectively disable the other swap partitions by adding ''sudo swapoff <PARTITION>'' to '/opt/bootsync.sh'. Options for specifying the partition are listed by ''swapoff -h''.
  
-==== Adding menu entries to Openbox for suspending ====+==== X-tweaks ==== 
 +Start-up scripts under '~/.X.d.' risk not being executed upon wake-up or resume. To have them triggered anew, they need to be executed by pm-utils via a hook. For this purpose, create an executable file '/usr/lib/pm-utils/sleep.d/10XdC' with the following content adapted to your needs: 
 +<code> 
 +#!/bin/sh 
 +case "$1" in                                                         
 +        hibernate|suspend)                                           
 +                ;;                                                   
 +        thaw|resume)                                               
 +                ~/.X.d/<SCRIPT> 
 +                ;; 
 +        *)         
 +                ;; 
 +esac    
 +exit $? 
 +</code> 
 + 
 +===== Adding menu entries to Openbox for suspending =====
 The commands for suspending and hibernating can be made available through the Openbox menu in a similar fashion to the menu tweaks applied to [[dcore:migrating_from_flwm_to_lxde?&#openbox-menu|LXDE]]. For LXDE itself, a more elaborate [[dcore:migrating_from_flwm_to_lxde?&#menu_entries_and_panel_buttons_for_suspending_to_ram_or_disk|outline]] is available. The commands for suspending and hibernating can be made available through the Openbox menu in a similar fashion to the menu tweaks applied to [[dcore:migrating_from_flwm_to_lxde?&#openbox-menu|LXDE]]. For LXDE itself, a more elaborate [[dcore:migrating_from_flwm_to_lxde?&#menu_entries_and_panel_buttons_for_suspending_to_ram_or_disk|outline]] is available.
  
Line 54: Line 70:
 </code> </code>
  
-Then add a reference to this file in '~/.config/openbox/rc.xml' (or '~/.config/openbox/lxde-rc.xml' when using LXDE). That is, add ''<file>pm-utils.xml</file>'' somewhere to the ''<menu>''-section (around line 601 in 'rc.xml', line 541 in 'lxde-rc.xml').+Then add a reference to this file in '~/.config/openbox/rc.xml' (or '~/.config/openbox/lxde-rc.xml' when using LXDE). That is, add ''<file>pm-utils.xml</file>'' somewhere to the ''<menu>''-section (around line 601 in 'rc.xml', line 541 in 'lxde-rc.xml'//before// the closing ''<file>menu.xml</file>''.
  
 Finally, make the menu available by adding the following to the section ''<menu id="root-menu" label="Openbox 3">'' of '~/.config/openbox/menu.xml' at the desired location. Finally, make the menu available by adding the following to the section ''<menu id="root-menu" label="Openbox 3">'' of '~/.config/openbox/menu.xml' at the desired location.
Print/export
QR Code
QR Code dcore:suspending (generated for current page)