Hi,
I have a program that runs on Ubuntu (various versions and Debian Squeeze) and also on another installation SuSE 12.1 64 (miles away) but not here on SuSE 12.1 64. The program needs to run as root to access USB ports.
Initially the program failed when trying to open X display so I wrote a very simple piece of code:
#include <stdio.h>
#include<X11/Xlib.h>
int main()
{
Display *d;
if ((d = XOpenDisplay(NULL)) == NULL)
{
printf ("Error trying to open XDisplay\n");
return 1;
}
printf("XOpenDisplay(NULL) = %p\n",d);
return 0;
}
Searching pointed me at using YaST to change Security settings to allow remote access to X Server and now the above code returns a pointer when run as user but not when run using sudo.
I think it is some security issue but I haven't found what as yet so I'd appreciate any help.
TIA
David


Reply With Quote



Bookmarks