Cygwin: Unable to initialize GTK: could not open display - cygwin

I've got a Win 10 box with Cygwin and the X packages installed. I run xlaunch and start up the X server. I then do "ssh -Y user#myserver". Then I su and run virt-manager. I get an error:
Cygwin: Unable to initialize GTK: could not open display
echo $DISPLAY shows:
localhost:10.0
I've tried changing it with EXPORT DISPLAY=localhost:0.0 with no luck.
I've googled and read all of the similar questions but none address my problem, as simple as I'm sure it is.

Starting from xorg-server version 1.17 , the option -nolisten tcp is now the default, so the server only accepts local connections on a unix domain socket.
To allow connection by TCP you should use the option -listen that has been added to restore the previous behaviour.
As reported by the package maintainer:
https://sourceware.org/ml/cygwin-announce/2015-10/msg00111.html

Related

QXcbConnection error while try to install QT package on Ubuntu 18, Linux

I have Ubuntu 18 on mu VMware software and try to install QT based on this youtube video. The issue is when I want to run the following command:
sudo ./qt-opensource-linux-x64-5.11.3.run
I get this error:
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QXcbConnection: Could not connect to display
Aborted
Any help?
Thank you very much.
It looks like this might simply be a case of the DISPLAY environment variable not being set.
Try ssh with X11 forwarding rather than sudo. So something like...
ssh -X root#localhost <full-path-to>/qt-opensource-linux-x64-5.11.3.run

Unable to connect error in the csf update

If you refer to the ConfigServer Security & Firewall - csf on your server, in "Upgrade" section you should see this message:
"You are running the latest version of csf. An Upgrade button will appear here if a new version becomes available"
One of the features of this firewall is its automatic update, if a new version of the CSF firewall is available, the CSF will automatically update it to the new version.
The user sent us a CSF update report and, in the explanations for us, the error is
"Unable to connect to https://download.configserver.com, retry in 300 seconds."
which we will continue to teach you how to fix this problem.
Note: This training is tested on the operating system centos 6.7
This error is due to the non-installation of Crypt-SSLeay on the server, so you must have access to the server management, you can use the putty software to log onto your ssh server and install yum by this package. After entering ssh, enter the following command on the server:
# yum install perl-Crypt-SSLeay
Wait for 5 minutes and try again if your problem still exists,
in "csf - ConfigServer Firewall" Section,click on "Firewall Configuration" buttom, then find "URLGET" and set it to "2", go to end of the page and click on "Change" buttom,then restart CSF.
If you see this Warning:
"URLGET set to use LWP but perl module is not installed"
This problem is due to the fact that Perl's required modules are not installed on the server. Some CSF firewall operations depend on the modules and packages installed in the CSF, which does not work properly if these CSF modules or packages are not installed. To fix this error, you must install perl-libwww-perl packages and net-tools and perl-LWP-protocol-https on your Linux operating system. To install these packages, you must connect to the SSH server, then log in to the server administration and enter the following command:
# yum install perl-libwww-perl net-tools perl-LWP-Protocol-https
Your Problem Solved. Good luck :)
for update CSF on Command line use:
# csf -u
I had the same problem upgrading to CSF version 13.05! The problem that I have found was the Country Block did not take note but I guess the update server is located in NL? Remove all country block restart CSF and do the
# csf -u using shell
et voilĂ !

I'm trying to run gedit in cygwin, but receiving error

I'm trying to run some normal text editor in cygwin (version 2.4.1(0.293/5/3)).
I've really disappointed and frustrated with emacs :( So I downloaded and installed gedit as a part of cygwin package, but when I'm trying to run it, I receive:
$ gedit
Unable to init server: Could not connect to 127.0.0.1: Connection refused
(gedit:8196): Gtk-WARNING **: cannot open display:
I understand that it can be somehow connected with security issues (it runs on multiuser win10 PC), but I cannot find out how to solve it....
Please help!
I was having the same problem and was able to solve. Your case may be the same
install Cygwin/X
open cygwin and start x11 server by typing
startxwin >/dev/null 2>&1 &
set DISPLAY environment variable as explained here by typing
export DISPLAY=:0.0
Start gedit normally
This (startxwin >/dev/null 2>&1 & export DISPLAY=:0.0) work for temporary, not permanent. It is needed to type each time I close terminal.

Raspberry Pi Tkinter via shh and xming

I'm trying to run a Tkinter script from a raspberry, via an ssh client and xming. Once I've logged into the pi via shh I use the command:
gksudo python3 home/pi/PythonScripts/TkinterTest.py
This is the error that is given on my PC:
(gksudo:2700): Gtk-WARNING **: cannot open display:
and a different error on my laptop running the same software:
(gksudo:3227): GLib-CRITICAL **: g_str_has_prefix: assertion 'str != NULL' failed
I have tried to change the display with the command:
export DISPLAY=:0.0
But this had no effect on the output.
First of all be sure that the X forwarding is actived on your raspberry, you can check that in /etc/ssh/sshd_config: X11Forwarding yes
ssh -X username#<raspberry> (-X flag for the X11 forwarding)
Run your script : (su) python /path/to/script.py
Sometimes when you try to run program via sudo you can have some error, you need to check the permissions of .Xauthority file
I had a similar problem. I know this Question is 3 years old. But my search landed me here. So just answering the question
sudo cp ~pi/.Xauthority ~root/
This just copies the X11 authority file directly to root without the xauth command management. This will make all active user pi X11 connections available for use by root without having to sort through and find the correct one.
P.S : I'm just copy pasting, credit goes to this answer in this forum

SCP error: Bad configuration option: PermitLocalCommand

When I execute this command below:
scp -P 36000 hdfs#192.168.0.114:~/tmp.txt SOQ_log.txt
I get an error:
command-line: line 0: Bad configuration option: PermitLocalCommand
Does anyone know why?
scp runs a copy of the ssh program to create the communications channel, and it runs ssh with the options:
-oForwardAgent=no -oPermitLocalCommand=no -oClearAllForwardings=yes
So that explains where the "PermitLocalCommand" option is coming from in the first place. I'll add that sftp uses the same options to run ssh, so it'll probably display the same behavior.
"PermitLocalCommand" is normally a valid ssh configuration option. If your copy of ssh is complaining about it, then it seems that your copy of ssh isn't the normal copy of ssh that goes with your copy of scp.
This serverfault question suggests that the error could be due to someone installing a malware version of ssh (ie, a rootkit) on your system. This forum thread also suggests that the problem is due to having an altered version of ssh, which was fixed by removing and reinstalling the OpenSSH client utilities.
An alternate explanation would be that someone--maybe your Linux distro maintainer--has installed a version of ssh on your system with that option removed, and you're using it unawares. Or you have a very old version of the ssh program for some reason, which doesn't support the option.
My system is CentOs 5.9
I'm facing the same problem, I found it to be due to this configuration line in /etc/ssh/sshd_config:
# override default of no subsystems
Subsystem sftp /opt/libexec/sftp-server
But I cannot run /opt/libexec/sftp-server, it is broken for some reason
now it is solved by reinstall the remote openssh-server:
yum erase openssh-server
yum install openssh-server
now the changes to
# override default of no subsystems
Subsystem sftp /usr/libexec/openssh/sftp-server
and /usr/libexec/openssh/sftp-server is runnable
don't forget to execute:
/etc/init.d/sshd restart
Sometimes command cannot parse this kind of stuff
:~/
Id change it to the full path.

Resources