> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] 
> Sent: Saturday, September 13, 2003 07:09
> To: [EMAIL PROTECTED]
> Subject: E CVS: apps/entrance jeoparde
> 
> Enlightenment CVS committal
> 
> Author  : jeoparde
> Project : e17
> Module  : apps/entrance
> 
> Dir     : e17/apps/entrance/src/client
> 
> Modified Files:
>       entrance_session.c 
> 
> Log Message:
> Please discuss.
> 
> My personal ruling is that whatever goes with the majority of 
> distros, with the condition of working under Mandrake Linux 

Based on the fact that RH 7.3 does not have /etc/x11/Xsession,
I would say that assumption is not accurate (I have no RH8 or 
RH9 to check with so I do not know whether they do or not).

> (personal prerogative), stays in CVS. Power users can always 
> modify source code with a couple of pointers in the README, 
> or eventually we'll just modify configure to do the right thing.

How about just stat()-ing the files to see whether /etc/X11/Xsession
or /etc/X11/xdm/Xsession exists?

        struct stat statbuf;

        if (stat("/etc/X11/Xsession", &statbuf) >= 0)
            strcpy(buf, "/etc/X11/Xsession");
      else if (stat("/etc/X11/xdm/Xsession", &statbuf) >= 0)
            strcpy(buf, "/etc/X11/xdm/Xsession");
        else
            return -1; /* Or whatever happens in case of failure */

        if ((session_key = (char*)evas_hash_find(e->config->sessions,
e->session)))
            snprintf(buf + strlen(buf), PATH_MAX - strlen(buf), " %s",
session_key);

//Peter

> ===================================================================
> RCS file: 
> /cvsroot/enlightenment/e17/apps/entrance/src/client/entrance_s
> ession.c,v
> retrieving revision 1.10
> retrieving revision 1.11
> diff -u -3 -r1.10 -r1.11
> --- entrance_session.c        11 Sep 2003 14:40:40 -0000      1.10
> +++ entrance_session.c        13 Sep 2003 05:08:52 -0000      1.11
> @@ -120,10 +120,13 @@
>     
>     entrance_auth_setup_environment(e->auth);
>  
> +   /* Assumption is that most common distributions have Xsession in
> +     * /etc/X11. A notable exception is Gentoo, but there is a
customized
> +     * ebuild for this distribution. Please comment. */
>     if((session_key = (char*)evas_hash_find(e->config->sessions,
e->session)))
> -       snprintf(buf, PATH_MAX, "/etc/X11/xdm/Xsession %s",
session_key);
> +       snprintf(buf, PATH_MAX, "/etc/X11/Xsession %s", session_key);
>     else
> -       snprintf(buf, PATH_MAX, "/etc/X11/xdm/Xsession");     /*
Default session */
> +       snprintf(buf, PATH_MAX, "/etc/X11/Xsession"); /* Default
session */
>     /* If a path was specified for the session, use that path instead
of
>        passing the session name to Xsession */


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
enlightenment-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to