Re: 4-eyes session view without user sharing the connection

2018-05-30 Thread Nick Couchman
On Mon, Apr 9, 2018 at 3:51 AM, Kalle Jääskeläinen <
kalle.jaaskelai...@gmail.com> wrote:

> Hi,
>
> I tried to search for old posts as well as Jira but could’t find a easy
> answer to the following.
>
> Is it somehow possible for an admin (e.g. guacadmin who can see and kill
> active connections) to jump into the session and watch it real time without
> user first sharing the connection and sending the sharing URL?
>
> In case of 3rd party vendor access, we would like to be able to watch the
> sessions without requiring user to share the connection first.
>
> Ideally this would be a feature in the UI in Active Connections where you
> could select the session and have a “Watch Session” button next to “Kill
> Session”.
>
> thanks
>
>
This is currently not implemented, though there have been several requests
for it lately, so it seems to be gaining some popularity.  I believe there
are two different JIRA issues open right now that deal with various aspects
of this.

-Nick


Re: RDP Issue

2018-05-30 Thread Nick Couchman
On Wed, May 30, 2018 at 1:10 PM, Jaya Chandra  wrote:

> Hi Nick
>
> Iam using  0.9.13-incubating
>  version.
>
> Thanks & Regards
>
>
You might try 0.9.14 or even the latest github master version, as there
have been several improvements in connection error handling in those two
versions.  I believe 0.9.14 introduced some additional checks for RDP
disconnect messages, and the git master includes a very recently-introduced
feature that warns about network instability.

If you update you will need to update both Guacamole Client and Server
(guacd).

-Nick


Re: Dynamic Session Creation

2018-05-30 Thread Nick Couchman
On Sun, May 20, 2018 at 4:58 PM, Felix Wolfheimer 
wrote:

> Hi Nick,
>
> thanks for your answer. Yes, I was talking about VNC sessions on Linux.
>  The scenario I have in mind is a cloud deployment with auto-scaling
> functionality:
>
> There's one instance where guacamole is installed. This instance is
> small, cheap, and runs 24/7. The applications used in the VNC sessions
> require decent 3D rendering performance and, thus, I want to host them
> on GPU instances. These instances are expensive and so I would like to
> only spin them up when there's demand for a session. I have a mechanism
> that can submit a script (which creates a VNC session) to a scheduling
> system (e.g. SLURM). This scheduling system is connected with an
> autoscaling mechanism, e.g., cfncluster, which starts session host
> instances if there's demand. The session starts on the new instance,
> and the session information is added to the guacamole_db.
> This is why I was thinking the it would be great to have a mechanism to
> trigger the submission of the session creation script to the scheduling
> system when a user logs in. As the start of an instance needs a moment,
> I would like to have some way to inform the user about what's going on
> in the background.
>


That makes sense.  You should be able to do something like this in a
Guacamole extension - monitor the number of users connected to a particular
connection or connection group, and then trigger something every time
there's a connect or disconnect.  I would imagine the most useful thing
would be event listeners:

http://guacamole.apache.org/doc/gug/event-listeners.html

If you trigger an action every time a connection is established or
terminated, you can scale it in such a way that you always have 1 or more
spare instances running (depending on how frequently and quickly you expect
users to connect), and that would do the trick.  If you wanted to go even
leaner than that, you could trigger it at user logon/logoff such that an
instance was started when a user logged on to Guacamole, and, if there was
sufficient time between logon and the user attempting to connect, this
might work, as well, without having to keep as many (any?) spare instances.

The other option is to use an external load balancer to accomplish this and
then just point Guacamole at the load balancer.  I'm all for implementing
cool extensions for Guacamole, but this may have some benefits,
particularly in cloud-type environments where you're given these tools.
I'm thinking of AWS where you can do EC2 + Elastic Load Balancer (ELB) and
ELB will actually manage the number of spare EC2 instances for you.  The
plus side to this is that, at least in the case of AWS, it's already
implemented.  You can also do some similar stuff with a load balancer like
HAProxy, where you can look at the current user count vs. maximum count and
start up or shut down instances with a script of some sort based on that.
I've done this in the past and it worked reasonably well.

Anyway, plenty of possibilities for you - post back and let us know what
you do and how it works!

-Nick


Re: Connection history and recordings?

2018-05-30 Thread Nick Couchman
On Wed, May 16, 2018 at 1:05 AM, Joachim Lindenberg 
wrote:

> I am trying to understand what I need to do in my extension to enable
> connection-history and whether it is feasible to include the recordings
> there (i.e. some browser interaction rather than command line). So far I
> looked at
>
> http://guacamole.apache.org/doc/gug/administration.html#connection-history
>
> http://guacamole.apache.org/doc/gug/configuring-guacamole.html
>
> but I might miss a pointer.
>
> Also: is there any retention interval defined on these?
>
> Any hint?
>
> Thanks, Joachim
>

The biggest issue is that the recordings are generated by guacd, while the
extension is part of the Guacamole Client.  In order to integrate the two
you will need some way to couple the recordings on the guacd side with
whatever method you use to track them on the Guacamole Client side.

And, to answer your second question, neither guacd nor the Guacamole Client
currently enforce any retention interval on the recordings - there is no
setting for it, and it's up to you to keep them cleaned up.  Again, once
you have your extension written and you've found a way to connect the
recordings generated by guacd to the connections you may find it easier to
also implement a way to enforce retention.

-Nick


Extension not working

2018-05-30 Thread elvelux
Hello, i´m new to guacamole and i have managed to get it working with
proxmox.

But I have a problem. I am trying to add an extension to run a linux script
when an user logs into guacamole.

I have followed the guacamole manual in its 22th chapter and I have got the
extension loaded into guacamole (log file says Extension "lantalde" loaded).
The extension adds an event listener, but the code inside the listener is
never run.

I´m not sure if the problem is with the code or if i´m not creating the .jar
correctly. The only way to get the extension loaded that I have find is
creatin the .har with winrar including the guac-manifest.json and the
pom.xml into it. I have tried to generate the .jar with a mvn package
command, but then guacamole does not load the plugin because the manifest is
not in the root of the .jar file.

I´m not sure if I have to put the .java class file into the .jar or into the
guacamole client source code and then compile, I have tried both with no
success.

I suppose I am failing at something very basic because I´m new to guacamole
and Java. Can you see what is the problem? Thanks!

the files of the extension:

LantaldeListener.java
/package org.apache.guacamole.event;

import org.apache.guacamole.GuacamoleException;
import org.apache.guacamole.net.event.listener.Listener;
import org.apache.guacamole.net.event.AuthenticationSuccessEvent;
import java.io.IOException;

public class LantaldeListener implements Listener {
@Override
public void handleEvent(Object event) throws GuacamoleException {
if (event instanceof AuthenticationSuccessEvent) {
try { 
Process p =
Runtime.getRuntime().exec("/var/lib/tomcat8/webapps/lanzar.sh");

p.waitFor();
} catch (Exception e) {
}
}
}
}

/

guac-manifest.json
/{
"guacamoleVersion" : "*",
"name" : "lantalde",
"namespace" : "lantalde",

"listeners" : [
"org.apache.guacamole.event.LantaldeListener"
]
}/

pom.xml
/   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
4.0.0
org.apache.guacamole
lantalde
0.9.14
lantalde


UTF-8








org.apache.maven.plugins
maven-compiler-plugin
3.3

1.6
1.6








org.apache.guacamole
guacamole-ext
0.9.14
provided


/



--
Sent from: 
http://apache-guacamole-general-user-mailing-list.2363388.n4.nabble.com/