[X2go-Commits] x2godesktopsharing.git - build-main (branch) updated: 3.0.1.3

X2go dev team git-admin at x2go.org
Wed Oct 12 11:20:02 CEST 2011


The branch, build-main has been updated
       via  0d8c6ada8efc63d78d114cd49cff08cbe281257e (commit)
       via  f1c63f7ce96103df55065dd2eccd399ef62e865f (commit)
       via  0d4198a2a0e28e1984995ad8b60c132303d61c61 (commit)
       via  65513d1ac3a1d04eb168d14745edd49e2927f737 (commit)
       via  d7dfa95bf6f99174a9a88adae3b3de68b57aa7d8 (commit)
       via  a9be575d798f9cf7674f232becd9abddc63ec0ab (commit)
       via  090e7aff4281c5fa3bbc441962bbdc6056cb73c8 (commit)
       via  dc2af16a85f83b4b1ebe9ce9079d6f00c8ab5c3e (commit)
       via  7d7533aa07b347e105a6b02557d7732183579a48 (commit)
       via  4802e527534545c7ecb17d977d193e5cc246d57d (commit)
       via  caf8fd6bfb2f094a64effac706a7cb0202c2124b (commit)
       via  0d49dfdde6ee62e21c709de027a6f80576d88727 (commit)
       via  ae952c3ad02ebd5231b425cfcc13c8a6515c01d8 (commit)
       via  afbd6ea63298d948d3543143e13ed12db7b3fddd (commit)
       via  10d8ce59c44d6fdc17ff4823efb307a36cbfa79d (commit)
       via  d1674883c091c3a532011a31bb2c17d35cb7b725 (commit)
       via  91df9e9278ea7dcb4bc17d1f8a934af0dfdd909d (commit)
       via  3c4601b7ec0af5717bdd9e6983e451efd1c4b67f (commit)
       via  0720d15908712b9f3c3390e46515bdd3fcd8b550 (commit)
       via  cf356157e83da59220ab7af3c8bb71f722b3e754 (commit)
       via  619fa9d40858791b1bf98754ed110c606c634005 (commit)
       via  a17eb04222eac5aee009924f004df2ad6342eb34 (commit)
       via  37b57f64cab0f715aae80056a5c0053eafb3390d (commit)
       via  05b2d0b00809da05a1e9f30ea4b1fdb71612a861 (commit)
       via  3f8822957798a3b61415f9bf358fd08266144854 (commit)
       via  e9168f26a14d6d2c5215285966a534b73b974118 (commit)
       via  4b8c2abb58aa34828aed15d5d7b336a785ca8bc9 (commit)
       via  91e0971284d686e42f444e312cf3220ea22ea6f9 (commit)
       via  4cf4a0b2dad35e92ddaac712c9d2b6f513cd4a46 (commit)
       via  ecfddd98ebfd7f844942ebba155240ba7a388e22 (commit)
       via  b84f97efa59e4643b32927f752332ad30a98c160 (commit)
       via  68851b594c736924659ee40696317b8c0bc9c27d (commit)
       via  308d4207bf44963ce7c31984531d175b238de42d (commit)
       via  80ba9339306dd2c7283be72389dca892df4bf85d (commit)
      from  8aaf4bd12b80f30767983f299c9581d5d73916c0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 Doxyfile                                        |    6 +-
 VERSION                                         |    1 -
 VERSION.x2godesktopsharing                      |    1 +
 bin/x2goresume-desktopsharing                   |   39 +
 bin/x2gosuspend-desktopsharing                  |   34 +
 bin/x2goterminate-desktopsharing                |   46 ++
 debian/changelog                                |   23 +
 debian/control                                  |    7 +-
 debian/rules                                    |    2 +-
 debian/x2godesktopsharing.dirs                  |   12 +-
 debian/x2godesktopsharing.install               |    3 +
 debian/x2godesktopsharing.manpages              |    3 +-
 debian/x2godesktopsharing.postinst              |    4 +-
 main.cpp                                        |  215 ++++---
 man/{ => man1}/x2godesktopsharing.1             |    6 +-
 man/man8/x2goresume-desktopsharing.8            |   28 +
 man/man8/x2gosuspend-desktopsharing.8           |   37 +
 man/man8/x2goterminate-desktopsharing.8         |   30 +
 share/x2gofeature.d/x2godesktopsharing.features |   36 +
 sharetray.cpp                                   |  871 +++++++++++++----------
 sharetray.h                                     |  111 ++--
 21 files changed, 980 insertions(+), 535 deletions(-)
 delete mode 100644 VERSION
 create mode 100644 VERSION.x2godesktopsharing
 create mode 100755 bin/x2goresume-desktopsharing
 create mode 100755 bin/x2gosuspend-desktopsharing
 create mode 100755 bin/x2goterminate-desktopsharing
 create mode 100644 debian/x2godesktopsharing.install
 rename man/{ => man1}/x2godesktopsharing.1 (77%)
 create mode 100644 man/man8/x2goresume-desktopsharing.8
 create mode 100644 man/man8/x2gosuspend-desktopsharing.8
 create mode 100644 man/man8/x2goterminate-desktopsharing.8
 create mode 100755 share/x2gofeature.d/x2godesktopsharing.features

The diff of changes is:
diff --git a/Doxyfile b/Doxyfile
index 03042a9..fc8159f 100644
--- a/Doxyfile
+++ b/Doxyfile
@@ -4,7 +4,7 @@
 # Project related configuration options
 #---------------------------------------------------------------------------
 DOXYFILE_ENCODING      = UTF-8
-PROJECT_NAME           = x2godesktopshare
+PROJECT_NAME           = x2godesktopsharing
 PROJECT_NUMBER         = 1
 OUTPUT_DIRECTORY       = 
 CREATE_SUBDIRS         = NO
@@ -93,7 +93,7 @@ WARN_LOGFILE           =
 #---------------------------------------------------------------------------
 # configuration options related to the input files
 #---------------------------------------------------------------------------
-INPUT                  = /usr/src.cur/db-builds/x2godesktopshare/x2godesktopshare-3.0.1
+INPUT                  = /usr/src.cur/db-builds/x2godesktopsharing/x2godesktopsharing-3.0.1.3
 INPUT_ENCODING         = UTF-8
 FILE_PATTERNS          = *.c \
                          *.cc \
@@ -272,7 +272,7 @@ SKIP_FUNCTION_MACROS   = YES
 # Configuration::additions related to external references   
 #---------------------------------------------------------------------------
 TAGFILES               = 
-GENERATE_TAGFILE       = x2godesktopshare.tag
+GENERATE_TAGFILE       = x2godesktopsharing.tag
 ALLEXTERNALS           = NO
 EXTERNAL_GROUPS        = YES
 PERL_PATH              = /usr/bin/perl
diff --git a/VERSION b/VERSION
deleted file mode 100644
index cd0a3b6..0000000
--- a/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-3.0.1.2
diff --git a/VERSION.x2godesktopsharing b/VERSION.x2godesktopsharing
new file mode 100644
index 0000000..e9aef23
--- /dev/null
+++ b/VERSION.x2godesktopsharing
@@ -0,0 +1 @@
+3.0.1.3
diff --git a/bin/x2goresume-desktopsharing b/bin/x2goresume-desktopsharing
new file mode 100755
index 0000000..aaa2c25
--- /dev/null
+++ b/bin/x2goresume-desktopsharing
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+# Copyright (C) 2007-2011 X2go Project - http://wiki.x2go.org
+#
+# 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
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Copyright (C) 2011  Oleksandr Shneyder <oleksandr.shneyder at obviously-nice.de>
+# Copyright (C) 2011  Heinz-Markus Graesing <heinz-m.graesing at obviously-nice.de>
+# Copyright (C) 2011  Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
+
+if [ $# -eq 1   ]; then
+	SESSION_NAME=$1
+else 
+	SESSION_NAME=$X2GO_SESSION
+fi
+
+X2GO_LIB_PATH=`echo -n \$(x2gobasepath)/lib/x2go`
+
+$X2GO_LIB_PATH/x2gosyslog "$0" "info" "$(basename $0) called with options: $@"
+
+X2GO_DISPLAY=$(echo $SESSION_NAME | cut -d"-" -f2)
+
+test -e $HOME/.x2go/C-$SESSION_NAME/resume-desktopsharing && {
+	rm -f $HOME/.x2go/C-$SESSION_NAME/resume-desktopsharing
+	DISPLAY=:$X2GO_DISPLAY.0 x2godesktopsharing &>/dev/null &
+}
diff --git a/bin/x2gosuspend-desktopsharing b/bin/x2gosuspend-desktopsharing
new file mode 100755
index 0000000..676cab1
--- /dev/null
+++ b/bin/x2gosuspend-desktopsharing
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+# Copyright (C) 2007-2011 X2go Project - http://wiki.x2go.org
+#
+# 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
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Copyright (C) 2011  Oleksandr Shneyder <oleksandr.shneyder at obviously-nice.de>
+# Copyright (C) 2011  Heinz-Markus Graesing <heinz-m.graesing at obviously-nice.de>
+# Copyright (C) 2011  Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
+
+if [ $# -eq 1   ]; then
+	SESSION_NAME=$1
+else 
+	SESSION_NAME=$X2GO_SESSION
+fi
+
+X2GO_LIB_PATH=`echo -n \$(x2gobasepath)/lib/x2go`
+
+$X2GO_LIB_PATH/x2gosyslog "$0" "info" "$(basename $0) called with options: $@"
+
+x2goterminate-desktopsharing $SESSION_NAME && touch $HOME/.x2go/C-$SESSION_NAME/resume-desktopsharing
diff --git a/bin/x2goterminate-desktopsharing b/bin/x2goterminate-desktopsharing
new file mode 100755
index 0000000..bbf7675
--- /dev/null
+++ b/bin/x2goterminate-desktopsharing
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+# Copyright (C) 2007-2011 X2go Project - http://wiki.x2go.org
+#
+# 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
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Copyright (C) 2011  Oleksandr Shneyder <oleksandr.shneyder at obviously-nice.de>
+# Copyright (C) 2011  Heinz-Markus Graesing <heinz-m.graesing at obviously-nice.de>
+# Copyright (C) 2011  Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
+
+if [ $# -eq 1   ]; then
+	SESSION_NAME=$1
+else 
+	SESSION_NAME=$X2GO_SESSION
+fi
+
+X2GO_LIB_PATH=`echo -n \$(x2gobasepath)/lib/x2go`
+
+$X2GO_LIB_PATH/x2gosyslog "$0" "info" "$(basename $0) called with options: $@"
+
+
+X2GO_DISPLAY=$(echo $SESSION_NAME | cut -d"-" -f2)
+for process_id in `pidof x2godesktopsharing`; do
+	env_of_process=$(cat -A /proc/$process_id/environ)
+	env_of_process=${env_of_process//^@/\\n}
+	display=$(echo -e $env_of_process | egrep "^DISPLAY=.*$" | cut -d"=" -f2)
+	if echo $display | grep ":$X2GO_DISPLAY" &>/dev/null; then
+		kill -SIGTERM $process_id
+		exit 0
+	fi
+done
+
+exit -1
diff --git a/debian/changelog b/debian/changelog
index c4bd217..97f169f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,26 @@
+x2godesktopsharing (3.0.1.3-0~x2go1) unstable; urgency=low
+
+  * New upstream version (3.0.1.3):
+    - Fix incomplete DENY statement in main.cpp.
+    - System group for x2godesktopsharing changed from x2gousers ->
+      x2godesktopsharing.
+    - Differentiate between local and remote user, fixes display of wrong
+      user name for remote user.
+    - Add signal handler so that unix signals can be handled within Qt.
+    - Add script x2godesktopsharing-terminate: detect x2godesktopsharing process
+      of a given session and terminate that process.
+    - Save settings and tidy up lock and socket file on X-Server crash.
+    - Provide feature for suspending/resuming x2godesktopsharing
+      (x2godesktopsharing will be terminated on x2gosuspend-session and
+      operations will be resumed on x2goresume-session).
+    - Add man pages for x2go<action>-desktopsharing commands, re-arrange man
+      page folders in source project.
+  * Depend on x2goserver (>=3.0.99.6).
+  * Make sure postinst script does not fail when checking for existence
+    of group x2godesktopsharing.
+
+ -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Wed, 12 Oct 2011 11:17:38 +0200
+
 x2godesktopsharing (3.0.1.2-0~x2go1) unstable; urgency=low
 
   * change of version numbering scheme
diff --git a/debian/control b/debian/control
index 7c7b9c3..94119f0 100644
--- a/debian/control
+++ b/debian/control
@@ -6,14 +6,17 @@ Uploaders: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
 Build-Depends:
  debhelper (>= 7),
  libqt4-dev
-Standards-Version: 3.9.1
+Standards-Version: 3.9.2
+Homepage: http://code.x2go.org/releases/source/x2godesktopsharing
+Vcs-Git: git://code.x2go.org/x2godesktopsharing.git
+Vcs-Browser: http://code.x2go.org/gitweb?p=x2godesktopsharing.git;a=summary
 
 Package: x2godesktopsharing
 Architecture: any
 Depends:
  ${misc:Depends},
  ${shlibs:Depends},
- x2goserver (>= 3.0.99),
+ x2goserver (>= 3.0.99.6-0~),
  libqt4-gui,
 Recommends:
 Description: share X2go desktops with other users (via shadow sessions)
diff --git a/debian/rules b/debian/rules
index 57f35f4..6add866 100755
--- a/debian/rules
+++ b/debian/rules
@@ -78,7 +78,7 @@ binary-arch: build install
 	dh_installchangelogs 
 	dh_installdocs
 	dh_installexamples
-#	dh_install
+	dh_install
 	dh_installmenu
 #	dh_installdebconf	
 #	dh_installlogrotate
diff --git a/debian/x2godesktopsharing.dirs b/debian/x2godesktopsharing.dirs
index bd2db4c..7e4dcd7 100644
--- a/debian/x2godesktopsharing.dirs
+++ b/debian/x2godesktopsharing.dirs
@@ -1,8 +1,10 @@
 usr/bin
-usr/share/applications/
+usr/share/applications
 usr/share/x2godesktopsharing
 usr/share/x2godesktopsharing/icons
-usr/share/icons/hicolor/128x128/apps/
-usr/share/icons/hicolor/16x16/apps/
-usr/share/icons/hicolor/64x64/apps/
-usr/share/icons/hicolor/32x32/apps/
+usr/share/icons/hicolor/128x128/apps
+usr/share/icons/hicolor/16x16/apps
+usr/share/icons/hicolor/64x64/apps
+usr/share/icons/hicolor/32x32/apps
+usr/share/x2go
+usr/share/x2go/versions
diff --git a/debian/x2godesktopsharing.install b/debian/x2godesktopsharing.install
new file mode 100644
index 0000000..1e51109
--- /dev/null
+++ b/debian/x2godesktopsharing.install
@@ -0,0 +1,3 @@
+VERSION.x2godesktopsharing      usr/share/x2go/versions
+bin/*                           usr/bin/
+share/*                         usr/share/x2go/
\ No newline at end of file
diff --git a/debian/x2godesktopsharing.manpages b/debian/x2godesktopsharing.manpages
index 7aee1a9..ad46900 100644
--- a/debian/x2godesktopsharing.manpages
+++ b/debian/x2godesktopsharing.manpages
@@ -1 +1,2 @@
-man/x2godesktopsharing.1
\ No newline at end of file
+man/man1/x2godesktopsharing.1
+man/man8/x2go*-desktopsharing.8
diff --git a/debian/x2godesktopsharing.postinst b/debian/x2godesktopsharing.postinst
index 2f7b721..6fd8a1a 100755
--- a/debian/x2godesktopsharing.postinst
+++ b/debian/x2godesktopsharing.postinst
@@ -22,10 +22,10 @@ set -e
 
 case "$1" in
     configure)
-    X2GOGRP=`getent group | grep x2gousers`
+    X2GOGRP=`getent group | grep x2godesktopsharing || true`
     if [ "x$X2GOGRP"="x" ]
     then 
-         addgroup --system x2gousers
+         addgroup --system x2godesktopsharing
     fi
     ;;
 
diff --git a/main.cpp b/main.cpp
index 636c43c..d3733b5 100644
--- a/main.cpp
+++ b/main.cpp
@@ -26,102 +26,141 @@
 #include <QLocalSocket>
 #include <iostream>
 #include <QDir>
-
+#include <csignal>
 
 using namespace std;
 
 void  client ( const QStringList & cmd )
 {
 
-    if ( cmd.size() !=10 )
-    {
-        cerr<<"wrong parameters"<<endl;
-        cout<<"DEN";
-	return;
-    }
-    QStringList params=cmd[9].split ( "XSHAD" );
-    if ( params.size() !=3 )
-    {
-        cerr<<"wrong parameters"<<endl;
-        cout<<"DEN";
-	return;
-    }
-
-    cerr<<"starting x2godesktopsharing in client mode, cmd: "<<
-        cmd.join(" ").toAscii().data() <<std::endl;
-
-    QString dispname=params[2];
-    QString socketName=QDir::tempPath() +"/x2godesktopsharing_@"+
-                       params[1]+"@"+dispname;
-    QLocalSocket sock;
-    sock.connectToServer ( socketName );
-    if ( !sock.waitForConnected ( 3000 ) )
-    {
-        QString message="Unable to connect: " +socketName;
-        cout<<"DEN";
-        cerr<<message.toAscii().data() <<endl;
-	return;
-    }
-    sock.write ( cmd.join(" ").toAscii().data(),cmd.join(" ").toAscii().length() );
-    if ( !sock.waitForReadyRead() )
-    {
-        cout<<"DEN";
-        cerr<<"Cannot write to socket: "<<socketName.toAscii().data() <<endl;
-        return;;
-    }
-    char buffer[256];
-    int read=sock.read ( buffer,255 );
-    if ( read<=0 )
-    {
-        cout<<"DEN";
-        cerr<<"Cannot read from socket: " <<socketName.toAscii().data() <<endl;
-        return;    
-    }
-    buffer[read]=0;
-    cout<<buffer<<endl;
+	if ( cmd.size() !=11 )
+	{
+		cerr<<"wrong parameters"<<endl;
+		cout<<"DENY";
+		return;
+	}
+	QStringList params=cmd[9].split ( "XSHAD" );
+	if ( params.size() !=3 )
+	{
+		cerr<<"wrong parameters"<<endl;
+		cout<<"DENY";
+		return;
+	}
+
+	cerr<<"starting x2godesktopsharing in client mode, cmd: "<<
+	cmd.join(" ").toAscii().data() <<std::endl;
+
+	QString dispname=params[2];
+	QString socketName=QDir::tempPath() +"/x2godesktopsharing_@"+
+	                   params[1]+"@"+dispname;
+	QLocalSocket sock;
+	sock.connectToServer ( socketName );
+	if ( !sock.waitForConnected ( 3000 ) )
+	{
+		QString message="Unable to connect: " +socketName;
+		cout<<"DENY";
+		cerr<<message.toAscii().data() <<endl;
+		return;
+	}
+	sock.write ( cmd.join(" ").toAscii().data(),cmd.join(" ").toAscii().length() );
+	if ( !sock.waitForReadyRead() )
+	{
+		cout<<"DENY";
+		cerr<<"Cannot write to socket: "<<socketName.toAscii().data() <<endl;
+		return;;
+	}
+	char buffer[256];
+	int read=sock.read ( buffer,255 );
+	if ( read<=0 )
+	{
+		cout<<"DENY";
+		cerr<<"Cannot read from socket: " <<socketName.toAscii().data() <<endl;
+		return;
+	}
+	buffer[read]=0;
+	cout<<buffer<<endl;
+}
+
+static int setup_unix_signal_handlers()
+{
+	struct sigaction keybint, term, abort, hup;
+
+	keybint.sa_handler = ShareTray::keybintSignalHandler;
+	sigemptyset(&keybint.sa_mask);
+	keybint.sa_flags = 0;
+	keybint.sa_flags |= SA_RESTART;
+
+	if (sigaction(SIGINT, &keybint, 0) > 0)
+		return 1;
+
+	term.sa_handler = ShareTray::termSignalHandler;
+	sigemptyset(&term.sa_mask);
+	term.sa_flags |= SA_RESTART;
+
+	if (sigaction(SIGTERM, &term, 0) > 0)
+	return 2;
+
+	abort.sa_handler = ShareTray::abortSignalHandler;
+	sigemptyset(&abort.sa_mask);
+	abort.sa_flags |= SA_RESTART;
+
+	if (sigaction(SIGABRT, &abort, 0) > 0)
+	return 3;
+
+	hup.sa_handler = ShareTray::hupSignalHandler;
+	sigemptyset(&hup.sa_mask);
+	hup.sa_flags |= SA_RESTART;
+
+	if (sigaction(SIGHUP, &hup, 0) > 0)
+	return 4;
+
+	return 0;
 }
 
 int main ( int argc, char *argv[] )
 {
-    if ( argc>2 )
-    {
-        QString par=argv[1];
-        if ( par == "client" )
-        {
-            QStringList cmdl;
-            for ( int i=2; i<argc;++i )
-                cmdl<<argv[i];
-            client ( cmdl );
-            return 0;
-        }
-    }
-
-    QApplication app ( argc,argv );
-    QTranslator translator;
-    QString filename=QString ( ":/x2godesktopsharing_%1" ).arg (
-                         QLocale::system().name() );
-    filename=filename.toLower();
-    if ( !translator.load ( filename ) )
-    {
-        qDebug ( "Can't load translator (%s) !\n",
-                 filename.toLocal8Bit().data() );
-    }
-    else
-        app.installTranslator ( &translator );
-
-
-    QTranslator qtTranslator;
-    filename=QString ( ":/qt_%1" ).arg ( QLocale::system().name() );
-    if ( !qtTranslator.load ( filename ) )
-    {
-        qDebug ( "Can't load translator (%s) !\n",
-                 filename.toLocal8Bit().data() );
-    }
-    else
-        app.installTranslator ( &qtTranslator );
-    ShareTray* tray=new ShareTray;
-    tray->hide();
-
-
-    return app.exec();
+	if ( argc>2 )
+	{
+		QString par=argv[1];
+		if ( par == "client" )
+		{
+			QStringList cmdl;
+			for ( int i=2; i<argc;++i )
+			cmdl<<argv[i];
+			client ( cmdl );
+			return 0;
+		}
+	}
+
+	QApplication app ( argc,argv );
+	QTranslator translator;
+	QString filename=QString ( ":/x2godesktopsharing_%1" ).arg (
+	                 QLocale::system().name() );
+	filename=filename.toLower();
+	if ( !translator.load ( filename ) )
+	{
+		qDebug ( "Can't load translator (%s) !\n",
+		         filename.toLocal8Bit().data() );
+	}
+	else
+		app.installTranslator ( &translator );
+
+	QTranslator qtTranslator;
+	filename=QString ( ":/qt_%1" ).arg ( QLocale::system().name() );
+	if ( !qtTranslator.load ( filename ) )
+	{
+		qDebug ( "Can't load translator (%s) !\n",
+		         filename.toLocal8Bit().data() );
+	}
+	else
+		app.installTranslator ( &qtTranslator );
+
+	ShareTray* tray=new ShareTray;
+	tray->hide();
+	setup_unix_signal_handlers();
+	try {
+		return app.exec();
+	} catch (const std::bad_alloc &) {
+		tray->slotMenuClose();
+	}
 }
diff --git a/man/x2godesktopsharing.1 b/man/man1/x2godesktopsharing.1
similarity index 77%
rename from man/x2godesktopsharing.1
rename to man/man1/x2godesktopsharing.1
index 2fba34c..eb154a1 100644
--- a/man/x2godesktopsharing.1
+++ b/man/man1/x2godesktopsharing.1
@@ -5,7 +5,7 @@
 \\$2 \(la\\$1\(ra\\$3
 ..
 .if \n(.g .mso www.tmac
-.TH x2godesktopsharing 1 "14 Apr 2011" "Version 3.0.1.2" "X2go Application"
+.TH x2godesktopsharing 1 "14 Apr 2011" "Version 3.0.1.x" "X2go Application"
 .SH NAME
 x2godesktopsharing \- Share an X2go desktop with other clients and users.
 .SH SYNOPSIS
@@ -15,8 +15,8 @@ x2godesktopsharing \- Share an X2go desktop with other clients and users.
 \fBx2godesktopsharing\fR 
 
 .SH DESCRIPTION
-\fBx2godesktopsharing\fR is a system tray tool that allows a user to control access his/her X2go
-session (via shadow sessions).
+\fBx2godesktopsharing\fR is a system tray tool that allows a user to give/control access to his/her X/X2go
+session (via shadow session support in NX libraries).
 .PP
 .SH OPTIONS
 \fBx2godesktopsharing\fR has no known options.
diff --git a/man/man8/x2goresume-desktopsharing.8 b/man/man8/x2goresume-desktopsharing.8
new file mode 100644
index 0000000..dc6fd28
--- /dev/null
+++ b/man/man8/x2goresume-desktopsharing.8
@@ -0,0 +1,28 @@
+'\" -*- coding: utf-8 -*-
+.if \n(.g .ds T< \\FC
+.if \n(.g .ds T> \\F[\n[.fam]]
+.de URL
+\\$2 \(la\\$1\(ra\\$3
+..
+.if \n(.g .mso www.tmac
+.TH x2goresume-desktopsharing 8 "Sep 2011" "Version 3.0.99.x" "X2go Server Tool"
+.SH NAME
+x2goresume-desktopsharing \- Resume Desktop Sharing Applet for a given X2go Session
+.SH SYNOPSIS
+'nh
+.fi
+.ad l
+x2goresume-desktopsharing <session_id>
+
+.SH DESCRIPTION
+\fBx2goresume-desktopsharing\fR launches the \fBx2godesktopsharing\fR applet for X2go session <session_id>.
+.PP
+\fBx2goresume-desktopsharing\fR is run with normal user privileges and it is used from within X2go Server.
+There normally is no need to execute this command manually.
+.SH RETURN VALUES
+As exitcode \fBx2goresume-desktopsharing\fR always returns 0.
+.SH SEE ALSO
+x2godesktopsharing(1), x2goresume-session(8), x2gosuspend-desktopsharing(8), x2goterminate-desktopsharing(8)
+.SH AUTHOR
+This manual has been written by Mike Gabriel <mike.gabriel at das-netzwerkteam.de> for the X2go project
+(http://www.x2go.org).
diff --git a/man/man8/x2gosuspend-desktopsharing.8 b/man/man8/x2gosuspend-desktopsharing.8
new file mode 100644
index 0000000..6f7b6b4
--- /dev/null
+++ b/man/man8/x2gosuspend-desktopsharing.8
@@ -0,0 +1,37 @@
+'\" -*- coding: utf-8 -*-
+.if \n(.g .ds T< \\FC
+.if \n(.g .ds T> \\F[\n[.fam]]
+.de URL
+\\$2 \(la\\$1\(ra\\$3
+..
+.if \n(.g .mso www.tmac
+.TH x2gosuspend-desktopsharing 8 "Sep 2011" "Version 3.0.99.x" "X2go Server Tool"
+.SH NAME
+x2gosuspend-desktopsharing \- Suspend Desktop Sharing for a given X2go Session
+.SH SYNOPSIS
+'nh
+.fi
+.ad l
+x2gosuspend-desktopsharing <session_id>
+
+.SH DESCRIPTION
+\fBx2gosuspend-desktopsharing\fR executes \fBx2goterminate-desktopsharing\fR and places a reminder file
+.PP
+    ,,resume-desktopsharing''
+.PP
+into
+.PP
+    $HOME/.x2go/C-<session_id>/
+.PP
+so that \fBx2godesktopsharing\fR can be resumed
+on session resume.
+.PP
+\fBx2gosuspend-desktopsharing\fR is run with normal user privileges and it is used from within X2go Server.
+There normally is no need to execute this command manually.
+.SH RETURN VALUES
+As exitcode \fBx2gosuspend-desktopsharing\fR always returns 0.
+.SH SEE ALSO
+x2godesktopsharing(1), x2gosuspend-session(8), x2goterminate-desktopsharing(8), x2goresume-desktopsharing(8)
+.SH AUTHOR
+This manual has been written by Mike Gabriel <mike.gabriel at das-netzwerkteam.de> for the X2go project
+(http://www.x2go.org).
diff --git a/man/man8/x2goterminate-desktopsharing.8 b/man/man8/x2goterminate-desktopsharing.8
new file mode 100644
index 0000000..b970b16
--- /dev/null
+++ b/man/man8/x2goterminate-desktopsharing.8
@@ -0,0 +1,30 @@
+'\" -*- coding: utf-8 -*-
+.if \n(.g .ds T< \\FC
+.if \n(.g .ds T> \\F[\n[.fam]]
+.de URL
+\\$2 \(la\\$1\(ra\\$3
+..
+.if \n(.g .mso www.tmac
+.TH x2goterminate-desktopsharing 8 "Sep 2011" "Version 3.0.99.x" "X2go Server Tool"
+.SH NAME
+x2goterminate-desktopsharing \- Cleanly Terminate Desktop Sharing for a given X2go Session
+.SH SYNOPSIS
+'nh
+.fi
+.ad l
+x2goterminate-desktopsharing <session_id>
+
+.SH DESCRIPTION
+\fBx2goterminate-desktopsharing\fR allows to detect a running and associated \fBx2godesktopsharing\fR
+applet and to cleanly terminate this applet.
+.PP
+\fBx2goterminate-desktopsharing\fR is run with normal user privileges and it is used from within X2go Server.
+There normally is no need to execute this command manually.
+.SH RETURN VALUES
+As exitcode \fBx2goterminate-desktopsharing\fR returns 0 if a \fBx2godesktopsharing\fR process could be identified
+and terminated. If not, the exit code is -1.
+.SH SEE ALSO
+x2godesktopsharing(1), x2goteminate-session(8), x2gosuspend-desktopsharing(8), x2goresume-desktopsharing(8)
+.SH AUTHOR
+This manual has been written by Mike Gabriel <mike.gabriel at das-netzwerkteam.de> for the X2go project
+(http://www.x2go.org).
diff --git a/share/x2gofeature.d/x2godesktopsharing.features b/share/x2gofeature.d/x2godesktopsharing.features
new file mode 100755
index 0000000..2f29612
--- /dev/null
+++ b/share/x2gofeature.d/x2godesktopsharing.features
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+# Copyright (C) 2007-2011 X2go Project - http://wiki.x2go.org
+#
+# 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
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Copyright (C) 2011  Oleksandr Shneyder <oleksandr.shneyder at obviously-nice.de>
+# Copyright (C) 2011  Heinz-Markus Graesing <heinz-m.graesing at obviously-nice.de>
+
+X2GO_LIB_PATH=`echo -n \$(x2gobasepath)/lib/x2go`
+
+$X2GO_LIB_PATH/x2gosyslog "$0" "info" "$(basename $0) called with options: $@"
+
+X2GO_FEATURE=$1
+
+# check for X2go server core features
+case "$X2GO_FEATURE" in
+
+    "X2GO_DESKTOPSHARING") echo "ok"; exit 0;;
+    *) exit -1;;
+
+esac
+
diff --git a/sharetray.cpp b/sharetray.cpp
index 541b50c..2bf7dee 100644
--- a/sharetray.cpp
+++ b/sharetray.cpp
@@ -17,10 +17,12 @@
 #include <QDir>
 #include <QtDebug>
 #include <QMessageBox>
+#include <QSocketNotifier>
+#include <sys/socket.h>
 #include "simplelocalsocket.h"
 #include "accessaction.h"
 #include <sys/types.h>
-#include <signal.h>
+#include <csignal>
 #include <errno.h>
 #include <QToolTip>
 #include <QTimer>
@@ -33,520 +35,619 @@
 #include <QProcess>
 #define STAT_ACT_COUNT 10
 
-#define VERSION "3.0.1-1"
+#define VERSION "3.0.1.3"
+
+//needed to not get an undefined reference to static members
+int ShareTray::sigkeybintFd[2];
+int ShareTray::sigtermFd[2];
+int ShareTray::sigabortFd[2];
+int ShareTray::sighupFd[2];
 
 ShareTray::ShareTray()
         : QMainWindow()
 {
-    serverSocket=0l;
-    menuClose=false;
-    current_list=BLACK;
-
-    ui.setupUi ( this );
-    ui.box->setSelectionMode ( QAbstractItemView::ExtendedSelection );
-
-    connect ( ui.close_box,SIGNAL ( clicked ( QAbstractButton* ) ),
-              SLOT ( slotMsgClose ( QAbstractButton* ) ) );
-
-    connect ( ui.ok_cancel_box,SIGNAL ( clicked ( QAbstractButton* ) ),
-              SLOT ( slotMsgOkCancel ( QAbstractButton* ) ) );
-
-    connect ( ui.del,SIGNAL ( clicked() ),
-              SLOT ( slotDelListItem() ) );
-
-    ui.icon->setPixmap ( QPixmap ( ":icons/128x128/x2godesktopsharing.png" ) );
-
-    ui.text->setText ( tr ( "<b>X2GO DesktopSharing V. " ) +VERSION+
-                       " </b >(Qt - "+qVersion() +")"+
-                       ui.text->text() );
-
-    setWindowFlags ( Qt::Dialog );
-    Qt::WindowFlags flags=windowFlags();
-    flags&= ~Qt::WindowTitleHint;
-    setWindowFlags ( flags );
-
-    QString dispname=getenv ( "DISPLAY" );
-    socketFname=QDir::tempPath() +"/x2godesktopsharing_@"+
-                getenv ( "LOGNAME" ) +"@"+dispname;
-    lockFname=QDir::tempPath() +"/x2godesktopsharing.lock_"+
-              getenv ( "LOGNAME" ) +"@"+dispname;
-    if ( QFile::exists ( lockFname ) )
-    {
-        QFile file ( lockFname );
-        if ( file.open ( QIODevice::ReadOnly | QIODevice::Text ) )
-        {
-            QTextStream in ( &file );
-            if ( !in.atEnd() )
-            {
-                QString line = in.readLine();
-                file.close();
-                if ( abs ( line.toUInt() -
-                           QDateTime::currentDateTime().toTime_t() ) <5 )
-                {
-
-                    QString message=QString (
-                                        tr (
-                                            "X2Go desktop sharing application "
-                                            "is already active for this "
-                                            "display \n"
-                                            "if this application is no longer "
-                                            "running, remove %1\n"
-                                            "and start again" ) ).arg ( lockFname );
-                    QMessageBox::critical ( 0l,tr (
-                                                "Error" ),message,
-                                            QMessageBox::Ok,
-                                            QMessageBox::NoButton );
-                    exit ( -1 );
-                }
-            }
-        }
-        QFile::remove ( lockFname );
-    }
-    if ( QFile::exists ( socketFname ) )
-        QFile::remove ( socketFname );
-
-    QTimer *lockTimer = new QTimer ( this );
-    connect ( lockTimer, SIGNAL ( timeout() ), this, SLOT ( slotUpdateLockFile() ) );
-    lockTimer->start ( 3000 );
-    trayIcon=new QSystemTrayIcon ( this );
-    setWindowIcon ( QIcon ( ":icons/22x22/x2godesktopsharing.png" ) );
-    menu = new QMenu ( this );
-    trayIcon->setContextMenu ( menu );
-    trayIcon->setToolTip ( tr ( "X2Go desktop sharing application" ) );
-
-    menu->addSeparator();
-
-    actWhite = menu->addAction ( QIcon ( ":icons/32x32/wlist.png" ) ,
-                                 tr ( "Granted users..." ) );
-    actBlack = menu->addAction ( QIcon ( ":icons/32x32/blist.png" ) ,
-                                 tr ( "Banned users..." ) );
-    menu->addSeparator();
-
-    actStart = menu->addAction ( QIcon ( ":icons/32x32/share.png" ) ,
-                                 tr ( "Activate desktop sharing" ) );
-
-    actStop = menu->addAction ( QIcon ( ":icons/32x32/stop.png" ) ,
-                                tr ( "Deactivate desktop sharing" ) );
-
-    menu->addSeparator();
-    QAction* actAbout=menu->addAction (
-                          QIcon ( ":icons/32x32/x2godesktopsharing.png" ),
-                          tr ( "About X2GO Sharing" ) );
-//
-//     QAction* actAboutQt=menu->addAction(
-//                              tr("About Qt"));
-//     connect ( actAboutQt,SIGNAL ( triggered ( bool ) ),this,
-//          SLOT ( slotAboutQt() ) );
-//
-    connect ( actAbout,SIGNAL ( triggered ( bool ) ),this,
-              SLOT ( slotAbout() ) );
+	serverSocket=0l;
+	menuClose=false;
+	current_list=BLACK;
+
+	ui.setupUi ( this );
+	ui.box->setSelectionMode ( QAbstractItemView::ExtendedSelection );
+
+	connect ( ui.close_box,SIGNAL ( clicked ( QAbstractButton* ) ),
+	          SLOT ( slotMsgClose ( QAbstractButton* ) ) );
+
+	connect ( ui.ok_cancel_box,SIGNAL ( clicked ( QAbstractButton* ) ),
+	          SLOT ( slotMsgOkCancel ( QAbstractButton* ) ) );
+
+	connect ( ui.del,SIGNAL ( clicked() ),
+	          SLOT ( slotDelListItem() ) );
+
+	ui.icon->setPixmap ( QPixmap ( ":icons/128x128/x2godesktopsharing.png" ) );
+
+	ui.text->setText ( tr ( "<b>X2GO DesktopSharing v" ) +VERSION+
+	                   " </b >(Qt - "+qVersion() +")"+
+	                   ui.text->text() );
+
+	setWindowFlags ( Qt::Dialog );
+	Qt::WindowFlags flags=windowFlags();
+	flags&= ~Qt::WindowTitleHint;
+	setWindowFlags ( flags );
+
+	QString dispname=getenv ( "DISPLAY" );
+	socketFname=QDir::tempPath() +"/x2godesktopsharing_@"+
+	            getenv ( "LOGNAME" ) +"@"+dispname;
+	lockFname=QDir::tempPath() +"/x2godesktopsharing.lock_"+
+	          getenv ( "LOGNAME" ) +"@"+dispname;
+	if ( QFile::exists ( lockFname ) )
+	{
+		QFile file ( lockFname );
+		if ( file.open ( QIODevice::ReadOnly | QIODevice::Text ) )
+		{
+			QTextStream in ( &file );
+			if ( !in.atEnd() )
+			{
+				QString line = in.readLine();
+				file.close();
+				if ( abs ( line.toUInt() -
+					QDateTime::currentDateTime().toTime_t() ) <5 )
+					{
+
+					QString message=QString (
+					                tr (
+					                    "X2Go desktop sharing application "
+					                    "is already active for this "
+					                    "display \n"
+					                    "if this application is no longer "
+					                    "running, remove %1\n"
+					                    "and start again" ) ).arg ( lockFname );
+					QMessageBox::critical ( 0l,tr (
+					                                "Error" ),message,
+					                                QMessageBox::Ok,
+					                                QMessageBox::NoButton );
+					exit ( -1 );
+				}
+			}
+		}
+		QFile::remove ( lockFname );
+	}
+	if ( QFile::exists ( socketFname ) )
+		QFile::remove ( socketFname );
+
+	QTimer *lockTimer = new QTimer ( this );
+	connect ( lockTimer, SIGNAL ( timeout() ), this, SLOT ( slotUpdateLockFile() ) );
+	lockTimer->start ( 3000 );
+	trayIcon=new QSystemTrayIcon ( this );
+	setWindowIcon ( QIcon ( ":icons/22x22/x2godesktopsharing.png" ) );
+	menu = new QMenu ( this );
+	trayIcon->setContextMenu ( menu );
+	trayIcon->setToolTip ( tr ( "X2Go desktop sharing application" ) );
+
+	menu->addSeparator();
+
+	actWhite = menu->addAction ( QIcon ( ":icons/32x32/wlist.png" ) ,
+	                             tr ( "Granted users..." ) );
+	actBlack = menu->addAction ( QIcon ( ":icons/32x32/blist.png" ) ,
+	                             tr ( "Banned users..." ) );
+	menu->addSeparator();
+
+	actStart = menu->addAction ( QIcon ( ":icons/32x32/share.png" ) ,
+	                             tr ( "Activate desktop sharing" ) );
+
+	actStop = menu->addAction ( QIcon ( ":icons/32x32/stop.png" ) ,
+	                            tr ( "Deactivate desktop sharing" ) );
+
+	menu->addSeparator();
+	QAction* actAbout=menu->addAction (
+	                                    QIcon ( ":icons/32x32/x2godesktopsharing.png" ),
+	                                    tr ( "About X2GO Sharing" ) );
+	//
+	//     QAction* actAboutQt=menu->addAction(
+	//                              tr("About Qt"));
+	//     connect ( actAboutQt,SIGNAL ( triggered ( bool ) ),this,
+	//          SLOT ( slotAboutQt() ) );
+	//
+	connect ( actAbout,SIGNAL ( triggered ( bool ) ),this,
+	          SLOT ( slotAbout() ) );
+
+
+	menu->addSeparator();
+	QAction* actExit = menu->addAction ( QIcon ( ":icons/32x32/exit.png" ) ,
+	                                     tr ( "&Quit" ) );
+
+	connect ( actWhite,SIGNAL ( triggered ( bool ) ),this,
+	          SLOT ( slotWhiteList() ) );
+	connect ( actBlack,SIGNAL ( triggered ( bool ) ),this,
+	          SLOT ( slotBlackList() ) );
+
+	connect ( actExit,SIGNAL ( triggered ( bool ) ),this,
+	          SLOT ( slotMenuClose() ) );
+
+	connect ( actStart,SIGNAL ( triggered ( bool ) ),this,
+	          SLOT ( slotStartSharing() ) );
+
+	connect ( actStop,SIGNAL ( triggered ( bool ) ),this,
+	          SLOT ( slotStopSharing() ) );
+
+
+
+	actStop->setEnabled ( false );
+
+	// unix signals (TERM, INT) are piped into a unix socket and will raise Qt events
+	if (::socketpair(AF_UNIX, SOCK_STREAM, 0, sigkeybintFd))
+		qFatal("Couldn't create keyboard INT socketpair");
+
+	if (::socketpair(AF_UNIX, SOCK_STREAM, 0, sigtermFd))
+		qFatal("Couldn't create TERM socketpair");
+
+	if (::socketpair(AF_UNIX, SOCK_STREAM, 0, sigabortFd))
+		qFatal("Couldn't create ABRT socketpair");
+
+	if (::socketpair(AF_UNIX, SOCK_STREAM, 0, sighupFd))
+		qFatal("Couldn't create HANGUP socketpair");
+
+	snKeybInt = new QSocketNotifier(sigkeybintFd[1], QSocketNotifier::Read, this);
+	connect(snKeybInt, SIGNAL(activated(int)), this, SLOT(handleSigKeybInt()));
+	snTerm = new QSocketNotifier(sigtermFd[1], QSocketNotifier::Read, this);
+	connect(snTerm, SIGNAL(activated(int)), this, SLOT(handleSigTerm()));
+	snAbort = new QSocketNotifier(sigabortFd[1], QSocketNotifier::Read, this);
+	connect(snAbort, SIGNAL(activated(int)), this, SLOT(handleSigAbort()));
+	snHup = new QSocketNotifier(sighupFd[1], QSocketNotifier::Read, this);
+	connect(snHup, SIGNAL(activated(int)), this, SLOT(handleSigHup()));
+
+	QTimer *timer = new QTimer ( this );
+	connect ( timer, SIGNAL ( timeout() ), this, SLOT ( slotTimer() ) );
+	timer->start ( 5000 );
+	loadSettings();
+	setTrayIcon();
+	trayIcon->show();
+}
 
 
-    menu->addSeparator();
-    QAction* actExit = menu->addAction ( QIcon ( ":icons/32x32/exit.png" ) ,
-                                         tr ( "&Quit" ) );
+ShareTray::~ShareTray()
+{
+	qDebug() <<"stopping desktop sharing";
+	slotStopSharing();
+	if ( QFile::exists ( lockFname ) )
+		QFile::remove ( lockFname );
+		qDebug() <<"lock file removed";
+	saveSettings();
+	qDebug() <<"settings saved";
+}
 
-    connect ( actWhite,SIGNAL ( triggered ( bool ) ),this,
-              SLOT ( slotWhiteList() ) );
-    connect ( actBlack,SIGNAL ( triggered ( bool ) ),this,
-              SLOT ( slotBlackList() ) );
+void ShareTray::handleSigKeybInt()
+{
+	snKeybInt->setEnabled(false);
+	char tmp;
+	::read(sigkeybintFd[1], &tmp, sizeof(tmp));
 
+	// do Qt stuff here
+	slotMenuClose();
 
-    connect ( actExit,SIGNAL ( triggered ( bool ) ),this,
-              SLOT ( slotMenuClose() ) );
+	snKeybInt->setEnabled(true);
+}
 
-    connect ( actStart,SIGNAL ( triggered ( bool ) ),this,
-              SLOT ( slotStartSharing() ) );
+void ShareTray::handleSigTerm()
+{
+	snTerm->setEnabled(false);
+	char tmp;
+	::read(sigtermFd[1], &tmp, sizeof(tmp));
 
-    connect ( actStop,SIGNAL ( triggered ( bool ) ),this,
-              SLOT ( slotStopSharing() ) );
+	// do Qt stuff here
+	slotMenuClose();
 
+	snTerm->setEnabled(true);
+}
 
+void ShareTray::handleSigAbort()
+{
+	snAbort->setEnabled(false);
+	char tmp;
+	::read(sigabortFd[1], &tmp, sizeof(tmp));
 
-    actStop->setEnabled ( false );
+	// do Qt stuff here
+	slotMenuClose();
 
-    QTimer *timer = new QTimer ( this );
-    connect ( timer, SIGNAL ( timeout() ), this, SLOT ( slotTimer() ) );
-    timer->start ( 5000 );
-    loadSettings();
-    setTrayIcon();
-    trayIcon->show();
+	snAbort->setEnabled(true);
 }
 
+void ShareTray::handleSigHup()
+{
+	snHup->setEnabled(false);
+	char tmp;
+	::read(sighupFd[1], &tmp, sizeof(tmp));
 
-ShareTray::~ShareTray()
+	// do Qt stuff here
+	slotMenuClose();
+
+	snHup->setEnabled(true);
+}
+
+void ShareTray::keybintSignalHandler(int)
+{
+	char a = 1;
+	::write(sigkeybintFd[0], &a, sizeof(a));
+}
+
+void ShareTray::termSignalHandler(int)
 {
-    slotStopSharing();
-    if ( QFile::exists ( lockFname ) )
-        QFile::remove ( lockFname );
-    saveSettings();
+	char a = 1;
+	::write(sigtermFd[0], &a, sizeof(a));
 }
 
+void ShareTray::abortSignalHandler(int)
+{
+	char a = 1;
+	::write(sigabortFd[0], &a, sizeof(a));
+}
+
+void ShareTray::hupSignalHandler(int)
+{
+	char a = 1;
+	::write(sighupFd[0], &a, sizeof(a));
+}
 
 void ShareTray::slotStopSharing()
 {
-    if ( serverSocket )
-    {
-        serverSocket->close();
-        delete serverSocket;
-        serverSocket=0l;
-    }
-    if ( QFile::exists ( socketFname ) )
-        QFile::remove ( socketFname );
-    for ( int i=menu->actions().count()-STAT_ACT_COUNT-1;i>=0;--i )
-    {
-        slotCloseConnection ( ( AccessAction* ) ( menu->actions() [i] ) );
-    }
-    actStop->setEnabled ( false );
-    actStart->setEnabled ( true );
-    setTrayIcon();
+	if ( serverSocket )
+	{
+		serverSocket->close();
+		delete serverSocket;
+		serverSocket=0l;
+	}
+	if ( QFile::exists ( socketFname ) )
+		QFile::remove ( socketFname );
+	for ( int i=menu->actions().count()-STAT_ACT_COUNT-1;i>=0;--i )
+	{
+		slotCloseConnection ( ( AccessAction* ) ( menu->actions() [i] ) );
+	}
+	actStop->setEnabled ( false );
+	actStart->setEnabled ( true );
+	setTrayIcon();
 }
 
 
 void ShareTray::slotStartSharing()
 {
-    actStop->setEnabled ( true );
-    actStart->setEnabled ( false );
-    if ( serverSocket )
-        delete serverSocket;
-    if ( QFile::exists ( socketFname ) )
-        QFile::remove ( socketFname );
-    serverSocket=new QLocalServer ( this );
-    if ( serverSocket->listen ( socketFname ) )
-    {
-
-        chown ( socketFname.toAscii(),getuid(),getgrnam ( "x2gousers" )->gr_gid );
-        QFile::setPermissions ( socketFname,
-                                QFile::ReadOwner|QFile::WriteOwner|QFile::ReadGroup|QFile::WriteGroup );
-        connect ( serverSocket,SIGNAL ( newConnection() ),
-                  this,SLOT ( slotServerConnection() ) );
-    }
-    else
-    {
-        QString message=
-            tr (
-                "Can't listen on socket:" ) + socketFname;
-        QMessageBox::critical ( 0l,tr (
-                                    "Error" ),message,
-                                QMessageBox::Ok,
-                                QMessageBox::NoButton );
-        close();
-    }
-    setTrayIcon();
+	actStop->setEnabled ( true );
+	actStart->setEnabled ( false );
+	if ( serverSocket )
+		delete serverSocket;
+	if ( QFile::exists ( socketFname ) )
+		QFile::remove ( socketFname );
+	serverSocket=new QLocalServer ( this );
+	if ( serverSocket->listen ( socketFname ) )
+	{
+
+		chown ( socketFname.toAscii(),getuid(),getgrnam ( "x2godesktopsharing" )->gr_gid );
+		QFile::setPermissions ( socketFname,
+		                        QFile::ReadOwner|QFile::WriteOwner|QFile::ReadGroup|QFile::WriteGroup );
+		connect ( serverSocket,SIGNAL ( newConnection() ),
+		          this,SLOT ( slotServerConnection() ) );
+	}
+	else
+	{
+		QString message=
+		    tr (
+		        "Can't listen on socket:" ) + socketFname;
+		QMessageBox::critical ( 0l,tr (
+		                            "Error" ),message,
+		                        QMessageBox::Ok,
+		                        QMessageBox::NoButton );
+		close();
+	}
+	setTrayIcon();
 }
 
 bool ShareTray::acceptConnections()
 {
-    return actStop->isEnabled();
+	return actStop->isEnabled();
 }
 
 QString ShareTray::getSocketAnswer ( QString message )
 {
-    qDebug() <<"message: "<<message;
-    QStringList lst=message.split ( ' ' );
-    if ( lst.size() !=10 )
-    {
-        qDebug() <<"wrong parameters";
-        return "DENY";
-    }
-    QStringList params=lst[9].split ( "XSHAD" );
-    if ( params.size() !=3 )
-    {
-        qDebug() <<"wrong parameters";
-        return "DENY";
-    }
-    QString client=lst[0];
-    QString user=params[1];
-    if ( getAccess ( user,client ) ==QMessageBox::Yes )
-    {
-        trayMessage ( tr ( "Access granted" ),QString (
-                          tr (
-                              "%1(%2): access granted" ) ).arg (
-                          user ).arg ( client ) );
-        //start agent
-        QProcess proc ( this );
-        lst.removeAt ( 0 );;
-        proc.start ( "x2gostartagent",lst );
-        if ( !proc.waitForFinished ( 5000 ) )
-        {
-            return "DENY";
-        }
-        else
-        {
-            QString output=proc.readAllStandardOutput();
-            qDebug() <<"agent out: "<<output;
-            QStringList lines=output.split ( "\n" );
-            QString pid="pid";
-            if ( lines.size() >3 )
-                pid=lines[2];
-            qDebug() <<"agent pid: "<<pid;
-            AccessAction *act=new AccessAction (
-                pid,user,client,
-                QString ( tr ( "Disconnect %1(%2)" ) ).arg ( user ).arg ( client ),
-                this );
-            menu->insertAction ( menu->actions() [0],act );
-            connect ( act,SIGNAL ( actionActivated ( AccessAction* ) ),this,
-                      SLOT ( slotCloseConnection ( AccessAction* ) ) );
-            trayMessage ( tr ( "Remote connection" ),
-                          QString (
-                              tr ( "%1(%2) connected" ) ).arg ( user ).arg ( client ) );
-            setTrayIcon();
-            return output;
-        }
-    }
-    trayMessage ( tr ( "Access denied" ),QString (
-                      tr ( "%1(%2): access denied" ) ).arg ( params[1] ).arg ( client ) );
-    return "DENY";
+	qDebug() <<"message: "<<message;
+	QStringList lst=message.split ( ' ' );
+	if ( lst.size() !=11 )
+	{
+		qDebug() <<"wrong parameters";
+		return "DENY";
+	}
+	QStringList params=lst[9].split ( "XSHAD" );
+	if ( params.size() !=3 )
+	{
+		qDebug() <<"wrong parameters";
+		return "DENY";
+	}
+	QString client=lst[0];
+	QString user=params[1];
+	QString remote_user=lst[10];
+	if ( getAccess ( remote_user, client ) ==QMessageBox::Yes )
+	{
+		trayMessage ( tr ( "Access granted" ),QString ( tr ( "%1(%2): access granted" ) ).arg (remote_user ).arg ( client ) );
+		//start agent
+		QProcess proc ( this );
+		lst.removeAt ( 10 );;
+		lst.removeAt ( 0 );;
+		proc.start ( "x2gostartagent",lst );
+		if ( !proc.waitForFinished ( 5000 ) )
+		{
+			return "DENY";
+		}
+		else
+		{
+			QString output=proc.readAllStandardOutput();
+			qDebug() <<"agent out: "<<output;
+			QStringList lines=output.split ( "\n" );
+			QString pid="pid";
+			if ( lines.size() >3 )
+				pid=lines[2];
+			qDebug() <<"agent pid: "<<pid;
+			AccessAction *act=new AccessAction (
+			    pid,remote_user,client,
+			    QString ( tr ( "Disconnect %1(%2)" ) ).arg ( remote_user ).arg ( client ),
+			    this );
+			menu->insertAction ( menu->actions() [0],act );
+			connect ( act,SIGNAL ( actionActivated ( AccessAction* ) ),this,
+			          SLOT ( slotCloseConnection ( AccessAction* ) ) );
+			trayMessage ( tr ( "Remote connection" ),
+			              QString (
+			                  tr ( "%1(%2) connected" ) ).arg ( remote_user ).arg ( client ) );
+			setTrayIcon();
+			return output;
+		}
+	}
+	trayMessage ( tr ( "Access denied" ),QString (
+	              tr ( "%1(%2): access denied" ) ).arg ( remote_user ).arg ( client ) );
+	return "DENY";
 }
 
 void ShareTray::closeSocket ( SimpleLocalSocket* sock )
 {
-    qDebug() <<"closing null socket";
-    if ( sock )
-    {
-        qDebug() <<"closing socket";
-        delete sock;
-        qDebug() <<"done";
-    }
+	qDebug() <<"closing null socket";
+	if ( sock )
+	{
+		qDebug() <<"closing socket";
+		delete sock;
+		qDebug() <<"done";
+	}
 }
 
 void ShareTray::slotServerConnection()
 {
-    new SimpleLocalSocket ( this,serverSocket->nextPendingConnection() );
+	new SimpleLocalSocket ( this,serverSocket->nextPendingConnection() );
 }
 
 void ShareTray::slotCloseConnection ( AccessAction* action )
 {
-    kill ( action->pid().toUInt(),15 );
-    menu->removeAction ( action );
-    delete action;
-    setTrayIcon();
+	kill ( action->pid().toUInt(),15 );
+	menu->removeAction ( action );
+	delete action;
+	setTrayIcon();
 }
 
 
-int ShareTray::getAccess ( QString user, QString host )
+int ShareTray::getAccess ( QString remote_user, QString host )
 {
-    if ( whiteList.contains ( user ) )
-        return QMessageBox::Yes;
-    if ( blackList.contains ( user ) )
-        return QMessageBox::No;
-
-    MessageBox m ( user,host, this );
-    m.activateWindow();
-    m.raise();
-    int res=m.exec();
-    if ( m.isChecked() &&res==QMessageBox::Yes )
-        whiteList<<user;
-    if ( m.isChecked() &&res==QMessageBox::No )
-        blackList<<user;
-    actBlack->setEnabled ( blackList.size() >0 );
-    actWhite->setEnabled ( whiteList.size() >0 );
-    return res;
+	if ( whiteList.contains ( remote_user ) )
+		return QMessageBox::Yes;
+	if ( blackList.contains ( remote_user ) )
+		return QMessageBox::No;
+
+	MessageBox m ( remote_user, host, this );
+	m.activateWindow();
+	m.raise();
+	int res=m.exec();
+	if ( m.isChecked() &&res==QMessageBox::Yes )
+		whiteList<<remote_user;
+	if ( m.isChecked() &&res==QMessageBox::No )
+		blackList<<remote_user;
+	actBlack->setEnabled ( blackList.size() >0 );
+	actWhite->setEnabled ( whiteList.size() >0 );
+	return res;
 }
 
 void ShareTray::closeEvent ( QCloseEvent*  ev )
 {
-    if ( !menuClose )
-    {
-        ev->ignore();
-        hide();
-        return;
-    }
-    slotStopSharing();
-    if ( QFile::exists ( lockFname ) )
-        QFile::remove ( lockFname );
-    saveSettings();
+	if ( !menuClose )
+	{
+		ev->ignore();
+		hide();
+		return;
+	}
+	qDebug() <<"stopping desktop sharing";
+	slotStopSharing();
+	if ( QFile::exists ( lockFname ) )
+		QFile::remove ( lockFname );
+		qDebug() <<"lock file removed";
+	saveSettings();
+	qDebug() <<"settings saved";
 }
 
 void ShareTray::slotTimer()
 {
-    for ( int i=menu->actions().count()-STAT_ACT_COUNT-1;i>=0;--i )
-    {
-        AccessAction* action= ( AccessAction* ) ( menu->actions() [i] );
-        if ( !isProcessRunning ( action->pid() ) )
-        {
-            trayMessage ( tr ( "User disconnected" ),
-                          QString (
-                              tr ( "%1(%2) disconnected" ) ).arg (
-                              action->user() ).arg ( action->host() ) );
-            menu->removeAction ( action );
-            delete action;
-        }
-    }
-    setTrayIcon();
+	for ( int i=menu->actions().count()-STAT_ACT_COUNT-1;i>=0;--i )
+	{
+		AccessAction* action= ( AccessAction* ) ( menu->actions() [i] );
+		if ( !isProcessRunning ( action->pid() ) )
+		{
+			trayMessage ( tr ( "User disconnected" ),
+			              QString (
+			                  tr ( "%1(%2) disconnected" ) ).arg (
+			                  action->user() ).arg ( action->host() ) );
+			menu->removeAction ( action );
+			delete action;
+		}
+	}
+	setTrayIcon();
 }
 
 void ShareTray::trayMessage ( QString title, QString text )
 {
-    if ( !QSystemTrayIcon::supportsMessages () )
-        QToolTip::showText ( geometry().topLeft(),
-                             text );
-    else
-        trayIcon->showMessage ( title,text );
+	if ( !QSystemTrayIcon::supportsMessages () )
+		QToolTip::showText ( geometry().topLeft(),
+		                     text );
+	else
+		trayIcon->showMessage ( title,text );
 }
 
 
 bool ShareTray::isProcessRunning ( QString pid )
 {
-    if ( kill ( pid.toInt(),SIGCONT ) ==-1 )
-    {
-        if ( errno==ESRCH )
-        {
-            return false;
-        }
-    }
-    return true;
+	if ( kill ( pid.toInt(),SIGCONT ) ==-1 )
+	{
+		if ( errno==ESRCH )
+		{
+			return false;
+		}
+	}
+	return true;
 }
 
 
 void ShareTray::slotBlackList()
 {
-    current_list=BLACK;
-    showList();
-    setWindowTitle ( tr ( "Banned users" ) );
-
+	current_list=BLACK;
+	showList();
+	setWindowTitle ( tr ( "Banned users" ) );
 }
 
 void ShareTray::slotWhiteList()
 {
-    current_list=WHITE;
-    showList();
-    setWindowTitle ( tr ( "Granted users" ) );
-
+	current_list=WHITE;
+	showList();
+	setWindowTitle ( tr ( "Granted users" ) );
 }
 
 void ShareTray::showList()
 {
-    show();
-    ui.ok_cancel_box->show();
-    ui.box->show();
-    ui.del->show();
-
-    ui.close_box->hide();
-    ui.icon->hide();
-    ui.text->hide();
-
-    QStringList* lst;
-    if ( current_list==BLACK )
-        lst=&blackList;
-    else
-        lst=&whiteList;
-    lst->sort();
-    ui.box->clear();
-    ui.box->insertItems ( 0,*lst );
+	show();
+	ui.ok_cancel_box->show();
+	ui.box->show();
+	ui.del->show();
+
+	ui.close_box->hide();
+	ui.icon->hide();
+	ui.text->hide();
+
+	QStringList* lst;
+	if ( current_list==BLACK )
+		lst=&blackList;
+	else
+		lst=&whiteList;
+	lst->sort();
+	ui.box->clear();
+	ui.box->insertItems ( 0,*lst );
 }
 
 void ShareTray::loadSettings()
 {
-    QSettings st ( QDir::homePath() +"/.x2godesktopshare/settings",
-                   QSettings::NativeFormat );
+	QSettings st ( QDir::homePath() +"/.x2godesktopsharing/settings",
+	               QSettings::NativeFormat );
 
-    blackList= st.value ( "blacklist" ).toStringList();
-    whiteList= st.value ( "whitelist" ).toStringList();
+	blackList= st.value ( "blacklist" ).toStringList();
+	whiteList= st.value ( "whitelist" ).toStringList();
 
-    actBlack->setEnabled ( blackList.size() >0 );
-    actWhite->setEnabled ( whiteList.size() >0 );
+	actBlack->setEnabled ( blackList.size() >0 );
+	actWhite->setEnabled ( whiteList.size() >0 );
 }
 
 void ShareTray::saveSettings()
 {
-    QSettings st ( QDir::homePath() +"/.x2godesktopshare/settings",
-                   QSettings::NativeFormat );
+	QSettings st ( QDir::homePath() +"/.x2godesktopsharing/settings",
+	               QSettings::NativeFormat );
 
-    st.setValue ( "blacklist",blackList );
-    st.setValue ( "whitelist",whiteList );
+	st.setValue ( "blacklist",blackList );
+	st.setValue ( "whitelist",whiteList );
 }
 
 
 void ShareTray::setTrayIcon()
 {
-    if ( !acceptConnections() )
-    {
-        trayIcon->setIcon ( QIcon ( ":icons/22x22/discard.png" ) );
-        return;
-    }
-    if ( menu->actions().count() >STAT_ACT_COUNT )
-    {
-        trayIcon->setIcon ( QIcon ( ":icons/22x22/view.png" ) );
-        return;
-    }
-    trayIcon->setIcon ( QIcon ( ":icons/22x22/accept.png" ) );
+	if ( !acceptConnections() )
+	{
+		trayIcon->setIcon ( QIcon ( ":icons/22x22/discard.png" ) );
+		return;
+	}
+	if ( menu->actions().count() >STAT_ACT_COUNT )
+	{
+		trayIcon->setIcon ( QIcon ( ":icons/22x22/view.png" ) );
+		return;
+	}
+	trayIcon->setIcon ( QIcon ( ":icons/22x22/accept.png" ) );
 }
 
 
 
 void ShareTray::slotAbout()
 {
-    setWindowTitle ( tr ( "X2Go Desktop Sharing" ) );
+	setWindowTitle ( tr ( "X2Go Desktop Sharing" ) );
 
-    show();
-    ui.ok_cancel_box->hide();
-    ui.box->hide();
-    ui.del->hide();
+	show();
+	ui.ok_cancel_box->hide();
+	ui.box->hide();
+	ui.del->hide();
 
-    ui.close_box->show();
-    ui.icon->show();
-    ui.text->show();
+	ui.close_box->show();
+	ui.icon->show();
+	ui.text->show();
 }
 
 
 void ShareTray::slotAboutQt()
 {
-    QMessageBox::aboutQt ( 0 );
+	QMessageBox::aboutQt ( 0 );
 }
 
 void ShareTray::slotMsgOkCancel ( QAbstractButton* button )
 {
-    if ( ui.ok_cancel_box->buttonRole ( button ) ==QDialogButtonBox::AcceptRole )
-    {
-        QStringList* lst;
-        if ( current_list==BLACK )
-            lst=&blackList;
-        else
-            lst=&whiteList;
-        lst->clear();
-        for ( int i=ui.box->count()-1;i>=0;--i )
-        {
-            *lst<<ui.box->item ( i )->text();
-        }
-    }
-    actBlack->setEnabled ( blackList.size() >0 );
-    actWhite->setEnabled ( whiteList.size() >0 );
-    hide();
+	if ( ui.ok_cancel_box->buttonRole ( button ) ==QDialogButtonBox::AcceptRole )
+	{
+		QStringList* lst;
+		if ( current_list==BLACK )
+			lst=&blackList;
+		else
+			lst=&whiteList;
+		lst->clear();
+		for ( int i=ui.box->count()-1;i>=0;--i )
+		{
+			*lst<<ui.box->item ( i )->text();
+		}
+	}
+	actBlack->setEnabled ( blackList.size() >0 );
+	actWhite->setEnabled ( whiteList.size() >0 );
+	hide();
 }
 
 void ShareTray::slotMsgClose ( QAbstractButton* )
 {
-    hide();
+	hide();
 }
 
 void ShareTray::slotDelListItem()
 {
-    for ( int i=ui.box->count()-1;i>=0;--i )
-    {
-        QListWidgetItem* it=ui.box->item ( i );
-        if ( it->isSelected() )
-        {
-            ui.box->takeItem ( i );
-            delete it;
-        }
-    }
+	for ( int i=ui.box->count()-1;i>=0;--i )
+	{
+		QListWidgetItem* it=ui.box->item ( i );
+		if ( it->isSelected() )
+		{
+			ui.box->takeItem ( i );
+			delete it;
+		}
+	}
 }
 
 void ShareTray::slotMenuClose()
 {
-    menuClose=true;
-    close();
+	menuClose=true;
+	close();
 }
 
-
-
 void ShareTray::slotUpdateLockFile()
 {
-    QFile file ( lockFname );
-    if ( file.open ( QIODevice::WriteOnly | QIODevice::Text ) )
-    {
-        QTextStream out ( &file );
-        out<<QDateTime::currentDateTime().toTime_t();
-    }
+	QFile file ( lockFname );
+	if ( file.open ( QIODevice::WriteOnly | QIODevice::Text ) )
+	{
+		QTextStream out ( &file );
+		out<<QDateTime::currentDateTime().toTime_t();
+	}
 }
diff --git a/sharetray.h b/sharetray.h
index 137ba61..71c792a 100644
--- a/sharetray.h
+++ b/sharetray.h
@@ -22,62 +22,85 @@ class AccessAction;
 class QSystemTrayIcon;
 class MessageBox;
 class QAction;
+class QSocketNotifier;
 
 /**
 	@author Oleksandr Shneyder <oleksandr.shneyder at obviously-nice.de>
 */
 class ShareTray : public QMainWindow
 {
-    Q_OBJECT
+	Q_OBJECT
 public:
-    ShareTray();
-    ~ShareTray();
-    QString getSocketAnswer(QString message);
-    void closeSocket(SimpleLocalSocket* sock);
-    bool acceptConnections();
+	ShareTray();
+	~ShareTray();
+	// Unix signal handlers.
+	static void keybintSignalHandler(int unused);
+	static void termSignalHandler(int unused);
+	static void abortSignalHandler(int unused);
+	static void hupSignalHandler(int unused);
+	// desktop sharing socket
+	QString getSocketAnswer(QString message);
+	void closeSocket(SimpleLocalSocket* sock);
+	// entry point for incoming connections
+	bool acceptConnections();
 private:
-    enum {BLACK,WHITE} current_list;
-    QMenu* menu;
-    QWidget* mainWnd;
-    QAction* actStart;
-    QAction* actStop;
-    QAction* actWhite;
-    QAction* actBlack;
-    QSystemTrayIcon* trayIcon;
-    QLocalServer* serverSocket;
-    QString socketFname;
-    QString lockFname;
-    MessageBox* mbox;
-    QStringList whiteList;
-    QStringList blackList;
-    Ui::mwnd ui;
-    bool menuClose;
+	enum {BLACK,WHITE} current_list;
+	QMenu* menu;
+	QWidget* mainWnd;
+	QAction* actStart;
+	QAction* actStop;
+	QAction* actWhite;
+	QAction* actBlack;
+	QSystemTrayIcon* trayIcon;
+	QLocalServer* serverSocket;
+	QString socketFname;
+	QString lockFname;
+	MessageBox* mbox;
+	QStringList whiteList;
+	QStringList blackList;
+	Ui::mwnd ui;
+	bool menuClose;
 protected:
-    void closeEvent ( QCloseEvent* event );
+	void closeEvent ( QCloseEvent* event );
 
+public slots:
+	// Qt signal handlers.
+	void handleSigKeybInt();
+	void handleSigTerm();
+	void handleSigAbort();
+	void handleSigHup();
+	void slotMenuClose();
 private slots:
-    void slotStopSharing();
-    void slotStartSharing();
-    void slotServerConnection();
-    void slotCloseConnection(AccessAction* action);
-    void slotTimer();
-    void slotWhiteList();
-    void slotBlackList();
-    void slotAboutQt();
-    void slotAbout();
-    void slotMsgClose(QAbstractButton*);
-    void slotMsgOkCancel(QAbstractButton* button);
-    void slotDelListItem();
-    void slotMenuClose();
-    void slotUpdateLockFile();
+	void slotStopSharing();
+	void slotStartSharing();
+	void slotServerConnection();
+	void slotCloseConnection(AccessAction* action);
+	void slotTimer();
+	void slotWhiteList();
+	void slotBlackList();
+	void slotAboutQt();
+	void slotAbout();
+	void slotMsgClose(QAbstractButton*);
+	void slotMsgOkCancel(QAbstractButton* button);
+	void slotDelListItem();
+	void slotUpdateLockFile();
 private:
-    int getAccess(QString user, QString host);
-    void trayMessage(QString title, QString text);
-    bool isProcessRunning(QString pid);
-    void loadSettings();
-    void saveSettings();
-    void setTrayIcon();
-    void showList();
+	int getAccess(QString user, QString host);
+	void trayMessage(QString title, QString text);
+	bool isProcessRunning(QString pid);
+	void loadSettings();
+	void saveSettings();
+	void setTrayIcon();
+	void showList();
+	// unix file sockets for signal handler communication (unix <-> Qt)
+	static int sigkeybintFd[2];
+	static int sigtermFd[2];
+	static int sigabortFd[2];
+	static int sighupFd[2];
+	QSocketNotifier *snKeybInt;
+	QSocketNotifier *snTerm;
+	QSocketNotifier *snAbort;
+	QSocketNotifier *snHup;
 };
 
 #endif


hooks/post-receive
-- 
x2godesktopsharing.git (Desktop Sharing for X2go)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2godesktopsharing.git" (Desktop Sharing for X2go).




More information about the x2go-commits mailing list