Programming :: Invoke A ButtonPress Event Using XLib?

Nov 17, 2010

I'm working on an application which generates random shapes when clicking on a window. I designed the window using Motif. I want to invoke the ButtonPress Event .

View 1 Replies


ADVERTISEMENT

OpenSUSE :: Xlib: Extension "Generic Event Extension" Missing On Display <my_ip>

Dec 28, 2009

After upgrading to 11.2, I get the following error when starting any xclient. Worse, its usually repeated a few times for each client.

Xlib: extension "Generic Event Extension" missing on display <my_ip>

I get this both when using Xming and nomachine.

View 2 Replies View Related

Ubuntu :: Can't Find Xlib.h - Fatal Error: Xlib.h: No Such File Or Directory

Jun 12, 2011

I'm trying to build a program called Obpager, but I'm getting an error saying I don't have xlib.h. From what I understand, that file is included in libx11-dev, which I have installed. Any idea?

Code:

dagoss@MAGIC-PORT:~/Downloads/obpager-1.8$ make
Compiling src/main.cc
In file included from src/main.cc:33:0:

[code]....

View 2 Replies View Related

Programming :: Invoke Methods Via Ssh On Servers From CSV?

Jan 14, 2011

I have to execute certain commands (like shutdown Tomcat) on several servers so I'm using a loop and ssh. I put the server's IP on a CSV file which I parse, execute the commands for each line and send the output to a file. The problem is that after processing one line the program stops execution. I wonder if someone could lend me a hand with this, I'm new in bash scripting and I ran out of ideas.

The CSV (servers.csv) file looks like this:

Code:

192.168.254.5:Server 1
192.168.254.6:Server 2
...

And the script looks like this:

Code:

#!/bin/bash
while IFS=: read ip name
do
sshpass -p "pass" ssh -o "StrictHostKeyChecking no" root@"$ip" 'sh <CATALINA_BASE>/bin/shutdown.sh' >> output.log
done < servers.csv

View 1 Replies View Related

Programming :: Invoke The Calculator In Bash Script?

May 16, 2010

My main problem right now is doing floating point arithmetic within a bash script, with variables.Right now I have a folder called "myExamples" with a script called "run_example" that runs with no issues.I plan to(1) create many folders inside [myExamples], that are named [example10] [example11]...each containing an identical copy of (run_example),(2) modify Line 172 of each copy of (run_example)...in one copy, it would be 3.00, the next copy would have 3.05, etc. (This part doesn't work!)How can I use the available calculator bc code to do floating point operationsMy code is below -

#!/bin/sh
# run from directory where this script is
cd `echo $0 | sed 's/(.*)/.*/1/'` # extract pathname

[code]....

View 1 Replies View Related

Programming :: Invoke Cairo Functions From Glade?

Feb 12, 2011

I have created a glade file which so far have two regions in it:

1) On the right division is a toggle button which calls a C script when enabled.

2) I have a drawing area, in which I would like to plot a point (X-Y scatter plot). The plot should be generated dynamically using a C script. I am not sure how the integration between the two is possible for a drawing area.

In glade what properties of drawing area should I set? eg.expose event, realize etc. I was thinking of using cairo for generating the plot.

View 2 Replies View Related

Programming :: Not Able To Invoke Variable Values / Sort It?

May 5, 2010

I am trying to import variable values from a profile file to a perl program.
I am using the below command for doing it.

Quote:

system (". /opt/bbfb/bin/setbbfbenv $codeset");

the above command does make variable values available to the running perl program..
Can some one help me on this front..

View 1 Replies View Related

Programming :: Can't Invoke A Command From Within Shell Script / Sort It?

May 17, 2010

When I try to invoke 'source' command from within a shell script, namely, myscript.sh, I get the following error message code...

View 1 Replies View Related

Programming :: Can't Get Xlib Window To Display / What To Do?

Mar 12, 2009

I am having trouble writing an Xlib application that displays a window. The most frustrating thing is that I've written applications like this before, and never had any problems. For some reason I cannot get this program to work properly. I'm running KDE and when I launch the program, a "button" for the application will appear on the application panel, however, no window will display. It is possible to right click on the panel button and select the Close item which will successfully close the window.

The following is source code that when built will exhibit the behaviour described above code...

View 10 Replies View Related

Programming :: Use QPainter Over An Xlib Window?

Jan 15, 2011

Suppose i have an XID of a window. How can i wrap QPainter to draw on this window? I need something like cairo_xlib_surface_create(), but Qt-based.

View 3 Replies View Related

Programming :: Implementing Scrollbar Using Xlib ?

Oct 17, 2010

I am working on xlib project to develop text editor without using help from any of toolkit/widgets.I get stuck in scrollbar.I have no idea how they work and developed.It become more difficult as I am using low-level C library - xlib.

View 1 Replies View Related

Programming :: Mouse Click C++ XLIB

Mar 3, 2009

The code below seems to do a right mouse click (firefox 2.0.0.7) IF I pass it 3, but I cant get it to do a left mouse click?

View 4 Replies View Related

Programming :: Difference Between Xlib And OpenGL?

Dec 6, 2008

I am starting to learn Linux graphical programming. Most of codes in my hands were written based on xlib, which is a kind of old graphic lib. I see some developers more interested in openGL. Then what's the difference between xlib and openGL? And which one is more popular used in which industry area?

View 2 Replies View Related

Programming :: Get String Width In Pixels In Xlib?

Aug 3, 2009

I'm trying to get the width of a string in pixels this way:

Display *disp;
int len;
disp = XOpenDisplay(0);
font = XLoadQueryFont(disp, desc );

[code]....

I'm getting negative numbers as the the pixel length, eg -7275

View 3 Replies View Related

Programming :: Read The State By Using _NET_WM_STATE In Xlib?

Oct 8, 2010

i want to get the state of a particular window by using the _NET_WM_STATE atom. i dont know how to use it with XGetProperty.

View 6 Replies View Related

Programming :: Xlib - C Programming - Get Value From Pixel

Dec 11, 2009

I'm making a game with the xlib library. What I want to do is to know if the character is standing on a trap or something else.

So far I've solved that using the coordinates but when I draw circles or stuff not shaped like a rectangle it gets to hard to make the game exact.

So what I'm asking for is if there is some kind of function in the xlib that tells you which color a pixel has. Because then it'd be much easier.

I've searched but I haven't been able to find anything good. I found XGetPixel() but that appears to work only with images, maybe I can make my window to be an "image"?

View 7 Replies View Related

Programming :: Use Colors In Xlib Programming ?

Apr 27, 2010

I'm trying to understand how to use colors in Xlib programming. What I think I understand so far is that modern displays use 24 or 32-bit TrueColor. And TrueColor uses three colormaps, one for each primary color, and a single pixel value is composed of three indices.

Now the part i'm confused about is how to get my programs to use a 32-bit TrueColor visual. I thought I could inheret the visual from the root window to get color but it seems no matter what pixel value I use it's either black or white.

I guess my question is, how can I setup my programs so that I can specify a pixel value that is a combination of RGB values to get the color I want?

I come from windows where I simply used RGB(r,g,b) macro to specify colors and never had to worry about depth and colormaps and visuals, so I'm a bit overwhelmed by all of these concepts.

View 1 Replies View Related

Programming :: Xlib Documentation With GUI Programming?

Dec 14, 2008

I want to do some experimentation with GUI programming. What mostly interests me is how the toolkits actually work (what are the drawing mechanisms, how it communicates with X, etc.) and how the window managers work. I know it's quite a lot but I don't plan on developing the next best DE/Toolkit/Window Manager, just to play with API, mostly to learn. It seems that there is a shortage of documentation on this topics, I'm trying to find anything for 2 days now with no result.

View 7 Replies View Related

Programming :: Xlib C Program Doesnt Work Every Time

Jul 24, 2010

I tried to draw two lines with xlib.h in C. If I start this compiled program it show me in most cases a window with two lines as it should be.

But sometimes the two lines are not drawn.If I insert XFlush() before the second XSync() it worked better but not every time.Why?How can I solve the problem?How works the X-Server buffer in detail?

Code:

View 1 Replies View Related

Programming :: Invoke Java From Bash Terminal Via Shell Script Fails Under Mint Debian / Fix It?

Feb 16, 2011

I am running a Java application on the command line bash terminal under Mint Debian. I have JDK1.6.0_22 installed 64-bit, and the OS is 64-bit too. I have a few JAR files in the directory and a few native LWJGL libraries. When I run the application using the command line, all works fine.
Lets assume my directory where the files are is called /home/riz/MyGame. I change to that directory and this is the command I use code...

View 3 Replies View Related

Programming :: Mq_notify Not Notifying About An Event

Nov 30, 2010

I'm using mq_notify to be notified about events on a message queue. But my registered notifier function is not being called. I'm pasting my code snippet below:

[Code]....

View 4 Replies View Related

Programming :: Event When Network Interface Goes Down?

Jul 13, 2010

I am trying to write an app that will perform some actions when a network interface is unplugged. Is there a way to get the OS to signal me when a network interface is unplugged. I have looked at DBus but can't figure it out.

View 1 Replies View Related

Programming :: Event Device Nodes And Xorg?

Oct 14, 2010

When i create a new event device (/dev/input/event) it is automatically grabbed by Xorg:

Code:
(II) config/udev: Adding input device Keypad Emulation Driver (/dev/input/event7)
(**) Keypad Emulation Driver: Applying InputClass "evdev keyboard catchall"

[code]....

View 1 Replies View Related

Programming :: Detect A Keypress Event In A Console Session?

Oct 27, 2010

Is any way to detect a keypress event in a console session? Preferebly without needing the application to be running in the foreground

View 2 Replies View Related

Programming :: Add Time Of Occurrence For Mouse Event In Xinput?

Jan 24, 2011

i need to have the time of occurence for mouse event in xinput,right now i run

Code:
xinput test <device_id> >log.txt
(for finding device_id using xinput list)

[code]...

View 4 Replies View Related

Programming :: Java Applets - Mouse Dragging Event

Jan 4, 2010

I know how to deal with a mouse click event like so:

Code:

But was happens when I am dealing with mouse dragging? Will my implementation of mouseDragged() get called for every pixel moved? So I just getX() and getY() like with a mouse click?

Also, in order to know when mouse dragging stops and starts, do I also have to put code in mousePressed and mouseReleased?

View 1 Replies View Related

Programming :: Run A Script On Switch-user Event Ubuntu 9.10?

Feb 18, 2010

How to do so? For starters, I'm not sure there is such an event. Maybe it has something to do with the OS moving through certain run-levels

View 6 Replies View Related

Programming :: Using Perl To Update Mysql Table On Certain Event?

Feb 6, 2011

I'd like to use a perl script to update a fields in mysql database when pianobar (command line pandora radio player) starts a new song. Pianobar has the ability to run a script based on events, I'd like to take advantage of and use perl toparse the artist,song,album and update the corresponding fields. Then later retrieve them and display them with php/html. I am by no means proficient with perl. I started to use bash, but it looks like perl will be much more efficient and and less time consuming.

Code:
#! /usr/bin/perl -wT
use strict;

[code]...

View 2 Replies View Related

Programming :: Invoke The Calculator "bc" In Bash Script For Floating Point Arithmetic?

May 15, 2010

My main problem right now is doing floating point arithmetic within a bash script, with variables.Right now I have a folder called "myExamples" with a script called "run_example" that runs with no issues.I plan to(1) create many folders inside [myExamples], that are named [example10] [example11]...each containing an identical copy of (run_example),(2) modify Line 172 of each copy of (run_example)...in one copy, it would be 3.00, the next copy would have 3.05, etc. (This part doesn't work!)How can use the available calculator bc code to do floating point operations?My code is below -

#!/bin/sh
# run from directory where this script is
cd `echo $0 | sed 's/(.*)/.*/1/'` # extract pathname

[code]...

View 2 Replies View Related

Programming :: Python And Curses : Unable To Getch() For A Curses.KEY Event

Nov 8, 2010

When I getch() a key event (UP arrow key), the getch() function return a string of characters that I cannot compare with curses.KEY_UP constant. Here is the code I use :

while True:
w = gb.scrn.getch()
c = chr(w)
otp = 'touche:'+str(w)+' '+str(c)+"

[Code]...

It seems like getch() return three distincts bytes while I would retrieve it with a single ord() instruction in python like describes in curses/python documentation.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved