User Tools

Site Tools


docs:tips_n_tricks:ubuntu:index.html

Ubuntu

Pages tagged Ubuntu

Make bootable USB stick

As there are detailled descriptions on how to install Ubuntu on an USB stick (aka “pen drive” or “flash drive”) they assume you have a running Ubuntu System.

To install a CD installation image on an USB stick with any Linux distro, just use dd to put the *.img file on the sticks device (i.e. not on a partition).

dd if=/path/to/ubuntu-X.XX.X-Arch.img of=/dev/sdX bs=1M

After this, you can run your favourite *fdisk and add partions to use the remaining space on the stick for other purposes.

Make resume work

For some reason, the hibernated state was ignored on system start on an Ubuntu 11.10 laptop I am maintaining. On this system, the problem was solved by installing uswsusp:

aptitude install uswsusp

Other resources on the web indicate, that on system start, the swap partition might not be identified. It was recommended to identifify the UUID of the swap partition by

blkid

and use this in configuration files to specify the partition. See

for more details.

Installing cryptsetup (by dependencies, not using it) seemed to break resume on one laptop (it freezed while reuming after heaving read image “successfully”). I didn't find any solution but removing cryptsetup.

Warnings after installing cryptsetup

Running update-initrd throwed some warnings regarding

cryptsetup: WARNING: found more than one resume device candidate:
                     vg_sys1-lv_SWAP0
                     805ec481-cda1-4548-b7b4-327de62ed4fb

While vg_sys1-lv_SWAP0 was the right resume device in terms of lvm, the UUID 805ec481-cda1-4548-b7b4-327de62ed4fb was not known to the system (any more). Some googling1) showed, that /etc/initramfs-tools/conf.d/resume might be involved - in my case, it contained the UUID mentioned by update-initrd. I got rid of the warning above by editing this, unfortunately this didn' help in the resume problem mentioned above.

Enable menu entry "Hibernate"

This is just to enable the item, this does not resolve any problems that may arise, when you select it!

Ubuntu 12.10,13.04

Create the file /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate. pkla with this content:

[Re-enable hibernate by default]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes

and reboot ;-)

Ubuntu 13.10

Create the file /var/lib/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla with the following lines

[Re-enable hibernate by default in upower]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes

[Re-enable hibernate by default in logind]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate
ResultActive=yes

and rebbot ;-)

Inhibit Hibernate when running XEN

Create the file /etc/pm/sleep.d/00_xen containing the following lines:

#!/bin/sh

mode="$1"
xendir=/proc/xen

case "$mode" in
  "hibernate") if [ -d "$xendir" ]
               then
                  echo "$0: Obviously running XEN, as $xendir exists"
                  echo "$0: Inhibiting $mode"
                  exit 1
               fi
               ;;
esac

Recover from NetworkManager problems

To restart the NetworkManager, just enter

~ # restart network-manager

One problem I solved this way were the network menus claiming that wifi was disabled while it could easily used after being configured by ifconfig and iwconfig.

ss

Enable Headset for high quality audio

Applied on Ubuntu 14.04

  • Make sure, bluetooth hardware is available
  • Install all kind of bluetooth and bluez stuff from aptitude
  • run as root pactl load-module module-bluetooth-discover
  • Edit /etc/bluetooth/audio.conf:

[General]

    :\\
    :\\
    ''Disable = socket''\\
    :\\
    :\\
    ''Autoconnect=true''\\
    :\\
    :\\

Get rid of 'Gtk-Message: Failed to load module "overlay-scrollbar"'

Searching the we led me to Ask Ubuntu. In my case, the setting was the environment variable GTK2_MODULES:

~ $ echo $GTK2_MODULES                                   
overlay-scrollbar
~ $

Following the basic idea, I followed the answer linked above and found

~ $ cat /etc/X11/Xsession.d/81overlay-scrollbar
# This file is sourced by Xsession(5), not executed.
 
if [ -z "$GTK2_MODULES" ] ; then
        GTK2_MODULES="overlay-scrollbar"
else
        GTK2_MODULES="$GTK2_MODULES:overlay-scrollbar"
fi
 
export GTK2_MODULES
~ $ dpkg --search /etc/X11/Xsession.d/81overlay-scrollbar
overlay-scrollbar: /etc/X11/Xsession.d/81overlay-scrollbar
~ $ dpkg --listfiles overlay-scrollbar
/.
/etc
/etc/X11
/etc/X11/Xsession.d
/etc/X11/Xsession.d/81overlay-scrollbar
/usr
/usr/share
/usr/share/glib-2.0
/usr/share/glib-2.0/schemas
/usr/share/glib-2.0/schemas/com.canonical.desktop.interface.gschema.xml
/usr/share/glib-2.0/schemas/com.canonical.desktop.interface.enums.xml
/usr/share/doc
/usr/share/doc/overlay-scrollbar
/usr/share/doc/overlay-scrollbar/changelog.Debian.gz
/usr/share/doc/overlay-scrollbar/copyright
~ $ dpkg --list 'overlay-scrollbar*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                       Version            Architecture       Description
+++-==========================-==================-==================-=========================================================
ii  overlay-scrollbar          0.2.17.1+16.04.201 all                Scrollbar overlay - configuration
rc  overlay-scrollbar-gtk3:amd 0.2.16+r359+15.04. amd64              GTK 3 module for overlay scrollbars
~ $

continue as root:

~ # dpkg --purge overlay-scrollbar-gtk3
(Reading database ... XYZYXZ files and directories currently installed.)
Removing overlay-scrollbar-gtk3:amd64 (0.2.16+r359+15.04.20150319-0ubuntu1) ...
Purging configuration files for overlay-scrollbar-gtk3:amd64 (0.2.16+r359+15.04.20150319-0ubuntu1) ...
~ # apt-mark auto overlay-scrollbar
overlay-scrollbar set to automatically installed.
~  # aptitude install
The following packages will be REMOVED:
  overlay-scrollbar{u}
0 packages upgraded, 0 newly installed, 1 to remove and 400 not upgraded.
Need to get 0 B of archives. After unpacking 23.6 kB will be freed.
Do you want to continue? [Y/n/?] y
(Reading database ... 606065 files and directories currently installed.)
Removing overlay-scrollbar (0.2.17.1+16.04.20151117-0ubuntu1.16.04.1) ...
Processing triggers for libglib2.0-0:amd64 (2.48.2-0ubuntu1) ...

~ # dpkg --purge overlay-scrollbar                            
(Reading database ... XYZXYZ files and directories currently installed.)
Removing overlay-scrollbar (0.2.17.1+16.04.20151117-0ubuntu1.16.04.1) ...
Purging configuration files for overlay-scrollbar (0.2.17.1+16.04.20151117-0ubuntu1.16.04.1) ...
~ # 

Well, the last steps could have been simplified by just dpkg –purge overlay-scrollbar2) - but I wanted to have some fun 8-)

2)
apt-get purge overlay-scrollbar would do it as well
docs/tips_n_tricks/ubuntu/index.html.txt · Last modified: 19.09.2018 10:54 UTC by peter