[E-devel] Entranced does not start entrance properly
Hi, I have an issue with running entranced. I have a Debian 3.1 Testing box with XOrg 7.0.0 running. I've compiled Entrance sucessfully but running entranced (either directly, or from /etc/init.d/entrace) does not start entrance itself. When I run entranced, X starts but entrance does not start within it. After this, entranced bails out, saying it cannot start the X server. However, the X server is successfully started, and it continues to run after entranced has quit. Also, If i start xinit -e entrace, entrance starts successfuly. I had already compiled entrance with -g and I tried debugging it, but I'm not a genius at that. It seems to me that before x is started the x_cmd variable is somehow corrupted. Is there any chance of that happening? How do I turn debugging on so I can see more of what's happening? What other information would you guys want? Cheers, Eugen. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Entranced does not start entrance properly
On Sun, 27 Aug 2006 14:39:45 +0300 Eugen Minciu [EMAIL PROTECTED] wrote: Sorry, I ran the debug again. It isn't corrupted. There was a \000 at the end of the string like there should have been, it was just gdb printing more data beyond that \000 The command that get executed is: /usr/X11R6/bin/X -quiet -nolisten tcp vt7 -auth /var/lib/entrance/:0.Xauth :0 Hi, I have an issue with running entranced. I have a Debian 3.1 Testing box with XOrg 7.0.0 running. I've compiled Entrance sucessfully but running entranced (either directly, or from /etc/init.d/entrace) does not start entrance itself. When I run entranced, X starts but entrance does not start within it. After this, entranced bails out, saying it cannot start the X server. However, the X server is successfully started, and it continues to run after entranced has quit. Also, If i start xinit -e entrace, entrance starts successfuly. I had already compiled entrance with -g and I tried debugging it, but I'm not a genius at that. It seems to me that before x is started the x_cmd variable is somehow corrupted. Is there any chance of that happening? How do I turn debugging on so I can see more of what's happening? What other information would you guys want? Cheers, Eugen. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Entranced does not start entrance properly
On Sun, 27 Aug 2006 14:50:24 +0300 Eugen Minciu [EMAIL PROTECTED] wrote: I found out what was causing the problem. Just like it says in the code. /* FIXME: need to parse command and NOT go thru /bin/sh */ /* why? some /bin/sh's wont pass on this SIGUSR1 thing... */ apparenty dash is one of those /bin/sh's :( Maybe it would be better if we were to check that /bin/bash exists and execute that instead of /bin/sh if it does? If that seems OK to you guys I'll write the patch in a couple of hours. On Sun, 27 Aug 2006 14:39:45 +0300 Eugen Minciu [EMAIL PROTECTED] wrote: Sorry, I ran the debug again. It isn't corrupted. There was a \000 at the end of the string like there should have been, it was just gdb printing more data beyond that \000 The command that get executed is: /usr/X11R6/bin/X -quiet -nolisten tcp vt7 -auth /var/lib/entrance/:0.Xauth :0 Hi, I have an issue with running entranced. I have a Debian 3.1 Testing box with XOrg 7.0.0 running. I've compiled Entrance sucessfully but running entranced (either directly, or from /etc/init.d/entrace) does not start entrance itself. When I run entranced, X starts but entrance does not start within it. After this, entranced bails out, saying it cannot start the X server. However, the X server is successfully started, and it continues to run after entranced has quit. Also, If i start xinit -e entrace, entrance starts successfuly. I had already compiled entrance with -g and I tried debugging it, but I'm not a genius at that. It seems to me that before x is started the x_cmd variable is somehow corrupted. Is there any chance of that happening? How do I turn debugging on so I can see more of what's happening? What other information would you guys want? Cheers, Eugen. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Entranced does not start entrance properly
Fixed it. Here's a patch that runs /bin/bash first. If that doesn't work execl should return so the next line should run after that ( execl(/bin/sh, ...) I also found the same issue when entrace starts the session. The same fix finally got everything working corectly. BTW, I'm new to this patching thing ... Should I have ran cvs diff -u in e17/apps/entrance so both files would have been inside the same diff? Cheers, Eugen. Index: entranced_display.c === RCS file: /var/cvs/e/e17/apps/entrance/src/daemon/entranced_display.c,v retrieving revision 1.2 diff -u -r1.2 entranced_display.c --- entranced_display.c 1 Aug 2006 05:30:58 - 1.2 +++ entranced_display.c 27 Aug 2006 15:50:27 - @@ -162,6 +162,10 @@ sigaction(SIGUSR1, _entrance_x_sa, NULL); /* FIXME: need to parse command and NOT go thru /bin/sh */ /* why? some /bin/sh's wont pass on this SIGUSR1 thing... */ + + /* FIXME: PARTIAL FIX: try to run /bin/bash before /bin/sh + * because /bin/bash works */ + execl(/bin/bash,/bin/bash,-c, x_cmd, NULL); execl(/bin/sh, /bin/sh, -c, x_cmd, NULL); syslog(LOG_WARNING, Could not execute X server.); exit(1); Index: entrance_session.c === RCS file: /var/cvs/e/e17/apps/entrance/src/client/entrance_session.c,v retrieving revision 1.84 diff -u -r1.84 entrance_session.c --- entrance_session.c 3 Jun 2006 07:24:49 - 1.84 +++ entrance_session.c 27 Aug 2006 16:07:16 - @@ -497,6 +497,7 @@ entrance_session_free(e); /* replace this process with a clean small one that just waits for its */ /* child to exit.. passed on the cmd-line */ + execl(/bin/bash, /bin/bash, -l, -c, buf, NULL); execl(/bin/sh, /bin/sh, -l, -c, buf, NULL); } - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Entranced does not start entrance properly
Eugen Minciu wrote: Fixed it. Here's a patch that runs /bin/bash first. If that doesn't work execl should return so the next line should run after that ( execl(/bin/sh, ...) I also found the same issue when entrace starts the session. The same fix finally got everything working corectly. BTW, I'm new to this patching thing ... Should I have ran cvs diff -u in e17/apps/entrance so both files would have been inside the same diff? Yeah, best way to submit a cvs diff is from the root of whatever module you are changing. That will pull all changes to the module. (And then check it to verify only the changes you want are being submitted.) Cheers, Eugen. -- Kevin - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Entranced does not start entrance properly
On 8/27/06, Eugen Minciu [EMAIL PROTECTED] wrote: Fixed it. Here's a patch that runs /bin/bash first. If that doesn't work execl should return so the next line should run after that ( execl(/bin/sh, ...) I also found the same issue when entrace starts the session. The same fix finally got everything working corectly. BTW, I'm new to this patching thing ... Should I have ran cvs diff -u in e17/apps/entrance so both files would have been inside the same diff? FYI I'm already changing this code to use bash in entrance in OpenEmbedded because the default shell is busybox which doesn't handle the SIGUSR1 as well. http://www.openembedded.org/repo/org.openembedded.dev/packages/e17/entrance/use-bash.patch -- Justin Patrin - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Entranced does not start entrance properly
On Sun, 27 Aug 2006 19:13:25 +0300 Eugen Minciu [EMAIL PROTECTED] babbled: Fixed it. Here's a patch that runs /bin/bash first. If that doesn't work execl should return so the next line should run after that ( execl(/bin/sh, ...) I also found the same issue when entrace starts the session. The same fix finally got everything working corectly. BTW, I'm new to this patching thing ... Should I have ran cvs diff -u in e17/apps/entrance so both files would have been inside the same diff? nice - but ugly. then you still have the problem if bash isn't installed. instead of the simple and (still broken) fix... do what the comment says - actually write code to parse a command-line - frankly for executing x you won't need anything complex. you won't even have to evaluate environment variables. for this usage just splitting into an argv array based on whitespace would work just fine. adding escape handling would be easy (\ + char == explicit char). e17 has code that even will evaluate environment variables too (e_utils.c). add in quote (single and double) handling and you have done it all - but frankly i think you will survive with whitepsace splitting. -- - Codito, ergo sum - I code, therefore I am -- The Rasterman (Carsten Haitzler)[EMAIL PROTECTED] 裸好多 Tokyo, Japan (東京 日本) - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel