| GKSu Developers Manual |
|---|
gksu-private —
struct GkConf; int prepare_xauth (); void ask_pass_ok_cb (GtkWidget *w, gpointer data); GkConf* gksu_get_conf ();
struct GkConf {
gchar *xauth;
gchar *dir;
gchar *display;
gchar *title;
gchar *message;
gchar *icon;
gchar *user;
gchar *command;
gboolean login_shell;
gboolean keep_env;
gboolean grab;
gboolean debug;
gboolean ssh_fwd;
};
Structure to hold all configuration information, some important environment variables and some meta-information about mainly x authentication.
This is the structure that holds most GKSu configuration settings but should not be accessed directly, use the getter/setter functions instead.
| gchar *xauth | the X authorization token |
| gchar *dir | |
| gchar *display | storage for the DISPLAY environment variable |
| gchar *title | the title of the window which asks for password |
| gchar *message | the label to be put at the window which asks for password |
| gchar *icon | path for the icon the window will use |
| gchar *user | user gksu will switch to |
| gchar *command | which command to run with su |
| gboolean login_shell | should run a login shell? |
| gboolean keep_env | should the current environment be kept? |
| gboolean grab | should gksu try to gra X keyboard and mouse? |
| gboolean debug | show debug information? |
| gboolean ssh_fwd | are we running inside a ssh X11 forwarding tunnel? |
int prepare_xauth ();
Sets up the variables with values for the $DISPLAY environment variable and xauth-related stuff. Also creates a temporary directory to hold a .Xauthority
| Returns : | 0 if it suceeds. |
void ask_pass_ok_cb (GtkWidget *w,
gpointer data);This function handles cases in which the default widget of the ask_pass dialog is not the one activated to 'OK' the dialog. This function will, then, emmit the GTK_RESPONSE_OK to the dialog passed on data.
| w : | activated widget |
| data : | the GtkDialog to which a response should be emitted. |
| << GKSu Hackers Internals Guide | GKSu Hackers Utility Functions Guide >> |