Archive for the ‘Ubuntu’ Category

Statuses

Written manual or video howto’s? (and how to make them)

In Bluefish,Gnome,Gnome shell,open source,Screencast,Ubuntu on November 4, 2012 by oli4444

In time, the number of features in Bluefish has grown to a very large number. More and more we receive requests for features that are somewhat superfluous: a similar feature is already present in Bluefish. Often if we explain the submitter how to use a certain existing feature he/she is quite satisfied. This means that some Bluefish features are (too) hard to find.

So what is  the best way to improve this? Is written documentation with screenshots the best way to introduce features to the users nowadays, or are video tutorials (screencasts) better?

From the community the support for our manual project has been declining over the last years (I must admit that I personally think manual writing is not the most rewarding work). Currently the Bluefish manual is mostly improved by a single volunteer, and therefore continuously behind. Is this a sign that written manuals are considered less important nowadays? At least the Bluefish screencasts on YouTube do well (194000 views, but is that high or not?).

So what do you think? Written manual or screencast?

Second subject for this post: what is the best way to create screencasts? Previously I used the built-in screen recorder in gnome-shell: excellent quality with a high compression. Merging the sound, however, always was lousy (tried Pitivi and Openshot): the quality decreased while the file size usually grew a lot. And it was a lot of work. But with the last Ubuntu release (gnome-shell 3.6) the feature seems to be missing (Ubuntu bug or Gnome-shell bug?). What is the best way to create screencasts (with sound) in Gnome-shell?

Articles

Install Gnome3 on Ubuntu 12.04

In Gnome,Gnome shell,Linux desktop,Ubuntu,Unity on June 23, 2012 by oli4444

You like the nice configuration defaults of Ubuntu but not Unity?

Add this to your /etc/apt/sources.list

deb http://ppa.launchpad.net/gnome3-team/gnome3/ubuntu precise main 
deb-src http://ppa.launchpad.net/gnome3-team/gnome3/ubuntu precise main
deb http://ppa.launchpad.net/webupd8team/gnome3/ubuntu precise main 
deb-src http://ppa.launchpad.net/webupd8team/gnome3/ubuntu precise main

Now run

sudo apt-get update && apt-get install gnome-shell

and you have an up-to-date gnome-shell. Even many of the pretty extensions are packaged as well.

As a bonus I found out that Gnome 3 runs much snappier than Unity on an old IBM T43 laptop (which has 6 years old Centrino technology).

Statuses

Debugging a reference count bug

In Bluefish,gtk+,open source,Programming,Ubuntu on February 5, 2012 by oli4444 Tagged:

Last days I have been debugging some weird reports. They all show the same characteristics:

  • the users are on Ubuntu 11.10
  • they use bluefish compiled against gtk 3.2 (so not the bluefish package that is provided by Ubuntu, but a newer one)
  • in the Bluefish run the sort function of a GtkTreeModelSort is called after the GtkTreeModelSort should have been finalized and free’ed.

First I used gobject-list.c from http://people.gnome.org/~mortenw/gobject-list.c to see all refs and unrefs on all GtkTreeModelSort objects in Bluefish (luckily there is only 1 used in Bluefish).This showed that there was indeed a GtkTreeModelSort with lots of references left after it should have been finalized. I tried the same thing on Fedora 16 (also gtk-3.2), but it can only be reproduced on Ubuntu 11.10.I tried to get backtraces with gobject-list (which uses libunwind for that) but those backtraces turned out to be useless.

Luckily I received some help on IRC #gtk+ from Company and alex. The first idea was to use systemtap, but since there is no useful kernel for systemtap available for Ubuntu I had to use something more low tech suggested by Company:  I set a breakpoint on gtk_tree_model_sort_new to retrieve the pointer of the GtkTreeModelSort. Once I got that pointer I could set a breakpoint on g_object_ref and g_object_unref with a condition on this pointer. Then I created an automatic backtrace on each breakpoint:

break g_object_ref if object == 0x123123123
commands
bt
c
end

I configured gdb to log everrything to a file, and did a bluefish run. This resulted in a 2.1 Mb logfile with backtraces. This log also showed there were more refs than unrefs.

In this logfile there were a lot of similar backtraces, with an identical function doing a ref and an unref. I wrote a short python script to parse the backtraces and skip all ‘valid pairs’

After this step I had only 15 backtraces left. And from these backtraces the leaking references were easily identified.

Because I was unsure if this is a Ubuntu specific bug or a generic gtk bug the resulting bugreport can be found both at https://bugzilla.gnome.org/show_bug.cgi?id=669376 and at https://bugs.launchpad.net/bugs/926889

Now I am wondering if this approach would work for any reference count leaking problem. I guess the most difficult issue is to find the value of the pointer that is leaking if you have many objects of the same type.. Any suggestions how to do this?

Statuses

Bluefish, Ubuntu or Gtk bug?

In Bluefish,Gnome,open source,Programming,Ubuntu on October 25, 2011 by oli4444

There is a weird widget scaling issue happening with Bluefish compiled on Ubuntu 11.10 with gtk-3.2.0 that I don’t see on the same Ubuntu 11.10 with Bluefish compiled with gtk-2.24.6 nor on Fedora 15 compiled with Bluefish compiled with either gtk-3.0.12 or gtk-2.24.4.

Bluefish has a GtkHPaned widget to show a sidebar (by default on the left). Inside that sidebar is a GtkNotebook, and inside that notebook is a GtkComboBox. The text string in the GtkComboBox sometimes becomes quite long. Normally this string is just shortened by gtk as can be seen below (the string is file:///home/olivier etc. etc.):

On Ubuntu 11.10 with gtk-3.2, however, this string defines the GtkComboBox minimum width, and if you try to move the GtkHPaned handle to the left it makes all of the contents inside the GtkHPaned move to the left, outside the window border (watch the left side of the GtkNoteBook, see that one of the tabs is moved outside the window? See that the contents of the GtkTreeView are moved outside the window?):

In this example there is a long string in the active entry of the GtkComboBox, but if there is a short string active and a long string only in the popup menu, the issue still appears. So the minimum width is defined by the longest string in the GtkListModel.

In the documentation I cannot find if a GtkComboBox should shrink smaller than the text that is possibly in the popup menu. But I do know that this has never been a problem before on any gtk version up to gtk-3.0 (but Fedora 16 is not yet released, so my only Gtk-3.2 box has Ubuntu 11.10), so I’m wondering if the bug is in Bluefish, Ubuntu or Gtk?

Update 1: I can reproduce this on Fedora 16 beta, so this is not an Ubuntu issue, it is either Gtk-3.2 or Bluefish

Update 2: thanks to the comment from Benjamin Otte I fixed part of the issue by setting the ellipsize property to the GtkComboBox text renderer. However it is still not really back to normal nice behavior. The GtkComboBox furthermore has weird/buggy behavior if ellipsize is disabled. If there used to be a long string in the model, but that string is gone, it still wants a very big width. I think at least this bit is buggy.

Articles

Gnome shell starting to become my favourite

In Gnome,Gnome shell,Linux desktop,open source,Unity on August 19, 2011 by oli4444

I have several different computers, running Gnome 2, Gnome 3, Unity and Mac OSX. New interfaces always take a while to get used to, so after the initial launch of Gnome 3 and Unity the “classic” Gnome 2 interface was still my favourite to get my work done.

Gnome 3 has the best looks (yes, I like it better than OSX), but to get my work done I don’t need the best looks. A long time ago I ran Enlightenment with the aliens theme to have a very cool desktop, but I always switched the Sawfish when I had some real programming to do.

So what is making Gnome 3 making my first choice? The main reason for that is the keyboard control. Hit <alt><f1> or the <windows> key and start typing some characters of the program name and hit enter. Better, start typing the name of the bluefish project file that I used recently and hit enter, and I have my project open. I don’t have to type the exact name of the command (typing “te” already selects “gnome-terminal” for me, “tru” selects my “bluefish_trunk” bluefish project file, “fi” selects firefox, etc.) which makes it very fast and convenient. Switching virtual desktops (called workspaces in gnome 3) is <ctrl><alt><up> or <ctrl><alt><down>, and when I need a new desktop it is automatically created by hitting <down> one extra time.

Some other things I like a lot: tiling widows side by side by dragging a window to the right/left, and restoring the original size when moving the window again. However, I would like to be able to widen the windows after tiling, the left window can be widened on the bottom-right corner, but there is no way to make the left window a bit wider. I like <alt><`> for switching between windows of the same application (it feels natural because it is so close to <alt><tab>). I like <alt><f2> to start new commands, especially when using <ctrl><enter> to start that command in a new terminal.

What would make things even better for me:

  • <Alt><tab> behavior per desktop per window. I just doesn’t make sense to me that switching between two web-pages in two firefox windows is different from switching between two web-pages in chrome-and-firefox. I often <alt><tab> between a couple of terminal windows and bluefish windows. The default just switches applications, and I usually need a specific session of that application on the same virtual desktop. The alternate tab extension however, makes me tab between all open windows on all virtual desktops (which usually is a long list).
  • Easier mouse access to virtual desktops. The hot corner is left, but to switch to a different virtual desktop without key combination, I have to move the mouse all the way to the right (which is a long way on a widescreen display). I have the workspaces menu extension installed to have the virtual desktops in the top bar, but it needs two mouseclicks to switch between two desktops. An improvement could be to make the top-right of the screen a second hot corner that activates the workspaces area by default (I have the right-hot-corner extension installed, but I first have to move the mouse to the top right for the hot corner, and then to the middle to activate the workspaces area).
  • Better use of the vertical screen space. The top bar of each window is quite high, and it only has a close button and you use it to drag the window. Especially when maximising a window the top space of the screen has a lot of unused space. This is an area where Unity tries to do good things (except that the menu thing in unity is slow and buggy as I posted earlier). Luckily Bluefish has a fullscreen feature!
  • Make it the default to open a new window. For most programs I use I have multiple open windows (terminals, bluefish sessions, firefox sessions etc.). If I want to switch to an open window it is much faster to select that window in the overview mode than clicking the icon in the dash (which selects just one of the open sessions which is anyway usually not the one you need). I want to use the dash to start a new session, regardless if I have a session running already. Having the hold <ctrl> while clicking is annoying. Same for starting a program using the keyboard control: if I type “fi” and hit enter, I don’t want any of my existing firefox sessions, I want a new session!

Statuses

Ubuntu Unity breaks Bluefish

In Bluefish,Linux desktop,open source,Ubuntu,Unity on July 13, 2011 by oli4444

Slowly more bug reports are arriving that can only be reproduced on Ubuntu 11.04 with Unity. Ubuntu 11.04 with the Gnome shell, or with classic gnome are not affected. This is kind of difficult for an application developers perspective. I personally don’t care too much about Unity, I like Gnome shell better so I switched to Fedora. But a lot of users do use a default Ubuntu install, so they will have to deal with Unity. And that’s why I have to deal with Unity bugs…

Menu synchronisation is broken

If you open two documents in Bluefish, and you disable for example “Show right margin” for one document, and you switch to the other document (which has show right margin still enabled) , the menu toggle option is disabled. It seems that unity was not designed for applications that change menu toggle options without the user clicking on it.

Snippets menu is totally gone

If you use the snippets plugin, Bluefish has two menu bars. Unity seems to disable all menu bars to show them on the window border. But the snippets menu bar isn’t showed in the window border… It seems that Unity was not designed for applications that have multiple menu bars.

No menu when full screen

A popular feature for netbooks is the fullscreen mode of Bluefish. But if you hit F11 with unity, there is no menu. Not really a killer bug, since unity already optimises the vertical screen space, so fullscreen makes little difference.

All recent menu entries open the same file

… which renders the recent menu quite useless. Always the top-most entry in the recent menu is activated, regardless which entry is clicked.

Weird user interface shifting

This one puzzles me. I can’t really describe it, so I made a screencast. Every click on the user interface moves the user interface from left to right. You can’t open a file by doubleclicking. You can’t click a button, you’ll end up with the buton next to it.

It doesn’t happen all the time, but once it happens it is really annoying!

What to do now?

I filed some bugreports for unity, but I haven’t seen a response yet (there are quite a few bugreports, so I can image the developers have a busy time). What should I do as application developer? Tell users to avoid Ubuntu with Unity?

Follow

Get every new post delivered to your Inbox.