x11

Java Can't connect to X11 window server using 'localhost:10.0' as the value of the DISPLAY variable

十年热恋 提交于 2020-03-07 06:52:51
问题 I have a script using java to connect to display X11 in the port 10.0 at localhost but i get always this error java.lang.InternalError: Can't connect to X11 window server using 'localhost:10.0' as the value of the DISPLAY variable. at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:62) at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:178) at java.security.AccessController.doPrivileged(Native

How to apply 'Qt.WA_X11NetWmWindowTypeDesktop' attribute to my QML window by using PyQt5

好久不见. 提交于 2020-02-29 06:31:45
问题 I am working on a desktop environment and I want my QML window as my main desktop window. I am integrating QML with PyQt5. here is my code import sys from PyQt5 import* from PyQt5.QtCore import* from PyQt5.QtWidgets import* from PyQt5.QtQuick import* from PyQt5.QtQml import* from threading import Thread import os import importlib import subprocess import tempfile import re import random import os.path from os import path dir_path = os.path.dirname(os.path.realpath(__file__)) if __name__ == '_

PHP判断两个矩形是否相交

末鹿安然 提交于 2020-02-12 08:06:41
<?php $s = is_rect_intersect(1,2,1,2,4,5,0,3); var_dump($s); /* 如果两个矩形相交,那么矩形A B的中心点和矩形的边长是有一定关系的。 Case 2345中,两个中心点间的距离肯定小于AB边长和的一半。 Case 1中就像等了。 设A[x01,y01,x02,y02] B[x11,y11,x12,y12]. 矩形A和矩形B物理中心点X方向的距离为Lx:abs( (x01+x02)/2 – (x11+x12) /2) 矩形A和矩形B物理中心点Y方向的距离为Ly:abs( (y01+y02)/2 – (y11+y12) /2) 矩形A和矩形B X方向的边长为 Sax:abs(x01-x02) Sbx: abs(x11-x12) 矩形A和矩形B Y方向的边长为 Say:abs(y01-y02) Sby: abs(y11-y12) 如果AB相交,则满足下列关系: Lx <= (Sax + Sbx)/2 && Ly <=(Say+ Sby)/2 参考地址:https://blog.csdn.net/szfhy/article/details/49740191 */ function is_rect_intersect($x01,$x02,$y01,$y02,$x11,$x12,$y11,$y12){ $zx = abs($x01+

Tracking XWindow Protocol

我的梦境 提交于 2020-02-01 05:08:32
问题 Is it possible to track XWindow protocol with a tool? I thought wireshark would be a good framework to host such an idea but there seems no support. What should be done to achieve this goal? 回答1: Wireshark does have the ability to dissect the X-Window protocol. However: You first have to be able to capture the actual X-Window traffic between an X-client (app) and an X-Server before Wireshark can dissect it. X-Windows traffic between an app (X-Windows client) and an X-Windows Server both

Tracking XWindow Protocol

烈酒焚心 提交于 2020-02-01 05:07:51
问题 Is it possible to track XWindow protocol with a tool? I thought wireshark would be a good framework to host such an idea but there seems no support. What should be done to achieve this goal? 回答1: Wireshark does have the ability to dissect the X-Window protocol. However: You first have to be able to capture the actual X-Window traffic between an X-client (app) and an X-Server before Wireshark can dissect it. X-Windows traffic between an app (X-Windows client) and an X-Windows Server both

Tracking XWindow Protocol

亡梦爱人 提交于 2020-02-01 05:07:19
问题 Is it possible to track XWindow protocol with a tool? I thought wireshark would be a good framework to host such an idea but there seems no support. What should be done to achieve this goal? 回答1: Wireshark does have the ability to dissect the X-Window protocol. However: You first have to be able to capture the actual X-Window traffic between an X-client (app) and an X-Server before Wireshark can dissect it. X-Windows traffic between an app (X-Windows client) and an X-Windows Server both

Tracking XWindow Protocol

半腔热情 提交于 2020-02-01 05:06:20
问题 Is it possible to track XWindow protocol with a tool? I thought wireshark would be a good framework to host such an idea but there seems no support. What should be done to achieve this goal? 回答1: Wireshark does have the ability to dissect the X-Window protocol. However: You first have to be able to capture the actual X-Window traffic between an X-client (app) and an X-Server before Wireshark can dissect it. X-Windows traffic between an app (X-Windows client) and an X-Windows Server both

Linux/ubuntu 服务器开启6010端口-X11服务-ssh连接

北城以北 提交于 2020-01-27 18:49:11
此文首发于我的个人博客: Linux/ubuntu 服务器开启6010端口-X11服务-ssh连接 — zhang0peter的个人博客 晚上在检查我的Linux-ubuntu服务器的端口状况时发现开启了6010端口: -> # nmap -p 1-65535 127.0.0.1 Starting Nmap 7.60 ( https://nmap.org ) at 2020-01-22 19:13 CST Nmap scan report for localhost.localdomain (127.0.0.1) Host is up (0.0000040s latency). Not shown: 65531 closed ports PORT STATE SERVICE 22/tcp open ssh 6010/tcp open x11 6011/tcp open x11 6013/tcp open x11 Nmap done: 1 IP address (1 host up) scanned in 7.63 seconds 我本来以为是服务器之前装了 vnc server ,没关导致6010,6011,6013的端口开着,具体参考这篇文章: Linux/ubuntu server 18.04 安装远程桌面–vnc server-tightvncserver —

通过X11转发以查看服务器主机上运行的GUI图形界面应用程序(on Ubuntu Server 18.04.3 LTS)

岁酱吖の 提交于 2020-01-24 14:02:45
一、在Ubuntu机器上进行以下操作 sudo apt-get install xauth # 安装xorg sudo apt-get install xorg Next install a Window Manager: # 安装Window Manager:openbox sudo apt-get install openbox 二、在要打开图形界面的Windows本机上进行以下操作 安装ssh客户端: Putty 安装 xming 安装好后会在下图位置看到 打开PuTTY并建立从Windows到远程X客户端的ssh连接,确保在连接> SSH> X11中启用X11转发。如下所示,选中X11转发框,在显示位置输入“ localhost:0.0”,然后选择“ MIT-Magic-Cookie”设置。 There are also two settings in PuTTY that need to be changed to make X11 forwarding work. Open PuTTY as normal, filling in the IP address or DNS alias name. Before clicking OK to connect to the server, go to the connection menu in PuTTY, select

VTK works with real X, crashes with Xvfb

♀尐吖头ヾ 提交于 2020-01-24 10:11:31
问题 I'm debugging a 3rd party Python script that implements headless image processing with the VTK library. When run with a regular X window session, it works as expected, flashing a window for a split second. When run against Xvfb (virtual framebuffer in memory), it crashes. The script goes like this (fluff omitted): inname = args[0] outname = args[1] from vtk import * reader = vtkPLYReader() reader.SetFileName(inname) gf = vtkGraphicsFactory gf.SetOffScreenOnlyMode(1) gf.SetUseMesaClasses(1) if