x11

R script using X11 window only opens for a second

馋奶兔 提交于 2019-12-12 11:09:48
问题 I'm running an R script via my Linux Mint 16 command line. It contains a boxplot that I want to display in a window. So I'm using x11() function for creating that window. Here is my code: testdata <- data.frame(sample(1:1000,size=100,replace=T), row.names=NULL) colnames(testdata)<-c("data") x11() boxplot(testdata, main="Boxplot der Testdaten", horizontal=TRUE) When I run this function in Rstudio, it will open a window and show the boxplot created. But whenever I run it from the command line

XEventsQueued equivalent in xcb

主宰稳场 提交于 2019-12-12 10:14:55
问题 I have read 'Need for XEventsQueued(display, QueuedAfterReading) in XCB' but the answer specifies a function ( xcb_poll_for_queued_event ) that modifies the internal event queue. I need a function that is exactly the equivalent of XEventsQueued(display, QueuedAfterReading) . Modifying the event queue breaks the code I'm currently writing if done where XEventsQueued would be used. What is the equivalent function or block of code in xcb? 来源: https://stackoverflow.com/questions/31624732

How can I run an OpenGL application installed on a linux machine from my windows machine?

蹲街弑〆低调 提交于 2019-12-12 07:38:10
问题 In the spirit of being helpful, this is a problem I had and solved, so I will answer the question here. Problem I have: An application that has to be installed on on Redhat or SuSE enterprise. It has huge system requirements and requires OpenGL. It is part of a suite of tools that need to operate together on one machine. This application is used for a time intensive task in terms of man hours. I don't want to sit in the server room working on this application. So, the question came up... how

Using matplotlib on non-0 MPI rank causes “QXcbConnection: Could not connect to display”

本小妞迷上赌 提交于 2019-12-12 06:39:44
问题 I have written a program that uses mpi4py to do some job (making an array) in the node of rank 0 in the following code. Then it makes another array in the node of rank 1. Then I plot both the arrays. The array in node 0 is broad casted to node 1. However the code gives a bizarre error. I used the following command: mpiexec -n 2 -f mfile python mpi_test_4.py The program goes as: from mpi4py import MPI import matplotlib.pyplot as plt import numpy as np comm = MPI.COMM_WORLD rank = comm.rank x =

JNA - JVM Fatal Error - XGetInputFocus - Ubuntu

两盒软妹~` 提交于 2019-12-12 06:38:05
问题 OS: Ubuntu 16.04 JNA: 4.2.2 JDK: 1.8.0u111 I'm trying to retrieve the current focused window using JNA in a JavaFX application running on Ubuntu. To achieve my goal, I'm using X11 api, more precisely the function XGetInputFocus in that way : if (Platform.isLinux()) { System.err.println("Linux platform"); final X11 x11 = X11.INSTANCE; final XLib xlib = XLib.INSTANCE; X11.Display display = x11.XOpenDisplay(null); //X11.Window window = new X11.Window(); X11.WindowByReference winRef = new X11

Why does Node hang when using deasync with x11 events?

倾然丶 夕夏残阳落幕 提交于 2019-12-12 06:21:11
问题 I'm trying to use the node modules deasync and x11 to perform actions when certain keys are pressed. When I use deasync inside a callback that has been initiated by a keypress deasync seems to be stuck in an endless loop. It works fine if I create a generic event myself. Run the following script using xtrace to see that X11 does respond: xtrace -D :10 ./the-script #!/usr/bin/env node var deasync = require('deasync'); var x11 = require('x11'); var display = (deasync(x11.createClient)()); var

Kivy error - “Unable to get a window, abort”

≡放荡痞女 提交于 2019-12-12 03:55:45
问题 I installed kivy on my Raspberry pi3, where i run a python program that already works on another pi3. I now am trying to install the same thing on this second pi, and it doesn't work...maybe I forgot something, but i think i did all the same steps as before.. kivy is well installed indeed, as other packages for the python program. here below the error: pi@raspberrypi:~ $ python pi4.py [INFO ] [Logger ] Record log in /home/pi/.kivy/logs/kivy_17-01-19_4.txt [INFO ] [Kivy ] v1.9.2-dev0 [INFO ]

Getting information about nearest monitor to mouse cursor in X11

我是研究僧i 提交于 2019-12-12 03:44:52
问题 I need to get information such as size and coordinates about nearest monitor to the mouse cursor position in multi-monitor systems. I've done it before in Windows and I want to know how to do it in Linux X11. Using the code below I can measure the sum of whole screens size but cannot measure each monitor separately. Screen *screen = DefaultScreenOfDisplay(DisplayHandle); int xx = screen->width / 2 - Settings::WindowWidth / 2; int yy = screen->height / 2 - Settings::WindowHeight / 2; My

Dynamic Icon - Ubuntu - Nautilus

纵饮孤独 提交于 2019-12-12 03:15:27
问题 Nautilus in Ubuntu has dynamic icon, which means it changes during runtime then changes back. It changes in the Unity bar etc. for example when copying a file we see a progress icon. I was wondering how is this done? I would like to make my applications icon dynamic too, for example during a process I would like to replace my icon with another icon ( i created that has a mini image of a can in the top left corner). https://code.launchpad.net/~3v1n0/ubuntu/oneiric/nautilus/unity-launcher