cygwin Xserver losing connection [duplicate] - ssh

This question already has answers here:
Cygwin XWin server randomly loses connection
(3 answers)
Closed 10 years ago.
I am running Xserver on cygwin (on top on Windows 7), and then using xterm to remote to linux via ssh -X, and run remote applications there, like konsole, emacs and others.
Initially all works fine, e.g. executing emacs pops up the correctly working window on my Windows 7 box.
But if I try to run the same emacs some time (like an hour) later, I get a linux message
Display localhost:10.0 unavailable, simulating -nw
and emacs runs in-line.
I have checked and the Xserver seems still up and running ok. Indeed, if I exit out to the original cygwin and reconnect to Linux by ssh -X again, it works just fine.
Would you know what is happening and how can it be fixed? Why is my Xserver connection being dropped?
Thank you very much.

Feel like a total moron to ask a question and answer it myself, but for the same of a future reference, here is a work around that helped. Instead of using ssh -X, if ssh -Y is used instead, it works better and does not drop the ability to spawn new windows over time.

Related

WSLv2 mount option missing from wsl util

I'm using wslv2 on Windows 10 Pro running on the dev channel. I've made sure it's fully up to date, then completely uninstalled wsl and ubuntu, then reinstalled them.
Despite this, I don't have a working mount option :(
wings#machine:~$ wsl --mount
Unknown command: --mount
If I understand correctly, you are trying to do this from the wsl terminal. But this must be done through powershell.
This is due to the --mount option being not yet released.
The documentation on Microsoft doesn't highlight it very much but you have to use early windows 11 preview to be able to use the mount option.
See here: https://learn.microsoft.com/en-us/windows/wsl/wsl2-mount-disk#prerequisites
From what I understand there, the actual release is scheduled for this month (Sept. 21) in Win 10.

x2go issue with XFCE and Ubuntu 20.04

When I connect x2go with XFCE Ubuntu 20.04 (KVM VM) after ~10 minutes of idle time, x2go will lose its mouse focus and keyboard focus and there is no way to grab control of the session. Even restarting x2go will not bring the focus back.
The XFCE VM is still running because I can see the top output in the console.
I tried several key combinations to bring the focus back but it does not. I tried LXDE and it does not have this issue. I tried XFCE desktop 20.04 on its running in a KVM VM. I also tried installing Ubuntu server 20.04 and load Xubuntu-desktop (KVM VM) - the same issue. After ~10 minutes the x2go session-focus is lost.
What brings the session focus back is if I reboot the VM and then connect to the VM again using x2go. as I mentioned just restarting x2go will not bring the session focus back.
I tried uninstalling the screensaver and the power management features in XFCE but that did not fix this issue.
Update: this x2go bug report log suggests its screensaver related. Using the applications/settings/screensaver allowed me to turn off anything related to the screensaver, solving the problem for me. Issue appears to be solved here similarly: askubuntu forum
I've been having the same issue w/ XFCE and LXDE both after an idle period (10-15 minutes), and only on Ubuntu 20.04, not on 18.04 or earlier. In either desktop env, the session was not recoverable and required termination of the session either from the client side or via a separate terminal ssh session to kill <PID> the x2gocleansessio process on the server side (after seeing it was running using top). For a short period, I regained control in the new session until the cycle recurred.
Seems like a major problem for x2go in Ubuntu 20.04.
Just to save everyone the time of digging through the AskUbuntu forum... run this + restart and you should be good to go on Ubuntu 20.04 -
sudo apt-get remove xfce4-screensaver
If your are login via x2go and don't want to uninstall xfce4-screensaver, it's hard to solve the problem because there are intern script of xfce who launch xfce4-screensaver whatever you told him to do. I found my own workaround WITHOUT root privilege:
First activate screensaver on start-up :settings-manager -> Session and Startup->check screensaver(that sound weird but by this way you are sure to launch your xfce4-screensaver localy otherwise it's the root user who launch it which this own startup file which you can't edit without root)
Second : in ~/.config/autostart/xfce4-screensaver.desktop (if it doesn't exist uncheck then check screensaver in first step). Add to the end of this file:
Exec=sh -c "kill $(pgrep -u <YOUR-USERNAME> screen)"
This will launch it but auto-kill it after OnLogin
Edit: it's better than uninstall it because in my case that was the administrator that install for every user xfce4-screensaver so I can't uninstall it because the computer need a screensaver on the real sessions (I mean not in ssh on the physique machine). Maybe switch to Xscreensaver or other screensaver will solve this problem

Stop keyboard becoming unresponsive on Pycharm startup

Symptoms:
When starting Pycharm:
the keyboard seems completely unresponsive
the cursor disappears
menu items with keyboard bindings are greyed out
text selection still works with the mouse, but the cursor is not visible
This may be related to another SO question "pycharm with ideavim occasionally makes the keyboard unresponsive" but ideavim is not involved.
Set-up:
remote desktop connection to a Windows 7 64-bit computer
Windows machine has Xming running as a X-window server
Using PuTTy to ssh tunnel into a Linux box running SuSE 11.3
Pycharm v4.0.5
JRE 1.7.0
Further Details
switching between tabs in Pycharm doesn't fix this
no cursor is visible in the console, python, or editor windows
switching to another X-window (xclock) doesn't help
switching to another non-X-window doesn't help either
re-starting Pycharm doesn't help
sudo ibus restart, see issue 78860 on my flavor of linux doesn't do anything
Working fix:
Turn off the 'Tip of the day' start-up dialogue box, then re-start Pycharm.
I can confirm that it works as a fix to my specific problem.
It sounds like there's a known problem with the cursor disappearing: see issue 65637 and issue 79312. Based on my experience it seems that this problem can also be caused when Pycharm pop-up windows steal focus.
Hope this is useful to some other folks out there.
I am using pycharm in ubuntu and this thing worked for me. Just run this command in terminal. I don't even restarted. It worked.
$ ibus-daemon -rd

Problems with Octave on Windows 8: crashes after any error

I have installed (and re-installed) Octave 3 times on Windows 8, and I still can't get it right. The first and most obvious problem is that the prompt is missing; the screen only shows the flashing underscore that follows the prompt. This is not a major problem since the system properly responds to commands.
The major problem is that Octave crashes whenever it encounters a syntax error, instead of politely giving a diagnostic. This makes for extremely tedious software development.
Is there a way around this problem, or do we just have to wait for one side or the other to come up with an accommodation?
I encountered the same problem. I solved it by this:
create a shortcut to octave.exe, then right click->property-> change the "target" to something like:
C:\Program Files\Octave\Octave3.6.*_gcc*.*.*\bin\octave.exe -i --line-editing
Then it won't exit if u have syntax errors.
I don't understand the meaning of the parameters yet.
reference:
http://exciton.eo.yzu.edu.tw/~lab/?p=1121
Type octave --help can check the meaning of parameters.
-i also --interactvie, to force Octave interactive behavior.
Maybe Octave run at non-interactive mode at default, that means prompt should not be shown and it should terminate immediately when encountered error when reading a file.
I don't know if this will solve your problem, or if this is too bloated of a solution for you, but I use Octave on Windows 7 through Cygwin without any problems.
If you can't get Octave to run on Windows 8, you may consider running Octave through Linux via computer virtualization technology (virtual computer). Two, off the top of my head that you could use are VirtualBox by Oracle or VMWare Player
Once you have it installed, you can go to any number of sites that have pre-built Linux images that you can download and then run inside of Windows 8.X. Do a Google search of for 'Virtualbox images' or as 'VMWare appliances'. You can then download and use that to run the lastest version of Octave. I hope that helps.
Cheers,

xquartz: couldn't query security extension and xterm failing

I am using OSX 10.7.5 from my MacBook Air to login to remote Linux workstation, running Suse (/etc/issue: SUSE Linux Enterprise Desktop 11 SP2 (x86_64) - Kernel \r (\l))
Everything was working fine until I started to play with macports latest X11, XQuartz XWindow System (XQuartz 2.7.4 (xorg-server 1.13.0)). By default OSX 10.7.5 comes with XQuartz 2.6.4 (xorg-server 1.10.6), however I've installed and made default XQuartz 2.7.4. I am now observing two issues:
(1) When logging to my remote Suse box (this is done via VPN tunnel btw, not sure if it matters), via 'user1> ssh -X user2#wks01' I am getting
Warning: untrusted X11 forwarding setup failed: xauth key data not generated
This (at least appears) to be traced to the fact that there's no 'Security' extension on the new Xquarts server. Traced via ssh -vvv option, and then due to the fact that xauth is failing, so running it separately on MacBox, or remote Suse gives:
user2#wks04:~> xauth generate "$DISPLAY" .
trustedxauth: (argv):1: couldn't query Security extension on display "localhost:10.0"
'ssh -Y' logs in without warning
(2) What is also interesting, that in both ssh modes -X and -Y I am able to open and forward to my display any X-application that I have checked, including xclock, xlogo, xcalc and even eclipse. However running simple 'xterm' results in a hanging job (i.e. appears running), but xterm never displays on my Mac.
While rolling back to will XQuartz 2.6.4 probably help with the issues above (as all the above operations worked smoothly before), but I am curious now to understand the root of the matter.
Thank you in advance for your help,
Dmitry