February 4, 2017

Customize GRUB2 menu colors in Ubuntu

The procedure for customizing GRUB2 menu colors in Ubunt is as follows:
1) Edit (or create) the file "/lib/plymouth/themes/default.grub" to add the appropriate menu color information.
Example:
# Color of the highlighted menu entry and its background within the menu box
set menu_color_highlight=yellow/dark-gray
# Color of non-selected menu entries within the menu box
set menu_color_normal=black/light-gray
# Color of the text and background outside the menu box
set color_normal=light-gray/black
2) Regenerate the the grub configuration file by running 'sudo update-grub'.

Customize other OS menu entries in GRUB2

The procedure for customizing menu entries for other OSes in GRUB2 is as follows:
1) Copy the menu entry you wish to customize from "/boot/grub/grub.cfg"
to "/etc/grub.d/40_custom".
2) Change the name of the menu entry as you wish.
3) Disable the OS prober to prevent regenerating the old menu entry by using the option "GRUB_DISABLE_OS_PROBER=true" in "/etc/default/grub".
4) Regenerate the the grub configuration file by running 'sudo update-grub'.

February 3, 2017

Enable Keychain use for ssh in macOS

In order to enable the use of passwords/passphrases stored by the Keychain Access service on macOS, the following specific ssh option is available starting with macOS 10.12:
  UseKeychain=yes

The setting can be provided either on the command line, or in the ssh configuration files (/etc/ssh/ssh_config, ~/.ssh/config).

May 23, 2016

Force disk checking during boot in Ubuntu

In order to force disk checking during boot in Ubuntu and other modern
operating systems, the 'fsck.mode=force' kernel parameter needs to be
added before booting.

In Ubuntu this is done as follows:
1) At the GRUB screen, press 'e' to edit the kernel parameters.
2) Add 'fsck.mode=force' at the end of the line that starts with the
keyword 'linux'.
3) Press 'Ctrl+x' or 'F10' to boot with the updated kernel parameters.

Note that only the partitions that have '1' or '2' as the fsck option in
'/etc/fstab' will be checked. The value '1' is reserved for the boot
partition, and all the other partitions to be checked should use the
value '2'.

April 2, 2016

Fix automatic suspend in Lubuntu

If you get the error "Authentication required before suspend" when the PC tries to suspend automatically, the actions below are required.

In the file "/usr/share/polkit-1/actions/org.freedesktop.login1.policy" search the section "<action id="org.freedesktop.login1.suspend">" and change the corresponding lines as below:

<defaults>
<allow_any>yes</allow_any>
<allow_inactive>yes</allow_inactive>
<allow_active>yes</allow_active>
</defaults>

An alternative solution, which is supposed to be permanent since the file above is updated occasionally, is given next.

Go to "/etc/polkit-1/localauthority/50-local.d/" and create a file named for instance "com.0.enable-automatic-suspend.pkla". Put the following text into the file:

[Enable automatic suspend]
Identity=unix-user:*
Action=org.freedesktop.login1.suspend
ResultAny=yes

Based on http://askubuntu.com/questions/785509/hibernating-from-cron/786225#786225