Re: [gdm-list] Running a gtk application at GDM login screen




Renju:

How are you trying to run the application?  There are two ways I
know of that you can do this.

You can run programs by launching them in the GDM Init script
(/etc/gdm/Init/Default).  The Init script blocks, so if you launch
your GUI this way, the login GUI won't show up until your program
exits.  This can be desirable in some cases like if you want to
present the user with a click-through agreement before presenting
the login GUI.  You can get programs started in the Init script to
run at the same time as the login GUI if you run them in the background
by putting a "&" at the end of the command.

But, if you want the program to run while the login GUI is running,
then it might make more sense to add a desktop file in the following
directory:

  /usr/share/gdm/autostart/LoginWindow

Programs that are started this way are launched by the gnome-session
process that is running as the "gdm" user while the login GUI is being
shown.  In fact, this mechanism is used to run the login GUI itself.

Brian

I'm trying to run a gtk based application which does some monitor
resolution configuration based on the no of outputs( monitors )
connected to my machine. The application runs when the network brings up
and during this time user may be at login screen or in a session. When
user is in a session it works fine, however if we are at gdm login
screen, this fails to open the display. I'm using the APIs like
gtk_init(), gdk_screen_get_default() etc.. in my application. Even i set
the DISPLAY using setenv, it doesn't work ( setenv( DISPLAY, ":0", 1).
The gdm version i'm using is gdm-2.24.0.

Could anyone help me to figure out why it fails to open display at gdm
login screen

Thanks,
-Renju



_______________________________________________
gdm-list mailing list
gdm-list gnome org
http://mail.gnome.org/mailman/listinfo/gdm-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]