From a78ed4472a6bd7624f9f7975e4a699641565b4d4 Mon Sep 17 00:00:00 2001 From: Tim Jansen Date: Sat, 22 Dec 2001 03:31:19 +0000 Subject: [PATCH] release 0.1 rc 1 svn path=/trunk/kdenetwork/krfb/; revision=128292 --- Makefile.am | 2 +- README | 14 ++++++ TODO | 6 ++- configure.in.in | 5 ++ krfb/Makefile.am | 18 +++---- krfb/configurationdialog.ui | 12 ++--- krfb/hi32-app-krfb.png | Bin 0 -> 592 bytes krfb/hi48-app-krfb.png | Bin 0 -> 2351 bytes krfb/newconnectiondialog.ui | 92 ++++++++++++++++++++++++++++++++---- krfb/rfbcontroller.cc | 7 +++ krfb/trayicon.cpp | 6 +-- 11 files changed, 132 insertions(+), 30 deletions(-) create mode 100644 krfb/hi32-app-krfb.png create mode 100644 krfb/hi48-app-krfb.png diff --git a/Makefile.am b/Makefile.am index c99f5680..b6147eb5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,7 @@ SUBDIRS = krfb po doc include -EXTRA_DIST = admin AUTHORS COPYING ChangeLog INSTALL README TODO krfb.lsm +EXTRA_DIST = admin AUTHORS COPYING ChangeLog INSTALL README TODO NOTES krfb.lsm # not a GNU package. You can remove this line, if # have all needed files, that a GNU package needs diff --git a/README b/README index 8b137891..97a94bf5 100644 --- a/README +++ b/README @@ -1 +1,15 @@ +KRfb +==== + +KRfb is a small server for the RFB protocol, better known as VNC. It is based +on x0rfbserver, available from http://www.hexonet.de/software/x0rfbserver/. +Unlike most other Unix/Linux RFB servers, KRfb (and x0rfbserver) allows you +to share your X11 session instead of creating a new X11 session. + +For more information about KRfb visit http://www.tjansen.de/krfb + +Read the NOTES file for various notes on KRfb. + + + diff --git a/TODO b/TODO index 3ce56c7a..cc3788e4 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,8 @@ Todo: -- i18n (0.2) +- i18n +- do something against potential denial-of-service attacks by repeatedly + trying to connect to users until they agree. Maybe a message box + after the third attempt offering the user to stop KRfb, block the IP or + something like this diff --git a/configure.in.in b/configure.in.in index 9a598b18..b044319d 100644 --- a/configure.in.in +++ b/configure.in.in @@ -5,3 +5,8 @@ AM_INIT_AUTOMAKE(krfb,0.1) AC_CHECK_HEADER(X11/extensions/XTest.h, [], AC_MSG_ERROR([XTest extension header not found])) + +AC_CHECK_HEADER(zlib.h, + [], + AC_MSG_ERROR([ZLib header not found])) + diff --git a/krfb/Makefile.am b/krfb/Makefile.am index 8589ba3e..a754f53d 100644 --- a/krfb/Makefile.am +++ b/krfb/Makefile.am @@ -1,22 +1,16 @@ METASOURCES = AUTO -KDE_ICON = AUTO -POFILES=AUTO bin_PROGRAMS = krfb krfb_SOURCES = rfbcontroller.cc configuration.cc trayicon.cpp XUpdateScanner.cc rfbconnection.cc main.cpp configurationdialog.ui newconnectiondialog.ui -krfb_LDADD = ./lib/liblib.a $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI) $(LIBSOCKET) +krfb_LDADD = ./lib/librfbserver.a $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI) $(LIBSOCKET) SUBDIRS = lib -EXTRA_DIST = krfb.desktop lo32-app-krfb.png lo16-app-krfb.png rfbcontroller.h rfbconnection.h eyes-closed24.png eyes-open24.png XUpdateScanner.h trayicon.h configuration.h +EXTRA_DIST = $(krfb_SOURCES) krfb.desktop lo32-app-krfb.png lo16-app-krfb.png rfbcontroller.h rfbconnection.h eyes-closed24.png eyes-open24.png XUpdateScanner.h trayicon.h configuration.h install-data-local: $(mkinstalldirs) $(kde_appsdir)/Applications/ $(INSTALL_DATA) $(srcdir)/krfb.desktop $(kde_appsdir)/Applications/krfb.desktop - $(mkinstalldirs) $(kde_icondir)/locolor/32x32/apps/ - $(INSTALL_DATA) $(srcdir)/lo32-app-krfb.png $(kde_icondir)/locolor/32x32/apps/krfb.png - $(mkinstalldirs) $(kde_icondir)/locolor/16x16/apps/ - $(INSTALL_DATA) $(srcdir)/lo16-app-krfb.png $(kde_icondir)/locolor/16x16/apps/krfb.png $(mkinstalldirs) $(kde_datadir)/krfb/pics $(INSTALL_DATA) $(srcdir)/eyes-closed24.png $(kde_datadir)/krfb/pics/eyes-closed24.png $(INSTALL_DATA) $(srcdir)/eyes-open24.png $(kde_datadir)/krfb/pics/eyes-open24.png @@ -24,11 +18,11 @@ install-data-local: uninstall-local: -rm -f $(kde_appsdir)/Applications/krfb.desktop - -rm -f $(kde_icondir)/locolor/32x32/apps/krfb.png - -rm -f $(kde_icondir)/locolor/16x16/apps/krfb.png -rm -f $(kde_datadir)/krfb/pics/eyes-open24.png -rm -f $(kde_datadir)/krfb/pics/eyes-closed24.png +KDE_ICON = krfb + # this 10 paths are KDE specific. Use them: # kde_htmldir Where your docs should go to. (contains lang subdirs) # kde_appsdir Where your application file (.kdelnk) should go to. @@ -46,7 +40,9 @@ uninstall-local: INCLUDES= $(all_includes) -I../include # the library search path. -krfb_LDFLAGS = $(all_libraries) $(KDE_RPATH) -lXtst +krfb_LDFLAGS = $(all_libraries) $(KDE_RPATH) -lXtst -lz + +CXXFLAGS = -DUSE_ZLIB_WARREN # Uncomment the following two lines if you add a ui.rc file for your application to make use of # KDE´s XML GUI builing diff --git a/krfb/configurationdialog.ui b/krfb/configurationdialog.ui index a316843b..1e8bec2e 100644 --- a/krfb/configurationdialog.ui +++ b/krfb/configurationdialog.ui @@ -11,20 +11,20 @@ 0 0 - 318 + 321 257 sizePolicy - 5 - 5 + 0 + 0 caption - KRfb configuration + KRfb: Configuration @@ -76,7 +76,7 @@ text - ask &before remote client connects + Ask &before remote client connects whatsThis @@ -91,7 +91,7 @@ text - allow &remote client to control the desktop + Allow &remote client to control the desktop whatsThis diff --git a/krfb/hi32-app-krfb.png b/krfb/hi32-app-krfb.png new file mode 100644 index 0000000000000000000000000000000000000000..29e4ef3a9bba58c428236cd2ebb2173aec3d77c6 GIT binary patch literal 592 zcmV-W0zC8p|O0|}LSGxeDl&UBS)wZq5^Bhu2 zlQvBQ0Lb$k08kW#l2WR@K&t>ckT%g0LI41orUB<1ZQC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?JSg+u?BFa<$8{X__<|4Rl>UU_Y+yejVk1B7hMH zuzmF^bzR3|w(x1+V0m;{)Ye*Md9JYhbNLA($7El@B165(P*G33YJ(b_R`hxJY@&wdwTtW^?&s2 V7PTSU*rfmf002ovPDHLkV1iH_a4P@+ literal 0 HcmV?d00001 diff --git a/krfb/newconnectiondialog.ui b/krfb/newconnectiondialog.ui index 267dd4bc..67947e2f 100644 --- a/krfb/newconnectiondialog.ui +++ b/krfb/newconnectiondialog.ui @@ -17,7 +17,7 @@ caption - New RFB Connection + KRfb: New Connection @@ -145,7 +145,7 @@ QLabel name - TextLabel3 + mainTextLabel sizePolicy @@ -168,12 +168,12 @@ text - A user on the computer x.x.x.x requests a RFB connection to your computer. -This means that he can see everything on your screen and, if the box below is enabled, he can also control it. Refuse the connection unless you trust the person. + Somebody requests a RFB connection to your computer. +This means that she can see everything on your screen and, if the option below is enabled, she can also control it. Refuse the connection unless you trust the person. textFormat - PlainText + AutoText alignment @@ -189,6 +189,78 @@ This means that he can see everything on your screen and, if the box below is en + + QFrame + + name + Frame6 + + + sizePolicy + + 7 + 0 + + + + frameShape + NoFrame + + + frameShadow + Plain + + + layoutMargin + + + layoutSpacing + + + + margin + 0 + + + spacing + 1 + + + QLabel + + name + TextLabel1 + + + font + + 1 + + + + text + Remote system: + + + + QLabel + + name + ipLabel + + + font + + 1 + + + + text + 123.234.123.234 + + + + QCheckBox @@ -204,7 +276,7 @@ This means that he can see everything on your screen and, if the box below is en text - Allow remote user to control keyboard and mouse + Allow remote user to control &keyboard and mouse whatsThis @@ -278,7 +350,7 @@ This means that he can see everything on your screen and, if the box below is en text - Accept connection + &Accept Connection whatsThis @@ -293,7 +365,11 @@ This means that he can see everything on your screen and, if the box below is en text - Refuse connection + &Refuse Connection + + + accel + 276824146 default diff --git a/krfb/rfbcontroller.cc b/krfb/rfbcontroller.cc index b62a4a7d..ade39f0e 100644 --- a/krfb/rfbcontroller.cc +++ b/krfb/rfbcontroller.cc @@ -29,11 +29,13 @@ #include #include #include +#include #include #include #include #include #include +#include RFBController::RFBController(Configuration *c) : configuration(c), @@ -107,8 +109,13 @@ void RFBController::accepted(KSocket *s) { socket = s; if (configuration->askOnConnect()) { + QString host, port; + KExtendedSocket::resolve(KExtendedSocket::peerAddress(sockFd), + host, port); + dialog.ipLabel->setText(host); dialog.allowRemoteControlCB->setChecked( configuration->allowDesktopControl()); + dialog.setFixedSize(dialog.sizeHint()); dialog.show(); } else { diff --git a/krfb/trayicon.cpp b/krfb/trayicon.cpp index 2ed3c2c1..bf53e12f 100644 --- a/krfb/trayicon.cpp +++ b/krfb/trayicon.cpp @@ -16,6 +16,7 @@ ***************************************************************************/ #include "trayicon.h" +#include #include #include #include @@ -32,7 +33,7 @@ TrayIcon::TrayIcon(KDialog *d, Configuration *c) : trayIconClosed = loader->loadIcon("eyes-closed24", KIcon::User); setPixmap(trayIconClosed); - configureAction = new KAction(i18n("&Configure KRfb...")); + configureAction = KStdAction::preferences(); if (!c->preconfigured()) configureAction->plug(contextMenu()); @@ -41,8 +42,7 @@ TrayIcon::TrayIcon(KDialog *d, Configuration *c) : closeConnectionAction->setEnabled(false); contextMenu()->insertSeparator(); - aboutAction = new KAction(i18n("&About KRfb"), - KApplication::kApplication()->instanceName()); + aboutAction = KStdAction::aboutApp(); aboutAction->plug(contextMenu()); connect(configureAction, SIGNAL(activated()), SIGNAL(showConfigure())); connect(aboutAction, SIGNAL(activated()), SLOT(showAbout()));