October 1st, 2020
Back in February I wrote about xcowsay 1.5 which had been updated with Gtk3 support. At the time I knew it would cause problems with non-compositing window managers but I wasn’t sure if this would affect anyone. Well, I received complaints. I always hate it when software updates break otherwise working systems so I’d like to apologise for this and it’s now fixed with xcowsay 1.5.1.
The problem was caused by Gtk3 removing the
gtk_widget_shape_combine_mask function which xcowsay used for transparency around the cow and the bubble. In xcowsay 1.5 I simply added an alpha channel to the windows and the compositor will blend them with the desktop underneath. However without a compositor it results in ugly black squares like this:
To work around this xcowsay 1.5.1 grabs the pixels from the root window and uses that as the background to draw the cow and bubble onto. This works fine unless the windows underneath move while the cow is displayed, but I think in practice this is unlikely to cause a problem.
Download the new release here: xcowsay-1.5.1.tar.gz
This release is also signed with with my PGP key: xcowsay-1.5.1.tar.gz.asc
February 8th, 2020
Xcowsay is starting to show it’s age a bit, and with Gtk2 and legacy GDK fast disappearing from distributions it’s time to upgrade to Gtk3! (Yes I know Gtk4 is out soon…)
Migrating from GDK to Cairo was fairly painless as the drawing API is very similar. The main problem is the removal of the
gtk_widget_shape_combine_mask function that xcowsay used to make the background of the cow and the bubble transparent. This took the 2D bitmask and cut an arbitrary hole in the window. In Gtk3 we instead have to use the window’s alpha channel to make portions transparent. The big drawback of this is that it requires a compositing X11 window manager or Wayland or it won’t work at all. If this affects you then you can just use 1.4 as there’s no functional difference. A side effect of this change is that the edge of the speech bubble is now anti-aliased, fixing a long-standing complaint.
The source zip is here: xcowsay-1.5.tar.gz.
September 8th, 2016
Once upon a time I used this this blog to publish softwares of questionable utility, and if my analytics stats are anything to go by, I should have stuck to that. So today I’m proud to announce the release of… xcowsay 1.4!
This is just a rolling up of various minor tweaks over the past few years:
- Fixed various usages of deprecated Gtk features
- Allow values with quotes to be set in the config file
- Fixed a crash when the
-r option was used without a value
- Added a
--release option to close the window on mouse button release
Download it here or wait for it to appear in your distribution. Report any problems via the GitHub issue tracker.
November 4th, 2014
I was pleasantly surprised today when I did a dist-upgrade on Debian Jessie today and it upgraded xcowsay to version 1.3 which was released a mere four years ago.
Alarmingly, there appear to be bug reports! :-o Methinks I should be working on a 1.4 release…
May 2nd, 2012
Xcowsay fans rejoice! Xcowsay is now officially supported on the Raspberry Pi!
In other news I’ve started updating xcowsay to use Gtk3 and Cario. Expect version 1.4 later in the year!
April 24th, 2011
It’s less than a week to go until the most anticipated day of the year: the wedding of Kate and Wills. A momentous day in the history of our nation. And look, even the humble pound shops are joining the celebrations!
Here at doof.me.uk we’re marking the occasion with a release of a special royal themed script for xcowsay: royal-fact-say! Install xcowsay, unzip the file, then run
./royal-fact-say and xcowsay will spout a random wedding factoid alongside an adorable picture of the happy couple. Enjoy!
November 11th, 2010
Out of the barn and on to the interwebs: here it comes! xcowsay 1.3! This version is another minor upgrade to xcowsay with the following changes:
- A number of small bug fixes in xcowsay itself and the configure script.
--time=0 now means the cow is displayed until clicked.
- If the text is so wide that the speech bubble would not fit on the screen, word wrapping is automatically applied. This can be disabled with
- As requested by some users, it is now possible to make the speech bubble appear on the left hand side using
--left. This is useful if you are using your own left-facing image, for example.
- New Russian and updated Portuguese translations.
You can download the source code here: xcowsay-1.3.tar.gz. There are no binary packages for this release as xcowsay is now in a large number of Linux distributions and BSD ports collections which will hopefully be updated soon.
You can now track xcowsay on GitHub if you like.
Several people have asked about anti-aliasing the edge of the cow and speech bubble. I’ve experimented a bit using Cario but unfortunately this does not seem to be possible as X only accepts a binary mask when cutting out shapes in windows. I think you would need a compositing window manager with a proper alpha channel for this to work so I doubt xcowsay will support it any time soon.
January 5th, 2010
After nearly 18 months I’m releasing a new version of xcowsay! Release 1.2 doesn’t contain any new major features but it does contain a number of bug fixes and small improvements requested by 1.1 users. These include:
- Fixed bugs relating to multiple monitors: the cow will no longer be spliced across two screens and a new
--monitor option forces the cow to appear on a particular monitor.
- A new
--image option allows you to use your own images instead of the cow, letting you do things like this.
--bubble-at options let you change the default position of cow and bubble. Useful if you’re using your own images.
- The DBus daemon now supports `think’ and `dream’ modes.
- Supports an XDG compliant config file location, and a new
--config option lets you specify additional config files.
- Lots of minor bug fixes.
Download the source code: xcowsay-1.2.tar.gz.
Did you know xcowsay is now available in Debian, Ubuntu, Fedora, and several BSD variants? I won’t be providing any distribution-specific packages for this release as yours should hopefully update it soon. You can always build it from source though!
Someone asked if xcowsay could have a
--theme option to bundle a custom image with a custom bubble location, etc. This is possible with the new
--config option. E.g. create a file
my_theme.cfg with your customisations:
alt_image = /path/to/image.png
bubble_x = 5
And run xcowsay with
xcowsay --config=my_theme.cfg message.
A couple of bug fixes and improvements didn’t make it into 1.2. These include:
- The cow and speech bubble have jagged edges which would be improved by
- Very long strings will disappear off the right-hand side of the
screen. This could be fixed e.g. by using Pango’s word wrapping.
UPDATE: Now with an updated Portuguese translation!
October 31st, 2009
Recently I had a flirtation with removing all the non-free software from my Debian installs. This didn’t last very long: I got annoyed that I couldn’t watch iplayer with gnash, and blodgett reminded me that I had a copy of Vista running in VirtualBox. Ooops.
However, upon reinstating the non-free repository I installed the vrms package to remind me of my failings. Blodgett suggested vrms might be better implemented as a popup character like clippy. But wait! Doesn’t xcowsay do something very similar?!
Well, xcowsay has a
--cow-size option that lets you select from small, medium, and large cow images. This actually just looks for a
cow_*.png file, so if we created a
Here we see Richard Stallman arising from the Humber like some terrible sea monster about to wreak destruction on the propriety software industry of Hull.
If you want to use this yourself just install xcowsay, vrms, and grab these files:
- cow_rms.png – save this in
/usr/share/xcowsay or wherever xcowsay is installed.
- vrms-xcowsay – a script to invoke xcowsay with the output of vrms. Don’t forget to
chmod +x it!
The script is very simple and looks like this:
(printf "I SEE UR USIN NON-FREE SOFTWARES :-(;\n\n"; vrms) \
| xcowsay --font=monospace --cow-size=rms $*
I’m thinking of adding a
--image option to xcowsay 1.2 to make things like this easier.
UPDATE: xcowsay 1.2 now supports this via the