summaryrefslogtreecommitdiffstats
path: root/launcher
diff options
context:
space:
mode:
authorHuang Peng <shawn.p.huang@gmail.com>2008-08-06 22:32:04 +0800
committerHuang Peng <shawn.p.huang@gmail.com>2008-08-06 22:32:04 +0800
commitbb9aab042d50a17f142120a0c00a7201f443924c (patch)
tree2e232931e770858984ede2dfb8477c8daca2c78f /launcher
parentaa9ad606487ac6730837f95c2c7e215329ac649d (diff)
downloadibus-bb9aab042d50a17f142120a0c00a7201f443924c.tar.gz
ibus-bb9aab042d50a17f142120a0c00a7201f443924c.tar.xz
ibus-bb9aab042d50a17f142120a0c00a7201f443924c.zip
Fix problem when start ibus with a window manager.
Diffstat (limited to 'launcher')
-rw-r--r--launcher/Makefile.am7
-rw-r--r--launcher/ibus.desktop.in9
-rw-r--r--launcher/ibus.in13
3 files changed, 27 insertions, 2 deletions
diff --git a/launcher/Makefile.am b/launcher/Makefile.am
index eaf3167..807f331 100644
--- a/launcher/Makefile.am
+++ b/launcher/Makefile.am
@@ -21,10 +21,13 @@
bin_SCRIPTS = ibus
-CLEANFILES = \
- $(NULL)
+desktop_DATA = ibus.desktop
+desktopdir = $(datadir)/applications
EXTRA_DIST = \
ibus.in \
+ ibus.desktop.in \
$(NULL)
+CLEANFILES = \
+ $(NULL)
diff --git a/launcher/ibus.desktop.in b/launcher/ibus.desktop.in
new file mode 100644
index 0000000..d3c5e89
--- /dev/null
+++ b/launcher/ibus.desktop.in
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=IBus
+Comment=Setup utility for IBus
+Exec=ibus
+Icon=ibus
+Terminal=false
+Type=Application
+StartupNotify=true
+Categories=Settings;
diff --git a/launcher/ibus.in b/launcher/ibus.in
index 4142b88..1257411 100644
--- a/launcher/ibus.in
+++ b/launcher/ibus.in
@@ -18,7 +18,9 @@
# License along with this program; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place, Suite 330,
# Boston, MA 02111-1307 USA
+
import os
+import os.path
import sys
import time
@@ -29,6 +31,17 @@ conf = "@prefix@/libexec/ibus-gconf"
daemon_pid = 0
+logname = os.path.expanduser("~/.ibus-error")
+os.close(0)
+os.close(1)
+os.close(2)
+try:
+ os.unlink(logname)
+except:
+ pass
+fd = os.open(logname, os.O_CREAT | os.O_WRONLY)
+os.dup2(fd, 1)
+os.dup2(fd, 2)
try:
print "start ibus-daemon"
daemon_pid = os.spawnv (os.P_NOWAIT, daemon, [daemon])