Search Results: "gio"

23 March 2008

MJ Ray: Random recent threads from planet debian

22 March 2008

Neil Williams: GVfs and http://

Update
After contacting Sebastian Dr ge, I've found that the problem with GVfs isn't in the deb-gview code, it is a permission problem within GVfs - the current deb-gview CVS code works with remote URIs when run under sudo which isn't ideal but at least indicates the nature of the problem. Once I have confirmation and/or gvfs is fixed, I'll skip deb-gview 0.1.6 and upload 0.2.0.

** (deb-gview:31002): WARNING **: file-read:http://ftp.debian.org/debian/pool/main/g/gpe-tetris/gpe-tetris_0.6.4-1_i386.deb:The specified location is not supported

Hmm. This is with current CVS of deb-gview, already substantially modified to work with GIO and GVfs as libgnomevfs is deprecated. I wanted to look at the port because quicklist and gpe-filemanager will need similar ports.

$ dpkg -l 'gvfs*'
ii gvfs 0.2.1-1 userspace virtual filesystem - server
ii gvfs-backends 0.2.1-1 userspace virtual filesystem - backends

I have an RC bug in deb-gview that I need to fix and I wanted to do the two jobs in one but it's looking now as if I'll need two uploads, 0.1.6 with a trivial fix to unstable just to fix the existing bug and 0.2.0 to experimental with a lot more changes but partially broken functionality. It's a shame because I've got everything else working using GIO - it is only the GVfs part that is giving errors.

Anyone else using GIO and GVfs with http:// in Sid?

21 March 2008

Ian Wienand: Grace Wifi Radio Review

I recently purchased a Grace ITC-IR1000 Wifi Radio from Beach Audio. Grace ITC-IR1000 Wifi Radio There seem to be a number of competing products available at the moment, and it seems they are all based on the Reciva internet radio platform. This appears to be an ARM based system running Linux (checkout the GPL compliance area). It has built-in wireless, so connects up directly to your 802.11 network. It supports WEP and WPA; entering the WPA key is a little like entering your high score on an arcade game with a built-in scrolling alphabet. It supports all sorts of codecs, including the most important Real, WMA and MP3. Once on the network, it contacts Reciva service (free) to update and download channel lists. Once there, you can select stations filtered by region (Europe, Oceania, etc) then country. There are literally thousands to choose from, and users can contribute streams which are filtered by Reciva and added to the database periodically. An excellent feature is the ability to log-in to the website and both build favourite lists and add your own personal streams. You then register your radio's serial number with the website and on the next channel update you get access to your lists. It also offers you the opportunity to connect to a local PC to stream music from folders there; I haven't looked into this feature at all. Overall, it's a great device. The audio quality is great, and it seems to have at least a little sub-woofer built in. It has some nice features; 5 of the buttons on the front are quick access preset buttons, just hold it down when you are listening to the station and it remembers it. It supports a wide range of streams, the interface is simple to understand, it keeps the clock via NTP and directly connecting to the wireless is great. My ideal application is for a bedside clock radio, so I can listen to .au radio as I go to sleep and wake up. It has an inbuilt back-lit clock, sleep timer and alarm system, but they all take a bit of fiddling. The buttons are small and black, which doesn't help in the dark, and most access is done via the big scroll wheel which you press to make a selection (think iPod). However, the resistance of the rubber pads is less than that the pressure required to push the button in, so it really takes two hands. This means when you want to setup an alarm and put on the sleep timer as you go to bed there is a bit of fiddling through menus, etc. Also, as it is playing the clock seems to go away. Initially I had a problem with firewall ports, but it doesn't seem a big issue on the forums so it must have just been me. I also wonder what happens when Reciva go out of business, because all the tuning happens via their website. Something similar happened when 3com Audrey support was dropped; it then became a matter of faking DNS replies. Sniffing the protocol might be fun :) All in all, although it sounds a little silly, if you know what you want it for this is a great little system. I imagine any expat will get their money's worth listening to home radio stations. If you're only interested in local radio, I'd still suggest the best thing is still probably (surprise, surprise) a radio. It leaves a little to be desired as a bedside radio but is otherwise a very nice toy!

20 March 2008

Jeff Bailey: Update on my dad

My dad's home, having had an angioplasty and three stints put in.

So we're all home now and recovering, and the prognosis is good all around.

Jeff Bailey

More updates:

* I can now walk to the mailbox on my own, and I only need to rest once on the way.
* I'm generally leaving the walker alone. It causes me more grief than it solves.
* I feel confident making the three steps up and down the balcony - which is good because the main doors are still too heavy for me.
* I've had a shower. I smell much better.
* We're starting to take visitors now - Jim and Sarah were here last night, Andrew and Sarah are coming tonight. It'll be nice to feel a little less isolated.
* I haven't spoken to my dad in a couple of days, but they were still scheduling his angiogram when I last spoke to him. All the walking and stuff that I've been doing means that I'm spending the balance of my day sleeping, so hopefully I'll catch up later today.

At this point, I'll probably post updates a lot less frequently, because it feels like the initial touch-and-go part is done. I'm looking forward to being off the steroids, and slowly spacing out the medications and such, but we're just in that zone where I'm getting up and around and am just waiting for lifting restrictions and such to be removed.

In the last few days, I've managed to sort out the various school extensions I need, the short term disability paperwork, the DMV disabled sticker paperwork, and all that.

Phone calls are much appreciated - the number is in my Orkut and Facebook profiles, it gives me a chance to interact with people and I'm starting to worry that I have too much time and am bothering the ones I talk to al the time. I'm still quite behind on emails, mostly because typing on the blackberry gets to be a bit much after a while.

I suspect I'm about to go into that annoying phase of recovery where nothing is urgent anymore, and we're coping, but we go stir-crazy because I'm not actually better enough to interact with the world yet and Angie still has to do almost everything for me. Any suggestions on making that part of the recovery suck less are appreciated! I've watched it a pile of times, but everyone seems to forget about it (including the people going through it).

Sunrise is 7:11 here this morning, I think I'll try to sit outside for it.

18 March 2008

Neil Williams: GNOME 2.22 and GPE (gpe-filemanager to be exact)

This could be fun - gpe-filemanager is not currently available for Emdebian because it depends on libgnomevfs which in turn brings in a variety of other dependencies ending up with liborbit2 which simply does not (and appears cannot) cross build.
Thankfully, GNOME 2.22 deprecates libgnomevfs in favour of GIO which is already part of libglib2.0-0 and only needs other stuff via plugins.

I need now to port deb-gview to GIO and, in the process, probably see if gpe-filemanager can also be ported to GIO. After all, a GUI without a file manager is going to look a little odd.

I'm still working on libqof2 upstream too so it looks like I won't be doing much on Lenny for a while - not directly at least.

I expect to have deb-gview 2.0.0 depending on GIO and in Lenny and maybe quicklist too. (Typical, no sooner does quicklist migrate from Gtk1 than it also needs to migrate from libgnomevfs.) Then there's all my usual Debian and Emdebian stuff.

17 March 2008

Russell Coker: Barack Obama wants a National CTO

I am just watching US Senator Barack Obama speaking at Google about his bid to become the next US president [1]. He has announced plans for allowing greater citizen oversight of the government including having all government data in open file formats (a great idea - the Australian Bureau of Statistics has a large amount of data online in Excel format). But his most significant item so far is to have a National CTO (Chief Technology Officer). It’s an idea that seems totally obvious now that I’ve heard it and leaves me wondering why I never thought of it before! Barack understand technology, wants a functioning democracy, and gets a +5 Insightful from me for the CTO idea! He also announced a plan to double federal funding for basic scientific research as part of a measure to make the US more competitive with other countries. He mentioned the US standing in the world as a problem (it’s the first mention of this that I’ve heard from anyone in the US government) and notes this as an issue which limits the ability of the US to save lives in regions such as the Darfur. He also claims that there is no clash of civilisations and cites his experience living in a Muslim country as helping to build bridges. When discussing his reasons for running he said that he believes that he can bring his country together to solve problems better than other candidates. That’s the type of thing you often hear and ignore in political campaigns. It is often difficult to believe that someone wants to be famous and powerful for anything other than the most selfish reasons. But Barack gives me the strong impression that he is genuine. He stated a plan to shut down Guantanamo bay (presumably just the prison and torture aspect - I’m guessing that he is not intending to close the military base) and to stop “rendition” (sending prisoners to other countries to be tortured). His plans for education are innovative, as part of educating young children (0-3 years old) he stated an aim to teach parents to read so that they can read to their children! It’s sensible and obvious once you have heard it, but no-one seems to have publicised that idea before. He announced that he will increase teachers’ salaries. He describes the US as having an “empathy deficit“, it’s obvious to almost everyone outside the US but not something that many people in the US realise. He wants decisions to be based on facts and is determined to use facts when dealing with health insurance companies. I just wish that we had some politicians like him in Australia. In terms of policy the Greens politicians would agree with him, but the combination of great policies, insight, and excellent delivery seems a lot better than any of the options in Australia. Update: Changed the post (including the permalink) to have the correct spelling of Barack. Mental note - double check the spelling of everything in the permalink.

Russell Coker: Barak Obama wants a National CTO

I am just watching US Senator Barak Obama speaking at Google about his bid to become the next US president [1]. He has announced plans for allowing greater citizen oversight of the government including having all government data in open file formats (a great idea - the Australian Bureau of Statistics has a large amount of data online in Excel format). But his most significant item so far is to have a National CTO (Chief Technology Officer). It’s an idea that seems totally obvious now that I’ve heard it and leaves me wondering why I never thought of it before! Barak understand technology, wants a functioning democracy, and gets a +5 Insightful from me for the CTO idea! He also announced a plan to double federal funding for basic scientific research as part of a measure to make the US more competitive with other countries. He mentioned the US standing in the world as a problem (it’s the first mention of this that I’ve heard from anyone in the US government) and notes this as an issue which limits the ability of the US to save lives in regions such as the Darfur. He also claims that there is no clash of civilisations and cites his experience living in a Muslim country as helping to build bridges. When discussing his reasons for running he said that he believes that he can bring his country together to solve problems better than other candidates. That’s the type of thing you often hear and ignore in political campaigns. It is often difficult to believe that someone wants to be famous and powerful for anything other than the most selfish reasons. But Barak gives me the strong impression that he is genuine. He stated a plan to shut down Guantanamo bay (presumably just the prison and torture aspect - I’m guessing that he is not intending to close the military base) and to stop “rendition” (sending prisoners to other countries to be tortured). His plans for education are innovative, as part of educating young children (0-3 years old) he stated an aim to teach parents to read so that they can read to their children! It’s sensible and obvious once you have heard it, but no-one seems to have publicised that idea before. He announced that he will increase teachers’ salaries. He describes the US as having an “empathy deficit“, it’s obvious to almost everyone outside the US but not something that many people in the US realise. He wants decisions to be based on facts and is determined to use facts when dealing with health insurance companies. I just wish that we had some politicians like him in Australia. In terms of policy the Greens politicians would agree with him, but the combination of great policies, insight, and excellent delivery seems a lot better than any of the options in Australia.

15 March 2008

Jeff Bailey: Post-Surgery Firsts...

I've had a series of post-surgery firsts in the past few days... Some of them good:

My first wriggling into a pair of jeans.

My first walks outside without my walker.

My first couple of stairs.

Some of them less good:

My first setback - It seems that 1.5km is too far for me to walk with the walker. I pulled a muscle in my back. I'm almost back to 100% after a couple of days, but I got to discover a new class of opiates.

My first family emergency - My father had a heart attack. He seems to be okay, he's in Kamloops hospital now, and will transfer to Vernon next week for the Angiogram. Information on bypass versus blood thinners waits on that (as does going home versus transfering to Vancouver). This is apparently the same sort of thing that killed my grandfather in his 30's. So there's two concerns:

1) My dad: Medtech is better than it was back then, and they're monitoring him in-hospital. So, I'm optimistic. While I can't find this in the Wikipedia article, I'm generally under the impression that once you make it to the hospital, you're probably fine and that deaths from heart attacks are from people who do things like sit around and wait to see if they'll feel better.

2) Me: Hopefully the exercising, non-smoking, vegan thing is enough to mitigate this. Aside from my recent taking of steroids and opiates for my back, I've generally treated my body well, and I'll find out if I should be doing further things or monitoring to stay away from this one.

And, well, there it is.

11 March 2008

Isaac Clerencia: On why I love The Wire

I have just watched The Wire’s last episode. For those who don’t know about it, The Wire is the greatest TV series ever created (Salon and Slate back me on this). It’s been acclaimed by critics, but widely disregarded by audience. I’ll never forget Jimmy McNulty, a troubled Irish American dipsomaniac murder detective (played by brilliant Brit Dominic West) or Omar Little, a Robin Hood-like stickup homosexual man in west Baltimore. The rest of the deeply portrayed characters of the show are great too, but above all of them, the real starring role belongs to Baltimore. I am sure Baltimore’s reality goes way beyond this show, but I don’t think a show can get more real than The Wire. Each season focuses on a different topic, such as drug-dealing, unions, politics, the press, always keeping the police department around. The story arcs are really long and complex, The Wire is not the kind of show you can enjoy watching a single episode of, but more like, as its own creator - a former Baltimore Sun journalist - put it, a “66 hour movie”. Well, I could keep praising it for hours, but lots of people have done that already, even Barack Obama loves it (:P, let’s ride the hype). Praise available in Spanish too :P Besides, Eliot Spitzer has made wiretaps really popular again these last days ;) Really, you must see it.

Jeff Bailey

It's funny sitting down to finally write something on LJ and not being sure what to write. I can tell stories of Angie's mom coming to support her and giving me time with my wife. I could rant about students putting in some of their first IVs (or not, actually since after the third try I got bitchy and she ran away. Literally. Oops.) I could talk about recovery, the joy that is delaudid, the devil that Valium turned out to be, or wonderful nurses who were so helpful and encouraging (and the ones who bent the rules and let me see Leif on his first year birthday) or the ones who lied, failed to check in on me and left me in distress for several hours.

On the whole, the people and experience were very good. From almost immediately after I woke up, things have been better. I hadn't realized there was pain associated with all this until it was gone post-surgery. The numbness is still there, but better that it was before by a long shot.

I do want to make sure I say thanks for all the energy, thoughts, and prayers. I felt good on Monday going in with the power and energy of literally hundreds behind me. Religiously, I have a complex relationship with this stuff, but I believe that at moments where a yes or a no gets to be decided by luck or external unknown forces, this can really help the answer be a yes. And I think we'd be surprised at how much of life fits into that category.

There are lots of emails and posts I haven't replied to yet. My lifting restrictions are such that I can't pick up my laptop. So if you see emails or LJ posts from me, its been typed on the iPhone or the Blackberry. Same with the instant messenger. I have my status set to "do not disturb" when I'm around so that I don't exceed my ability to type by getting into talking to too many people at once. My lifting restrictions continue for the next 6 weeks.

That said, I do enjoy chatting and writing. It just takes a while and is quite tiring.

I haven't figured out how to upload pictures to flickr such that the pictures are public, but that are not forced onto people who just wanted to see pictures of Leif. :)

Tired now. If there is any particular part of the surgery/recovery you want details on, let me know and i'll write about it.

*hugs and love*
Jeff

10 March 2008

Jan Wagner: bit nagios-plugin bugsquashing, stalling policyd-weight and my first perl module package

Last week I did again some work on nagios-plugins. After the announcement of Dann Frazier to upload NMU to fix a trivial bug, I thought it’s time again to give some extra care to the package. So I prepared 1.4.11-2 fixing the important bugs and uploaded it. I also commited some minor fixes to the svn, so these issues will get fixed by the next upload. Since the development of policyd-weigh stalled and unfortunately maybe get stuck, I was looking for an alternative, which maybe found with postfwd. It’s quite flexible but it also will take more time (and care!) to get a reliable configuration, which maybe effective as policyd-weight (still) is right now. While checking the dependencies for postfwd I noticed that Net::DNS::Async isn’t available in Debian (yet). So I decided to create a package starting with dh-make-perl, join the Debian Perl Group and let it review. Damyan Ivanov was so kind to review and upload it, Gregor Herrmann did also give some much useful hints. Thanks to both! And yes, I also found time to step forward with NM, since I was overloaded the last weeks with usual work and life. Thank to my AM to be so appreciative.

8 March 2008

Neil Williams: self-delusion and Debian

Daniel notes that self-delusion is a necessary component of all voluntary work.
Any human activity can be over-analysed into oblivion, especially if the terms of reference for "meaning" are impacted by a view of the real world that is overly abstract. Even paid work needs some self-delusion because no matter how much money you earn, the old maxims bite back - "you can't take it with you" and "no point earning it unless you can enjoy it".
Before I started with voluntary software work, I was heavily involved in voluntary charity work and the motivation is much the same. "The grand scheme of things" will never be sufficiently affected by any activity such as to provide the sole justification for that activity. The vast majority of people and the vast majority of actions simply are not and cannot become that important. (This is where religion is important for some people, the hope that despite all evidence to the contrary, acts of random kindness have some meaning to the person doing the act instead of just to the recipient.)
Voluntary work is generally for the benefit of others. In free software it is about writing code to solve our own issues in a way that others can use without facing the problems that we had to solve. Writing new code to solve a problem or fixing bugs in existing code to solve a new problem can only help others if the solution is shared. So the validation of that work is in helping someone else accomplish a task without having to spend the time fixing that issue, leaving them time to fix the next one.
Working on free software of all kinds is worthwhile simply because it is a way of helping others.
"When all things are considered", most people working on Debian are the lucky ones. Born into an environment where good education is available and where parents/relatives were able to indulge our fascination with electronic and computerised widgets that had no direct bearing on whether our basic human needs were met with regard to food, warmth and health. Trained at great expense and able to use that training not only to meet our personal financial needs but also to make time available for other unpaid tasks that benefit others who do not have those things. Living in a time of peace and stability, where the more esoteric and "frivolous" tasks can be undertaken without causing hardship or neglect of others. (My nephew frequently sums up this whole idea as like having won the lottery just by existing.)
There is an element of justification that can be derived from such a view - an element of responsibility and duty. After experiencing all those good things and after realising that we have such an opportunity, it can engender a feeling of obligation to do something that justifies what we have already received to balance out those who have the skills to do what we do but, for reasons of birth alone, do not have that opportunity or the means.
That is a form of secular humanism - validation of our own situation in the use of our skills and time to make things easier for those who are less fortunate.
OK, Debian isn't about providing clean water for all, or the redistribution of food and medicines to those without but the organisations that do that work can be assisted indirectly by making the systems used by such organisations work more efficiently, with greater stability and with more flexibility.
Not everyone can (or should) be on the front line of whatever acts of kindness will solve the problem of inequality but there is an obligation on those of us who have received the benefits of inequality to do what we can to make it easier to redraw the balance.
Debian is one such way and it is a truly international way of benefiting others too. It is more beneficial than the charity work that I did previously - chiefly because that was a very local service that was very labour-intensive and so could only benefit small numbers of people.
Improving Debian won't make us more important to the universe, life and everything (the answer to that is 42 as we all know), but it will help others do what they do, it will improve their lives and their ability to spend their time on what they want to do instead of having to fix problems that we have already solved.
Debian, to me, is about sharing solutions. Helping someone else do something that Debian could not do before, without requiring them to fix all the problems that I had to solve to devise the solution in the first place. Sharing not just the solution but the method of the solution and the means to extend the solution to new problems.
We, as Debian developers, have been granted the access and tools to solve these problems for the benefit of those who do not have upload privileges. Those rights come with responsibilities (as always) to use our skills and time to find the solution and without making things more difficult in the process.
In the grand scheme of what I can actually do as opposed to what might be possible if X, Y and Z were different, what I do in Debian and Emdebian is worthwhile. In fact, it is just as worthwhile as my paid non-IT employment in healthcare provision because, within healthcare, I can only help the single person in front of me. In Debian, I can help all those people who I will probably never meet but who want Debian to do something that I am able to achieve.
What is particularly nice about Emdebian is that there are people who tell us that our work is worthwhile by putting up the hard cash to fund work sessions and conferences that bring the various developers into one place. The international aspects of Debian can be a barrier in some ways and things always happen more quickly when the various members of the team can be brought from the four corners of the planet into one place for a week or so. It is these gatherings that boost the motivation and the enjoyment of making progress towards a common goal. Debian can be a solitary world where communication is limited to plain text. Probably the best way to "oil the wheels" in Debian is to get a group of Debian people together and just let them hack.
Voluntary work of all kinds requires personal motivation and working alone with only limited means of communication with others can be quite demotivating. Getting people together is a very useful antidote.

3 March 2008

Russell Coker: Links March 2008

Dan Bernstein wrote an interesting paper about the security of Qmail [1]. Of particular interest to me are the sections about things that might do differently if he was to do it again and the mentions of language features for security. Bruce Schneier has some interesting comments about this [2]. Interesting paper by Jessica Walpaw Reyes about the link between lead in petrol and crime [3]. The research indicates that “the reduction in childhood lead exposure in the late 1970s and early 1980s is responsible for significant declines in violent crime in the 1990s, and may cause further declines into the future“. It makes me wonder about what other health measures could be used to reduce crime. Paul Wayper writes about a wax that is used in both floor and car polish as well as food [4]. The Australia Institute [5] has some interesting papers. Here’s a PDF about over-consumption in Australia [6]. It states that 46% of people who have household incomes greater than $70,000 say that they can’t buy everything that they really need. It uses the term affluenza to describe the tendency of middle-class people to try and emulate the life-styles of the rich. I wonder whether Gear Acquisition Syndrome [7] is related to this. The site Unbelief.org - exposing the religious “right” in Australia [8] has some interesting information. I didn’t realise that the problem was so bad here.

MJ Ray: Constitutional Review Roadshow

[Photo of Explore] On Saturday 1 March, I attended the Constitutional Review Roadshow at Explore@Bristol (pictured). The review is trying to develop the rules for the Cooperative Group after its merger with United. The event wasn't at all what I expected or hoped for. There were relatively few individual members there. I don't know the split, but most of the 60 or so attendees seemed to be elected members of some sort and this was the first chance they'd had to comment since the open consultation ended last year. Some of the elected members had travelled from the Eastern and South East regions. The initial slide "Purpose of Today" stated three aims:
  1. bring members up to date;
  2. give members the opportunity to ask questions;
  3. and aid members in preparing their formal feedback.
I don't feel the event really brought us up to date or aided in preparing formal feedback, because the roadshow appeared to summarise a report which hasn't been published. Some of the elected members had seen it the day before, but no copies were available to use at the event, so we were pretty much in the dark for some aspects. The event didn't give us much opporunity to ask questions either, despite its length. I was expecting more of a consultation event, which was reinforced when I entered the room and saw seats gathered around tables. I did not expect an hour-long lecture followed by three hours or so of whole-group question-and-answer, broken by lunch. Even with the competent chairing (AFAICT), that was an amazingly inefficient way of working, with some people being cut short, but still leaving some people not being heard. It can be summed up by the chairman commenting
"I do not want this to turn into a discussion"
while the big screen next to him said "questions and discussion"! Headlines from the review: similar elected structures to current Group structure, but regional board nominated by individual members; merge regions to produce six new regions (West Midlands and North West, Wales and South West, London and South East, Eastern England and East and South Midlands, Yorkshire and Humber and North East, Scotland and Northern Ireland); add management and non-executive directors to national board; no clue how to fix diversity problems; no view on fees or job spec until structures are defined. I'll go through the slides in detail and post the questions and answers if anyone leaves a comment asking for them. Otherwise, I think I've lost enough time to this for now.

1 March 2008

Romain Francoise: Fast directory navigation

About a year ago I stumbled upon this post which mentions the following shell keybindings: M-- for pushd .. and M-= for popd. Since the dash and equal signs are very conveniently placed next to each other, this allows fast directory navigation with accessible keystrokes and is especially convenient to move up in the directory hierarchy. Very neat.

Of course I use zsh and not bash, so I had to "port" this hack to zsh, which resulted in somewhat obscure code compared to the bash version:
function up-one-dir   set -E; pushd ..; set +E; zle redisplay; zle -M  pwd   
function back-one-dir set -E; popd; set +E; zle redisplay; zle -M pwd
zle -N up-one-dir
zle -N back-one-dir
bindkey "^[-" up-one-dir
bindkey "^[=" back-one-dir
Not so pretty, but it works. The only problem is that I do most of my shell interaction through shell-mode in Emacs, not in zle-capable terminals. So I also had to write a shell-mode version, which turned out to be even uglier because I basically had to rip off the shell-resync-dirs code to handle comint interaction and directory tracking. Here it is in all its glory:
(defun ore-shell-dirnav (direction)
(interactive)
(let* ((proc (get-buffer-process (current-buffer)))
(pmark (process-mark proc))
(cmd (if (eq direction 'up) "pushd .." "popd")))
(goto-char pmark)
(sit-for 0)
(comint-send-string proc cmd)
(comint-send-string proc "\n")
(set-marker pmark (point))
(let ((pt (point))
(regexp
(concat
(if comint-process-echoes
(concat "\\(" (regexp-quote cmd) "\n\\)")
"\\(\\)")
"\\(.+\n\\)")))
(insert "\n")
(backward-char 1)
(while (not (looking-at regexp))
(accept-process-output proc)
(goto-char pt)))
(goto-char pmark)
(delete-char 1)
(let* ((dl (buffer-substring (match-beginning 2) (1- (match-end 2))))
(dl-len (length dl))
(ds '())
(i 0))
(delete-region (match-beginning 2) (1- (match-end 2)))
(while ( i dl-len)
(string-match "\\s *\\(\\S +\\)\\s *" dl i) ; pick off next dir
(setq ds (cons (concat comint-file-name-prefix
(substring dl (match-beginning 1)
(match-end 1)))
ds))
(setq i (match-end 0)))
(let ((ds (nreverse ds)))
(condition-case nil
(progn (shell-cd (car ds))
(setq shell-dirstack (cdr ds)
shell-last-dir (car shell-dirstack))
(shell-dirstack-message))
(error (message "Couldn't cd")))))))

(defun ore-shell-dirnav-up ()
(interactive)
(ore-shell-dirnav 'up))

(defun ore-shell-dirnav-down ()
(interactive)
(ore-shell-dirnav 'down))

(define-key shell-mode-map (kbd "M--") 'ore-shell-dirnav-up)
(define-key shell-mode-map (kbd "M-=") 'ore-shell-dirnav-down)
Phew. It's a lot of code for a seemingly simple feature, but the time it saves me probably adds up to a few hours per year, so it's worth it.

28 February 2008

Erich Schubert: Vote Green, please.

There are communal elections in my region this weekend.Green campaignI'm a supporter and member of the Greens. Please support us by voting for us.Don't vote for CSU. Ever. Just think of what they've been doing towards spying on citizens, data retention and such. They fight against your freedom by blaming the "terrorists".We could use up to 20% greens, and there is no way we're going to reach that anytime soon. So it's save to vote for the Greens. Even with your vote, they'll probably just reach 10%, and that definitely is a good thing for democracy. Nobody is talking about the Greens becoming the strongest party, you know... but we could use more Greens than we currently have in the parliaments. If we have 4-5 reasonably strong parties and changing coalitions, that helps fighting corruption.

Erich Schubert: Vote Green, please.

There are communal elections in my region this weekend.Green campaignI'm a supporter and member of the Greens. Please support us by voting for us.Don't vote for CSU. Ever. Just think of what they've been doing towards spying on citizens, data retention and such. They fight against your freedom by blaming the "terrorists".[Yes, I am aware that these topics are national, not communal topics. But in communal topics it's the same thing. CSU wants to waste billions of money on a train which is 10 minutes faster at the airport, and which nobody is going to use because it's quite a bit more expensive. The money could be used for much better purposes, but I guess they owe some construction companies ... It is a fact that they have introduced study fees, despite the need for more high-qualified people; they should be putting more money into our universities instead of driving people away from higher education.]We could use up to 20% greens, and there is no way we're going to reach that anytime soon. So it's save to vote for the Greens. Even with your vote, they'll probably just reach 10%, and that definitely is a good thing for democracy. Nobody is talking about the Greens becoming the strongest party, you know... but we could use more Greens than we currently have in the parliaments. If we have 4-5 reasonably strong parties and changing coalitions, that helps fighting corruption.

27 February 2008

Sergio Talens-Oliag: Tips & Tricks: plone, nginx and path rewriting

The problem On a couple of Debian Etch systems we have a plone-site that is published using a backport of the nginx web server. The Zope instance is running on the standard port and serves the Plone contents under the /plone path. Initially we were publishing the site to the external world using an https site served by nginx using the following entry on the configuration:
  location /plone/  
    proxy_pass http://plone:9673;
    include    /etc/nginx/proxy.conf;
   
The proxy.conf contents are quite standard:
  # proxy.conf
  proxy_redirect                  off;
  proxy_set_header                Host $host;
  proxy_set_header                X-Real-IP $remote_addr;
  proxy_set_header                X-Forwarded-For $proxy_add_x_forwarded_for;
  client_max_body_size            0;
  client_body_buffer_size         128k;
  proxy_connect_timeout           90;
  proxy_send_timeout              90;
  proxy_read_timeout              90;
  proxy_buffer_size               4k;
  proxy_buffers                   4 32k;
  proxy_busy_buffers_size         64k;
  proxy_temp_file_write_size      64k;
With this settings we see the /plone contents using the same path that is used by the Zope instance, but after testing we have decided to change the /plone path and server the contents under the /web path. The Wrong Solution The fist option I though about was quite simple, rename the Zope's plone object to web. Seems reasonable and simple for someone without Zope experience (I don't administer the internals of the Zope/Plone site), but now I know that it is a very big mistake, because renaming objects in Zope in not cheap, as it implies that the server has to modify all the contents of the renamed object and the operation can take a very long time. With my ignorance I tried to rename the plone object using the Zope administrative interface and after a minute or so I cancelled the page loading that was running on my browser, thinking that I had cancelled the rename operation. To make a long story short I'll tell you that the operation was still running and after several hours the folder was renamed (in fact I noticed when the good solution broke, as I had already solved the problem using the next method), but something went wrong and part of the site functionality was broken... the final solution to the debacle has been to recover a backup of the Zope instance older than the rename operation and continue from that copy. The Right Solution (TM) It seems that Zope has a couple of systems to do Virtual Hosting and the best option is the use of the product called Virtual Host Monster, a weird and confusing system (IMHO, of course), that does the job once the right configuration settings are in place. The best solution to our problem was to modify the requests done by the reverse proxy without touching anything on the Plone site (the original one already had a Virtual Host Monster object installed and that was the only thing that we needed to add). The nginx configuration for the new /web path is the following:
  location /web/  
    proxy_pass http://plone:9673/plone/VirtualHostRoot/_vh_web/;
    include    /etc/nginx/proxy.conf;
   
With this change, when the user asks for anything under the /web/ path the Zope server gets the contents traversing the /plone object and adding to it the elements that appear after the VirtualHostRoot component, ignoring components that start with the _vh_ prefix (the protocol and host name of the requests are not modified, as we did not touched that). Once the object is found, the server rewrites the URLs included on the HTML files using the path components that appear after the VirtualHostRoot one, including the suffix of the components that start with the prefix _vh_. For example, when the Zope server receives a request for an URL like:
  http://plone:9673/plone/VirtualHostRoot/_vh_web/home
it publishes the content found on:
  http://plone:9673/plone/home
but the HTML files returned assume that their base URL is:
  http://plone:9673/web/home

25 February 2008

Sergio Talens-Oliag: Still Alive

Today I've noticed that my last post was on August and I've decided that I'm going to try to keep this blog alive. Since this summer I've left the University and now I only have two jobs... my daily work and my son; I believe that things are going better at a personal level, but the truth is that lately I have near zero time to devote to Debian and Free Software in general. As I don't want to leave the FLOSS world and I'm still able to do some sysadmin related tasks at work and at home I've decided that I'll try to reserve some time for blogging about them. I'm also thinking about starting a blog and a wiki in Spanish, mainly to be able to publish some of the documents I write at work about our installations, the advantage for me is that I can publish them with a little revision and that is much faster than translating them into English. Anyway, before creating new blogs my first task is to finish my home server migration; I'm moving all the services that were running on my old PowerBook (PowerPC @ 400Mhz, 378MB of RAM, 10 GB HD) to my other PowerBook (PowerPC @ 1Ghz, 768MB of RAM, 60GB HD), as I haven't used it for ages and I still use a lot the old machine. On the move I plan to change a lot of things, the machine is going to run multiple vservers and I plan to change a lot of the software I was using, always trying to simplify the maintenance and/or get more performance from the new machine: I'll try to blog about this new installation once it is done.

Next.

Previous.