[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    resurrecting kwrited
From:       George Kiagiadakis <kiagiadakis.george () gmail ! com>
Date:       2008-10-11 22:25:35
Message-ID: 200810120125.37058.kiagiadakis.george () gmail ! com
[Download RAW message or body]

Hello folks,

A few days ago I was writing some system script that uses wall(1) to notify me 
about events and I was pretty disappointed when I discovered that kwrited 
doesn't work at all on my system, so I've spent some time last week working on 
it.

For those that are ignorant of what kwrited is, it is a kded module that sits 
in the background and listens for messages send with write(1) or wall(1) and 
when a message is received, it pops up a window showing the message. The 
source code currently lives with konsole in kdebase/apps/konsole.

The problem on my system is that debian does not ship libutempter with it and 
as a result, KPty is unable to login to any pseydo-terminal device (in case 
libutempter is missing, KPty uses login(3), which requires elevated user 
privileges that kwrited does not have). That makes kwrited useless because 
wall(1) sends messages only on terminal devices where there are users logged 
in. I started working on kwrited mainly to workaround this problem, but seeing 
the state of this code (completely abandoned!) I thought it would be nice to 
give some more love to it :)

So, I made some modifications and feature additions that can all be found here: 
http://git.devreactor.org/?p=gkiagia/kwrited;a=summary
(git clone url: git://git.devreactor.org/gkiagia/kwrited )

There are four branches in this tree where I have split the various new 
features so that it is easy to distinguish them.

The master branch contains some minor improvements and code cleanups. This 
should be safe to upload to kde's svn as it doesn't really have any major 
changes. See the shortlog on gitweb for details.

The knotify branch introduces the feature to use KNotify instead 
of popping up the kwrited window on every new message. I was inspired to do 
this from bug 104019. The changes in this branch should close now this bug. 
Note here that I implemented a knotify popup with two actions, "Details" and 
"Ignore". The details action pops up the kwrited window showing the same 
message. After I implemented that, I thought it would be better to drop 
completely the kwrited window and use ONLY knotify. What do you think of that? 
That would also eliminate the dependency on QtGui/kdeui, which is useful to 
save resources in the no-utempter version (see below).

The no-utempter branch introduces a workaround to my problem. To satisfy the 
need for elevated user privileges, I made kwrited to build as an executable 
instead of a kded module, so that it can be setgid to the utmp group, which is 
the group that is able to edit the utmp and wtmp system files and login to 
terminal devices. Building as an executable is a compile time detection (cmake 
detects if libutemtper is available and acts appropriately). I am not sure if 
this is really desired in kde, however if this is not going to be merged in 
svn, I will probably continue maintaining it as a fork for myself :)

The knotify-no-utempter branch combines all the features from the knotify and 
no-utempter branches. (The no-utempter branch has no knotify code).

The reason I send this email is mainly because I don't have an svn account to 
commit it myself (this is my first contribution to kde, actually) and I would 
also like to receive other people's comments as I am unsure of what should be 
committed from all the changes that I've made. I can make a clean patch 
against svn trunk upon request, just mail me or catch me on irc (nick: 
gkiagia).

Thank you and sorry for the long email :)
George

 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic