[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: [PATCH] Re: resurrecting kwrited
From: "George Kiagiadakis" <kiagiadakis.george () gmail ! com>
Date: 2008-10-18 10:12:56
Message-ID: ba4a6e220810180312o208cac3bt2bdcb359aa6f6839 () mail ! gmail ! com
[Download RAW message or body]
2008/10/17, Oswald Buddenhagen <ossi@kde.org>:
> > Tell me if I need to fix something else.
> >
>
> nothing obvious. in any case, you are the kwrited maintainer now. get
> yourself an svn account to fulfill that role. :D
Are you sure that would be the right thing to do? Well, I will
probably continue contributing to other applications as well in the
future, but I think it may be an abuse to get an account to apply this
patch now. On the other hand, an svn account sounds good :)
Anyway, I am sending the full patch against kdebase for last minute
review. If anyone has any objections, tell me. Also, I am unsure about
a few things:
1) The kwrited executable (if built as an executable) is setgid to the
utmp group. I am not sure if all distros that do not ship libutempter
use this group for /var/run/utmp and /var/log/wtmp. At least debian
does.
2) This commit introduces a new .desktop file
(kwrited-noutempter.desktop). As this is a modified copy of the
already existing kwrited.desktop, it already includes the translated
strings. Is that ok? Also, I am unsure if the commands in that desktop
file are correct (although they do work for me). This desktop file is
supposed to be installed in ${AUTOSTART_INSTALL_DIR} to start kwrited
by default on startup. The commands are somehow based on
${AUTOSTART_INSTALL_DIR}/krunner.desktop
PS: As this probably not going to be commited until tommorow, I added
it in the feature list. I hope that was the correct thing to do :)
Best regards,
George
["kwrited-noutempter.patch" (text/x-patch)]
Index: apps/konsole/src/kwrited.cpp
===================================================================
--- apps/konsole/src/kwrited.cpp (revision 872799)
+++ apps/konsole/src/kwrited.cpp (working copy)
@@ -1,6 +1,7 @@
/*
kwrited is a write(1) receiver for KDE.
Copyright 1997,1998 by Lars Doelle <lars.doelle@on-line.de>
+ Copyright 2008 by George Kiagiadakis <gkiagia@users.sourceforge.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -21,77 +22,42 @@
// Own
#include "kwrited.h"
-#include <QtCore/QSocketNotifier>
-#include <QtGui/QKeyEvent>
-
-#include <kuniqueapplication.h>
-#include <kcmdlineargs.h>
-#include <klocale.h>
-#include <kglobalsettings.h>
#include <kdebug.h>
-#include <kcrash.h>
-#include <kpty.h>
+#include <kptydevice.h>
#include <kuser.h>
-#include <kglobal.h>
+#include <klocalizedstring.h>
+#include <knotification.h>
+#include <kaboutdata.h>
+#include <kdeversion.h>
-
-#include <stdlib.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <signal.h>
-
-#ifdef Q_WS_X11
-#include <X11/Xlib.h>
-#include <fixx11h.h>
+#ifdef HAVE_UTEMPTER
+# include <kpluginfactory.h>
+# include <kpluginloader.h>
+#else
+# include <QtCore/QCoreApplication>
+# include <kcomponentdata.h>
+# include <signal.h>
+# include <unistd.h>
#endif
-#include <kpluginfactory.h>
-#include <kpluginloader.h>
+static inline KAboutData aboutData()
+{
+ return KAboutData("kwrited", "konsole", ki18n("kwrited"), KDE_VERSION_STRING);
+}
-K_PLUGIN_FACTORY(KWritedFactory,
- registerPlugin<KWritedModule>();
- )
-K_EXPORT_PLUGIN(KWritedFactory("konsole"))
-
-
-/* TODO
- for anyone who likes to do improvements here, go ahead.
- - check FIXMEs below
- - add Menu
- - accept messages (on/off)
- - pop up on incoming messages
- - clear messages
- - allow max. lines
- - add DBus interface?
- - add session awareness.
- - add client complements.
- - kwrited is disabled by default if built without utempter,
- see ../Makefile.am - kwrited doesn't seem to work well without utempter
-*/
-
-KWrited::KWrited() : QTextEdit()
+KWrited::KWrited() : QObject()
{
- int pref_width, pref_height;
+ pty = new KPtyDevice();
+ pty->open();
- setFont(KGlobalSettings::fixedFont());
- pref_width = (2 * KGlobalSettings::desktopGeometry(0).width()) / 3;
- pref_height = fontMetrics().lineSpacing() * 10;
- setMinimumWidth(pref_width);
- setMinimumHeight(pref_height);
- setReadOnly(true);
-// setFocusPolicy(QWidget::NoFocus);
-// setWordWrap(QTextEdit::WidgetWidth);
-// setTextFormat(Qt::PlainText);
+#ifndef HAVE_UTEMPTER
+ dup2(pty->slaveFd(), 0); //HACK: login() from glibc requires this to login \
correctly +#endif
- pty = new KPty();
- pty->open();
pty->login(KUser().loginName().toLocal8Bit().data(), qgetenv("DISPLAY"));
- QSocketNotifier *sn = new QSocketNotifier(pty->masterFd(), QSocketNotifier::Read, \
this);
- connect(sn, SIGNAL(activated(int)), this, SLOT(block_in(int)));
+ connect(pty, SIGNAL(readyRead()), this, SLOT(block_in()));
- QString txt = i18n("KWrited - Listening on Device %1", pty->ttyName());
- setWindowTitle(txt);
- puts(txt.toLocal8Bit().data());
+ kDebug() << "listening on device" << pty->ttyName();
}
KWrited::~KWrited()
@@ -100,45 +66,58 @@
delete pty;
}
-void KWrited::block_in(int fd)
+void KWrited::block_in()
{
- char buf[4096];
- int len = read(fd, buf, 4096);
- if (len <= 0)
- return;
+ QByteArray buf = pty->readAll();
+ QString msg = QString::fromLocal8Bit( buf.constData(), buf.size() );
+ msg.remove('\r');
+ msg.remove('\a');
- insertPlainText( QString::fromLocal8Bit( buf, len ).remove('\r') );
- show();
- raise();
+ KNotification *notification = new KNotification("NewMessage", 0, \
KNotification::Persistent); +#ifdef HAVE_UTEMPTER
+ notification->setComponentData( KWritedFactory::componentData() );
+#endif
+ notification->setText( msg );
+ connect(notification, SIGNAL(closed()), notification, SLOT(deleteLater()) );
+ notification->sendEvent();
}
-void KWrited::clearText()
-{
- clear();
-}
+#ifdef HAVE_UTEMPTER
-void KWrited::contextMenuEvent(QContextMenuEvent * e)
-{
- QMenu *menu = createStandardContextMenu();
- menu->addAction("Clear Messages");
- // Add connection and shortcut if possible
- menu->exec(e->globalPos());
- delete menu;
-}
-
KWritedModule::KWritedModule(QObject* parent, const QList<QVariant>&)
: KDEDModule(parent)
{
- // Done by the factory now
- //KGlobal::locale()->insertCatalog("konsole");
pro = new KWrited;
}
KWritedModule::~KWritedModule()
{
delete pro;
- // Done by the factory now
- //KGlobal::locale()->removeCatalog("konsole");
}
+K_PLUGIN_FACTORY(KWritedFactory,
+ registerPlugin<KWritedModule>();
+ )
+K_EXPORT_PLUGIN(KWritedFactory(aboutData()))
+
+#else //HAVE_UTEMPTER
+
+static void sigterm_handler(int)
+{
+ QCoreApplication::quit();
+}
+
+int main(int argc, char **argv)
+{
+ signal(SIGTERM, sigterm_handler);
+ signal(SIGINT, sigterm_handler);
+
+ KComponentData kcompdata(aboutData());
+ QCoreApplication a(argc, argv);
+ KWrited w;
+ return a.exec();
+}
+
+#endif //HAVE_UTEMPTER
+
#include "kwrited.moc"
Index: apps/konsole/src/config-kwrited.h.cmake
===================================================================
--- apps/konsole/src/config-kwrited.h.cmake (revision 0)
+++ apps/konsole/src/config-kwrited.h.cmake (revision 0)
@@ -0,0 +1 @@
+#cmakedefine HAVE_UTEMPTER 1
Index: apps/konsole/src/CMakeLists.txt
===================================================================
--- apps/konsole/src/CMakeLists.txt (revision 872799)
+++ apps/konsole/src/CMakeLists.txt (working copy)
@@ -140,7 +140,24 @@
### KWriteD Daemon
- set(kded_kwrited_PART_SRCS kwrited.cpp )
- kde4_add_plugin(kded_kwrited ${kded_kwrited_PART_SRCS})
- target_link_libraries(kded_kwrited ${KDE4_KDEUI_LIBS} ${KDE4_KPTY_LIBS})
- install(TARGETS kded_kwrited DESTINATION ${PLUGIN_INSTALL_DIR} )
+ check_library_exists(utempter addToUtmp "" HAVE_ADDTOUTEMP)
+ check_include_files(utempter.h HAVE_UTEMPTER_H)
+ if (HAVE_ADDTOUTEMP AND HAVE_UTEMPTER_H)
+ set(HAVE_UTEMPTER 1)
+ endif (HAVE_ADDTOUTEMP AND HAVE_UTEMPTER_H)
+
+ configure_file(config-kwrited.h.cmake \
${CMAKE_CURRENT_BINARY_DIR}/config-kwrited.h ) +
+ if (HAVE_UTEMPTER)
+ kde4_add_plugin(kded_kwrited kwrited.cpp)
+ target_link_libraries(kded_kwrited ${KDE4_KDEUI_LIBS} ${KDE4_KPTY_LIBS})
+ install(TARGETS kded_kwrited DESTINATION ${PLUGIN_INSTALL_DIR} )
+ else (HAVE_UTEMPTER)
+ kde4_add_executable(kwrited kwrited.cpp)
+ target_link_libraries(kwrited ${KDE4_KDEUI_LIBS} ${KDE4_KPTY_LIBS})
+ install(TARGETS kwrited DESTINATION ${BIN_INSTALL_DIR} )
+ install(CODE "
+ set(KWRITED_PATH \"\$ENV{DESTDIR}${BIN_INSTALL_DIR}/kwrited\")
+ EXECUTE_PROCESS(COMMAND sh -c \"chgrp utmp '\${KWRITED_PATH}' && \
chmod g+s '\${KWRITED_PATH}'\") + ")
+ endif (HAVE_UTEMPTER)
Index: apps/konsole/src/kwrited.h
===================================================================
--- apps/konsole/src/kwrited.h (revision 872799)
+++ apps/konsole/src/kwrited.h (working copy)
@@ -1,6 +1,7 @@
/*
kwrited is a write(1) receiver for KDE.
Copyright 1997,1998 by Lars Doelle <lars.doelle@on-line.de>
+ Copyright 2008 by George Kiagiadakis <gkiagia@users.sourceforge.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -21,30 +22,29 @@
#ifndef KWRITED_H
#define KWRITED_H
-#include <kdedmodule.h>
-#include <QtGui/QTextEdit>
-#include <QtGui/QMenu>
+#include <config-kwrited.h>
+#include <QtCore/QObject>
+class KPtyDevice;
-class KPty;
-
-class KWrited : public QTextEdit
-{ Q_OBJECT
+class KWrited : public QObject
+{
+ Q_OBJECT
public:
KWrited();
~KWrited();
-protected:
- virtual void contextMenuEvent(QContextMenuEvent *);
private Q_SLOTS:
- void block_in(int fd);
- void clearText(void);
+ void block_in();
+
private:
- KPty* pty;
+ KPtyDevice* pty;
};
+#ifdef HAVE_UTEMPTER
+# include <kdedmodule.h>
+
class KWritedModule : public KDEDModule
{
- Q_OBJECT
public:
KWritedModule(QObject* parent, const QList<QVariant>&);
~KWritedModule();
@@ -53,3 +53,5 @@
};
#endif
+
+#endif
Index: apps/konsole/desktop/kwrited-noutempter.desktop
===================================================================
--- apps/konsole/desktop/kwrited-noutempter.desktop (revision 0)
+++ apps/konsole/desktop/kwrited-noutempter.desktop (revision 0)
@@ -0,0 +1,149 @@
+[Desktop Entry]
+Name=KDE Write Daemon
+Name[af]=KDE Skryf Bediener
+Name[ar]=رقيب الكتابة لِــ كدي
+Name[be]=Cервіс KDE Write
+Name[be@latin]=Cервіс KDE Write
+Name[bg]=Демон за писане (KDE)
+Name[bn]=কে.ডি.ই. রাইট ডিমন
+Name[bn_IN]=KDE Write ডেমন
+Name[br]=Diaoul skrivañ KDE
+Name[ca]=Dimoni d'escriptura del KDE
+Name[cs]=Zapisovací démon KDE
+Name[csb]=Demóna zôpisu KDE
+Name[cy]=Daemon KDE Write
+Name[da]=KDE Skrivedæmon
+Name[de]=Write-Dienst
+Name[el]=Δαίμονας Write του KDE
+Name[eo]=KDE-skribdemono
+Name[es]=Servicio de escritura de KDE
+Name[et]=KDE Write deemon
+Name[eu]=KDEren idazketa deabrua
+Name[fa]=شبح نوشتن KDE
+Name[fi]=KDE-kirjoituspalvelin
+Name[fr]=Démon de commande Write de KDE
+Name[fy]=KDE Skriuwdaemon
+Name[ga]=Deamhan Scríofa KDE
+Name[gl]=Daemon de escritura de KDE
+Name[gu]=KDE રાઇટ ડેમન
+Name[he]=תהליך הרקע Write של KDE
+Name[hi]=केडीई राइट डेमन
+Name[hr]=KDE demon za pisanje
+Name[hu]=KDE adatkiíró szolgáltatás
+Name[is]=KDE skriftarpúki
+Name[it]=Demone write di KDE
+Name[ja]=KDE Write デーモン
+Name[ka]=KDE Writed გუშაგი
+Name[kk]=KDE Write қызметі
+Name[km]=ដេមិនសរសេររបស់ KDE
+Name[kn]=ಕೆಡಿಇ ಬರವಣಿಗೆ (ರೈಟ್) ನೇಪಥಿಕ (ಡೀಮನ್)
+Name[ko]=KDE Write 데몬
+Name[ku]=Amûrê KDE Write
+Name[lt]=KDE Write tarnyba
+Name[lv]=KDE write dēmons
+Name[mk]=KDE Write даемон
+Name[ml]=കെഡിഇയിലെ അറിയിപ്പുകള്ക്കുള്ള നിരന്തരപ്രവൃത്തി
+Name[mr]=KDE राइट डीमन
+Name[ms]=Daemon Tulis KDE
+Name[nb]=KDEs skrivenisse
+Name[nds]=KDE Write-Dämoon
+Name[ne]=केडीई लेख्ने डेइमन
+Name[nl]=KDE Schrijfdaemon
+Name[nn]=KDE Skrivingsdemon
+Name[pa]=KDE ਲਿਖਣ ਡੈਮਨ
+Name[pl]=Demon zapisu KDE
+Name[pt]=Servidor do Write do KDE
+Name[pt_BR]=Servidor do Write do KDE
+Name[ro]=Demon "write" KDE
+Name[ru]=Чат локальной сети
+Name[se]=KDE čállinbálvá
+Name[sk]=KDE Write démon
+Name[sl]=Pisalni strežnik za KDE
+Name[sr]=КДЕ‑ов демон за поруке
+Name[sr@latin]=KDE‑ov demon za poruke
+Name[sv]=KDE-skrivdemon
+Name[te]=KDE వ్రాయు డెమోన్
+Name[th]=ดีมอน Write ของ KDE
+Name[tr]=KDE Write Servisi
+Name[uk]=Фонова служба запису KDE
+Name[uz]=KDE write demoni
+Name[uz@cyrillic]=KDE write демони
+Name[vi]=Trình nền Write KDE
+Name[wa]=Demon d' messaedjes «write» po KDE
+Name[x-test]=xxKDE Write Daemonxx
+Name[zh_CN]=KDE Write 守护程序
+Name[zh_TW]=KDE Write 伺服程式
+Comment=Watch for messages from local users sent with write(1) or wall(1)
+Comment[af]=Kyk uit vir boodskappe vanaf plaaslike gebruikers wat met write(1) of \
wall(1) gestuur is +Comment[be]=Назірае за паведамленнямі ад мясцовых карыстальнікаў, \
дасланымі праз write(1) ці wall(1) +Comment[be@latin]=Adsočvaje paviedamleńnia ad \
miascovych karystańnikaŭ, dasyłanyja zahadami „write(1)” ci „wall(1)”. \
+Comment[bg]=Наблюдение за съобщения от локални потребители, изпратени с write(1) или \
wall(1) +Comment[bn_IN]=write(1) অথবা wall(1) সহযোগে ব্যবহারকারীদের থেকে প্রাপ্ত \
বার্তার অপেক্ষা করা হবে +Comment[ca]=Fes atenció als missatges dels usuaris locals \
enviats amb write(1) o wall(1) +Comment[cs]=Sledování zpráv od místních uživatelů \
poslaných pomocí write(1) nebo wall(1) +Comment[csb]=Dozérô wiadłów òd môlowëch \
brëkòwników wësłónëch przez write(1) abò wall(1) +Comment[cy]=Gwylio am negeseuon \
oddiwrth defnyddwyr lleol a anfonwyd efo write(1) neu wall(1) +Comment[da]=Kig efter \
beskeder fra lokale brugere sendt med write(1) eller wall(1) +Comment[de]=Überwacht \
Meldungen lokaler Benutzer, die mittels write(1) oder wall(1) gesendet wurden \
+Comment[el]=Έλεγχος μηνυμάτων από τοπικούς χρήστες που στάλθηκαν με write(1) η \
wall(1) +Comment[eo]=Rigardi pri mesaĝoj de lokaj uzantoj, senditaj per write(1) aŭ \
wall(1) +Comment[es]=Ver los mensajes de usuarios locales enviados con write(1) o \
wall(1) +Comment[et]=Jälgib kohalike kasutajate write(1) või wall(1) abil saadetud \
teateid +Comment[eu]=Begiratu write(1) edo wall(1)-ekin bidalitako erabiltzaile \
lokalen mezuak +Comment[fa]=منتظر پیامهای کاربران محلی ارسالشده توسط write(1) یا \
wall(1) +Comment[fi]=Seuraa viestejä, joita paikalliset käyttäjät lähettävät write(1) \
tai wall(1) -komennoilla +Comment[fr]=Surveiller l'apparition de messages envoyés par \
d'autres utilisateurs locaux avec la commande « write(1) » ou « wall(1) » \
+Comment[fy]=Berjochten fan lokale brûkers ferstjoerd mei write(1) of wall(1) \
observearje +Comment[ga]=Éist le teachtaireachtaí ó úsáideoirí logánta a seoladh \
chugat le write(1) nó wall(1) +Comment[gl]=Procura mensaxes de usuarios locais \
enviadas con write(1) ou wall(1) +Comment[gu]=સ્થાનિક વપરાશકર્તાઓ દ્વારા write(1) \
અથવા wall(1) વડે મોકલાયેલ સંદેશાઓ જુઓ +Comment[he]=מעקב אחר הודעות ממשתמשים מקומיים \
שנשלחו באמצעות write(1) או wall(1) +Comment[hi]=स्थानीय उपयोक्ताओं द्वारा राइट(1) \
या वाल(1) के जरिए भेजे गए संदेशों के लिए देखें +Comment[hr]=Praćenje poruka lokalnih \
korisnika poslanih putem write(1) ili wall(1) +Comment[hu]=Helyi üzenetek figyelése \
(a write(1) és wall(1) segítségével) +Comment[is]=Fylgjast með skilaboðum frá \
notendum sem senda með write(1) eða wall(1) +Comment[it]=Controlla l'arrivo di \
messaggi da utenti locali inviati con write(1) o wall(1) +Comment[ja]= write(1) か \
wall(1) でローカルユーザから送信されたメッセージを監視 +Comment[ka]=ბრძანება write(1) ან wall(1)-ით ლოკალური \
მომხმარებლებისგან გაგზავნილ შეტყობინებებს იღებს +Comment[kk]=Жергілікті \
пайдаланушылардан write(1) және wall(1) командалармен жіберілген хабарларды \
қабылдайды +Comment[km]=មើលសារពីអ្នកប្រើមូលដ្ឋានដែលបានផ្ញើដោយប្រើ \
write(1) ឬ wall(1) +Comment[kn]=write(1) ಅಥವಾ wall(1) ರ ಮೂಲಕ ಸ್ಥಳೀಯ ಬಳಕೆದಾರರಿಂದ \
ಕಳುಹಿಸಲ್ಪಟ್ಟ ಸಂದೇಶಗಳಿಗಾಗಿ ಗಮನಿಸಿ +Comment[ko]=write(1)이나 wall(1)을 통해 사용자가 보낸 메시지 감시하기
+Comment[ku]=Peyamên bikarhênerên herêmî ên wekî digel write(1) an jî wall (1) \
şandine temaşe bike +Comment[lt]=Stebėti vietinių naudotojų išsiųstus laiškus su \
write(1) arba wall(1) +Comment[lv]=Novēro ziņojumus no lokālajiem lietotājiem, kuri \
sūtīti izmantojot write(1) vai wall(1) +Comment[mk]=Следи за пораки од локалните \
корисници пратени со write(1) или wall(1) \
+Comment[ml]=പ്രാദേശികോപയോക്താക്കളില്നിന്നുള്ള write(1) അല്ലെങ്കില് wall(1) \
ഉപയോഗിച്ചയച്ച സന്ദേശങ്ങള്ക്കായി ശ്രദ്ധിയ്ക്കുക +Comment[mr]=स्थानीय वापरकर्ता पासून \
राइट(1) किंवा वाल(1) संदेश पहा +Comment[ms]=Perhatikan mesej dari pengguna setempat \
yang dihantar dengan arahan write(1) atau wall(1) +Comment[nb]=Se etter meldinger fra \
lokale brukere sendt med write(1) eller wall(1) +Comment[nds]=Kiekt na Narichten vun \
lokale Brukers, sendt mit write(1) oder wall(1) +Comment[ne]=सन्देशका लागि स्थानीय \
प्रयोगकर्ताबाट पठाएका लेख(१) वा वाल(१) हेर्नुहोस् +Comment[nl]=Observeer berichten \
van lokale gebruikers verzonden met write(1) of wall(1) +Comment[nn]=Sjå etter \
meldingar frå lokale brukarar sende med write(1) eller wall(1) +Comment[pa]=ਲੋਕਲ \
ਯੂਜ਼ਰ ਰਾਹੀਂ write(1) ਜਾਂ wall(1) ਨਾਲ ਭੇਜੇ ਸੁਨੇਹੇ ਵੇਖੋ +Comment[pl]=Śledzi wiadomości \
od użytkowników lokalnych wysyłane za pomocą write(1) lub wall(1) \
+Comment[pt]=Escutar as mensagens dos utilizadores locais, enviadas com o write(1) ou \
o wall(1) +Comment[pt_BR]=Observa mensagens de usuários locais enviadas com o \
write(1) ou o wall(1) +Comment[ro]=Așteaptă mesaje de la utilizatori, trimise cu \
write(1) sau wall(1) +Comment[ru]=Приём сообщения пользователей локальной сети, \
отправленных командами write(1) или wall(1) +Comment[se]=Gozit dieđuid mat báikkalaš \
geavaheaddjit sáddejit «write» dahje «wall» +Comment[sk]=Sledovanie správ od \
lokálnych užívateľov poslaných pomocou príkazu write (1) alebo wall (1) \
+Comment[sl]=Opazuj sporočila od krajevnih uporabnikov, poslanih z write(1) ali \
wall(1) +Comment[sr]=Пази на поруке од локалних корисника послатих наредбама write(1) \
или wall(1) +Comment[sr@latin]=Pazi na poruke od lokalnih korisnika poslatih \
naredbama write(1) ili wall(1) +Comment[sv]=Titta efter meddelanden från lokala \
användare som skickas med write(1) eller wall(1) +Comment[ta]=உள் பயனர் அணுப்பியதுடன் \
write(1) or wall(1) அதிலிருந்து பார்க்கவேண்டிய தகவல்கள் +Comment[te]=స్థానిక \
వినియోగదారులనుండి write(1) లేదా wall(1) తో పంపబడిన సందేశాలనకొరకు గమనించండి \
+Comment[th]=เฝ้าดูข้อความจากผู้ใช้ภายในระบบที่ถูกส่งมาด้วย write(1) หรือ wall(1) \
+Comment[tr]=Yerel kullanıcılarda write(1) veya wall(1) ile gönderilmiş mesajları \
izle +Comment[uk]=Спостерігання за повідомленнями від локальних користувачів, \
відісланих через write(1) або wall(1) +Comment[vi]=Theo dõi các thông báo từ người \
dùng trên cùng máy được gửi bằng lệnh write(1) hay wall(1) +Comment[wa]=Louke après \
des messaedjes des uzeus locås evoyîs avou write(1) ou wall(1) \
+Comment[x-test]=xxWatch for messages from local users sent with write(1) or \
wall(1)xx +Comment[zh_CN]=监视本地用户发出的 write(1) 或 wall(1) 消息
+Comment[zh_TW]=監控本地使用者以 write(1) 或 wall(1) 傳送的訊息
+Type=Service
+Exec=kwrited
+OnlyShowIn=KDE;
+X-KDE-autostart-phase=0
Index: apps/konsole/desktop/kwrited.notifyrc
===================================================================
--- apps/konsole/desktop/kwrited.notifyrc (revision 0)
+++ apps/konsole/desktop/kwrited.notifyrc (revision 0)
@@ -0,0 +1,9 @@
+[Global]
+IconName=utilities-terminal
+Comment=KDE write daemon
+
+[Event/NewMessage]
+Name=New message received
+Comment=The daemon received a new message sent with wall(1) or write(1)
+Sound=KDE-Sys-App-Message.ogg
+Action=Popup|Sound
Index: apps/konsole/desktop/CMakeLists.txt
===================================================================
--- apps/konsole/desktop/CMakeLists.txt (revision 872799)
+++ apps/konsole/desktop/CMakeLists.txt (working copy)
@@ -10,5 +10,19 @@
install( FILES konsolepart.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
install( FILES konsolehere.desktop DESTINATION
${SERVICES_INSTALL_DIR}/ServiceMenus )
-install( FILES kwrited.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kded )
install( FILES konsole.notifyrc konsoleui.rc sessionui.rc partui.rc DESTINATION \
${DATA_INSTALL_DIR}/konsole ) +
+
+check_library_exists(utempter addToUtmp "" HAVE_ADDTOUTEMP)
+check_include_files(utempter.h HAVE_UTEMPTER_H)
+if (HAVE_ADDTOUTEMP AND HAVE_UTEMPTER_H)
+ set(HAVE_UTEMPTER 1)
+endif (HAVE_ADDTOUTEMP AND HAVE_UTEMPTER_H)
+
+if ( HAVE_UTEMPTER )
+ install( FILES kwrited.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kded )
+else ( HAVE_UTEMPTER )
+ install( FILES kwrited-noutempter.desktop DESTINATION ${AUTOSTART_INSTALL_DIR} )
+endif ( HAVE_UTEMPTER )
+
+install( FILES kwrited.notifyrc DESTINATION ${DATA_INSTALL_DIR}/kwrited )
>> 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