I have written small snippet as follows:
$ cat one.c
gtk_init( NULL, NULL );
GtkWidget *main_window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
compiling as follows:
pkg-config --cflags gtk+-3.0 --libs
If I run as ./a.out I am seeing the window
But if I run as sudo ./a.out it is not displaying the window.
Surprisingly this was the issue since yesterday. This was working since years.
same is the issue with gedit. If I run gedit it is fine with normal user.
But if I run as sudo gedit nothing is showing up…!!!
Can some one help me how to fix this?