menu: modified SDB shell command 66/27866/3
authorGiWoong Kim <giwoong.kim@samsung.com>
Sat, 20 Sep 2014 03:02:50 +0000 (12:02 +0900)
committerGiWoong Kim <giwoong.kim@samsung.com>
Sun, 28 Sep 2014 01:19:25 +0000 (10:19 +0900)
To close a factory gnome-terminal after the SDB session period,
suicide command should be reserved by host shell on Ubuntu.

Change-Id: I090e64733834fd7a95b060fb7ebb1219ec34e950
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkin.java

index ca29027..a5fecc4 100755 (executable)
@@ -1806,12 +1806,20 @@ public class EmulatorSkin {
                                                        "-s", "emulator-" + portSdb, "shell");
                                } else if (SwtUtil.isMacPlatform()) {
                                        procSdb.command("./sdbscript", "emulator-" + portSdb);
-                                       /* procSdb.command( "/usr/X11/bin/uxterm", "-T",
-                                                       "emulator-" + portSdb, "-e", sdbPath,"shell"); */
+                                       /*
+                                        * procSdb.command( "/usr/X11/bin/uxterm", "-T", "emulator-"
+                                        * + portSdb, "-e", sdbPath, "shell");
+                                        */
                                } else { /* Linux */
-                                       procSdb.command("/usr/bin/gnome-terminal",
-                                                       "--title=" + SkinUtil.makeEmulatorName(config),
-                                                       "-x", sdbPath, "-s", "emulator-" + portSdb, "shell");
+                                       String sdbCmd = sdbPath + " -s" + " emulator-" + portSdb + " shell";
+
+                                       /* Work Around :
+                                        * To close a factory gnome-terminal(first instance) after the SDB session
+                                        * period, suicide command should be reserved by host shell on Ubuntu.
+                                        */
+                                       procSdb.command("/usr/bin/gnome-terminal", "--disable-factory",
+                                                       "--title=" + SkinUtil.makeEmulatorName(config), "-x",
+                                                       "bash", "-c", sdbCmd + "; kill -9 `ps -p $$ -o ppid=`");
                                }
 
                                logger.info(procSdb.command().toString());