Tag Archives: gnome

Irssi in Terminal on GNOME 3.12 in Fedora 20.

A lot of people I know like running the Irssi IRC client in a terminal, whether in a terminal multiplexer like tmux or GNU Screen. Me too!

I also love running the latest GNOME releases. So when GNOME 3.12 was released and available for Fedora 20, I followed these simple instructions, courtesy of Fedora Magazine and Ryan Lerch, to install it on my system.

I discovered a new feature in the GNOME Terminal is that keys Alt+1 through Alt+0 are mapped to allow you to quickly navigate to the first ten tabs in Terminal. This is super-useful, but because those keys also happen to map to the shortcuts in Irssi for switching to your first ten IRC windows, I couldn’t use them in Irssi. Since I use that function a lot more often, here’s how I fixed it:

  1. Open a GNOME Terminal, and from the quick menu in GNOME Shell’s top bar, choose Preferences.
  2. Under the Shortcuts tab, locate the Tabs list.
  3. For each shortcut from “Switch to Tab 1” to “Switch to Tab 10,” click the shortcut to select it. Then click the entry under Shortcut Key. Hit the Backspace key to remove the existing shortcut.

Now you can use your Alt key combinations as before in Irssi. Have fun!


Using the GNOME Evolution address book with Mutt

For a while I’ve been using the GNOME Evolution address book with Mutt, my favorite email client. I use a script called mutt-eds-query, which consults the default evolution-data-server (EDS) address book to find contacts whose name or email address match a substring. I have a couple thousand contacts still stored in my EDS address book, so it’s really useful for me to be able to consult them. When I type an address in Mutt’s To: field, for example, I give a few letters and then hit Ctrl+T to see a list of completions.

Unfortunately, the script stopped working when I moved to Fedora 18, because the new release contains the newest Evolution and EDS (3.6 versions). The new EDS cleans up a number of deprecated functions and has a more regular interface for querying data sources. Obviously that means the mutt-eds-query needed changing too. I used the extensive GNOME developer documentation to find out what had changed, and updated the script I found on the Mutt wiki.

So I hacked in some changes today. I’m not a born C programmer, so I’m sure there are bad style uses and other stupidities in what I did. Nevertheless, I posted the results alongside the original on the Mutt wiki page. I’ve also put my files up on my Fedora People space. Feel free to grab and try it, and let me know if it helps you. (You’ll need the evolution-data-server development libraries to compile it.)

In the future I’d like to update this script to aggregate and query my GNOME online accounts as well. There’s a very robust set of functions for doing that, and documentation, so if I could just find the spare cycles, I think I could probably make this happen. Alternately, I wonder if that might make a good addition to the folks-tools package?

You can ring my bell.

I’ve been using xchat-gnome on Fedora for quite a while. It’s been my default chat client because the way it notifies about private or channel messages fits well with my workflow. However, recently I’ve wanted more often to encapsulate my chat in a screen session along with my other work. Of course, the obvious answer to this is Irssi, a popular text-based client.

I still tend to also have a web browser open often in a GNOME session, though, so notifications are very useful to me. For a while I used Irssi with a simple plugin script that calls notify-send to create popup notifications. However, I hadn’t used it since the GNOME 2.30-2.32 days, and I found this script had developed drawbacks as it aged against the new GNOME 3 environment.

For example, the notifications would fill up the notification tray over the course of the day. Clearing them required an action for each individual notification, which was tedious to say the least. Also, the --timeout argument to notify-send seemed to no longer work for me to make the notification leave the notice area after a specific length of time.

What I really wanted was a solution that would act more like many of the other native GNOME applications. Appointment notifications or email in Evolution, for instance, “stack” in the notification area into a single icon, with a number that tells you how many notices have been received. Thankfully a few GNOME folks — Marina, Matthias, and Ray — kindly gave me some advice on solutions.

First, there’s a hint called transient for notifications that lets them evaporate from the notification area after a specific time. (You can find the full notification spec here if you want to dig a little deeper; I found it really educational.) This was a step forward because it kept the notices from piling up in the notification area ad infinitum. For instance:

notify-send --hint transient:1 'subject' 'message'

Unfortunately, just using transient meant I’d likely miss some notices if I was away when they came in. I wouldn’t know someone was looking for me unless I switched to my Irssi window to look — which is precisely the thing that notifications should prevent. Nevertheless, it’s a really useful hint, so file that away for later reference.

Never fear though, because again the GNOME folks passed on some good advice. The stacking effect is handled automatically by GNOME Shell if the notifications are issued from the same PID. Aye, there’s the rub! The Irssi plugin I was using made this impossible, because it called the notify-send executable for each message, meaning a new process for each instance. What I really needed was a single process listening on the session D-Bus that could kick off a notification.

So what I came up with can be found here. If you want to just test the listener, maybe because you don’t use Irssi, try this command with the listener running:

dbus-send --session /org/irssi/Irssi org.irssi.Irssi.IrssiNotify string:'subject' string:'message'

The listener is just a dead-simple (or maybe I should say brain-dead, given the quality of code) Python script. I put it in ~/bin with the executable bit set on, added it to my list of applications that launch with my GNOME session using gnome-session-properties, and added the new notify Perl plugin for Irssi to my ~/.irssi/scripts/ folder, with a symlink from ~/.irssi/scripts/autorun/ so it starts whenever I run Irssi. The stacking of notifications makes them very easy to clear with one user action — aaah, much better!

Future thoughts:

  • One flaw with this method (I’m sure there are many!) is you’ll get notifications even if you’re actively looking at or talking in the IRC channel where a message comes in. It’s easy to add logic to alter the behavior based on that, but what complicates matters considerably would be trying to make this script understand when Irssi was in the active screen window — or when the screen was the foreground window in GNOME.
  • It might not be kosher for me to have used org.irssi.Irssi as a service name in D-Bus. After all, this isn’t official or part of the Irssi project at all. But as I understand it, you could use whatever name you liked, as long as you weren’t trying to claim a service name already in use.
  • You could make this work system-wide by packaging a real .service file for D-Bus along with the Irssi script.
  • When we were discussing the technical issues above, Ray told me he was actually looking for something similar. With any luck, he’ll find something annoying in my stupid solution he can’t live with, and he’ll add some magic GNOME-ishness to make it awesome. See what I did there? 😉

Enrichment class.

Lately, as an extramural project I’ve been preparing an enrichment class I’ll be teaching at my kids’ elementary school in November. The class is for fifth graders, a very light introduction to software and programming concepts. The kids elect their enrichment class, which is a fantastic way to put together an audience because you know they’ll already be interested in the subject. The classes are held for one hour each Monday after school for four weeks — so there are four hours of class in total.

The first question was, would we use a language? I felt strongly the answer was yes, because I wanted the kids to have a hands-on learning experience. In addition, I believe fast feedback is very important for younger kids. It helps them feel more confident while they get comfortable with the material. So it was important to pick a language that was interpreted.

I ultimately decided on Python, not just because I’m comfortable with it and it meets the criteria, but also because it’s widely in use running things the kids have heard of (Google, Facebook, NASA), widely recognized as a good first language for learning, and is eminently readable for any of the kids who decide to pursue it further after class is over.

Of course I plan to spend a couple minutes to explain to them the awesomeness of free software, and how they can share it with others. I hope that’s a tiny nugget of learning they can take away even if they never touch Python again.

I also knew I’d need some good self-directed learning resources for kids in this age group, so they could keep going when class ends. There are at least two good books out there the kids can use if they want to continue on their own:

Both these books are available for Python 3, which is what I’ll be using for the class. I’ll be providing electronic copies of both for the kids to enjoy and learn more later.

Now, how would I make Python available for the kids? As it turns out, the school has brand-new HP desktop machines that were purchased this past year, and the resulting lab is completely homogeneous. This is fantastic because it means I have to worry a lot less about a student having a problem specific to their computer. If things work OK on one, they should be OK for all, modulo some low risk of sudden hardware problems.

But this didn’t mean I can necessarily install Python on all the computers. Nor would I want the kids to go through that process; it would be a waste of time as well as frought with all sorts of chances for human error that would lessen the learning experience. Although I have full support from the school administration, that doesn’t mean I should be installing stuff on their computers’ hard disks, or putting the onus on the computer resource teacher to do it.

Obviously, what I needed was a bootable operating system that wouldn’t touch the lab systems’ hard drives. This called for a Fedora Live USB key! I decided to go with Fedora 15 since the class is coming up before the release date of Fedora 16. And thanks to the livecd-tools package, and the spin-kickstarts repository on Fedora Hosted, this was relatively easy to handle as well. With a couple quick customizations, I could provide the kids with a safe, friendly, and powerful environment in which to learn.

After creating this boffo live image, I needed to try it out at the actual lab environment. I did that this afternoon, just as school was letting out for the kids, since the lab was free. There were no problems at all — the free software X video drivers worked spectacularly, NetworkManager connected kids to the classroom network with zero fuss, and the new GNOME 3 environment was ready to use. I tried a number of lab systems and gloriously, they were all configured homogeneously as well. The systems were even set to boot from USB first; all I have to do is make the keys, and before class, just insert them and power on!

I know I shouldn’t be elated that the software works just like it should, but I still love to think about how far we’ve come from the days when Linux could only be used by tinkerers. And of course I have to give huge props to all the people who work on the kernel and plumbing, GNOME 3, and Python. Without their hard work there’s no way I could provide the class to the kids. And the best part is, the zero cost and freedom of Fedora means all the kids can keep the keys and continue learning even after class ends.

I also want to thank Máirín Duffy for the inspiration, and her thoughts as I started putting the class together. She ran an amazing Inkscape class for some young people not long ago, which you should definitely check out! Just as Máirín did, I’m going to provide all my materials under a Creative Commons license, and blogging the class progress here. I can’t promise to provide lots of photos to go along with everything (terminals make dull subjects!), but I hope it’ll be fun and maybe even interesting to read.

Double plus GOOG.

Last night I was able to get into the Google+ trial and one of the pieces of the setup was a Talk plugin that includes audio and video chat support. I was pleasantly surprised to find that it works great on Fedora 15. The PackageKit browser integration pulls in other support you may need. After installation you’re able to join the “Hangout” feature which lets you chat live with multiple other users using your webcam and audio. It also plays well with PulseAudio so I was able to easily use my USB headset with no tinkering.

So far it looks like Google may have figured out a way to take the interesting parts of Wave, and build them into a framework that’s more friendly and less like an out of control email client. Within 24 hours I had a lot of people I know hooked up via the “Circles” feature for sharing. What this means for Facebook I don’t know — I sincerely hope G+ doesn’t become a cul-de-sac for geeks only.

My other hope is that there are GNOME folks out there looking into the Google+ API project, to see if there will be interesting and user-friendly ways to have the future desktop OS interact with this service.

Boston bound again.

As I write this, I’m sitting on a plane on my way to Boston, having rolled out of bed at the unwholesome hour of 4:00am and into Richmond to catch a 7:00am flight. What’s that you say? Another week of travel for Stickster? Yes indeed — much to my wife’s chagrin (and likely my children’s delight since I usually play the role of Mean Parent at home), my third week of travel out of the last month.

This time I’m heading back to Boston for the Red Hat Summit and JBossWorld, this year breaking all previous records for size and registration. At previous Summits I was a customer, and then after joining Red Hat, a speaker on behalf of Red Hat’s continued successful partnership with and investment in the Fedora Project. This year I’m working as a volunteer staff member, along with helping my esteemed coworkers deliver a joint presentation on Red Hat Enterprise Linux 6 product features and roadmap. I’ll be doing lots of exciting things from working the information booth to helping stuff bags for our Red Hat Gives Back charity drive to benefit the Boston arm of Cradles to Crayons.

In real terms, what that means is I’ll be exceptionally busy throughout the week.

I expect we’ll have decent Internet at the event. The main issue at the Summit when you’re working at the event isn’t getting connected, it’s having free time to sit down and actually do it! So don’t fret if you don’t hear back from me lickety-split as usual — I’ll be picking up and responding to email as quickly as schedule allows. Of course, it wouldn’t be a Summit without something fun to do at night, but since my volunteer work starts at 7:30am daily, I’ll probably need to put the kibosh on any late night pub crawl.

Hopefully I will get a chance to meet up with some of my pals from around the globe at the event, though. I’m sharing a room with Jared Smith, the current Fedora project leader, and I believe, if I have the layout of the site correct in my memory, that the new Fedora booth location won’t be far from where I’m working most of the Summit — so it will be easy to send people from the information booth to pick up Fedora media and helpful tips there.

In previous years, I arranged with a partner vendor to have Fedora branded Live USB keys, containing the latest tasty Fedora operating system, available for all the attendees. Last year, Summit attendance had grown so substantially from the year before that we actually ran out of keys! From what I understand, Fedora Live USB keys came together rather late this year, but should be available at the booth on Wednesday for attendees to pick up. And I believe there will be a lot more of them than last year — which is good since I hear attendance is up yet again, making for the biggest Summit event to date!

I believe the Fedora Live USB keys will have the latest Fedora 15 pre-release installed, which is a spectacular showcase for the very latest cool technology (including GNOME 3). That’s also a great way for attendees to see what’s happening upstream in the free software community. I’m happy to hear the media is going to be available, and hopefully the experience of getting ready for this year’s Summit will also pay off for Jared and the Fedora crew in organizing for next year’s event as well. Inevitably the guidance you get from someone on their experience in a certain situation is never quite as valuable or sticky as the experience you garner for yourself.

I brought my DSLR camera, and one way or another, I’m going to try to capture some of the event, whether that’s through photos, blogging, microblogging, or whatever I can squeeze into my schedule. I’ll be returning home late Friday night, and my plan is to take a much needed extra day of PTO on Monday to rest up for what promises to be a very busy summer.

A fun day… for some hacking.

Over the course of the day, I:

  • Tweaked the package complement on my workstation where last night I did an installation of the Fedora 15 pre-release tree
  • Identified some weirdness in my local Eclipse environment and got things in better shape for later work
  • Got a good start on some user documentation for PulseCaster
  • Took my daughter to the skate rink, and managed to skate for at least a little while before realizing I was having a rough time because my kingpin bolts are just way too freakin’ tight
  • Figured out how to adjust said kingpin bolts and made a note to take care of that before next week
  • Took my son out for some errands and lunch — a nice trip and a good chance to exercise my patience muscles
  • As a reward, bought some beer and a couple decent malbecs
  • After returning home, cleared out some obsolete packages hanging around in Bodhi and begging for death
  • Built and pushed a new update of PulseCaster to fix some bugs
  • Built and pushed a refreshed upstream version of xmlstarlet
  • Played with the dog
  • Came back and turned up a French trance station I got into recently (for some reason, monotonous, non-vocal electronica seems to help me work more efficiently… probably since there are few lyrics to listen to and digest mentally)
  • Went through some email to reduce backlog for Monday
  • Triaged a crummy gnome-system-monitor bug affecting people with more than 4 CPU cores (like me)
  • Had dinner with the family (Eleya made a fabulous corned beef, first timer but it was pretty much perfect!)
  • Came back to the desk to find that the superhuman Matthias Clasen had fixed the gnome-system-monitor bug in question, and built and pushed an update out
  • Installed said update with many thanks to Matthias, tested, and provided feedback

So of course, my definition of hacking is not nearly what some of my colleagues manage daily. But I feel like attacking some of this stuff on weekends and working on my own GNOME-ish projects are starting to give me a better fundamental understanding of some of the plumbing at work in the desktop. And of course, it gives me a wh0le new appreciation for it as well. I’m now rocking GNOME 3.0 pre-releases on both my main systems here at home, my laptop and my big workstation, and loving it.

I’ve contributed a few bug reports and to a small portion of the GNOME 3.0 user documentation for this release. It was lots of fun and made me feel connected with the release process for something I use every day that will be an intrinsic part of Fedora 15 when it arrives. It’s a great feeling to be just cranking on some little bits to help others, and just as much as ever, I know that if everyone does the same, free software has a future that is even brighter than the (already well-lit) present.

Power punch.

Fedora Talk, Gobby, and IRC make for a great combination when it comes to inclusive conferencing. I joined a bit late, but there’s a fantastic online-enhanced teleconference going on today to tease out all the details around No Frozen Rawhide.

Developers and maintainers will undoubtedly have questions about how the NFR changes might affect the different things they do every day in Fedora. So we have an excellent opportunity to get all those details elucidated, and then written up for easy reference.

The write-ups are being built as different use cases that will help us be crystal-clear about how NFR might affect someone (if at all) depending on what they’re trying to get done. Whether it’s building a brand-new package, pushing an update into the new pending tree, helping to test one of the branches, administering a mirror — there will be clear information for everyone.

Fedora Talk is great for a high-bandwidth, “Oh, I see what you mean” type conversation. But we scribe everything down to Gobby where anyone can watch the work as it happens — which in this case, is the development of the use cases.  And we’re also on IRC Freenode at #fedora-nfr to invite questions and comments.  This multiplication of communication doesn’t have to be confusing as long as everyone present is focused on the tasks at hand. On the contrary, it gives us many ways to react to input and get the work done faster, and more collaboratively.

Thanks to Jesse Keating and John Poelstra for putting this little mini-conference together!

Incidentally, our Docs team has been talking to Shaun McCance about using this type of multi-channel solution at the Desktop Help Summit so the conference can get more assistance and participation from remote attendees. It’s worked well at our Fedora Activity Day events which are very much the same kind of “can-do” context.

GNOME Shell tryout.

I’ve been using the GNOME Shell preview available in Fedora 12 this week and I’m really enjoying it. I was testing out some candidates for updates to the free drivers for my ATI Radeon HD4850 (and the stuff that went with them) already, and decided to see what happened when I picked GNOME Shell.  At F12 release time, my graphics card wasn’t quite ready for GNOME Shell use. But now I get the whole kit and kaboodle!

The free drivers for both ATI and NVidia cards have come so far in just 2009. But the fact that out of the box I can get kernel mode setting on so much new hardware, and also 3D acceleration on a new card like mine, is just phenomenal. My hat is off to the guys in both projects working on truly free software drivers for today’s video hardware, among them Fedora and Red Hat’s own Dave Airlie and Ben Skeggs. Bonzer!

Anyway, back to GNOME Shell.

My favorite feature is the application search feature. Since I’m often on the keyboard already, I don’t have to switch to the mouse, or hit a bunch of arrow keys, to pull up another app I need. Say I’m in Firefox, and I want to bring up my gEdit text editor. I can just hit Alt+F1, the normal key combination for the main menu even in current GNOME. Then I type g, e, d and by that time gEdit comes up because that locates gEdit as a unique word in its name or description. Then I hit Enter and up it pops. Nice!

The new controls for selecting among multiple running application instances, or applications across desktops, through the Alt+Tab keycombo are superb — and very easy to read, even for my tired old eyes. Effectively rearranging my desktops to put the apps I want where I want them is a snap, too. The taskbar is now down to a single bar on top, and visually it no longer even draws attention to itself because of its black color. I think that GNOME Shell has probably helped me eke out another 2-5% productivity out of my day, just eliminating time-wasting aspects of the standard GNOME 2.x interface.

The one thing I worry is that I’m missing out on some power keystrokes out there to do cool things. Is there some reference out there for under-the-hood goodies, or a way a non-programmer like me can learn how to make some?

Saved by the icon, no. 5.

David, thanks for the fine work on the new disk utilities in GNOME. You saved my hide, because I found that the hard disk in the machine my wife and kids use was getting pretty dodgy after 3.5+ years of running time. $45 and 320 brand-spanking new gigabytes later, everything’s A-OK. (Using rsync made restoration a flash.)

Paying attention to that little disk warning icon in Fedora 12 saved me and mine a lot of time and unhappiness down the road.