Difference between revisions of "Gajim"

From ArchWiki
Jump to navigation Jump to search
(Add gajim sleep hook.)
(stub)
Line 1: Line 1:
 +
{{Stub}}
 
From the [http://gajim.org/index.php?lang=en project page]
 
From the [http://gajim.org/index.php?lang=en project page]
  

Revision as of 19:38, 15 March 2015

From the project page

Gajim a full featured and easy to use Jabber/XMPP client

Auto logout on suspend

If you suspend your computer gajim stay connected for about 15 minutes. To prevent message loss, it is needed to set your status offline before suspending or hibernating. The status message won't be changed.

Therefore create a new systemd unit gajim-suspend@.serivce in /etc/systemd/system.

[Unit]
Description=Suspend Gajim
Before=sleep.target
StopWhenUnneeded=yes

[Service]
Type=oneshot
User=%I
RemainAfterExit=yes
Environment=DISPLAY=:0
ExecStart=-/usr/bin/bash -c ". /home/%I/.dbus/session-bus/$(</var/lib/dbus/machine-id)-0 && /usr/bin/gajim-remote change_status offline"
ExecStop=/usr/bin/bash -c ". /home/%I/.dbus/session-bus/$(</var/lib/dbus/machine-id)-0 && /usr/bin/gajim-remote change_status online"

[Install]
WantedBy=sleep.target

Then enable it with systemctl enable gajim@<USER>, where USER is the login name.