Deactivate avahi daemon

I have updated my Ubuntu Gnome to version 16.10. Since then I get annoyed by the “printer detection system”. In the notification bar, a notification appeared about a newly detected printer. It even was added to the Printer list and couldn’t be removed in the CUPS administration menu (http://localhost:631)

After some search, I’ve found that the responsible service is the avahi-daemon (which also crashed periodically). The avahi daemon gets started on boot time and is hard to stop. On my machine (Ubuntu Gnome 16.10, Kernel 4.8.0-26-generic), the following command worked out well:

sudo systemctl disable avahi-daemon.service

Since then, I haven’t seen any notification about new printer nor seen any side effects.

Thanks to Stackexchange, http://unix.stackexchange.com/questions/255197/how-to-disable-avahi-daemon-without-uninstalling-it.

More infos about the SystemD and the old SysV system are found on http://blog.jorgenschaefer.de/2014/07/why-systemd.html.

Bluetooth Headset

I have bought a nice bluetooth headset, the Philips SHB 3060.
I installed it on Fedora 23 and it worked like a charm.
However, on Ubuntu Gnome 15.10, I was getting frustrated. In the settings Audio -> Test i only could had the option Mono. Listening to music sounded horrible.

So, somehow there was either e problem on Gnome 3.16 or in the configuration of Debian/Ubuntu.
Lukely, I found a link and I did what was descripted in the troubleshooting section*

I copy the part, in case the page no longer exists ( (c) to debian.org). Small adaptions are made to match to my configuration

Troubleshooting

Bluetooth headset is connected, but ALSA/PulseAudio fails to pick up the connected device or there’s no device to pick. This happens because GDM captures A2DP sink on session start, as GDM needs pulseaudio in the gdm session for accessibility. For example, the screen reader requires it.

In order to prevent GDM from capturing the A2DP sink on session start, edit /var/lib/gdm/.config/pulse/client.conf (or create it, if it doesn’t exist):

autospawn = no
daemon-binary = /bin/true

After that you have to grant access to this file to Debian-gdm user:

# chown gdm:gdm /var/lib/gdm/.config/pulse/client.conf

In order to auto-connect a2dp for some devices, add this to /etc/pulse/default.pa:

load-module module-switch-on-connect

Reboot.

Continue reading “Bluetooth Headset”

Customize mouse M560 on linux

I bought a new Logitech mouse, the M560 wireless. What I wanted was that two keys of my mouse are ”History Forward” and ”History backward” action in my browser. Unfortunately, Logitech Inc. does not provide a sufficient linxu driver. Therefore, I had to customize the ouse on my onw, which tooks a bit of research.

Needed packages

  • xbindkeys
  • xautomation

Install these tools eihter with (Fedora) dnf install xbindkeys xautomation or (Debian)
apt-get install xbindkeys xautomation

Configurate xbindkeys

  1. To find out which keys on the mouse are the forward and backwards buttons. The programm xev does this job.. Execute xev | grep button and click in the opened window. The number after the word button is the button number.xev output
  2. Configure the xbindkeys configuration. To do so, execute
    xbindkeys --defaults ~/.xbindkeysrc
  3. Open the file .xbindkeysrc. The History forward and backward action can be achieved with the keyboard combination Alt + Right and Alt + Left. So a click on the mouse button (in my case number 10 and 11) should send this signal. Thats were the programm xte comes into play. In the opened file, the following lines have to be added:
    "xte 'keydown Alt_L' 'key Left' 'keyup Alt_L'"
    b:11
    "xte 'keydown Alt_L' 'key Right' 'keyup Alt_L'"
    b:10
    The first two lines associate the button nr 11 to the history back action. The second line thas the sam ewith the history forward action.
    Save the file.
  4. To test the configuration, execute xbindkeys -n -v
  5. . This will start xbindkeys non-daemonized with a verbose output. To start xbindkeys normally, execute xbindkeys

  6. Set xbindkeys to the autostart. One possibility is to add a desktop-file in ~/.config/autostart/.
    [Desktop Entry]
    Name=xbindkeys
    GenericName=xbindkeys
    Comment=Start xbindkeys at login
    Exec=/usr/bin/xbindkeys
    Terminal=False
    Type=Application
    X-GNOME-Autostart-enabled=true

 

 

Links

A lot of information are gained through the following links

  • https://wiki.ubuntuusers.de/xbindkeys
  • https://ask.fedoraproject.org/en/question/59485/fedora-21-doesnt-come-with-gnome-session-properties/

Plugin test

WordPress has some nice plugins

One is the WP Latex plugin, which allows to use some latex.

P_{lm}\left(\xi\right) = \left(1-\xi^2 \right)^{m/2} \frac{d^m}{d\xi^m} \frac{1}{2^l l!} \frac{d^l}{d\xi^l} \left(\xi^2-1\right)^l

 

A further one is the WP Syntax.

    public class Hello {
      public static void main(String[] args) {
        System.out.println("Hello World!");
      }
    }
    

Moved to WordPress

Now, here I am, moving to WordPress.
Having used several different CMS including pluck (ceased development) and drupal (only v6 possible on n.ethz) I try word press and hopefully will have better experiences and less manual maintenance (ooh, drupal, I won’t miss your periodic appearing security bugs).

But I want to keep the freedom to customize my theme, which seemed to be provided. So, go on WordPress, surprise me!