Suto Attila
unread,Jul 27, 2011, 10:43:56 AM7/27/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to xdotool-users
Hi all, I wrote a program in C using xdotool. The program gets the
active window properties(title, class, etc). I need to run this in
Ubuntu at startup in background and I wrote a script to start the
program. If i run the script after startup, it's running well, but at
startup fails with "Error: Couldn't open display (null) ". The error
is from where the program calls XInternAtom function. I tried to put
the script in /etc/init.d/ and /etc/X11/Xsession.d/, but it fails in
both cases.
char* get_window_prop(unsigned char** title, unsigned char**
machine...)
{
xdo_t* xdo=xdo_new(NULL);
Atom atom= XInternAtom(xdo->xdpy,"WM_NAME",True);
.......
Can somebody tell me how to make this work at startup?
Thank you