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 00000000..29e4ef3a Binary files /dev/null and b/krfb/hi32-app-krfb.png differ diff --git a/krfb/hi48-app-krfb.png b/krfb/hi48-app-krfb.png new file mode 100644 index 00000000..da867b98 Binary files /dev/null and b/krfb/hi48-app-krfb.png differ 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()));