diff --git a/Makefile.am b/Makefile.am
index 9c4679c029db0617754a7e8877222e24acf20a74..1fea897ab0dbaae3030adbacbfaabc9ed0c9d469 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -8,7 +8,7 @@ else
 OPTIONAL_BIN =
 endif
 
-bin_SCRIPTS = scripts/gajim $(OPTIONAL_BIN)
+bin_SCRIPTS = scripts/gajim scripts/gajim-history-manager $(OPTIONAL_BIN)
 
 
 docfilesdir = $(docdir)
@@ -29,14 +29,16 @@ EXTRA_DIST = \
 	gajim.nsi \
 	setup_win32.py \
 	scripts/gajim.in	\
-	scripts/gajim-remote.in
+	scripts/gajim-remote.in	\
+	scripts/gajim-history-manager.in
 	
 DISTCLEANFILES = 		\
 	intltool-extract 	\
 	intltool-merge 		\
 	intltool-update		\
 	scripts/gajim		\
-	scripts/gajim-remote
+	scripts/gajim-remote	\
+	scripts/gajim-histrory-manager
 
 MAINTAINERCLEANFILES = \
 	configure \
diff --git a/configure.ac b/configure.ac
index b38199934123d6a1b8c8c95bbb9fd7c083264cd3..79bcf76c211fc41465acd2f9b51a9ac8885fa6ed 100644
--- a/configure.ac
+++ b/configure.ac
@@ -201,6 +201,7 @@ AC_CONFIG_FILES([
 	src/osx/syncmenu/Makefile
 	scripts/gajim
 	scripts/gajim-remote
+	scripts/gajim-history-manager
 	po/Makefile.in
 ])
 AC_OUTPUT
diff --git a/src/gajim-remote.py b/src/gajim-remote.py
index e373a79257896aac0dba1ba1e4d7895e916fa5f3..c914362dc342704089c9e2a802ea144851d079ca 100755
--- a/src/gajim-remote.py
+++ b/src/gajim-remote.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 # -*- coding:utf-8 -*-
 ## src/gajim-remote.py
 ##
diff --git a/src/gajim.py b/src/gajim.py
index 08ed00a92950ea1b216a530772205b8112845a5c..306a38210c6fd292f1b65954c707398f75c9192a 100755
--- a/src/gajim.py
+++ b/src/gajim.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 # -*- coding:utf-8 -*-
 ## src/gajim.py
 ##
diff --git a/src/history_manager.py b/src/history_manager.py
index d934a1485613d965d1c861334f60356cd1de1ee9..9b68372a72cee8b3a69e0e7fd3777c6813562017 100755
--- a/src/history_manager.py
+++ b/src/history_manager.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 # -*- coding:utf-8 -*-
 ## src/history_manager.py
 ##