On Tue, 31 Jul 2018 15:49:53 +0200
Stefan Baur <x2go-m...@baur-itcs.de> wrote:

> > Hmm, this is a Q&D workaround:
> > 
> > $ cat /usr/lib/x2go/extensions/post-resume.d/010_xmodmap
> > #!/bin/dash
> > test -f ~/.Xmodmap || exit 0
> > /usr/local/scripts/xmodmap.sh &
> > 
> > $ cat /usr/local/scripts/xmodmap.sh
> > #!/bin/dash
> > sleep 10
> > exec /usr/bin/xmodmap ${HOME}/.Xmodmap
> 
> You should be able to simplify that into one script, assuming dash
> understands the syntax bash uses for this (haven't tried it):

As I said: "this is a Q&D workaround" Q&D means Quick and Dirty ;-)

> $ cat /usr/lib/x2go/extensions/post-resume.d/010_xmodmap
> #!/bin/dash
> test -f ~/.Xmodmap || exit 0
> (sleep 10; exec /usr/bin/xmodmap ${HOME}/.Xmodmap) &
> 
> Not sure why you'd need the "exec", even.

There's no need "exec" for it indeed

> Instead of blindly sleeping 10 seconds, you could also check if
> xmodmap returns an error when it's called too early in the process.
> Maybe something like
> (while ! /usr/bin/xmodmap ${HOME}/.Xmodmap ; do sleep 1 ; done) &

That would be a better option indeed

> Also, is there a particular reason why you need to run xmodmap
> manually/scripted, rather than using the keyboard settings option
> inside X2GoClient?  Are you a macOS X2GoClient user, and the
> autodetection we need to use on the Mac is failing for you?

It's all Linux. I use a script to start WindowMaker as windowmanager
("Custom desktop") and I noticed that xmodmap keymapping is reset
after a suspend/resume cycle. I needed to run "xmodmap ~/.Xmodmap" each
time after a suspend/resume cycle. That's why I was trying to script it.

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.

BTW, as stated in the OP, I don't think it's an x2go issue. Maybe I
have to play with the keyboard settings, I never did actually.

R.

-- 
richard lucassen
http://contact.xaq.nl/
_______________________________________________
x2go-user mailing list
x2go-user@lists.x2go.org
https://lists.x2go.org/listinfo/x2go-user

Reply via email to