Discussion:
[X2Go-User] client name
richard lucassen
2018-08-02 13:38:41 UTC
Permalink
Hello list,

I use "Custom desktop" as windowmanager, I start the session with a
script with the client name as parameter. In this way I'm able to
find the client name of the station which /initialized/ the session.

But is there a way to see which client /resumes/ an already existing
session?

R.
--
richard lucassen
http://contact.xaq.nl/
Stefan Baur
2018-08-02 13:48:26 UTC
Permalink
Post by richard lucassen
Hello list,
I use "Custom desktop" as windowmanager, I start the session with a
script with the client name as parameter. In this way I'm able to
find the client name of the station which /initialized/ the session.
But is there a way to see which client /resumes/ an already existing
session?
If you can do with an IP, the SSH_CLIENT variable contains the client
IP, source port, and destination port.
Unlike some X2GO* variables, which do not get set in all session types,
this one should be available regardless of session type.

Kind Regards,
Stefan Baur
--
BAUR-ITCS UG (haftungsbeschränkt)
Geschäftsführer: Stefan Baur
Eichenäckerweg 10, 89081 Ulm | Registergericht Ulm, HRB 724364
Fon/Fax 0731 40 34 66-36/-35 | USt-IdNr.: DE268653243
richard lucassen
2018-08-02 14:12:16 UTC
Permalink
On Thu, 2 Aug 2018 15:48:26 +0200
Post by Stefan Baur
Post by richard lucassen
I use "Custom desktop" as windowmanager, I start the session with a
script with the client name as parameter. In this way I'm able to
find the client name of the station which /initialized/ the session.
But is there a way to see which client /resumes/ an already existing
session?
If you can do with an IP, the SSH_CLIENT variable contains the client
IP, source port, and destination port.
Unlike some X2GO* variables, which do not get set in all session
types, this one should be available regardless of session type.
Ok, I already looked at the SSH_ environment variables but I cannot use
IP :-(

I have never played with keyboard settings, but would it be possible
to create a per client keyboard layout that is sent to the server? I
want to find a proper solution for automatically mapping keys. Now I
need to invoke manually the xmodmap ~/.Xmodmap.clientname to set the
different keyboards settings. A single session or resuming with the
same computer is no problem, the issue occurs when resuming a session
using a different computer than the computer which had initiated the
session.

IOW: this is a follow up of the xmodmap thread ;-)

R.
--
richard lucassen
http://contact.xaq.nl/
Ulrich Sibiller
2018-08-02 20:16:19 UTC
Permalink
On Thu, Aug 2, 2018 at 4:12 PM, richard lucassen
Post by richard lucassen
Ok, I already looked at the SSH_ environment variables but I cannot use
IP :-(
Just do a reverse lookup of the ip.

What exactly is the reason for the xmodmap stuff? We aim to always
ensure a proper keyboard setting. I even have code that replicates the
client's keyboard configuration (unfortunately still not in production
code).

Uli
Stefan Baur
2018-08-02 20:27:38 UTC
Permalink
Post by Ulrich Sibiller
What exactly is the reason for the xmodmap stuff? We aim to always
ensure a proper keyboard setting. I even have code that replicates the
client's keyboard configuration (unfortunately still not in production
code).
He explained it in another message - he is switching between machines
with regular vs. rather uncomfortable keyboard layouts - in the latter
case, he would need to use Fn + someotherkey for otherwise rather common
keys.
Post by Ulrich Sibiller
I use the x2go-server from various devices with sometimes some weird
keyboards. On some devices I mapped certain keys to functions like PgUp
and PgDn because otherwise these keys need "Fn + key" combination and
I'd like to keep these setting in the x2go session.
So I guess the question is if it would be possible to use a custom,
additional keyboard layout on the Server, and just specify this when
connecting from one of those "weird" machines (IIRC, this uses setxkbmap
in the background), instead of having to rely on an xmodmap hack.

Kind Regards,
Stefan Baur
--
BAUR-ITCS UG (haftungsbeschränkt)
Geschäftsführer: Stefan Baur
Eichenäckerweg 10, 89081 Ulm | Registergericht Ulm, HRB 724364
Fon/Fax 0731 40 34 66-36/-35 | USt-IdNr.: DE268653243
richard lucassen
2018-08-02 21:05:29 UTC
Permalink
On Thu, 2 Aug 2018 22:16:19 +0200
Post by Ulrich Sibiller
On Thu, Aug 2, 2018 at 4:12 PM, richard lucassen
Post by richard lucassen
Ok, I already looked at the SSH_ environment variables but I cannot
use IP :-(
Just do a reverse lookup of the ip.
When being a road warrior you can't do anything with a reverse lookup.
Post by Ulrich Sibiller
What exactly is the reason for the xmodmap stuff? We aim to always
ensure a proper keyboard setting. I even have code that replicates the
client's keyboard configuration (unfortunately still not in production
code).
That sounds good :-)

It would also be nice if the client name could be transferred to the
x2go server, e.g. as parameter or environment variable to the extension
scripts. That would make things much more flexible and this would be in
the spirit of the x2go-extensions IMHO ;-)
--
richard lucassen
http://contact.xaq.nl/
Ulrich Sibiller
2018-08-02 22:16:53 UTC
Permalink
On Thu, Aug 2, 2018 at 11:05 PM, richard lucassen
Post by richard lucassen
When being a road warrior you can't do anything with a reverse lookup.
Ok, accepted...
Post by richard lucassen
Post by Ulrich Sibiller
What exactly is the reason for the xmodmap stuff? We aim to always
ensure a proper keyboard setting. I even have code that replicates the
client's keyboard configuration (unfortunately still not in production
code).
That sounds good :-)
It would also be nice if the client name could be transferred to the
x2go server, e.g. as parameter or environment variable to the extension
scripts. That would make things much more flexible and this would be in
the spirit of the x2go-extensions IMHO ;-)
If x2go used openssh you could use the SendEnv/AcceptEnv configuration
for stuff like that. But I don't think libssh offers that.

But I have an idea/a workaround: create a directory on every client
that's named like the client and automatically forward it during
connecting. You can then deduce the client name from the mounted
directory. You can even put the xmodmap file there and just use it, so
you can skip the whole client name stuff.


Uli
richard lucassen
2018-08-03 07:30:36 UTC
Permalink
On Fri, 3 Aug 2018 00:16:53 +0200
Post by Ulrich Sibiller
But I have an idea/a workaround: create a directory on every client
that's named like the client and automatically forward it during
connecting. You can then deduce the client name from the mounted
directory. You can even put the xmodmap file there and just use it, so
you can skip the whole client name stuff.
Great! Works like a charm :) I use the same directory on all clients
~/x2go/ and I load the .Xmodmap in that directory. And there is also an
empty file with the client's name.

R.
--
richard lucassen
http://contact.xaq.nl/
Loading...