SilverWav's Journal

The best is yet to come…

Notify-osd – Now with 70% Less Annoy :-)

with 5 comments

Reduce the notify-osd time-out to 3 seconds, rather than the default 10.

Its amazing how much this changed my appreciation of the notifications…
I have found the annoyance is mainly based on them being on screen too long.

Tested on Lucid 10.04 64bit – experimental.

Quick Fix: Add the PPA and update:

sudo add-apt-repository ppa:silverwave/apps-0
sudo apt-get update
sudo apt-get install notify-osd

______________________________

If you:
Want to create your own package…
Would like to see a worked example…
Want to see how to alter an existing package…
Or would like an explanation of how to Publish a package to your PPA.
…carry on reading.

______________________________

Packaging

Install Packaging Tools

sudo apt-get install devscripts build-essential fakeroot debhelper gnupg pbuilder dh-make ubuntu-dev-tools diff patch cdbs quilt lintian

Create a folder to work in

sil:~$ mkdir pak
sil:~$ cd pak
sil:~/pak$ ls
sil:~/pak$


Test the display time of notify-osd

sudo apt-get install libnotify-bin
notify-send "test" "Write some notify-osd  text on screen... for How Long?!"

Download the source for notify-osd

sil@hyd:~/pak$ apt-get source notify-osd
Reading package lists... Done
Building dependency tree
Reading state information... Done
NOTICE: 'notify-osd' packaging is maintained in the 'Bzr' version control system at:
http://bazaar.launchpad.net/~ubuntu-desktop/notify-osd/ubuntu
Please use:
bzr get http://bazaar.launchpad.net/~ubuntu-desktop/notify-osd/ubuntu
to retrieve the latest (possibly unreleased) updates to the package.
Need to get 623kB of source archives.
Get: 1 http://gb.archive.ubuntu.com/ubuntu/ lucid/main notify-osd 0.9.29-0ubuntu2 (dsc) [1,305B]
Get: 2 http://gb.archive.ubuntu.com/ubuntu/ lucid/main notify-osd 0.9.29-0ubuntu2 (tar) [608kB]
Get: 3 http://gb.archive.ubuntu.com/ubuntu/ lucid/main notify-osd 0.9.29-0ubuntu2 (diff) [14.4kB]
Fetched 623kB in 2s (227kB/s)
gpgv: Signature made Wed 14 Apr 2010 11:59:03 BST using DSA key ID A2D7D292
gpgv: Can't check signature: public key not found
dpkg-source: warning: failed to verify signature on ./notify-osd_0.9.29-0ubuntu2.dsc
dpkg-source: info: extracting notify-osd in notify-osd-0.9.29
dpkg-source: info: unpacking notify-osd_0.9.29.orig.tar.gz
dpkg-source: info: applying notify-osd_0.9.29-0ubuntu2.diff.gz
dpkg-source: info: upstream files that have been modified:
 notify-osd-0.9.29/autogen.sh
 notify-osd-0.9.29/data/org.freedesktop.Notifications.service.in
 notify-osd-0.9.29/m4/python.m4
 notify-osd-0.9.29/src/bubble.c
 notify-osd-0.9.29/src/send-test-notification.sh
 notify-osd-0.9.29/tests/notifyosd.py
 notify-osd-0.9.29/tests/tests.suppression
sil@hyd:~/pak$

List the files and folders

sil@hyd:~/pak$ ls
notify-osd-0.9.29
notify-osd_0.9.29.orig.tar.gz
notify-osd_0.9.29-0ubuntu2.diff.gz
notify-osd_0.9.29-0ubuntu2.dsc

Setup .bashrc example

sil@hyd:~$ gedit .bashrc

Add these lines:

export DEBFULLNAME="silverwave (Launchpad OpenPGP Key)"
export DEBEMAIL="silverwav@gmail.com"

Setup .pbuilderrc example

sil@hyd:~$ gedit .pbuilderrc

Add these lines:

COMPONENTS="main restricted universe multiverse"

______________________________

Update Package

Change notify-osd time-out value

sil@hyd:~/pak$ cd notify-osd-0.9.29
sil@hyd:~/pak/notify-osd-0.9.29$ gedit src/defaults.c

Find:

#define DEFAULT_ON_SCREEN_TIMEOUT    10000

Change to:

#define DEFAULT_ON_SCREEN_TIMEOUT    3000

Save and close gedit.

Update the debian changelog with debchange (dch -i)

sil@hyd:~/pak/notify-osd-0.9.29$ dch -i

Update Version Number:

0.9.29-0ubuntu2ppa1

Add Change Details:

  * src/defaults.c:
    - Changed DEFAULT_ON_SCREEN_TIMEOUT from 10000 to 3000

Note: Your email needs to be perfect…

This is correct for me:

 -- silverwave (Launchpad OpenPGP Key) <silverwav@gmail.com>  Sat, 08 May 2010 18:50:00 +0100

This would cause gpg to fail later when attempting to sign the files.

 -- silverwave <silverwav@gmail.com>  Sat, 08 May 2010 18:50:00 +0100

Save and close nano (ctrl+x).

Update the source package (debuild -S -sa)

sil@hyd:~/pak/notify-osd-0.9.29$ debuild -S -sa

You will be asked for your gpg passphrase twice.
Then you should see a success message.

Successfully signed dsc and change files

Updated Files

sil@hyd:~/pak/notify-osd-0.9.29$ cd ..
sil@hyd:~/pak$
sil@hyd:~/pak$ ls
notify-osd-0.9.29
notify-osd_0.9.29-0ubuntu2.diff.gz
notify-osd_0.9.29-0ubuntu2.dsc
notify-osd_0.9.29-0ubuntu2ppa1.diff.gz
notify-osd_0.9.29-0ubuntu2ppa1.dsc
notify-osd_0.9.29-0ubuntu2ppa1_source.build
notify-osd_0.9.29-0ubuntu2ppa1_source.changes
notify-osd_0.9.29.orig.tar.gz

Pbuilder initial environment setup

sil@hyd:~/pak$ sudo pbuilder create

Build package with pbuilder

sil@hyd:~/pak$ sudo pbuilder build notify-osd_0.9.29-0ubuntu2ppa1.dsc

Once pbuilder has completed the build you can see the .deb here:

/var/cache/pbuilder/result

______________________________

Uploading a package to a PPA

sil@hyd:~/pak$ dput ppa:silverwave/apps-0 notify-osd_0.9.29-0ubuntu2ppa1_source.changes
Checking signature on .changes
gpg: Signature made Sat 08 May 2010 18:54:45 BST using RSA key ID 03187548
gpg: Good signature from "silverwave (Launchpad OpenPGP Key) <silverwav@gmail.com>"
Good signature on /home/sil/pak/notify-osd_0.9.29-0ubuntu2ppa1_source.changes.
Checking signature on .dsc
gpg: Signature made Sat 08 May 2010 18:53:20 BST using RSA key ID 03187548
gpg: Good signature from "silverwave (Launchpad OpenPGP Key) <silverwav@gmail.com>"
Good signature on /home/sil/pak/notify-osd_0.9.29-0ubuntu2ppa1.dsc.
Package includes an .orig.tar.gz file although the debian revision suggests
that it might not be required. Multiple uploads of the .orig.tar.gz may be
rejected by the upload queue management software.
Uploading to ppa (via ftp to ppa.launchpad.net):
  Uploading notify-osd_0.9.29-0ubuntu2ppa1.dsc: done.
  Uploading notify-osd_0.9.29.orig.tar.gz: done.    
  Uploading notify-osd_0.9.29-0ubuntu2ppa1.diff.gz: done.  
  Uploading notify-osd_0.9.29-0ubuntu2ppa1_source.changes: done.
Successfully uploaded packages.
sil@hyd:~/pak$ 

Email confirmation

[PPA silverwave-apps-0] [ubuntu/lucid] notify-osd 0.9.29-0ubuntu2ppa1 (Accepted)
Launchpad PPA
 to me
	
show details 11:30 PM (9 minutes ago)
	
Accepted:
 OK: notify-osd_0.9.29.orig.tar.gz
 OK: notify-osd_0.9.29-0ubuntu2ppa1.diff.gz
 OK: notify-osd_0.9.29-0ubuntu2ppa1.dsc
    -> Component: main Section: x11

Format: 1.8
Date: Sat, 08 May 2010 18:50:00 +0100
Source: notify-osd
Binary: notify-osd
Architecture: source
Version: 0.9.29-0ubuntu2ppa1
Distribution: lucid
Urgency: low
Maintainer: DX Team <dx-team@lists.ubuntu.com>
Changed-By: silverwave (Launchpad OpenPGP Key) <silverwav@gmail.com>
Description:
notify-osd - daemon that displays passive pop-up notifications
Changes:
notify-osd (0.9.29-0ubuntu2ppa1) lucid; urgency=low

 * src/defaults.c:
   - Changed DEFAULT_ON_SCREEN_TIMEOUT from 10000 to 3000
Checksums-Sha1:
e51a110171de8622c325ab56c598ba15322e3e9b 1613 notify-osd_0.9.29-0ubuntu2ppa1.dsc
795ecc42602b46390437c3787f3eb94f6fd562fc 607576 notify-osd_0.9.29.orig.tar.gz
650adb6b4695a50da86fe46f7c877ada1defe0a1 14612 notify-osd_0.9.29-0ubuntu2ppa1.diff.gz
Checksums-Sha256:
17e7c4c6e4d41a2d321ad6a23a2671f854c299b656bb22e6894edeeda65ee83c 1613 notify-osd_0.9.29-0ubuntu2ppa1.dsc
7b8d79fc6dce7002fb3639ae7e9ad85e5f5063fbcc62fe27b80700142a0d7fd7 607576 notify-osd_0.9.29.orig.tar.gz
02903f5080d5a58bf89f6220294e62a30e342a202f8e67fd7f80fa7c5e609f25 14612 notify-osd_0.9.29-0ubuntu2ppa1.diff.gz
Files:
79e54b412cf3029013b4cdbef8ae01ce 1613 x11 optional notify-osd_0.9.29-0ubuntu2ppa1.dsc
13df20eb3c6d06c17eef07400e1650d8 607576 x11 optional notify-osd_0.9.29.orig.tar.gz
9c8f64588ed44e0c93142bd4cf5c52f2 14612 x11 optional notify-osd_0.9.29-0ubuntu2ppa1.diff.gz


--
You are receiving this email because you are the uploader of the above
PPA package.

Check the PPA

https://launchpad.net/~silverwave/+archive/apps-0/+builds?build_state=built

1  → 2  of 2 results
[FULLYBUILT] 	i386 build of notify-osd 0.9.29-0ubuntu2ppa1 in ubuntu lucid RELEASE
Build started 18 minutes ago on samarium (virtual) and finished 13 minutes ago taking five minutes — see the log
[FULLYBUILT] 	amd64 build of notify-osd 0.9.29-0ubuntu2ppa1 in ubuntu lucid RELEASE
Build started 20 minutes ago on americium (virtual) and finished 15 minutes ago taking five minutes — see the log 

https://launchpad.net/~silverwave/+archive/apps-0/+packages
Expanding the package you may see this message:

Note: Some binary packages for this source are not yet published in the repository.

You will need to wait until the binary packages are build before testing.

Add PPA

sil@hyd:~/pak$ sudo add-apt-repository ppa:silverwave/apps-0
[sudo] password for sil: 
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv 4E0614F88874AF754D66E9C1EBD6062C6DE6117C
gpg: requesting key 6DE6117C from hkp server keyserver.ubuntu.com
gpg: key 6DE6117C: "Launchpad PPA for SilverWav" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1

Check policy

sil@hyd:~/pak$ sudo apt-get update
...
sil@hyd:~/pak$ apt-cache policy notify-osd
notify-osd:
  Installed: 0.9.29-0ubuntu2
  Candidate: 0.9.29-0ubuntu2ppa1
  Version table:
     0.9.29-0ubuntu2ppa1 0
        500 http://ppa.launchpad.net/silverwave/apps-0/ubuntu/ lucid/main Packages
 *** 0.9.29-0ubuntu2 0
        500 http://gb.archive.ubuntu.com/ubuntu/ lucid/main Packages
        100 /var/lib/dpkg/status

Install notify-osd – Now with 70% Less Annoy :-)

sil@hyd:~/pak$ sudo apt-get install notify-osd
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be upgraded:
  notify-osd
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 177kB of archives.
After this operation, 0B of additional disk space will be used.
Get: 1 http://ppa.launchpad.net/silverwave/apps-0/ubuntu/ lucid/main notify-osd 0.9.29-0ubuntu2ppa1 [177kB]
Fetched 177kB in 0s (416kB/s)    
(Reading database ... 185774 files and directories currently installed.)
Preparing to replace notify-osd 0.9.29-0ubuntu2 (using .../notify-osd_0.9.29-0ubuntu2ppa1_amd64.deb) ...
Unpacking replacement notify-osd ...
Setting up notify-osd (0.9.29-0ubuntu2ppa1) ...

Done!

Note: Here is a link to a video that’s a great help, Learning MOTU – Upgrading Packages

Written by SilverWav

May 8, 2010 at 2:39 pm

5 Responses

Subscribe to comments with RSS.

  1. I think it’s an enormous failure in design to not have any kind of configuration file to go with the application. These guides about tweaking notify-osd pop up every now and then indicating the need for a proper configuration method.

    This stuff shouldn’t be fixed by recompiling the entire package manually.

    linduxed

    May 10, 2010 at 4:14 pm

    • thanks for the comment linduxed,

      Well I haven’t got the link to hand but Mark has said he would be happy to accept a patch to allow configuration through gconf… I’ll try to dig it out :-)

      I agree that it certainly would be helpful, but it is a classic case of open source at least allowing you to scratch your own itch… that is this is annoying but at least I can change it.

      Also Canonical provided the distro, Launchpad, the free PPA’s, ubuntuforums and the MOTO packaging howto video…

      So I dont think I have much to complain about TBH ;-)

      ___
      Oh and PPA’s are now 2GB by default (and can be deleted!). LOL

      ___

      NotifyOSD improvements
      From: Mark Shuttleworth

      If those pieces are cleanly implemented, and could move to using gconf, then I’d support them being merged into notify-osd. We’d not put a UI on them, but folks using Tweak interfaces could play with them.

      SilverWav

      May 10, 2010 at 5:03 pm

  2. The ubuntu devs have showed just how much they do not care about letting the users decide on what they want..
    https://bugs.launchpad.net/ubuntu/+source/notify-osd/+bug/390508

    elm

    May 10, 2010 at 6:43 pm

    • Hi elm,

      Well that’s certainly an interesting thread…

      I was initially more concerned with the placement of notify.

      But I found that just reducing the timeout stopped notify being so annoying, without any further work needed.

      Just goes to show how unintuitive all this can be :-)

      And that there is no substitute for actual testing.

      SilverWav

      May 10, 2010 at 8:29 pm

  3. […] Notify-osd – Now with 70% Less Annoy […]


Leave a comment