call out to potential mentors for summer of code

the summer of code student application period is scheduled to open on march 24th and remain open until the 31st. at this time we will begin receiving applications from students interested in participating in summer of code with gnome.

after the application period closes, a small selection committee will decide which applications are accepted. we anticipate hundreds of applications from students, however, and in many cases, we will be unaware of the details concerning the area of gnome that the student is interested in working on.

if you’re interested in having students work for the summer on your corner of gnome, please sign up to be a mentor. generally, anyone who is a gnome foundation member will be accepted as a potential mentor. as applications are coming in, please comment on any that interest you and up/downmod as appropriate. indicate if you are willing to mentor a given application. this will make the job of reviewing applications and selecting the winners much easier and makes it more likely that your corner of gnome gets the attention that it deserves.

it’s not a bug, it’s a feature!

the hardy alpha 3 livecd has this strange compiz bug.

if the window decorator starts up before the gnome settings daemon then the decorator uses the default gtk selection colour (a deep blue). the bug is that when the settings daemon gets itself going the buttons on the window titlebar change colour but the titlebar itself stays stuck at the old colour.

this produces a very strange effect:

desrt metacity theme screenshot

when i first started up the live cd i said to myself “wow! this is a really cool new theme!”. the theme seemed to come and go, though, and i finally realised that what i was looking at was actually just a strange bug caused by a race condition.

anyway, i like this bug so much that i’ve turned it into a proper theme. i did this simply by taking the “human” metacity theme and hardcoding the two different colours into it.

unpack the tarball in your ~/.themes directory.

enjoy!

download here

public notice

the following word should never be spelt with a capital letter:

desrt

k, thx :)

cookie to jdub

a name i was thinking about a long time ago and jeff reminded me of

i present to the world:

GVariant

if anyone has anything negative to say about this name, now would be a good time…

dear lazyweb: please name DValue

DValue is the datatype at the foundation of dconf and of the glib-based dbus bindings that rob and ori are theoretically working on. it will end up being part of libglib (probably for the release before next guadec).

it is named DValue because it used to be named DConfValue.

you can read a little bit about DValue here.

one thing to note is that, unlike GValue, a DValue is actually a value — not a container or a variable. it can only exist as a value with a type and the value can never change. when you create it it has a value and the only way to get rid of that value is to destroy it. also note that it can contain exactly those values that can be sent over dbus. it cannot contain, for example, object references.

the problem is that its name starts with a ‘d’ and everything in glib must start with ‘g’. i would rename it to GValue but i cannot do this for obvious reasons.

i need a name for it that starts with g. this is something that a lot of people have thought about for a long time without coming up with any good name.

all suggestions must start with G, be short (G + 5 chars max) and not conflict with anything currently in glib or gobject. entries will be judged by my personal whim. i will buy the winner a cookie at our next meeting. feel free to list many suggestions but note that most of the obvious ones have already been considered and shot down for some reason or another…

thanks :)

gnome-screensaver vs. gnome-power-manager

today on #gnome-hackers i was musing to richard about how i think that the current g-p-m/g-s-s setup is very confusing. i’ve thought about this for a while and today i did an AsciiBuilder mockup of what i think the interface should be. he was interested enough to ask me to blog about it to gather opinions from planet.

i make no proposal about how this might be implemented or what the hand-offs between g-p-m and g-s-s might look like. i only propose this as what we should present to the user (and we can figure out the technical parts later).

here it is:

  Computer is inactive after         [2min, 5min, 10min, 1hr, never]

  [X] Automatically lock when inactive

      (*) immediately

      ( ) after an additional        [10min, 20min, 1hr, 2hr]

  [X] Show screensaver when inactive

      for the first                  [10min, 20min, 1hr, 2hr, forever]

          [X] even when I explicitly "Lock Screen".

the [2min, 5min, etc] are not meant to be an exaustive list of times supported by these options. they are merely there to indicate that some time selector is required with possible “never” or “forever” options, as appropriate.

forget screensavers for a moment. pay attention to only the top half of the dialog box.

the basic principle here is that in the absense of a screensaver, the monitor should either be showing your desktop or be powered off (with a small exception made for showing the ‘unlock’ dialog). this powered-off state is called “inactive”. i have not addressed the challenge of how to express this nuance to the user (although maybe it will just be obvious).

if ‘locked’ (implicitly, desktop is not shown) then this implies that the monitor must be off. however, the reverse implication is not true so we allow for a time difference between these two things occuring (including the possibility of zero and infinite time difference).

remember: so far, inactive means “monitor power is off”.

bringing in a screensaver spices things up a little bit but it’s not too bad. i see the screensaver merely as the initial (possibly never-ending) phase of power off. you show it first the first 10 minutes of what would have previously been the monitor’s powered-down mode. there is an exception for the “Lock Screen” item on the panel that allows you to have the screensaver skipped since many people will probably desire this.

note: no relationship whatsoever between the transition from screensaver to power-off and the transition from inactive-but-unlocked to locked. either may occur first (or never).

i think the behaviour from this dialog will be extremely clear and totally specified except for one small detail: when the screensaver is enabled and the unlock dialog box pops up after the monitor has gone to sleep, and the user fails to enter the correct password, then what happens? does the screensaver come on for another 10 minutes or does the computer go directly back to the state that it was in before the user moved the mouse? honestly, i don’t really care and i don’t think we need to expose this as an option.

a possible variation on the screensaver section above is as follows:

  [X] Show screensaver when inactive

      for the first                  [10min, 20min, 1hr, 2hr, forever]

  [X] Show screensaver when I "Lock Screen".

      for the first                  [10min, 20min, 1hr, 2hr, forever]

conceptually it is slightly clearer, and it also allows for more options not allowed by the other dialog. i actually prefer the second choice but i understand that some might see it as overkill.

the use case i have in mind for the second variation is that it might be helpful to show the screensaver for a minute or two after explicitly locking in order to use the monitor as a source of light (when going to bed or locking up the office at night). this might be desired even when a screensaver for inactivity is not desired (or if the inactivity screensaver is desired for a longer length of time).

it might be desirable to put the “screensaver section” in its own dialog (along with the options for selecting the specific screensaver to use).

as for the “times”: how do we do it? spinbox? slider? dropdown menu?

i really like the idea of a dropdown menu containing only “useful” lengths of time. the list of what makes a “useful” length of time is something like:

* 1 minute
* 5 minutes
* 10 minutes
* 30 minutes
* 1 hour
* 2 hours

a consideration not addressed here: perhaps someone wants to cause their computer to immediately be considered as “inactive” (because they are leaving their desk and they want to save power or just hide their screen contents) but doesn’t want to deal with unlock dialogs. we currently have absolutely no way of dealing with this. it’s difficult too, since a simple accidental flick of the mouse would be all that is required to re-activate the desktop. hot corners, anyone?

that is all.

murray jeff

la la la another one of these… time to pile on!

murray: please don’t “retract your post” as some are calling on you to do. this is such a ridiculous concept. you said what you said because it’s exactly what you meant to say. publishing a retraction won’t change that.

clearly some people agree with your statements and some disagree. this is an issue of personal opinion. your blog is obviously your opinion. the only thing i wish is that you were a little thicker on actual substantiation behind your claims and a little bit lighter on inflammatory language. perhaps something to keep in mind for next time.

there are a couple of things i really hate. one of them is people who persistently pretend to have a different level of skill than they really do (this goes in both directions). the other is people who talk trash behind someone’s back and act all friendly to their face. if someone has a problem with someone else, i think that they should make that person aware of it.

screaming it from the rooftops may or may not be the appropriate method to do so.

clarification: the “people who persistently pretend to have a different level of skill than they really do” comment has absolutely nothing to with the current goings on. i list it here only because, it is literally one of my two least favourite things.

important warning to postfix users

a few days ago i woke up in the morning and i checked my mail. i replied to a mail and evolution told me:

Recipient address rejected: Policy Rejection- You have exceeded the maximum(350) number of messages or recipients per hour. Please call Mountain Cablevision Technical Support: 905.389.1393. Thank you.

i instantly panic as i try to figure out which machine in my house has been infected with malware.

“mailq” on my main server says 3000 outgoing deferred messages. ok.

i take a look into the log and discover that the outgoing messages are all bounce replies for non-existent addresses. i’m generating backscatter! what the hell… i thought my postfix was configured properly. since i only receive mail for local users (and nothing fancy is going on) the mails to non-existant users are supposed to be immediately rejected at RCPT time.

the odd thing is that all of the bounces are for non-existent addresses *@kopesetik.desrt.ca.

i check my postfix configuration, and surely enough:

mydestination = desrt.ca

after reading some documentation i find out about another postfix option “relay_domains”. this is the list of domains that postfix will accept mail for (even if not to deliver locally). by default, this is set to be exactly equal to $mydestination, so in theory your mail server by default should only accept mail for domains that it will deliver locally for.

unfortunately there is yet another postfix configuration option. this is the worst setting ever. it is called “parent_domain_matches_subdomains”. this configuration parameter changes the interpretation of other configuration parameters. for each item listed in this parameter the meaning of the value of that item is modified. if for example, item “foo” is listed, and in your configuration file you have “foo = desrt.ca” then the meaning is now actually taken to mean “foo = *.desrt.ca”.

rather moronically, the default for this option is to include relay_domains but not mydestination.

so we have:

mydestination = desrt.ca
relay_domains = $mydestination
…but really, relay_domains = $mydestination plus a bunch of other crap…

this causes your mailserver to accept messages that it can not possibly deliver. in response, it must generate bounce messages. this makes you a source of backscatter and a contributor to the spam problem.

the brokenness can be fixed by setting the “parent_domain_matches_subdomains” option to empty.

broken broken broken.

i tried testing delivering to “nosuchuser@asdf.example.com” against the mailservers of some other people i know and about half of them had this exact problem (the ones with the problem were all running postfix). your mailserver should issue an error immediately on RCPT to such addresses. if the message is accepted for delivery then it is too late. please check your mailserver and fix as appropriate.

it is a good day

take that, web!

gcc feature breaks glibc feature

most gnome hackers are probably accustomed to the fact that they can pass a null pointer as a value to glibc’s “%s” conversion character and get the string “(null)” output instead of a crash.

take for example, this program:

#include <stdio.h>

int
main (void)
{
  printf ("%s", NULL);

  return 0;
}

this will output “(null)”. nice. i like this glibc feature.

of course, this program fails to put a newline. let’s make the obvious fix:

#include <stdio.h>

int
main (void)
{
  printf ("%s\n", NULL);

  return 0;
}

this program segfaults.

why is this?

let’s look at the assembly code generated for the second program:

...
...
main:
        ....
        ....
        call puts
        ....

it turns out that if gcc sees “printf (”%s\n”, string);” then it assumes that this is exactly equivalent to “puts (string);” and emits the puts code instead. this is without any optimisation enabled. of course, compiling with -ffreestanding causes it to not make this assumption.

of course, puts will crash if you give it a null pointer.

i guess the assumption is probably valid by strict reading of the relevant specifications (printfing a null string is probably said to be “undefined”) but clearly this feature of gcc is in conflict with the “(null)” feature of glibc.

Bad Behavior has blocked 137 access attempts in the last 7 days.