aboutsummaryrefslogtreecommitdiff
path: root/lib/Arctica
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-10-06 12:10:24 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-10-06 12:10:24 +0200
commit11035e9e29c3a3ef6adc2c40d37cfe0b9914649e (patch)
tree007704f55f95424065055101d7a0aa2e860a00cc /lib/Arctica
parent3e662ab0f3789de56f0bbc8efb5b0399888c275b (diff)
downloadperl-Arctica-Services-Graphics-NX3-11035e9e29c3a3ef6adc2c40d37cfe0b9914649e.tar.gz
perl-Arctica-Services-Graphics-NX3-11035e9e29c3a3ef6adc2c40d37cfe0b9914649e.tar.bz2
perl-Arctica-Services-Graphics-NX3-11035e9e29c3a3ef6adc2c40d37cfe0b9914649e.zip
First success: nxagent comes up via Forker.pm.HEADmaster
Diffstat (limited to 'lib/Arctica')
-rw-r--r--lib/Arctica/Services/Graphics/NX3/Client.pm65
-rw-r--r--lib/Arctica/Services/Graphics/NX3/Client/Desktop.pm65
-rw-r--r--lib/Arctica/Services/Graphics/NX3/Client/Seamless.pm65
-rw-r--r--lib/Arctica/Services/Graphics/NX3/Client/Shadow.pm65
-rw-r--r--lib/Arctica/Services/Graphics/NX3/Common.pm65
-rw-r--r--lib/Arctica/Services/Graphics/NX3/Server.pm205
-rw-r--r--lib/Arctica/Services/Graphics/NX3/Server/Desktop.pm128
-rw-r--r--lib/Arctica/Services/Graphics/NX3/Server/Seamless.pm63
-rw-r--r--lib/Arctica/Services/Graphics/NX3/Server/Shadow.pm63
-rw-r--r--lib/Arctica/Services/Graphics/NX3/Version.pm2
10 files changed, 786 insertions, 0 deletions
diff --git a/lib/Arctica/Services/Graphics/NX3/Client.pm b/lib/Arctica/Services/Graphics/NX3/Client.pm
new file mode 100644
index 0000000..6380147
--- /dev/null
+++ b/lib/Arctica/Services/Graphics/NX3/Client.pm
@@ -0,0 +1,65 @@
+################################################################################
+# _____ _
+# |_ _| |_ ___
+# | | | ' \/ -_)
+# |_| |_||_\___|
+# _ _ ____ _ _
+# / \ _ __ ___| |_(_) ___ __ _ | _ \ _ __ ___ (_) ___ ___| |_
+# / _ \ | '__/ __| __| |/ __/ _` | | |_) | '__/ _ \| |/ _ \/ __| __|
+# / ___ \| | | (__| |_| | (_| (_| | | __/| | | (_) | | __/ (__| |_
+# /_/ \_\_| \___|\__|_|\___\__,_| |_| |_| \___// |\___|\___|\__|
+# |__/
+# The Arctica Modular Remote Computing Framework
+#
+################################################################################
+#
+# Copyright (C) 2015-2016 The Arctica Project
+# http://http://arctica-project.org/
+#
+# This code is dual licensed: strictly GPL-2 or AGPL-3+
+#
+# GPL-2
+# -----
+# 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; version 2 of the License.
+#
+# 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.
+#
+# AGPL-3+
+# -------
+# This programm is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This programm 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 Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero 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) 2015-2016 Guangzhou Nianguan Electronics Technology Co.Ltd.
+# <opensource@gznianguan.com>
+# Copyright (C) 2015-2016 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
+#
+################################################################################
+package Arctica::Services::Graphics::NX3::Client;
+use strict;
+
+use Arctica::Core::eventInit qw( genARandom BugOUT );
+
+1;
diff --git a/lib/Arctica/Services/Graphics/NX3/Client/Desktop.pm b/lib/Arctica/Services/Graphics/NX3/Client/Desktop.pm
new file mode 100644
index 0000000..49da666
--- /dev/null
+++ b/lib/Arctica/Services/Graphics/NX3/Client/Desktop.pm
@@ -0,0 +1,65 @@
+################################################################################
+# _____ _
+# |_ _| |_ ___
+# | | | ' \/ -_)
+# |_| |_||_\___|
+# _ _ ____ _ _
+# / \ _ __ ___| |_(_) ___ __ _ | _ \ _ __ ___ (_) ___ ___| |_
+# / _ \ | '__/ __| __| |/ __/ _` | | |_) | '__/ _ \| |/ _ \/ __| __|
+# / ___ \| | | (__| |_| | (_| (_| | | __/| | | (_) | | __/ (__| |_
+# /_/ \_\_| \___|\__|_|\___\__,_| |_| |_| \___// |\___|\___|\__|
+# |__/
+# The Arctica Modular Remote Computing Framework
+#
+################################################################################
+#
+# Copyright (C) 2015-2016 The Arctica Project
+# http://http://arctica-project.org/
+#
+# This code is dual licensed: strictly GPL-2 or AGPL-3+
+#
+# GPL-2
+# -----
+# 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; version 2 of the License.
+#
+# 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.
+#
+# AGPL-3+
+# -------
+# This programm is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This programm 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 Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero 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) 2015-2016 Guangzhou Nianguan Electronics Technology Co.Ltd.
+# <opensource@gznianguan.com>
+# Copyright (C) 2015-2016 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
+#
+################################################################################
+package Arctica::Services::Graphics::NX3::Client::Desktop;
+use strict;
+
+use Arctica::Core::eventInit qw( BugOUT );
+
+1;
diff --git a/lib/Arctica/Services/Graphics/NX3/Client/Seamless.pm b/lib/Arctica/Services/Graphics/NX3/Client/Seamless.pm
new file mode 100644
index 0000000..b572626
--- /dev/null
+++ b/lib/Arctica/Services/Graphics/NX3/Client/Seamless.pm
@@ -0,0 +1,65 @@
+################################################################################
+# _____ _
+# |_ _| |_ ___
+# | | | ' \/ -_)
+# |_| |_||_\___|
+# _ _ ____ _ _
+# / \ _ __ ___| |_(_) ___ __ _ | _ \ _ __ ___ (_) ___ ___| |_
+# / _ \ | '__/ __| __| |/ __/ _` | | |_) | '__/ _ \| |/ _ \/ __| __|
+# / ___ \| | | (__| |_| | (_| (_| | | __/| | | (_) | | __/ (__| |_
+# /_/ \_\_| \___|\__|_|\___\__,_| |_| |_| \___// |\___|\___|\__|
+# |__/
+# The Arctica Modular Remote Computing Framework
+#
+################################################################################
+#
+# Copyright (C) 2015-2016 The Arctica Project
+# http://http://arctica-project.org/
+#
+# This code is dual licensed: strictly GPL-2 or AGPL-3+
+#
+# GPL-2
+# -----
+# 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; version 2 of the License.
+#
+# 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.
+#
+# AGPL-3+
+# -------
+# This programm is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This programm 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 Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero 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) 2015-2016 Guangzhou Nianguan Electronics Technology Co.Ltd.
+# <opensource@gznianguan.com>
+# Copyright (C) 2015-2016 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
+#
+################################################################################
+package Arctica::Services::Graphics::NX3::Client::Seamless;
+use strict;
+
+use Arctica::Core::eventInit qw( BugOUT );
+
+1;
diff --git a/lib/Arctica/Services/Graphics/NX3/Client/Shadow.pm b/lib/Arctica/Services/Graphics/NX3/Client/Shadow.pm
new file mode 100644
index 0000000..882e395
--- /dev/null
+++ b/lib/Arctica/Services/Graphics/NX3/Client/Shadow.pm
@@ -0,0 +1,65 @@
+################################################################################
+# _____ _
+# |_ _| |_ ___
+# | | | ' \/ -_)
+# |_| |_||_\___|
+# _ _ ____ _ _
+# / \ _ __ ___| |_(_) ___ __ _ | _ \ _ __ ___ (_) ___ ___| |_
+# / _ \ | '__/ __| __| |/ __/ _` | | |_) | '__/ _ \| |/ _ \/ __| __|
+# / ___ \| | | (__| |_| | (_| (_| | | __/| | | (_) | | __/ (__| |_
+# /_/ \_\_| \___|\__|_|\___\__,_| |_| |_| \___// |\___|\___|\__|
+# |__/
+# The Arctica Modular Remote Computing Framework
+#
+################################################################################
+#
+# Copyright (C) 2015-2016 The Arctica Project
+# http://http://arctica-project.org/
+#
+# This code is dual licensed: strictly GPL-2 or AGPL-3+
+#
+# GPL-2
+# -----
+# 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; version 2 of the License.
+#
+# 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.
+#
+# AGPL-3+
+# -------
+# This programm is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This programm 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 Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero 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) 2015-2016 Guangzhou Nianguan Electronics Technology Co.Ltd.
+# <opensource@gznianguan.com>
+# Copyright (C) 2015-2016 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
+#
+################################################################################
+package Arctica::Services::Graphics::NX3::Client::Shadow;
+use strict;
+
+use Arctica::Core::eventInit qw( BugOUT );
+
+1;
diff --git a/lib/Arctica/Services/Graphics/NX3/Common.pm b/lib/Arctica/Services/Graphics/NX3/Common.pm
new file mode 100644
index 0000000..036559c
--- /dev/null
+++ b/lib/Arctica/Services/Graphics/NX3/Common.pm
@@ -0,0 +1,65 @@
+################################################################################
+# _____ _
+# |_ _| |_ ___
+# | | | ' \/ -_)
+# |_| |_||_\___|
+# _ _ ____ _ _
+# / \ _ __ ___| |_(_) ___ __ _ | _ \ _ __ ___ (_) ___ ___| |_
+# / _ \ | '__/ __| __| |/ __/ _` | | |_) | '__/ _ \| |/ _ \/ __| __|
+# / ___ \| | | (__| |_| | (_| (_| | | __/| | | (_) | | __/ (__| |_
+# /_/ \_\_| \___|\__|_|\___\__,_| |_| |_| \___// |\___|\___|\__|
+# |__/
+# The Arctica Modular Remote Computing Framework
+#
+################################################################################
+#
+# Copyright (C) 2015-2016 The Arctica Project
+# http://http://arctica-project.org/
+#
+# This code is dual licensed: strictly GPL-2 or AGPL-3+
+#
+# GPL-2
+# -----
+# 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; version 2 of the License.
+#
+# 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.
+#
+# AGPL-3+
+# -------
+# This programm is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This programm 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 Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero 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) 2015-2016 Guangzhou Nianguan Electronics Technology Co.Ltd.
+# <opensource@gznianguan.com>
+# Copyright (C) 2015-2016 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
+#
+################################################################################
+package Arctica::Services::Graphics::NX3::Common;
+use strict;
+
+use Arctica::Core::eventInit qw( BugOUT );
+
+1;
diff --git a/lib/Arctica/Services/Graphics/NX3/Server.pm b/lib/Arctica/Services/Graphics/NX3/Server.pm
new file mode 100644
index 0000000..0ead6df
--- /dev/null
+++ b/lib/Arctica/Services/Graphics/NX3/Server.pm
@@ -0,0 +1,205 @@
+################################################################################
+# _____ _
+# |_ _| |_ ___
+# | | | ' \/ -_)
+# |_| |_||_\___|
+# _ _ ____ _ _
+# / \ _ __ ___| |_(_) ___ __ _ | _ \ _ __ ___ (_) ___ ___| |_
+# / _ \ | '__/ __| __| |/ __/ _` | | |_) | '__/ _ \| |/ _ \/ __| __|
+# / ___ \| | | (__| |_| | (_| (_| | | __/| | | (_) | | __/ (__| |_
+# /_/ \_\_| \___|\__|_|\___\__,_| |_| |_| \___// |\___|\___|\__|
+# |__/
+# The Arctica Modular Remote Computing Framework
+#
+################################################################################
+#
+# Copyright (C) 2015-2016 The Arctica Project
+# http://http://arctica-project.org/
+#
+# This code is dual licensed: strictly GPL-2 or AGPL-3+
+#
+# GPL-2
+# -----
+# 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; version 2 of the License.
+#
+# 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.
+#
+# AGPL-3+
+# -------
+# This programm is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This programm 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 Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero 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) 2015-2016 Guangzhou Nianguan Electronics Technology Co.Ltd.
+# <opensource@gznianguan.com>
+# Copyright (C) 2015-2016 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
+#
+################################################################################
+package Arctica::Services::Graphics::NX3::Server;
+use strict;
+
+use Arctica::Core::eventInit qw( genARandom BugOUT );
+use Arctica::Core::ManageDirs qw( create_new_adir );
+use Arctica::Core::Mother::Forker;
+
+sub new {
+
+ BugOUT(9,"NX3::Server new->ENTER");
+ my $class_name = $_[0];# Be EXPLICIT!! DON'T SHIFT OR "@_";
+ my $arctica_core_object = $_[1];
+ my $the_tmpdir = $arctica_core_object->{'a_dirs'}{'tmp_adir'};
+
+ my $dev_conf = $_[2];
+
+ # sanitize parameters (or fail)
+
+ # display: X11 display address (e.g. ":1", "localhost-ipv6:50", etc.)
+ my $display = $dev_conf->{'display'};
+ # FIXME: check provided value
+
+ # bind_address: hostname, IPv6 address, IPv4 address, path to Unix file socket, special keyword "local"
+ my $bind_address = $dev_conf->{'bind_address'};
+ # FIXME: check provided value
+
+ # bind_port: positive integer between 1025 and 60000
+ my $bind_port = $dev_conf->{'bind_port'};
+ # FIXME: check provided value
+
+ # disabled_extensions: list of extensions that shall be disabled at NXv3 agent startup
+ my $disabled_extensions = $dev_conf->{'disabled_extensions'};
+ # FIXME: check provided value list
+
+ # extra_options: list of additional NXv3 agent command line options
+ my $extra_options = $dev_conf->{'extra_options'};
+ # FIXME: check provided value list
+
+ # instantiate the NXv3 agent forker
+ my $forking_child = Arctica::Core::Mother::Forker->new($arctica_core_object, {
+ child_name => 'nxagent',
+ fork_style => 'interactive_pty',
+# handle_stdout => \&my_stdout_handler,
+ handle_stderr => \&stderr2BugOUT_handler,
+# handle_death => \&my_death_handler,
+ return_stdin => 0,
+ exec_hold => 1,
+ env_strict => 1,
+ env_pass => {
+ 'ARCTICA' => 1,
+ 'DISPLAY' => 1,
+ 'HOME' => 1,
+ 'TEMP' => 1,
+ 'USER' => 1,
+ 'XAUTHORITY' => 1,
+ },
+ env_set => {
+ 'NX_CLIENT' => '/usr/bin/arctica-services-graphics-nx3-server-callback', # nxagent callback handler
+# 'NX_HOME' => '', # don't set!!!
+# 'NX_ROOT' => $nx_root, # will be set the next moment, see below...
+# 'NX_SYSTEM' => '', # don't set!!!
+ 'NX_TEMP' => '/tmp', # set NX_TEMP to /tmp, make sure nxagent
+ # starts when pam_tmpdir.so is in use
+ },
+ exec_path => "/usr/bin/nxagent",
+ exec_cl_argv => [ "-nolisten", "tcp", "-ac", $display ],
+# on_exit => \&my_on_exit_handler,
+});
+
+ # create NX_ROOT directory
+ my $nx_root = $forking_child->new_empty_dir();
+ $forking_child->envset_append('NX_ROOT', $nx_root);
+
+ BugOUT(2,"Creating new NXv3 server object");
+
+ my $self = {
+ isArctica => 1, # Declare that this is an Arctica "something"
+ aobject_name => "Graphics_NX3_Server",
+ aobject_id => genARandom("id"),
+ mode => '',
+ display => $display,
+ bind_address => $bind_address,
+ bind_port => $bind_port,
+ disabled_extensions => $disabled_extensions,
+ extra_options => $extra_options,
+ forker => $forking_child,
+ };
+
+ bless($self, $class_name);
+
+ $arctica_core_object->{'aobj'}{'Services'}{$self->{'aobject_name'}}{$self->{'aobject_id'}}
+ = \$self;
+
+ BugOUT(9,"NX3::Server new->DONE");
+
+ return $self;
+}
+
+
+sub reconfigure {
+}
+
+sub start {
+
+ BugOUT(8,"Services::Graphics::Server::NX3 about to start()...");
+ my $self = $_[0];
+
+ $self->{'forker'}->run_child();
+
+}
+
+sub stop {
+
+ BugOUT(8,"Services::Graphics::Server::NX3 about to stop()...");
+ my $self = $_[0];
+
+ $self->{'forker'}->signal('SIGTERM');
+
+}
+
+sub resume {
+
+ BugOUT(8,"Services::Graphics::Server::NX3 about to resume()...");
+ my $self = $_[0];
+
+ # FIXME: check statefile and only if state is SUSPENDED:
+ $self->{'forker'}->signal('SIGHUP');
+
+}
+
+sub suspend {
+
+ BugOUT(8,"Services::Graphics::Server::NX3 about to suspend()...");
+ my $self = $_[0];
+
+ # FIXME: check statefile and only if state is RUNNING:
+ $self->{'forker'}->signal('SIGHUP');
+
+}
+
+sub stderr2BugOUT_handler {
+ BugOUT (2, "$_[0]\n");
+}
+
+
+1;
diff --git a/lib/Arctica/Services/Graphics/NX3/Server/Desktop.pm b/lib/Arctica/Services/Graphics/NX3/Server/Desktop.pm
new file mode 100644
index 0000000..d5c8b29
--- /dev/null
+++ b/lib/Arctica/Services/Graphics/NX3/Server/Desktop.pm
@@ -0,0 +1,128 @@
+################################################################################
+# _____ _
+# |_ _| |_ ___
+# | | | ' \/ -_)
+# |_| |_||_\___|
+# _ _ ____ _ _
+# / \ _ __ ___| |_(_) ___ __ _ | _ \ _ __ ___ (_) ___ ___| |_
+# / _ \ | '__/ __| __| |/ __/ _` | | |_) | '__/ _ \| |/ _ \/ __| __|
+# / ___ \| | | (__| |_| | (_| (_| | | __/| | | (_) | | __/ (__| |_
+# /_/ \_\_| \___|\__|_|\___\__,_| |_| |_| \___// |\___|\___|\__|
+# |__/
+# The Arctica Modular Remote Computing Framework
+#
+################################################################################
+#
+# Copyright (C) 2015-2016 The Arctica Project
+# http://http://arctica-project.org/
+#
+# This code is dual licensed: strictly GPL-2 or AGPL-3+
+#
+# GPL-2
+# -----
+# 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; version 2 of the License.
+#
+# 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.
+#
+# AGPL-3+
+# -------
+# This programm is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This programm 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 Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero 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) 2015-2016 Guangzhou Nianguan Electronics Technology Co.Ltd.
+# <opensource@gznianguan.com>
+# Copyright (C) 2015-2016 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
+#
+################################################################################
+package Arctica::Services::Graphics::NX3::Server::Desktop;
+use strict;
+
+use Arctica::Core::eventInit qw( BugOUT );
+
+use Arctica::Services::Graphics::NX3::Server;
+
+sub new {
+
+ BugOUT(9,"NX3::Server::Desktop new->ENTER");
+
+ my $class_name = $_[0];# Be EXPLICIT!! DON'T SHIFT OR "@_";
+ my $arctica_core_object = $_[1];
+
+ my $self = Arctica::Services::Graphics::NX3::Server::new(@_);
+
+ # START
+ $self->{'_start'} = \&_start;
+
+ # STOP
+ $self->{'_stop'} = \&_stop;
+
+ # RESUME
+ $self->{'_resume'} = \&_resume;
+
+ # SUSPEND
+ $self->{'_suspend'} = \&_suspend;
+
+ # RECONFIGURE
+ $self->{'_reconfigure'} = \&_reconfigure;
+
+ bless($self, $class_name);
+
+ BugOUT(9,"NX3::Server::Desktop new->DONE");
+
+ return $self;
+}
+
+sub start {
+
+ Arctica::Services::Graphics::NX3::Server::start(@_);
+
+}
+
+sub stop {
+
+ Arctica::Services::Graphics::NX3::Server::stop(@_);
+
+}
+
+sub resume {
+
+ Arctica::Services::Graphics::NX3::Server::resume(@_);
+
+}
+
+sub suspend {
+
+ Arctica::Services::Graphics::NX3::Server::suspend(@_);
+
+}
+
+sub reconfigure {
+
+ Arctica::Services::Graphics::NX3::Server::reconfigure(@_);
+
+}
+
+1;
diff --git a/lib/Arctica/Services/Graphics/NX3/Server/Seamless.pm b/lib/Arctica/Services/Graphics/NX3/Server/Seamless.pm
new file mode 100644
index 0000000..7ac6d61
--- /dev/null
+++ b/lib/Arctica/Services/Graphics/NX3/Server/Seamless.pm
@@ -0,0 +1,63 @@
+################################################################################
+# _____ _
+# |_ _| |_ ___
+# | | | ' \/ -_)
+# |_| |_||_\___|
+# _ _ ____ _ _
+# / \ _ __ ___| |_(_) ___ __ _ | _ \ _ __ ___ (_) ___ ___| |_
+# / _ \ | '__/ __| __| |/ __/ _` | | |_) | '__/ _ \| |/ _ \/ __| __|
+# / ___ \| | | (__| |_| | (_| (_| | | __/| | | (_) | | __/ (__| |_
+# /_/ \_\_| \___|\__|_|\___\__,_| |_| |_| \___// |\___|\___|\__|
+# |__/
+# The Arctica Modular Remote Computing Framework
+#
+################################################################################
+#
+# Copyright (C) 2015-2016 The Arctica Project
+# http://http://arctica-project.org/
+#
+# This code is dual licensed: strictly GPL-2 or AGPL-3+
+#
+# GPL-2
+# -----
+# 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; version 2 of the License.
+#
+# 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.
+#
+# AGPL-3+
+# -------
+# This programm is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This programm 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 Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero 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) 2015-2016 Guangzhou Nianguan Electronics Technology Co.Ltd.
+# <opensource@gznianguan.com>
+# Copyright (C) 2015-2016 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
+#
+################################################################################
+package Arctica::Services::Graphics::NX3::Server::Seamless;
+use strict;
+
+1;
diff --git a/lib/Arctica/Services/Graphics/NX3/Server/Shadow.pm b/lib/Arctica/Services/Graphics/NX3/Server/Shadow.pm
new file mode 100644
index 0000000..5b68254
--- /dev/null
+++ b/lib/Arctica/Services/Graphics/NX3/Server/Shadow.pm
@@ -0,0 +1,63 @@
+################################################################################
+# _____ _
+# |_ _| |_ ___
+# | | | ' \/ -_)
+# |_| |_||_\___|
+# _ _ ____ _ _
+# / \ _ __ ___| |_(_) ___ __ _ | _ \ _ __ ___ (_) ___ ___| |_
+# / _ \ | '__/ __| __| |/ __/ _` | | |_) | '__/ _ \| |/ _ \/ __| __|
+# / ___ \| | | (__| |_| | (_| (_| | | __/| | | (_) | | __/ (__| |_
+# /_/ \_\_| \___|\__|_|\___\__,_| |_| |_| \___// |\___|\___|\__|
+# |__/
+# The Arctica Modular Remote Computing Framework
+#
+################################################################################
+#
+# Copyright (C) 2015-2016 The Arctica Project
+# http://http://arctica-project.org/
+#
+# This code is dual licensed: strictly GPL-2 or AGPL-3+
+#
+# GPL-2
+# -----
+# 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; version 2 of the License.
+#
+# 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.
+#
+# AGPL-3+
+# -------
+# This programm is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This programm 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 Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero 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) 2015-2016 Guangzhou Nianguan Electronics Technology Co.Ltd.
+# <opensource@gznianguan.com>
+# Copyright (C) 2015-2016 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
+#
+################################################################################
+package Arctica::Services::Graphics::NX3::Server::Shadow;
+use strict;
+
+1;
diff --git a/lib/Arctica/Services/Graphics/NX3/Version.pm b/lib/Arctica/Services/Graphics/NX3/Version.pm
index ccd002d..7c8dcb3 100644
--- a/lib/Arctica/Services/Graphics/NX3/Version.pm
+++ b/lib/Arctica/Services/Graphics/NX3/Version.pm
@@ -63,3 +63,5 @@ use strict;
use vars qw[$VERSION];
$VERSION = '0.0.0.1';
+
+1;