Startup script not working

I have a startup script:


ibus-daemon -drx

It’s simply supposed to start the ibus-daemon on boot. But it doesn’t work. The same command, when invoked manually, works properly.

It sounds like that daemon depends on another. You can very easily express this kind of dependency when you create a systemd service script. You could maybe try that.

I’m not sure how to do that.

I can’t really give you a point by point tutorial, but you can take a look at any of the .service files that your system already has, which give you an idea on how the files are structured. They are really not complicated.

Alternatively, there are good tutorials explaining the basics of service descriptions for systemd.

1 Like

Okay, so I created this systemd service file. After a little bit of debugging (had to change the type from simple to forking), it seems to work.


# this is a systemd service file for automatically starting ibus-daemon at boot

# copy this file to ~/.config/systemd/user/ and execute
# systemctl enable --now --user ibus-daemon.service

Description=IBus Daemon

ExecStart=/usr/bin/ibus-daemon -drx
ExecReload=/usr/bin/ibus restart
ExecStop=/usr/bin/ibus exit


Update: The systemd service method wasn’t working reliably. The process ibus-daemon was starting but the keyboard shortcut weren’t working. Setting the script below as a startup script turned out to be much more reliable. The sleep is required for the shortcuts to work. (I think otherwise the ibus-daemon process starts before the plasma-desktop related processes have fully started. Maybe 10 is too much, but it doesn’t really matter.)


# this is a script to start the ibus-daemon on startup
# set it up to run automatically on startup somehow

export GTK_IM_MODULE=ibus
export QT_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
sleep 10
ibus-daemon -drxR

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.