Why does R2013b keyboard freeze when toggling X11 forwarded windows?
Ältere Kommentare anzeigen
Background: I'm accessing R2013b on a remote Linux server from Windows 7 via X11 forwarding (Xming and PuTTY). From the shell command line, I start Matlab with: matlab2013b &. Nothing fancy.
The problem: R2013b loads appropriately: I can enter commands in the command window with the keyboard. When I toggle window focus (for example, I click on a Matlab figure window or on the Windows 7 desktop background and then back to the command window), the command window regains focus. Although the toggled-focus command window accepts mouse-click input, such as highlighting text, no flashing cursor appears at the command line and keyboard input is not displayed. At this point I cannot continue using Matlab and I must kill the process.
Other information: I have tried the above on multiple Win7 machines with the same result. The problem did not arise when accessing the remote machine from a Linux machine via ssh -X in a terminal window. The problem did not arise when running matlab2012b.
2 Kommentare
Rob Holmes
am 9 Apr. 2014
This issue persists in R2014a. Is there a bug report?
Marc
am 15 Jun. 2014
Have you or anyone submitted a request to tech support?
Just to clarify, you don't have a Matlab license on your machine. You are trying to access a Matlab license on a server?
Have you contacted the Linux server administrator?
Akzeptierte Antwort
Weitere Antworten (11)
Jens Henrik Göbbert
am 11 Jun. 2014
1 Stimme
make sure sun.java2d.pmoffscreen=false is set for all JAVA Matlab uses. You have different options to achive this:
a) [...] put a file called "java.opts" containing the Java option "-Dsun.java2d.pmoffscreen=false" into the directory matlabroot/bin/*system*/. https://www.mathworks.com/matlabcentral/newsreader/view_thread/160387
b) [...] adding a file called “java.opts” to the working directory of your Matlab session, containing the line “-Dsun.java2d.pmoffscreen=false”. This has been found to speed up the performance of Matlab on the cluster. http://help.unc.edu/help/matlab-common-faqs/#P28_3000
c) [...] create a file call java.opts with a statement -Dsun.java2d.pmoffscreen=false under the home directory. http://osiutino.wordpress.com/2013/08/14/remotely-connect-to-matlab/
It would be great to know, how to check within Matlab if certain settings have been read. Any ideas?
Colby
am 9 Okt. 2014
1 Stimme
I had almost the same problem (MATLAB would not focus) when displaying from a Linux machine to OS X (various versions of OS X, MATLAB, Xquartz, and Java were tried with no solution). After suffering for a few years (VNCing into another Linux machine, forwarding X11 to that Linux machine, and displaying via VNC to my OS X machine), I finally searched for just the right phrases, and found these pages:
https://bbs.archlinux.org/viewtopic.php?id=134921
Now it works for me. I just use "ssh -Y" instead of "ssh -X" and the problem is gone. I can focus on the MATLAB window and type into it. I hope that helps someone else.
1 Kommentar
Robert Capps
am 19 Dez. 2018
This worked for me also!
Xiangrui Li
am 18 Dez. 2013
Bearbeitet: Xiangrui Li
am 18 Dez. 2013
0 Stimmen
I am having exactly the same problem, although I haven't tried other matlab versions due to access issue. Anyone has a solution? Thanks. -Xiangrui
Jody
am 3 Jan. 2014
0 Stimmen
I'm having the exact problem. Running Matlab R2013b, Secure CRT and XMing. Going to try another Xwindows program next.
Xiangrui Li
am 9 Jan. 2014
0 Stimmen
Due to the above problem, I am using VNC viewer for now. The keyboard almost works fine, except several keys on the number pad. When NumLock is on, pressing 0 paste the clipboard content then input 0
4 delete previous char and input 4
7,8,9 delete the whole line and input the number
Other number pad keys seem fine.
It seems this is matlab related issue, since there is no problem with other applications in the VNC viewer.
Any idea to fix this? Thanks.
-Xiangrui
Matthew Phillips
am 5 Feb. 2014
Bearbeitet: Matthew Phillips
am 5 Feb. 2014
0 Stimmen
I'm having this exact same problem. (Client is running Windows 8 in my case.) Could somebody at Mathworks please look into this, otherwise the compute server I'm trying to run it on sits idle. I don't have privileges to install VNC or other workarounds.
Pál Dömötör
am 11 Mär. 2014
0 Stimmen
I am having the same problem. If i am clicking to an other window or start an app, the cursor does not come back. Only way that i found is undock the command window. After undock and dock i have cursor again and i can click out from the window without lose the cursor.But after app starting or plot i do not have cursor again on command window. my Matlab version is R2014a. Running on linux(ubuntu(64)) and export the display to windows7(32). I try it with "export $DISPLAY" and with "matlab -display mydisplay" too.
Pál Dömötör
am 12 Mär. 2014
Bearbeitet: Pál Dömötör
am 12 Mär. 2014
0 Stimmen
Hi!
I try today Cygwin(with OpenBox) as "XServer" on windows and NO PROBLEM with the cursor. Without Openbox it still wrong.
1 Kommentar
Matthew Phillips
am 1 Apr. 2014
It works, but unfortunately I find that it's annoyingly difficult to switch between windows--only clicking on the top border will bring it to focus. For this reason I would still really like Matlab to fix the X11/XMing issue!
Has there been any update to this? This is extremely frustrating and makes MATLAB unusable. The solution by @Jens did not work for me.
Edit: a possible solution: Launch matlab, switch to local window (cursor should disappear), go back to matlab, undock the command window, and dock it back. For me this seems to bring the cursor back even after switching windows.
Moritz
am 20 Jun. 2014
0 Stimmen
Exactly the same problem. Is there any solution to this problem yet? If not I queue in and plead the matlab team to tackle this issue and debug Matlab ... Jen's answer helps to speed up my Matlab, but does not help me to keep the cursor active during a session.
Affan
am 24 Jun. 2014
0 Stimmen
Can someone please create a ticket for this. I've already created one but for some reason my school's license number is invalid. This is a really really annoying problem and I am considering switching to R.
1 Kommentar
Affan
am 24 Jun. 2014
EDIT: I have sort of FIXED this problem. When you launch X11, there are a couple of options. Instead of launching "multiple windows", I ran it in "one window" mode. Turns out that everytime I tried to do something, XMing crashed. It turns out it was a font problem, so I downloaded all the fonts for Xming (for my local computer, search Xming Fonts) and now if I run it in "one window" mode, everything flies beautifully.
Now, I can't do this process on my uni's lab computers as I can't install the fonts on Xming as I don't have privelges. But who knows, your IT admin may have already installed them.
Kategorien
Mehr zu Introduction to Installation and Licensing finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!