Re: Display option in multiscreen (session management)



JAYARAJ P R wrote:

Hi,

This is in continuation of the discussion at

http://mail.gnome.org/archives/desktop-devel-list/2002-April/msg00139.html

After following the discussion, here is a brief alogorithm of what
we plan to implement for session-management to work in a multiscreen
environment.

1. All GNOME applications need to do the following in their save_session
routine.

a)get the DISPLAY environment variable using getenv ("DISPLAY")
b)call gnome_client_set_environment (client, "DISPLAY", DISPLAY)

NOTE: Currently, there is a bug in gnome_client_set_environment(), that it
stores only the name of the environment variable and not its value in the
~/gnome2/session file. This has been logged as bug #79861 and a patch is
attached against it.

2. If the application is invoked with the --display argument and it uses
gtk_init(), then we need to do a setenv (DISPLAY, ":<display num>.<screen
num>")
before the call to gtk_init(), since gtk_init() seems to strip off
the --display
argument. The --display argument takes precedence over the DISPLAY
environment
variable.

Please give your thoughts/comments on the above.
Would the gdk_get_display() routine be usable for this? This should get round having to check if --display was passed.

James.

--
Email: james daa com au
WWW:   http://www.daa.com.au/~james/







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