ChaniBlog











{February 13, 2009}   tokamak II

hmm. I seem to have run out of words. my mind’s just drawing a complete blank.
tokamak was good, of course. everyone else has blogged, we’ve even got a dot article.
the first day was all presenations. the second day was (for me) all scripting, which I already blogged about, and I also repeated my presentation for some locals who missed it.

the third day I did a lot of writing and planning. lots of ideas. :) I have a possible soc project now, yay! (no, it’s not kdm.) I wrote a little code, too.

day four… I think I was a little burnt out. that seems to happen often after a really good day. I spent far too much time banging my head against stuff I didn’t really want to work on. stuff I do want to do will be rather awkward unless I improve the ZUI a bit first. oh, and they forgot to feed the vegetarians… but that was ok – we found a nice pasta place in the mall food court.

aaron brought his guitar along after lunch, so I subjected everyone to some practice of both the songs I know… and ended up learning a new song :) although I’ll have to buy a capo to be able to keep playing it. I need to learn more easy songs so that I can practice more without getting frustrated or bored.

as much as I’m happy to be home, it’s a shame that tokamak was over so fast. I probably won’t get to travel again until may, at the earliest, and I’m already beginning to miss people :) KDE’s a great community to be part of.



{February 13, 2009}   screensaver widgets in 4.2

I meant to blog about this when 4.2 was released, but didn’t get around to it. it seems like there’s a bit of confusion about the security of screensaver widgets. also, I figured I should remind everyone that to turn them on you go to hte screensaver KCM. :) quick summary: so long as you use common sense when adding widgets, and take a minute to test them, it should be perfectly safe. and if you’re feeling paranoid, you can just leave them disabled, of course.

the thing about screensaver security is, it’s not really about protecting against malicious code. that’s important too, but it applies to all of plasma. for the screensaver, I have to think about malicious (or simply meddlesome) users. if I leave my screen locked at school when I go to the bathroom, I don’t want to come back to find goatse or files deleted or anything mean like that (and yes, I’ve been in classes where this was a problem).

back in summer I looked over the code of every damn plasmoid in workspace, kdeplasma-addons and playground. what I found surprised me. nearly every plasmoid fell into one of two categories: completely and utterly harmless (like the bouncy ball), or completely inappropriate for the screensaver (like the taskbar and folderview). only a handful were in-betweens: a few launched external programs, which were safely hidden behind the screensaver but still there to be annoying when the screen was unlocked, and a few had actual security issues (like twitter, unless you *want* random strangers posting to your account). not only that, but most of the inappropriate ones were contained in a few categories. those categories have become a little more fuzzy since then, but there are still two or three that could just be banned from the screensaver entirely.

so, it turns out this isn’t so much a security problem as a “keep the inappropriate plasmoids from cluttering the appletbrowser” problem. if you sit and think for a minute about the plasmoids you’ve added to your screensaver, maybe poke at them while it’s locked to see if you can break stuff, you’ll easily see whether your screensaver is safe to leave unattended. the only thing I didn’t find completely obvious was that the battery applet lets me suspend from the screensaver (and personally I consider that a feature).

there are two things I had planned: making it possible to filter out the inappropriate plasmoids from the appletbrowser using categories and some security constraints, and making it possible for the small number of plasmoids in the grey area to ask if they need to act more securely, so that they can be allowed on the screensaver too. unfortunately this got derailed by other things not happening, and now some of the detailed notes are lost, but someday I’ll find time to do it…



{February 13, 2009}   home!

yay, I’m home. :) horribly jetlagged (slept from about 4pm to 2am), but I’m in my own warm bed. this post skips between past and present tense a bit randomly, because some of it is copy&pasted from notes.

the flight back went well, despite a few hiccups. I missed the bus I was planning back from the mall, so nuno’s sister came and we took a different route back to her place. then we called for a taxi. After lots of negotiation, it turned out i could only get a taxi at exactly 4am- i was hoping for more like 4:30, but oh well. I collapsed into bed for a few hours, dragged myself out to the taxi, and got to the airport before the lufthansa counter had even opened. When they did open, the lady there spent what seemed like forever on the computer, making worried faces, but in the end my ticket popped out- for an extra 40 euro service fee :/ i was too tired to argue. I had tickets. I got a boarding pass, and headed to the gate. Turns out i even managed to get a window seat.

in frankfurt, I discovered they’d lost my meal request. Bastards. I spent at least five minutes trying to talk someone into arranging something for the flight, even a snack, but she just pointed me to the little snack bar in the terminal that sells shit all at ridiculous prices. An 11 hour flight and again they’re hiding behind rules, saying it takes 24h to request a special meal… When i was flying to china the travel agent forgot the veggie meal request, and i didn’t find out until they were actually serving food, and they still managed to get me some rice and veggies. :P

…so i wandered the airport a bit, and bought some haagen dazs ice cream to calm down. And i just remembered the quality of food on the way over- i suppose i’m not missing much ;P but now i have no sandwiches, only granola bars, and no stop in toronto for tim hortons. We’ll see if the people on the plane are any more sympathetic.

they weren’t. I’m beginning to see a pattern here.

however, by coincidence both lunch and dinner had a “pasta” option which was not only vegetarian but damn good (for airline food). all I had to do was give away the prawns/shrimp/whatever sitting on top of my salad. the lunch came with a brownie, too. with cranberries it in. yum.

oh, and there was free booze. I took full advantage of that. :D

the plane we were on was pretty old – no personal tvs, just overhead ones every ten seats or so, and music on the armrest. however, they had done a good job with the music – the mode button worked properly to switch between audio and video (instead of making the first two audio channels the tv sound the way air canada does), and there were a full 30 audio channels. one even had poetry. I found two channels of chinese pop music after the movies were over. Cheesy as it is, i like it :)

sadly, all that free booze made it impossible to get any hacking done… I hate the feeling I get when I try to think about code while drunk. so instead I read rss feeds (some of you still aren’t putting the full post in the feed, damnit :P ) until the movies distracted me. that’s the problem with not having personal tvs, I can’t turn it off so I end up watching just because it’s on.

the flight went by pretty quickly, with two movies and plenty of alcohol. when I got home I just went straight to bed. oh dear, it’s 6am now… I feel like it’s time for another nap. I have school at 12:30. that’s going to be odd. good thing it’s the weekend after that – I have a hell of a lot of catching up to do. I’ll probably disappear for a week or two now. (except, I have a blog backlog to clear too…)



{February 11, 2009}   porto

Well, tokamak is over, but i’m still in portugal. Somehow i accidentally booked the return flight for 3/10 instead of 2/10. One little digit makes such a difference… And none of the three other people who have copies of my itinerary noticed either. :/ The people at the airport won’t lift a finger until someone in vancouver tells them how much to charge me, and it’s the middle of the night there, so… Well, by the time people arrive at work in vancouver, i fear the people in porto will have gone home. The earliest flight i have a chance at is on thursday anyways, though.
The good news is, nuno’s taking care of me. I’m staying at his sister’s place, he loaned me a phone so i can call him, and i even got his internet password so i can go to the mall and get online there. Sadly there’s no internet in this apartment. He hacked my power adaptor so that my laptop’s plug would fit, too- the hole for ground was slightly too small. So even though i don’t have internet, i at least have my computer. :)

And now that all that is sorted and i’m just waiting for the airport, it’s safe to panic. :P i wanna go hooome :(
Maybe later i’ll wander out and explore the town. Right now i need a nap.

…So i napped right through the day, to 5:30. Nobody was answering the phone at the airport- turns out this is exactly when they close. I tried calling travelocity too but got nowhere. Might as well have another nap…
Later tuesday evening, nuno’s sister got home. We went to the mall for dinner and she taught me about the buses. :) I was so stressed out i couldn’t eat the sandwich i bought until we got back to the apartment… And then i was going to have a shower, but suddenly i woke up and it was 4am ;)
I woke up again at 9, showered, and started the day by calling the airport. Ohhh, what a long day. They’d been told only travelocity could change the ticket, but travelocity had said the same about them, so they sent another telegram (or something similarly ancient) to vancouver, and i called travelocity again, who still insisted they weren’t the ones to talk to.

I don’t want to think about the phone bill at this point.

I packed up and headed out, intent on staying at the airport until someone took responsibility. I had to take the bus back to s. Joao to get the metro, so i stopped at the mall under the hotel for internet and lunch (in that order) where i found out my debit card wouldn’t even let me buy a 4 euro lunch, despite having $24CAD – and i was getting low on cash – so i talked pete into going to the bank in the middle of the night to shuffle money around. <3

[update: here’s the full notes now]

next stop, airport. The people at the counter had it in writing that they couldn’t do anything, so i got travelocity on the phone again, andmade them talk to each other, andthen ravelocity was going to at least try. After waiting half an hour for them to call back i find out the cellphone isn’t accepting calls… Odd, it worked fine in the morning when they had to call back. Anyways, i then realised the airport had internet, and switched to skype. Many dropped calls and much waiting on hold later, i was told the flight wasn’t changeable. Several more dropped calls later, i got through to a supervisor, gave him the # of the counter as well as my #, and he said he’d call vancouver and get back to me.
While i was waiting i tried some vancouver numbers- one was an answering machine, the other directed me to a toll-free number that didn’t work.

5:30 came and no reply. The counter closed, so i finally had a chance to find a toilet, then sit down in an actual chair. After going on irc and feeling hopeless for a few minutes, I phoned the second vancouver number, explained that the tollfree number didn’t work- and found i was speaking to someone who had been trying to solve my problem for the last 45 minutes :) she sounded very sympathetic – the first person who wasn’t hiding behind policy! Yay! – and had just figured out that it would cost $150 to change the ticket, and was trying to find the fare difference to upgrade me (no tickets in my class were left- turns out there are lots of different economy classes). She urged me to call the lufthansa sales number in portugal, to get tickets before they got more expensive, because the class that was available yesterday was full too now. So i went to the lufthansa website to find that number… And the net dropped out.

I called nuno and he said there ws a free computer in the airport, but the only one i found was offline too. I got pointed to the information counter, where someone showed me the number i needed in an information booklet. So i used my phone to call, and prayed that the battery would last.

The guy who answered there had to put me on hold for a looong time, and was then rather confused, because vancouver had alredy changed my ticket- but hadn’t told him how much to charge. His advice was to show up in the morning and pray that the lufthansa counter had the numbers. I got off the phone and discovered my internet had mystriously come back without even logging in… And just before i call vancouver again, my phone rings (looks like it decided to work again) and it’s the lufthansa guy in porto, who just got the price of my flight. $433 in total, not cheap, but it’s a flight. I can go home. I got himto send the info to the counter again, just to make really really sure that when I show up in the morning they know they’re allowed to take my money.

so now it’s quarter to 9, I’m back at the mall under the ibis, I’ve had dinner (yummy pasta – now that I’m not so stressed I can eat something other than fruit) and got a number for the taxi… I just have to go back to the apartment, get nuno’s sister to call me a taxi, and set an alarm for 4am again. and then, hopefully, I may actually get to go home. I never did get to see the city ’cause I was in the airport all day, but the view from the apartment is quite nice.

I am really, really really grateful to everyone who’s helped me out so much over the last couple of days. especiallly nuno and his sister. I may well have been completely screwed if I was on my own. *big hugs*

wish me luck.



{February 7, 2009}   adventures in plasmaland, part 4

tokamak is going well, and I’m hacking again. I decided it’s time for my victorycalendar plasmoid to get a config dialog. to start off, we’ll just try to configure the text of the label.

[oops. it seems I forgot to blog about my last bit of work. quick detour: it now uses flag icons and cycles between three colours when clicked. didn’t take much code. here’s the diff.]

sooo… we need a config file. from the package spec we see that it should be at config/main.xml and from the kconfigxt tutorial we’ll learn what to put in it.

I’m not going to repeat that tutorial, so go read it. at least the bit on the contents of the xml file. ignore the c++ generation stuff – obviously we’re not using c++. :)

so I’ve written a very simple config file now (I copied the crud at the top from an existing file). all it has is an entry for the label. next step: making a config ui to set it with.

this one goes in ui/config.ui, and of course I’ll be making it in Designer.

it’s pretty easy: a label and a lineedit. the important bit is that the linedit is called kcfg_label, to match the “label” name in main.xml.

so… er… I have these files. now what?
now it crashes, that’s what. :) kconfigdialogmanager doesn’t seem to like my config ui.
…turned out to be something that needed adding in libplasma, and aaron fixed it for me. :)

anyways. now we have a config dialog, and it saves its one setting… time to actually *use* that setting. :)

taskName.text = plasmoid.readConfig("label");

that gets us the right value on startup. now we need it to update when hte config is changed. for this, we implement the configChanged function, and… umm… do something. something like this:


plasmoid.configChanged = function()
{
taskName.text = plasmoid.readConfig("label");
}

except… that function isn’t getting called. looks like I hit another bug. aaand that’s fixed too now. :)

whee! now the text is all nice and configurable. I think the next step will be to add multiple rows.

oh, btw – I won’t be working on the kconfigmenu plasmoid any more. sebsauer beat me to it: if you add the traditional app launcher and configure it to hte system settings view, you get exactly what I was aiming for. :) this is a good thing; I have no shortage of stuff I want to work on.



{February 4, 2009}   on the road again

so in three hours my alarm is going to go off, and I’ll have to head out to the airport yet again. somehow I find myself blogging instead of sleeping, though.

I haven’t touched plasma this week – I’ve been busy catching up on homework, then trying to get ahead so that I can ignore it during tokamak. :) it’ll be great to see the plasma team in person and get some solid hacking time in. whee :)

so, um, yeah. I’m still alive, and I get to go to portugal! woo! the amount of travel I’ve done in the last year has been kinda crazy. crazy awesome.

I think I’m gonna pass out now. more blogs will come, with code. mmm, code. (actually, I did some haskell programming on hte weekend for homeork. that was fun. and hurt my brain.)

also, my desktop is prettier than your desktop ;P here’s my main activity and one of my school activities



et cetera