Phuah Yee Keat wrote:
Hi,
Attached is a patch that puts the X_SERVER configuration inside
entrance_config.cfg, so that I can configure it to add "-dpi 96", or
remove the "-nolisten tcp" parameter.
I originally attemped to load the conf file using entrance_config.c, but
it proved to have too much dependancies on other modules like
entrance_user.c and entrance_x_session.c and EDJE_LIBS etc...
Cheers,
Phuah Yee Keat
Is ecore_config_shutdown missing?
------------------------------------------------------------------------
? entrance_xprog.patch
? doc/html
? doc/latex
? doc/man
Index: data/config/build_config.sh.in
===================================================================
RCS file:
/cvsroot/enlightenment/e17/apps/entrance/data/config/build_config.sh.in,v
retrieving revision 1.11
diff -u -r1.11 build_config.sh.in
--- data/config/build_config.sh.in 8 Nov 2005 23:06:17 -0000 1.11
+++ data/config/build_config.sh.in 9 Dec 2005 04:25:35 -0000
@@ -48,3 +48,7 @@
ecore_config $DB set /entrance/autologin/mode int 0
#ecore_config $DB set /entrance/autologin/user str "user1"
ecore_config $DB set /entrance/presel/mode int 1
+
+# for Entranced
+ecore_config $DB set /entrance/daemon/xserver str "/usr/X11R6/bin/X -quiet
-nolisten tcp"
+ecore_config $DB set /entrance/daemon/attempts int 5
Index: src/daemon/Entranced.h
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/daemon/Entranced.h,v
retrieving revision 1.9
diff -u -r1.9 Entranced.h
--- src/daemon/Entranced.h 11 Oct 2005 23:43:22 -0000 1.9
+++ src/daemon/Entranced.h 9 Dec 2005 04:25:46 -0000
@@ -19,7 +19,7 @@
#define ENTRANCED_DEBUG 1
-#define X_SERVER "/usr/X11R6/bin/X -quiet -nolisten tcp"
+#define DEFAULT_X_SERVER "/usr/X11R6/bin/X -quiet -nolisten tcp"
//#define X_SERVER "/usr/X11R6/bin/Xnest -full"
#define X_DISP ":0" /* only used if DISPLAY variable is NOT set */
#define ENTRANCE PREFIX "/bin/entrance_wrapper"
Index: src/daemon/spawner.c
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/daemon/spawner.c,v
retrieving revision 1.25
diff -u -r1.25 spawner.c
--- src/daemon/spawner.c 28 May 2005 09:31:14 -0000 1.25
+++ src/daemon/spawner.c 9 Dec 2005 04:25:47 -0000
@@ -1,4 +1,5 @@
#include <Ecore.h>
+#include <Ecore_Config.h>
#include "Entranced.h"
#include "auth.h"
#include "util.h"
@@ -74,9 +75,15 @@
Entranced_Display *d;
d = calloc(1, sizeof(Entranced_Display));
- /* TODO: Config-ize these parameters */
- d->xprog = strdup(X_SERVER);
- d->attempts = 5;
+
+ ecore_config_string_default("/entrance/daemon/xserver", DEFAULT_X_SERVER);
+ ecore_config_int_default("/entrance/daemon/attempts", 5);
+
+ ecore_config_file_load(PACKAGE_CFG_DIR "/entrance_config.cfg");
+
+ d->xprog = ecore_config_string_get("/entrance/daemon/xserver");
+ d->attempts = ecore_config_int_get("/entrance/daemon/attempts");
+
d->status = NOT_RUNNING;
d->auth_en = 1;
d->auths = ecore_list_new();
@@ -134,11 +141,11 @@
return -1;
}
- snprintf(x_cmd, PATH_MAX, "%s -auth %s %s", X_SERVER, d->authfile, d->name);
+ snprintf(x_cmd, PATH_MAX, "%s -auth %s %s", d->xprog, d->authfile,
d->name);
}
else
{
- snprintf(x_cmd, PATH_MAX, "%s %s", X_SERVER, d->name);
+ snprintf(x_cmd, PATH_MAX, "%s %s", d->xprog, d->name);
}
entranced_debug("Entranced_Start_Server_Once: Executing %s\n", x_cmd);
@@ -397,6 +404,11 @@
/* Initialize Ecore */
ecore_init();
+ if (ecore_config_init("entrance") != ECORE_CONFIG_ERR_SUCC)
+ {
+ ecore_shutdown();
+ return -1;
+ }
ecore_app_args_set(argc, (const char **) argv);
openlog("entranced", LOG_NOWAIT, LOG_DAEMON);
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel