Wednesday, December 19, 2012

Ubuntu drum roll - silence or be damned!

This post relates to Ubuntu 12.04 lts (Precise) and newer only.

There are plenty of forum posts and conflicting advice out there, but here is what works:




Commands to type:

cd /usr/share/sounds/ubuntu/stereo/
 
sudo mv system-ready.ogg system-ready.ogg.disabled


Shown as a screenshot here:


Now restart your computer, and check the login screen, no longer gives a drum roll.

Before the change - how did everything look (default):



Recap - describing what I did:


The drum roll when the greeter screen (lightdm) is first displayed, is the system file system-ready.ogg

That file system-ready.ogg is a symbolic link to the actual sound file dialog-question.ogg

By moving system-ready.ogg to new name system-ready.ogg.disabled,
the Ubuntu system is unable to find what it has looked for, and you get what you want - silence!

No more drum roll every time the Ubuntu login screen is displayed.


Previous versions of Ubuntu and Gnome:

Ubuntu 11 and earlier did have a more Graphical and user friendly way of disabling the login drum roll.

There are plenty of forum posts about that.

To clarify: Advice that works for 12.04 lts will be different to advice that works for Ubuntu 11 or Ubuntu 10


Monday, November 12, 2012

Clone at revision - Git and Mercurial

This is possible in both Git and Mercurial, although one seems a bit more involved.

Git - clone THEN reset or checkout:



( full clone then: git reset --hard 754bda21cbc5c9044daf7f968fb9b4ffae39e334 )

Mercurial - just do it:



( hg clone -r 34dea6ddb0b927dc223c8cdbab4314a3aac355a7 https://bitbucket.org/wrightsolutions/local-bin )

In the screenshot above, I have cloned as described, and then removed the repo and done a full clone.
By doing this I hoped to illustrate the key difference in changeset counts:
  • 'clone at revision' gave 77 changesets with 99 changes to 83 files
  • full clone gave 79 changesets with 101 changes to 84 files
That should satisfy you that the 'clone at revision' really does what it suggests.


Next I give a signature style explanation of the 'clone at revision' command

hg clone -r <sha1> source_repo

Notes and Further Reading:

But, but, but with Git you can just create an empty git and then

git remote add origin https://github.com/jquery/jquery.git
git fetch origin 754bda21cbc5c9044daf7f968fb9b4ffae39e334

Try it and you might just see the Git complaint...
  'fatal: reference is not a tree: 754bda21cbc5c9044daf7f968fb9b4ffae39e334'

Another nicety of Mercurial is that you can use shortened references (just the first 7 characters) and in most cases that will get you what you want.

Seven character abbreviation example:
  hg clone -r 34dea6d https://bitbucket.org/wrightsolutions/local-bin
( rather than the full 40 character reference used in the example above )

Note: Where you have a huge repository like say sagemath which has 100 active committers, then you might want to use the full 40 character reference to be sure of requesting the right revision



There is an excellent Mercurial Hints and Tips page at OpenOffice.org

See hg.sagemath.org for current Sagemath repository.
Most contributions are currently handled by registered lists I think, but if you have taken the time to really understand the code, then there is place for pull requests also.