Tuesday May 26, 2009

I recently started playing with gtk on OpenSolaris and thought I'd post here the couple of packages you need to install to compile a simple gtk app. Took me a few minutes searching the web, would've been nice to get it all in one place. I'm running 2008.11 with the latest build, snv_111. Given a short piece of code using gtk, like this one from the gtk tutorial:
#include <gtk/gtk.h>

int main(int argc, char **argv)
{
	GtkWidget *window;

	gtk_init(&argc, &argv);

	window = gtk_window_new(GTK_WINDOW_TOPLEVEL);

	gtk_widget_show(window);

	gtk_main();
	
	return 0;
}
you'll need to install SUNWgnome-common-devel (for pkg-config), SUNWxwinc and SUNWxorg-headers (for header files). So just
# pfexec pkg install SUNWgnome-common-devel SUNWxwinc SUNWxorg-headers
and then
 # cc gtk_1.c -o gtk_1 `pkg-config --cflags --libs gtk+-2.0`
and you're set.

Thursday Apr 02, 2009

Last night (PST time), the LatencyTOP project gate received the first changeset from Intel containing LatencyTOP for OpenSolaris. This tool leverages DTrace to analyze sources of latency in the system, and help developers gain a batter understanding of why their app's may be running slower than desired.

You can clone the repository with

hg clone ssh://anon@hg.opensolaris.org/hg/latencytop/latencytop-gate

then follow these steps to build and run:

latencytop-gate $ cp usr/src/tools/env/opensolaris.sh .
latencytop-gate $ gedit opensolaris.sh -> edit GATE and CODEMGR_WS with the path to your workspace
latencytop-gate $ bldenv ./opensolaris.sh
latencytop-gate $ cd usr/src/tools
latencytop-gate $ dmake
latencytop-gate $ cd ../cmd/latencytop
latencytop-gate $ dmake
latencytop-gate $ i386/latencytop -> or amd64/, sparc/ depending on your system

If you're interested in getting involved in this project, now would be a great time for that. The application itself is relatively new, and there's lots of possibilities for improving and extending its functionalities.

Here's a screenshot of LatencyTOP running on my laptop.

The tool lists system-wide and per process sources of latency. The horizontal list of process at the bottom scrolls to the left/right so you can observe a specific process.

Thursday Jan 22, 2009

I've always liked having multiple windows open at once, or the ability to view and edit different files without having to switch windows or workspaces. This preference was amplified to a need once I started reading the OpenSolaris code. I've been using jEdit for years now, mainly because it allows you to split as many screens as you want, but also because of the various plugins you can find for it. It's also a good excuse to keep my Java from getting too rusted, tho you only need it if you're looking at the source. Here's a snapshot of my usual coding environment:

Hopefully I didn't shrink the image too much, but you should be able to see the tabbed editor and a big drop down box at the top to switch between projects. Both the tabbed view and the project features are plugins. I used to resize the window across a dual head setup when I had two monitors, having 10+ simultaneous views of different files speeds things up very nicely. Another cool feature is that you can have N views of the same file.

I also tend to have several Firefox instances open, and used to resize these to fit in one workspace. But yesterday I ran into the Split Browser add-on. It's been around for a while, so no big news here. It certainly can be improved, but it's been saving me lots of time lately. Check it out.

Let me know if you know of a good editor/browser/.. with split view-like features. Always interested in it.

Wednesday Oct 29, 2008

Last weekend I had the pleasure of attending the 2nd Ontario Linux Fest, in Toronto, Canada. Brian Leonard had a talk accepted there but couldn't make it, so I offered to fill in for him. The event started on Friday night with a reception for anyone who had already made it to the area, I was somewhat jet lagged from the trip but made it and had the opportunity to talk to some of the folks attending it. The event took off on Saturday morning, four/five presentations/hour from 9am to 6pm (check out the schedule). The topics were well balanced from technical to legal and ideological aspects of FOSS.

The talk I presented was entitled "What Makes OpenSolaris Interesting", very demo oriented which was perfect for the clearly technically oriented audience. I gave an introduction to OpenSolaris, demoing all the desktop goodies that it currently has (snv99), followed by slides and demos of IPS, DTrace, ZFS, SMF, FMA and a quick slide about resource management (processors sets, zones, containers, branded zones). I chose to do a single slide followed by demo for each of these technologies.

IMO it went pretty well, even though I hit a few bumps throughout the talk. I think there were 15-20 people in the audience, a little over 10% of the Fest's attendance. Had some good questions and folks seemed interested. I took my laptop to the party at night and continued to demo OpenSolaris around.

Before I get into what I perceived to be people's opinion about OpenSolaris (which was generally good), let me repeat what I said throughout the weekend: it was a pleasure and a privilege to be invited to a Linux event. Regardless of the fact that we're talking about competing OSes, we're all interested in providing the best solutions to the market. I truly appreciate the opportunity to go there and show some of the features of the system I believe offers the best ones.

The overall reaction was good, everyone I talked to seemed interested in what OS has to offer. Hopefully, my presentation and the demos were enough to get some of them to try OpenSolaris.

During the Intellectual Property and Open Source talk, the speaker said that you can still write closed source modules/drivers with CDDL. Me being anything but an expert in licenses and in a Linux conference, I didn't object, but that didn't sound right. Please feel free to comment on this point, I'd like to learn more about it.

While talking to a Linux community leader from the US, she told me about trying OpenSolaris when it first came out but since it wasn't clear to her at that time whether it was really open source or not, she did not continue to use it. But she was positively impressed about the current state of the system - she was surprised when I told her that the screen she was looking at was an OpenSolaris session.

I heard some complaints from people who tried 2008.05 but the LiveCD failed to boot, or the system became unresponsive at some point. Lack of drivers, specially for network devices, was another one. But I assured that person that a lot has been accomplished in that respect, and even more should follow.

Jeremy Allison, who works on Samba at Google, said he thinks Linux might go to GPLv3 if ZFS goes too. He seemed interested in that, as he believes v3 is the way to go.

John 'maddog' Hall gave the closing keynote and talked about sustainable computing. He brought up some good points, but I was particularly pleased to hear him mention improvements that the Linux kernel needs to become more power efficient. He listed changes to the dispatcher, which is one of the projects that the Power Management Community has been working on for some time, and should deliver the changes to ON very soon. There is a patch for the Linux kernel that addresses that, but that's all I know about it. Again, comments are welcome.

Summing up, I think we'll see some growth of OpenSolaris users in Canada - note that I'm not quantifying the growth. It was great to be a part of a grass roots effort such as the Ontario Linux Fest. Gotta admire what a dedicated community is capable of. Congrats to the organizers and the volunteers, it was a great event.

Sunday Oct 12, 2008

[Read More]

Just getting back to writing here, so I'll try to catch up with some of what happened over the last month or so.

On September 29th, the Porto Alegre OpenSolaris User Group along with RSJUG held a big event for Software Freedom Day. The groups organized a full day of talks around OpenSolaris, Java and open source technologies. We had around 150 registrations, but not all of those showed up (not sure why tho).

On the OpenSolaris side, we had talks about how to install the system, PostgreSQL on OpenSolaris, ZFS and one on what makes OpenSolaris interesting. Good to see everyone again, and even better to see the group growing at a good, steady rate.

You can check out some photos here and here.

Congrats to everyone in the group for setting this up, specially Vitorio Sassi who almost had a heart attack organizing the event :)

This blog copyright 2009 by rv