Slow with Xquartz in Snow Leopard

443 views
Skip to first unread message

Garikoitz Lerma-Usabiaga

unread,
Feb 6, 2014, 4:57:13 AM2/6/14
to spyd...@googlegroups.com
Hi, 
I have Spyder (from anaconda) installed in a Red Hat 6 server, and access it with Xquartz installed in Snow Leopard, and it is going painfully slow, does anybody have any recommendation?
thanks!
Gari 


Carlos Córdoba

unread,
Feb 6, 2014, 8:22:36 AM2/6/14
to spyd...@googlegroups.com
This has been reported before but for ssh'ing a Linux machine from
Windows. It probably has to do with our use of sockets for
communication. You can deactivate them in

Spyder > Preferences > General > Use a single instance

and

Spyder > Preferences > Console > Introspection > Enable monitor

to see if that helps.

Cheers,
Carlos

El 06/02/14 04:57, Garikoitz Lerma-Usabiaga escribió:
> --
> You received this message because you are subscribed to the Google
> Groups "spyder" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to spyderlib+...@googlegroups.com.
> To post to this group, send email to spyd...@googlegroups.com.
> Visit this group at http://groups.google.com/group/spyderlib.
> For more options, visit https://groups.google.com/groups/opt_out.

Garikoitz Lerma-Usabiaga

unread,
Feb 10, 2014, 6:25:07 AM2/10/14
to spyd...@googlegroups.com
Thanks! it goes faster indeed. 
I have another problem with the keyboard accessing to spyder from Citrix (both with a Mac keyboard or a Windows keyboard). It does not recognize any other keyboard than the US one and some characters are not mapped.
Is there any possibility to solve this through preferences or config?

thanks again!
Gari

Carlos Córdoba

unread,
Feb 10, 2014, 8:55:39 AM2/10/14
to spyd...@googlegroups.com
First a question: what's Citrix? (never heard of it).

Second: as far as I know we don't have any functionality to handle keyboards, so I presume that's done by Qt and you'd be better be asking in its forums about it.

Cheers,
Carlos

El 10/02/14 06:25, Garikoitz Lerma-Usabiaga escribió:

Adrian Klaver

unread,
Feb 10, 2014, 9:27:42 AM2/10/14
to spyd...@googlegroups.com
On 02/10/2014 05:55 AM, Carlos Córdoba wrote:
> First a question: what's Citrix? (never heard of it).

Short version, in this context its a terminal application for remotely
accessing desktops. FYI, you probably have indirectly heard of it, the
company owns XenSource the folks behind the Xen hypervisor.




--
Adrian Klaver
adrian...@gmail.com

Garikoitz Lerma-Usabiaga

unread,
Feb 11, 2014, 11:26:45 AM2/11/14
to spyd...@googlegroups.com
Thanks for your answers. 

I thought the problem was solved, but it is not... for summary:
> Keyboard problems when accessing from Citrix (accessing remotely through a Windows machine)
> Slowness when accessing from Snow Leopard with Xquartz.

The settings above made no difference, I have a improvement in speed when I access through Citrix, this means that: I have a remote connection to a local windows machine, with MobaXterm installed on it, and I launch Spyder with Spyder & > the speed of the interface is ok, but I have some keyboard problems (less with a Windows machine, more with a Mac.

When I access to spyder in the work network (from a Snow Leopard), I ssh to a Red Hat 6 machine and run Spyder through Xquartz with spyder &, then the Spyder slowness problem continues. It seems that the problem is related to Xquartz or the mac environment, in Windows it runs ok.

If there is no way to solve this problem (it makes it almost unusable), is it possible to use a remote iPython kernel? I can run spyder in my local Snow Leopard machine, I have all the files mapped locally, but I would need the programs to run in the Red Hat 6 kernel (I connect through ssh).

thank you very much again!
Gari 

Adrian Klaver

unread,
Feb 11, 2014, 12:09:07 PM2/11/14
to spyd...@googlegroups.com
On 02/11/2014 08:26 AM, Garikoitz Lerma-Usabiaga wrote:
> Thanks for your answers.
>
> I thought the problem was solved, but it is not... for summary:
> > Keyboard problems when accessing from Citrix (accessing remotely
> through a Windows machine)
> > Slowness when accessing from Snow Leopard with Xquartz.
>
> The settings above made no difference, I have a improvement in speed
> when I access through Citrix, this means that: I have a remote
> connection to a local windows machine, with MobaXterm installed on it,
> and I launch Spyder with Spyder & > the speed of the interface is ok,
> but I have some keyboard problems (less with a Windows machine, more
> with a Mac.

This would be a keyboard mapping problem.

A quick Google search found these links, among others:

https://discussions.apple.com/message/6659952#6659952

http://support.citrix.com/proddocs/topic/rec-mac-11-6/mac-optimize-keystroke-forwarding.html


>
> When I access to spyder in the work network (from a Snow Leopard), I ssh
> to a Red Hat 6 machine and run Spyder through Xquartz with spyder &,
> then the Spyder slowness problem continues. It seems that the problem is
> related to Xquartz or the mac environment, in Windows it runs ok.


Streaming graphical apps across a remote connection is a challenge
especially when using an add on like XQuartz. In any event are you by
chance hitting this bug:

http://xquartz.macosforge.org/trac/ticket/820

>
> If there is no way to solve this problem (it makes it almost unusable),
> is it possible to use a remote iPython kernel? I can run spyder in my
> local Snow Leopard machine, I have all the files mapped locally, but I
> would need the programs to run in the Red Hat 6 kernel (I connect
> through ssh).

Here is a recipe not sure if it will work for your purposes:

https://github.com/ipython/ipython/wiki/Cookbook:-Connecting-to-a-remote-kernel-via-ssh

>
> thank you very much again!
> Gari
>
>



--
Adrian Klaver
adrian...@gmail.com

Garikoitz Lerma-Usabiaga

unread,
Feb 12, 2014, 7:42:37 AM2/12/14
to spyd...@googlegroups.com
Thanks Adrian!
I already tried all the info on those links and none is working. 
The last one is the most frustrating, I should be able to use a remote kernel, but it fails to connect... maybe we have some strange config on the network.
If anybody has been successful I would really appreciate some help (when I substitute the port info in the .json with the ssh info, it doesn't recognize it, it would be great to have a look to any working ssh .json)
Thanks again,
Gari

Adrian Klaver

unread,
Feb 12, 2014, 11:43:10 AM2/12/14
to spyd...@googlegroups.com
On 02/12/2014 04:42 AM, Garikoitz Lerma-Usabiaga wrote:
> Thanks Adrian!
> I already tried all the info on those links and none is working.
> The last one is the most frustrating, I should be able to use a remote
> kernel, but it fails to connect... maybe we have some strange config on
> the network.

So what exactly are the keyboard issues you are seeing?

If I remember correctly you are connecting to Red Hat. When I see
unknown connection errors and Red Hat I think SELinux. You might want to
see what the SELinux policies are for your server. Also any firewall in
the mix?

A thought occurred to me late last night. Why are you using XQuartz to
access the server from you Mac? I would think OS X has its own remote
connection software. Is that the case?

> If anybody has been successful I would really appreciate some help (when
> I substitute the port info in the .json with the ssh info, it doesn't
> recognize it, it would be great to have a look to any working ssh .json)

So is there an error message?
Do you have a config in ~/.ssh that might be overriding the port?
Can you ssh directly to the server?

> Thanks again,

Garikoitz Lerma-Usabiaga

unread,
Feb 12, 2014, 6:04:46 PM2/12/14
to spyd...@googlegroups.com
Thanks again Adrian,


On Wednesday, February 12, 2014 5:43:10 PM UTC+1, Adrian Klaver wrote:
On 02/12/2014 04:42 AM, Garikoitz Lerma-Usabiaga wrote:
> Thanks Adrian!
> I already tried all the info on those links and none is working.
> The last one is the most frustrating, I should be able to use a remote
> kernel, but it fails to connect... maybe we have some strange config on
> the network.

So what exactly are the keyboard issues you are seeing?

For example:
- not possible to change the keyboard to spanish layout
- from a windows keyboard, almost all key combinations are working (although US layout), but from Mac keyboard many many keys are failing (@ is ok, but # doesn't work, for example).

 
If I remember correctly you are connecting to Red Hat.
That's rigth.

 
When I see
unknown connection errors and Red Hat I think SELinux. You might want to
see what the SELinux policies are for your server. Also any firewall in
the mix?

I don't think so. The problem is that I launch rstudio and matlab exactly in the same way, and I don't have problems with them, only with spyder (I mean, the spanish layout works and all keys work).

 
A thought occurred to me late last night. Why are you using XQuartz to
access the server from you Mac? I would think OS X has its own remote
connection software. Is that the case?
Well, until Snow Leopard (I think) it had X11 preinstalled, but from then on you had to install Xquartz yourselve. I need xquartz for another program that runs in the server (freesurfer) that need xquartz installed, so I had to substitue original X11. In any case, from  Lion onwards xquartz is your only choice.



 

> If anybody has been successful I would really appreciate some help (when
> I substitute the port info in the .json with the ssh info, it doesn't
> recognize it, it would be great to have a look to any working ssh .json)

So is there an error message?
It says that it cannot open a connection.
 
Do you have a config in ~/.ssh that might be overriding the port?
No

Can you ssh directly to the server?

Yes. I ssh to the server, and with "ipython kernel &" I create the kernel, and copy the created  .config/ipython ... .json to my local machine.
I create the links in my local machine per every port as stated in the manual (it asks for password per every change), and then go to spyder and ask for the connection to the remote kernel. It isn't working, although I didn't try a direct ipython connection, instead of going through spyder. Do you think it will make any difference?

thanks again!
Gari



 

Adrian Klaver

unread,
Feb 12, 2014, 7:56:04 PM2/12/14
to spyd...@googlegroups.com
On 02/12/2014 03:04 PM, Garikoitz Lerma-Usabiaga wrote:
> Thanks again Adrian,

There are too many different problems in play at the moment to get them
all solved at once. So my recommendation is to pick one of them and lets
see if we can get it fixed.

The choices as far as I can tell are:

1) Get your keyboard(s) working with Citrix

2) Get XQuartz to access Spyder without being slow.

3) Get IPython to see a remote kernel

You pick one and we will go from there.

--
Adrian Klaver
adrian...@gmail.com

Garikoitz Lerma-Usabiaga

unread,
Feb 13, 2014, 12:21:40 PM2/13/14
to spyd...@googlegroups.com
Thanks! I'll take 1), since I could work from home or work network from Citrix.
The speed is ok from Citrix, so the only problem I have is the keyboard one. 

Right now, this is what I've done (at work, from a Snow Leopard):
1.- Connect to Citrix
2.- launch ssh client (MobaXTerm) and connect to server with ssh -X
3.- Type spyder &

I see two main problems: 
1.- The keyboard change doesn't affect to spyder (other programs launched similarly as Matlab or rstudio do respond). It always has the English US layout.
2.- For example, # and ' are not working, but some other as @ or [ { are working (neither in the Spanish or US locations). When connecting with a Windows keyboard, I remember that it was working.

thanks!
Gari

Adrian Klaver

unread,
Feb 13, 2014, 1:54:34 PM2/13/14
to spyd...@googlegroups.com
On 02/13/2014 09:21 AM, Garikoitz Lerma-Usabiaga wrote:
> Thanks! I'll take 1), since I could work from home or work network from
> Citrix.
> The speed is ok from Citrix, so the only problem I have is the keyboard
> one.
>
> Right now, this is what I've done (at work, from a Snow Leopard):
> 1.- Connect to Citrix
> 2.- launch ssh client (MobaXTerm) and connect to server with ssh -X
> 3.- Type spyder &


So you are doing this:

via Citrix launch via ssh -X
OS X ----------> Windows(MobaXterm) ---------> Linux(RH)

Would it not be simpler from in Snow Leopard to just start an ssh
session and do ssh-X or is that what you are talking about when you say
XQuartz is slow?

>
> I see two main problems:
> 1.- The keyboard change doesn't affect to spyder (other programs
> launched similarly as Matlab or rstudio do respond). It always has the
> English US layout.

What keyboard change?

What has the English US layout, Spyder itself has no notion of keyboard
layouts?


> 2.- For example, # and ' are not working, but some other as @ or [ { are
> working (neither in the Spanish or US locations). When connecting with a
> Windows keyboard, I remember that it was working.

So does the Mac keyboard work with Matlab/rstudio?

>
> thanks!

Garikoitz Lerma-Usabiaga

unread,
Feb 22, 2014, 5:28:25 AM2/22/14
to spyd...@googlegroups.com
Sorry for the late reply,


On Thursday, February 13, 2014 7:54:34 PM UTC+1, Adrian Klaver wrote:
On 02/13/2014 09:21 AM, Garikoitz Lerma-Usabiaga wrote:
> Thanks! I'll take 1), since I could work from home or work network from
> Citrix.
> The speed is ok from Citrix, so the only problem I have is the keyboard
> one.
>
> Right now, this is what I've done (at work, from a Snow Leopard):
> 1.- Connect to Citrix
> 2.- launch ssh client (MobaXTerm) and connect to server with ssh -X
> 3.- Type spyder &


So you are doing this:

      via Citrix          launch      via ssh -X
OS X ----------> Windows(MobaXterm) ---------> Linux(RH)

Would it not be simpler from in Snow Leopard to just start an ssh
session and do ssh-X or is that what you are talking about when you say
XQuartz is slow?

Yes, the problem is that when I go directly it goes very slow, so as I can use Citrix both from work and from home, and the speed is ok in both cases, I wanted to try to solve the keyboard problem.  

>
> I see two main problems:
> 1.- The keyboard change doesn't affect to spyder (other programs
> launched similarly as Matlab or rstudio do respond). It always has the
> English US layout.

What keyboard change?

What has the English US layout, Spyder itself has no notion of keyboard
layouts?

Well, the thing is that the Windows machine we connect to with Citrix has a default US keyboard. I usually have to change it to spanish as the keyboard I am using both in mac and windows has spanish layout. Spyder is not responsive to those changes. 

 

> 2.- For example, # and ' are not working, but some other as @ or [ { are
> working (neither in the Spanish or US locations). When connecting with a
> Windows keyboard, I remember that it was working.

So does the Mac keyboard work with Matlab/rstudio?

I cannot check it right now, it is working from windows keyboard, but I am checking that the behaviour of matlab and rstudio seems the same of spyder... I am going to check with the sysadmins again if we can do anything about it in our side...

thanks again, I will update any advancement 

Garikoitz Lerma-Usabiaga

unread,
Feb 25, 2014, 8:29:20 AM2/25/14
to spyd...@googlegroups.com
Hi,  
definitely the keyboard problem seems to be Citrix related, we keep working on that. 

Related to the slowness accessing from Snow Leopard directly:
- ipython console works great
- only the editor it's too slow. 

Deactivating: 
Spyder > Preferences > General > Use a single instance 
Spyder > Preferences > Console > Introspection > Enable monitor 


Did not solve the problem. Any other idea?


By the way, don't know if it is related or not, but the terminal were i run Spyder is full of warning like this (just by starting the program): 

X Error: BadCursor (invalid Cursor parameter) 6
  Major opcode: 2 (X_ChangeWindowAttributes)
  Resource id:  0x3
X Error: BadCursor (invalid Cursor parameter) 6
  Major opcode: 95 (X_FreeCursor)
  Resource id:  0x3


thanks again!
Gari

Adrian Klaver

unread,
Feb 25, 2014, 1:00:03 PM2/25/14
to spyd...@googlegroups.com
On 02/25/2014 05:29 AM, Garikoitz Lerma-Usabiaga wrote:
> Hi,
> definitely the keyboard problem seems to be Citrix related, we keep
> working on that.
>
> Related to the slowness accessing from Snow Leopard directly:
> - ipython console works great

Text based IPython or the QT version?

> - only the editor it's too slow.

Running a GUI app via ssh -X can be a challenge.
>
> Deactivating:
> Spyder > Preferences > General > Use a single instance
> Spyder > Preferences > Console > Introspection > Enable monitor
>
>
> Did not solve the problem. Any other idea?

What version of XQuartz are you running?

Garikoitz Lerma-Usabiaga

unread,
Feb 25, 2014, 1:49:40 PM2/25/14
to spyd...@googlegroups.com


On Tuesday, February 25, 2014 7:00:03 PM UTC+1, Adrian Klaver wrote:
On 02/25/2014 05:29 AM, Garikoitz Lerma-Usabiaga wrote:
> Hi,
> definitely the keyboard problem seems to be Citrix related, we keep
> working on that.
>
> Related to the slowness accessing from Snow Leopard directly:
> - ipython console works great

Text based IPython or the QT version?

The one embedded in Spyder. In the same GUI, one part (iPython) is running nicely and the editor it is not.  

> - only the editor it's too slow.

Running a GUI app via ssh -X can be a challenge.

You are right, but I run everything that way (Matlab, rstudio, freeview, etc.) and it is going nicely, I found the slowness only in  Spyder editor. 

 
>
> Deactivating:
> Spyder > Preferences > General > Use a single instance
> Spyder > Preferences > Console > Introspection > Enable monitor
>
>
> Did not solve the problem. Any other idea?

What version of XQuartz are you running?

XQuartz 2.7.5 (xorg-server 1.14.4)

Thanks!
Gari 

Carlos Córdoba

unread,
Feb 25, 2014, 2:29:04 PM2/25/14
to spyd...@googlegroups.com
Are you running Mavericks in OS X by any chance?

El 25/02/14 13:49, Garikoitz Lerma-Usabiaga escribió:

Adrian Klaver

unread,
Feb 25, 2014, 2:31:35 PM2/25/14
to spyd...@googlegroups.com
On 02/25/2014 10:49 AM, Garikoitz Lerma-Usabiaga wrote:
>
>
> On Tuesday, February 25, 2014 7:00:03 PM UTC+1, Adrian Klaver wrote:
>
> On 02/25/2014 05:29 AM, Garikoitz Lerma-Usabiaga wrote:
> > Hi,
> > definitely the keyboard problem seems to be Citrix related, we keep
> > working on that.
> >
> > Related to the slowness accessing from Snow Leopard directly:
> > - ipython console works great
>
> Text based IPython or the QT version?
>
>
> The one embedded in Spyder. In the same GUI, one part (iPython) is
> running nicely and the editor it is not.
>
>
> > - only the editor it's too slow.
>
> Running a GUI app via ssh -X can be a challenge.
>
>
> You are right, but I run everything that way (Matlab, rstudio, freeview,
> etc.) and it is going nicely, I found the slowness only in Spyder editor.

>
> What version of XQuartz are you running?
>
>
> XQuartz 2.7.5 (xorg-server 1.14.4)
>

Per this bug report:

http://xquartz.macosforge.org/trac/ticket/820

have you tried rolling back to 2.7.4?




--
Adrian Klaver
adrian...@gmail.com

Garikoitz Lerma-Usabiaga

unread,
Mar 4, 2014, 9:13:58 AM3/4/14
to spyd...@googlegroups.com
Hi!
so, I have some news. 
Instead of downgrading to Xquartz 2.7.4 in Snow Leopard, IT department  decided to upgrade directly from Snow Leopard to Mavericks. 
Now Spyder if running nicely from ssh. 
I still have the keyboard problem sometimes when accessing from Citrix, but it is clearly our problem. 

Thank you very much for your support, it is really very appreciated. 
br,
Gari 
Reply all
Reply to author
Forward
0 new messages