### Debian, Ubuntu, Linux Mint, etc.
- sudo apt-get install build-essential python-all python-stdeb python-gtk2 python-psutil python-twisted python-pygame python-lzma wmctrl gnupg fakeroot
+ sudo apt-get install build-essential python-all python-stdeb python-gtk2 python-psutil python-twisted python-lzma wmctrl gnupg fakeroot
./build_deb.sh
sudo dpkg -i deb_dist/torbrowser-launcher_*.deb
+Optionally you can install python-pygame if you want to play a modem sound while Tor Browser is launching.
+
### Red Hat, Fedora, CentOS, etc.
- sudo yum install python-psutil python-twisted pygame wmctrl gnupg fakeroot
+ sudo yum install python-psutil python-twisted wmctrl gnupg fakeroot
./build_rpm.sh
sudo yum install dist/torbrowser-launcher-*.rpm
+Optionally you can install pygame if you want to play a modem sound while Tor Browser is launching.
+
## Installing in Ubuntu
I've created a PPA where I'm maintaining torbrowser-launcher binaries. You can install in an Ubuntu-based distribution like this:
[DEFAULT]
Package: torbrowser-launcher
-Depends: python-gtk2, python-psutil, python-twisted, python-lzma, python-pygame, gnupg, wmctrl
+Depends: python-gtk2, python-psutil, python-twisted, python-lzma, gnupg, wmctrl
Suite: trusty
# modem sound
self.modem_checkbox = gtk.CheckButton(_("Play modem sound, because Tor is slow :]"))
self.settings_box.pack_start(self.modem_checkbox, True, True, 0)
- if self.common.settings['modem_sound']:
- self.modem_checkbox.set_active(True)
- else:
+
+ try:
+ import pygame
+ if self.common.settings['modem_sound']:
+ self.modem_checkbox.set_active(True)
+ else:
+ self.modem_checkbox.set_active(False)
+ except ImportError:
self.modem_checkbox.set_active(False)
+ self.modem_checkbox.set_sensitive(False)
+ self.modem_checkbox.set_tooltip_text(_("This option requires python-pygame to be installed"))
self.modem_checkbox.show()
# labels
# play modem sound?
if self.common.settings['modem_sound']:
- import pygame
- pygame.mixer.init()
- sound = pygame.mixer.Sound(self.common.paths['modem_sound'])
- sound.play()
- time.sleep(10)
+ try:
+ import pygame
+ pygame.mixer.init()
+ sound = pygame.mixer.Sound(self.common.paths['modem_sound'])
+ sound.play()
+ time.sleep(10)
+ except ImportError:
+ md = gtk.MessageDialog(None, gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_WARNING, gtk.BUTTONS_CLOSE, _("The python-pygame package is missing, the modem sound is unavailable."))
+ md.set_position(gtk.WIN_POS_CENTER)
+ md.run()
+ md.destroy()
+
if run_next_task:
self.run_task()