Sunday, November 3, 2019

Change font DPI in KDE from a script

The following script works in Kubuntu 19.10:
#!/bin/bash
dpi=$1
re='^[0-9]+$'
if ! [[ $dpi =~ $re ]] ; then
   echo "error: Not a number" $dpi >&2; exit 1
fi
sed --in-place "s/forceFontDPI=.*/forceFontDPI=$dpi/" \

   $HOME/.config/kcmfonts
xrdb -edit /tmp/.Xresources
sed --in-place "s/Xft.dpi:.*/Xft.dpi:   $dpi/" /tmp/.Xresources
xrdb -load /tmp/.Xresources
dbus-send --session --type=signal /KDEPlatformTheme \

   org.kde.KDEPlatformTheme.refreshFonts

For older versions of Kubuntu the last command (dbus-send ...) was not necessary.

Sunday, October 5, 2014

Eclipse Luna SR1 on Kubuntu 14.4

Luna SR1 crashes when using oxygen-gtk. (bug report)
The workaround is described in comment 16:
Edit /usr/share/themes/oxygen-gtk/gtk-2.0/gtkrc as follows:
GtkComboBox::appears-as-list = 1
GtkComboBox::appears-as-list = 0

Intel Centrino Advanced-N 6205 under Linux

The driver iwlwifi seems to have a problem which leads to frequent crashes of wpa_supplicant with this card. The crashes disappeared after turning off hardware crypto.
Add the following line to /etc/modprobe.d/iwlwifi.conf:
options iwlwifi swcrypto=1

Friday, October 3, 2014

Building a p2 repository with tycho

  1. Use packing type
      <packaging>eclipse-repository</packaging>
  2. Use plugin
      <build>
        <plugins>
          <plugin>
            <groupId>org.eclipse.tycho</groupId>
            <artifactId>tycho-p2-publisher-plugin</artifactId>
            <version>${tycho-version}</version>
            <configuration>
              <publishArtifacts>true</publishArtifacts>
            </configuration>
          </plugin>
        </plugins>
      </build>
  3. What's included in the repository depends on which files are present in the project. The plugin executes 2 commands tycho-p2-publisher-plugin:publish-products and tycho-p2-publisher-plugin:publish-categories. It seems that publish-products looks a a *.product file in the project and adds all features referenced in this file to the repository. The publish-categories command searches for a categories.xml and adds the features referenced here to the repository. To limit the repository content to only the new plugins without any dependencies it is best to create a separate project with just a categories.xml file for the repository and use a different project for the product build. This way the product can contain additional eclipse features that need not be part of the repository.

Sunday, November 10, 2013

Fix Broken Bluetooth After Sleep in Kubuntu 13.10

Buetooth is broken after sleep with 3.11 kernel used in Kubuntu 13.10. The workaround:

Create a file /etc/pm/sleep.d/10_bluetooth with the following content

 #!/bin/bash
#Code from http://ubuntuforums.org/showthread.php?t=1387211

. /usr/lib/pm-utils/functions

case "$1" in
    hibernate|suspend)
        rfkill block bluetooth
        ;;
    thaw|resume)
        rfkill unblock bluetooth
        ;;
    *)
        ;;
esac

exit



Set permissions

chmod 755 10_bluetooth

Dell BH200 Headset in Kubuntu 13.10

The Dell BH200 bluetooth headset doesn't pair. There's a bug in the headset. The workaroud:

echo 'Y' > /sys/module/bluetooth/parameters/disable_esco

Monday, July 22, 2013

Debugging OCaml on Ubuntu

A Debian patch breaks OCaml debugging on Ubuntu by messing with the bytecode file format. See /usr/share/doc/ocaml-nox/README.Debian for the fix. Set OCAML_COMPAT=c in .bashrc.