Difference between revisions of "Gajim"

From ArchWiki
Jump to navigation Jump to search
m (rm gap)
(Add gajim sleep hook.)
Line 1: Line 1:
[[Category:Internet applications]]
+
From the [http://gajim.org/index.php?lang=en project page]
[[Category:Security]]
 
'''OTR''' (off-the-record) encryption is strong end-to-end encryption protocol for instant messaging ([http://www.cypherpunks.ca/otr/ read more]). OTR hasn't any XMPP XEP, because OTR is of cross-protocol nature.
 
  
And '''Gajim''' is a powerful XMPP-client without OTR support out-of-the-box.
+
Gajim a full featured and easy to use Jabber/XMPP client
  
== Gajim >= 0.15 (or gajim-hg) ==
+
==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.
  
Since version 0.15, Gajim has powerful plugin system. The [http://trac-plugins.gajim.org/wiki/OffTheRecordPlugin gotr] plugin is used to provide OTR encryption, and it depends on ''python-potr'', the modern OTR protocol implementation written on python by Kjell Bradden.
+
Therefore create a new systemd unit gajim-suspend@.serivce in /etc/systemd/system.
  
== Installation ==
+
{{bc|<nowiki>
To install the plugin follow these simple steps:
+
[Unit]
 +
Description=Suspend Gajim
 +
Before=sleep.target
 +
StopWhenUnneeded=yes
  
# Install [https://aur.archlinux.org/packages.php?ID=56560 aur:pure-python-otr-git];
+
[Service]
# Install/update the gajim plugins from hg.
+
Type=oneshot
## To go through next steps, you need mercurial (a popular DVCS) installed: <pre>$ sudo pacman -S mercurial</pre>
+
User=%I
## Go to gajim plugins directory:<pre>$ mkdir -p ~/.local/share/gajim/plugins/; cd ~/.local/share/gajim/plugins/</pre>
+
RemainAfterExit=yes
## (at first time) Download all plugins: <pre>$ hg clone http://hg.gajim.org/gajim-plugins/ .</pre>
+
Environment=DISPLAY=:0
## (at next times) Update plugins to newer versions: <pre>$ hg pull; hg up; rm -f */*.pyo</pre>
+
ExecStart=-/usr/bin/bash -c ". /home/%I/.dbus/session-bus/$(</var/lib/dbus/machine-id)-0 && /usr/bin/gajim-remote change_status offline"
# [Re]Start gajim;
+
ExecStop=/usr/bin/bash -c ". /home/%I/.dbus/session-bus/$(</var/lib/dbus/machine-id)-0 && /usr/bin/gajim-remote change_status online"
  
== Configuration ==
+
[Install]
At first time, you also need to activate OTR plugin:
+
WantedBy=sleep.target
# Go to menu Edit => Modules;
+
</nowiki>}}
# Activate the "Off-the-record encryption" plugin;
 
# Click on plugin settings button;
 
# Generate your OTR key using "Generate key";
 
# Take a look on other settings;
 
# Close dialogs to save the changes.
 
  
== Troubleshooting ==
+
Then enable it with {{ic|systemctl enable gajim@<USER>}}, where {{ic|USER}} is the login name.
 
 
'''Q''': "Off-the-record encryption" is not shown in ''Modules''.
 
 
 
'''A''': Be sure, that ''~/.local/share/gajim/plugins/gotr/'' is not empty and '''python-potr''' installed on latest version.
 
 
 
'''Q''': There are no ''Modules'' item in gajim menu.
 
 
 
'''A''': Go to Help => About. The gajim version should be 0.15 or something like 0.14.0.1-b9cb32f5badd, where "b9cb32f5badd" is any commit id, if gajim-hg is used. If not, update gajim as said earlier.
 

Revision as of 08:14, 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.