Enlightenment CVS committal
Author : xcomputerman
Project : e17
Module : apps/entrance
Dir : e17/apps/entrance/src/daemon
Modified Files:
auth.c spawner.c
Log Message:
Do not set display environment variable until before the session is
launched. This should fix the issue with Xnest not displaying.
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/daemon/auth.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- auth.c 24 Apr 2004 03:34:16 -0000 1.9
+++ auth.c 1 May 2004 20:44:52 -0000 1.10
@@ -233,7 +233,7 @@
entranced_auth_display_secure (Entranced_Display *d)
{
FILE *auth_file;
-/* FILE *host_file; */
+ FILE *host_file;
char buf[PATH_MAX];
char hostname[1024];
@@ -285,7 +285,6 @@
fclose(auth_file);
setenv("XAUTHORITY", d->authfile, TRUE);
-#if 0
/* Write host access file */
snprintf(buf, PATH_MAX, "/etc/X%d.hosts", d->dispnum);
if (!(host_file = fopen(buf, "w")))
@@ -295,7 +294,6 @@
}
fprintf(host_file, "%s\n", d->hostname);
fclose(host_file);
-#endif
entranced_debug("entranced_auth_display_secure: Successfully set up access for %s
(localhost)\n", d->name);
return TRUE;
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/daemon/spawner.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- spawner.c 19 Apr 2004 05:15:50 -0000 1.15
+++ spawner.c 1 May 2004 20:44:52 -0000 1.16
@@ -126,11 +126,6 @@
x_ready = 0;
- /* Set display name */
- if (d->name)
- free(d->name);
- d->name = strdup(getenv("DISPLAY"));
-
/* Create server auth cookie */
if (!entranced_auth_display_secure(d))
{
@@ -139,7 +134,8 @@
}
snprintf(x_cmd, PATH_MAX, "%s -auth %s %s", X_SERVER, d->authfile, d->name);
-
+ entranced_debug("Entranced_Start_Server_Once: Executing %s\n", x_cmd);
+
/* x_exe = ecore_exe_run(d->xprog, d); */
switch (xpid = fork())
{
@@ -165,7 +161,10 @@
}
if (!x_ready)
+ {
+ entranced_debug("Entranced_Start_Server_Once: Attempt to start X server
failed.\n");
d->status = NOT_RUNNING;
+ }
else
d->status = RUNNING;
@@ -380,7 +379,6 @@
int nodaemon = 0; /* TODO: Config-ize this variable */
Entranced_Display *d;
char *str = NULL;
- char *disp = NULL;
struct option d_opt[] = {
{"config", 1, 0, 'c'},
{"display", 1, 0, 'd'},
@@ -395,7 +393,6 @@
ecore_init();
ecore_app_args_set(argc, (const char **) argv);
- putenv("DISPLAY"); /* Not sure why this is here :) */
openlog("entranced", LOG_NOWAIT, LOG_DAEMON);
/* Set up a spawner context */
@@ -415,7 +412,6 @@
break;
case 'd':
d->name = strdup(optarg);
- setenv("DISPLAY", optarg, 1);
break;
case 'n':
nodaemon = 1;
@@ -447,14 +443,12 @@
}
}
- /* TODO: Config-ize this */
- if (!getenv("DISPLAY"))
- setenv("DISPLAY", X_DISP, 1);
+ if (!d->name)
+ d->name = strdup(X_DISP);
- disp = getenv("DISPLAY");
- str = strstr(disp, ":");
+ str = strstr(d->name, ":");
- if(!str || str >= (disp + strlen(disp) - 1))
+ if(!str || str >= (d->name + strlen(d->name) - 1))
d->dispnum = 0;
else
d->dispnum = atoi(str + 1);
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs