Why does R2013b keyboard freeze when toggling X11 forwarded windows?
显示 更早的评论
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 个评论
Rob Holmes
2014-4-9
This issue persists in R2014a. Is there a bug report?
Marc
2014-6-15
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?
采纳的回答
更多回答(11 个)
Jens Henrik Göbbert
2014-6-11
1 个投票
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
2014-10-9
1 个投票
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.
Xiangrui Li
2013-12-18
编辑:Xiangrui Li
2013-12-18
0 个投票
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
2014-1-3
0 个投票
I'm having the exact problem. Running Matlab R2013b, Secure CRT and XMing. Going to try another Xwindows program next.
Xiangrui Li
2014-1-9
0 个投票
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
2014-2-5
编辑:Matthew Phillips
2014-2-5
0 个投票
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
2014-3-11
0 个投票
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
2014-3-12
编辑:Pál Dömötör
2014-3-12
0 个投票
Hi!
I try today Cygwin(with OpenBox) as "XServer" on windows and NO PROBLEM with the cursor. Without Openbox it still wrong.
1 个评论
Matthew Phillips
2014-4-1
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
2014-6-20
0 个投票
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
2014-6-24
0 个投票
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 个评论
Affan
2014-6-24
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.
类别
在 帮助中心 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!