Subject: Bug#1093: x2goclient on OS X not finding MacPorts xmodmap executable in /opt/local/bin then crashes

From: Arthur J <[email-masked]>
Date: Tue, 27 Sep 2016 11:19:25 -0600

Package: x2goclient
Version: X2Go Client v. 4.0.5.2 (Qt - 4.8.7)
Operating System: OS X El Capitan version 10.11.6
Tags: macos osx x2goclient xmodmap path

I have installed the latest x2goclient package on OS X El Capitan using
MacPorts.  I have also installed the MacPorts xorg-server and xmodmap
packages.

In my user account .profile script, MacPorts has added the following line
to set the PATH variable:
export PATH="/opt/local/bin:/opt/local/sbin:$PATH"

I have confirmed that xmodmap exists in one of these directories, in:
/opt/local/bin

When attempting to connect to any X2Go session, an error dialog appears
with the following message before the application crashes:

xmodmap failed to start.

This likely means the binary is not available.  The current search path is:
/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin

X2Go Client will now terminate.

It appears that /opt/local/bin is not being searched for xmodmap, despite
its presence in the PATH variable of my user account .profile script.  I
even attempted to reboot before starting x2goclient in case the PATH
variable needed to be re-read, but the error did not change.

This is preventing me from using the OS X x2goclient application.

---

From: Mihai Moldovan <[email-masked]>
Date: Thu, 10 Nov 2016 16:01:50 +0100

Control: reassign -1 x2goclient 4.0.5.2

On 27.09.2016 07:19 PM, Arthur J wrote:
> MacPorts.  I have also installed the MacPorts xorg-server and xmodmap packages.
> 
> In my user account .profile script, MacPorts has added the following line to set
> the PATH variable:
> I have confirmed that xmodmap exists in one of these directories, in: /opt/local/bin
> 
> When attempting to connect to any X2Go session, an error dialog appears with the
> following message before the application crashes:
> 
> xmodmap failed to start.
> 

Hmm... AFAIK I'm adding /opt/local/bin to the search path in 4.0.5.2. Are you
absolutely sure you're on 4.0.5.2 and not 4.0.5.1? For 4.0.5.1, I released a
hotfix release tagged 4.0.5.1-1-osx, that fixes this issue explicitly.

> It appears that /opt/local/bin is not being searched for xmodmap, despite its
> presence in the PATH variable of my user account .profile script.  I even
> attempted to reboot before starting x2goclient in case the PATH variable needed
> to be re-read, but the error did not change.

That is normal, OS X resets the PATH to a clean value (see above, though without
/opt/X11/bin) for programs launched via the graphical interface or the "open"
utility.

Mihai