If you are experiencing this problem, it appears to be due to a bug specific to the VDPAU driver. Unfortunately, VLC gives no obvious error to indicate the snapshot was not taken (if it works, you should see a message briefly showing where the image was saved to). The work around is to simply change the video decoder method. Go to Tools -> Preferences, then select Input / Codecs at the top of the dialog, and change the setting for Hardware-accelerated decoding from Automatic or VDPAU video decoder to VA-API video decoder via X11 (or DRM).
https://askubuntu.com/questions/769585/vlc-cant-take-snapshots-anymore-due-to-corrupt-vdpau-video-surface-error
Showing posts with label Debian. Show all posts
Showing posts with label Debian. Show all posts
Monday, July 31, 2017
Wednesday, October 21, 2015
How to unbrick a Buffalo WZR-HP-G300NH and install OpenWRT
So, after a failed firmware installation, all you get is a flashing red DIAG light? All is not lost, you probably don’t need any special equipment or to open the case to unbrick the Buffalo WZR-HP-G300NH. You can probably still tftp a new firmware image when the router boots up. Instructions here are for Debian, but should be easily adaptable for other Linux distros. First, download the firmware image you want to install. If you want to install OpenWRT, it is going to be the ar71xx and make sure you get the tftp version. Here is the one I used. Now you will need to make sure you have a tftp client installed:
Now you need to configure your network to connect to the router and create a static arp entry for it. Directly connect the router to your computer by ethernet cable, but leave the router powered off. You will need the MAC address for the router, you can get it from the SSID on the label, just insert colons like: 001D12345678 = 00:1D:12:34:56:78. You will need to do this as root.
Replace
(Replace the name of the image, if you are using a different one.) As soon as you hit enter on that last command, plug in the router. The tftp client will keep retrying until the bootloader on the router is ready to receive the image, then you should see the upload begin to progress. Wait a few minutes and the router should reboot. Now you can turn your normal networking back on.
If you installed OpenWRT, the default IP for the router will now be 192.168.1.1, not 192.168.11.1. If your image included LuCI, like the one I used, you can now point your web browser to that IP to access the web interface. Now you have not only unbricked your router, but you are free to enjoy all of the awesomeness of OpenWRT!
Most of the instructions here are based on this post, many thanks to the author!
aptitude install tftp-hpaNow you need to configure your network to connect to the router and create a static arp entry for it. Directly connect the router to your computer by ethernet cable, but leave the router powered off. You will need the MAC address for the router, you can get it from the SSID on the label, just insert colons like: 001D12345678 = 00:1D:12:34:56:78. You will need to do this as root.
/etc/init.d/networking stop
ifconfig eth0 192.168.11.2
ifconfig eth0 netmask 255.255.255.0
arp -s 192.168.11.1 00:1D:12:34:56:78
Replace
eth0 with the ethernet interface you are using, if necessary (it is probably eth0), and use the MAC address from your router, as described. But the IP address should be as shown, not based on your usual network configuration. Now change to the directory where you downloaded the firmware image and start up your tftp client and prepare to send the image to the router (don’t power it on yet). Once you start the tftp client, you will be typing at it’s command prompt.
tftp 192.168.11.1
tftp> verbose
tftp> binary
tftp> trace
tftp> rexmt 1
tftp> timeout 60
tftp> put openwrt-15.05-ar71xx-generic-wzr-hp-g300nh-squashfs-tftp.bin
(Replace the name of the image, if you are using a different one.) As soon as you hit enter on that last command, plug in the router. The tftp client will keep retrying until the bootloader on the router is ready to receive the image, then you should see the upload begin to progress. Wait a few minutes and the router should reboot. Now you can turn your normal networking back on.
/etc/init.d/networking startIf you installed OpenWRT, the default IP for the router will now be 192.168.1.1, not 192.168.11.1. If your image included LuCI, like the one I used, you can now point your web browser to that IP to access the web interface. Now you have not only unbricked your router, but you are free to enjoy all of the awesomeness of OpenWRT!
Most of the instructions here are based on this post, many thanks to the author!
Saturday, November 15, 2014
Ripping CD to .opus with Audex on Debian
The Opus codec is basically the one codec to rule them all. It is an open standard (RFC 6716) and it outperforms almost all other codecs, open and proprietary, over a huge range of bitrates. It also has a very low latency which is important for internet applications involving real-time communications and it is already supported by modern browsers like Firefox, Chrome, and Opera. But if you want to start storing your music in the best available format, you might have difficulty finding convenient tools that support it. Well, here is one that worked for me, so I’ll share it. It was pretty simple, although not entirely obvious.
Audex is a graphical CD ripper for KDE. It does not support ripping to Opus out-of-box, but it does have a feature to add a new encoder. For this, we will just use the command-line encoder found in opus-tools, so install the packages audex and opus-tools. Now, when you run Audex, go to “Settings” > “Configure Audex...”, select the “Profiles” section, and then “Add...”. Name the new profile “Opus”. Under the “Encoder” tab, select “Custom” from the first drop down. Under “Command pattern:”, put in “
If you also want to capture metadata, you will need a newer version of opus-tools than what is in Wheezy. You can download the source, and build it yourself. You will need to have the wheezy-backports repository enabled to get some of the dependencies:
Once the dependencies are met, you should be able to configure and install opus-tools:
Now, you can change the “Command pattern:” in Audex to “
Update: If you are looking to get better compression for speech recordings, such as lectures, sermons, speeches, etc, see this post.
Audex is a graphical CD ripper for KDE. It does not support ripping to Opus out-of-box, but it does have a feature to add a new encoder. For this, we will just use the command-line encoder found in opus-tools, so install the packages audex and opus-tools. Now, when you run Audex, go to “Settings” > “Configure Audex...”, select the “Profiles” section, and then “Add...”. Name the new profile “Opus”. Under the “Encoder” tab, select “Custom” from the first drop down. Under “Command pattern:”, put in “
opusenc $i $o”, and under “Suffix:” put in “opus”. You can look at some of the other options if you wish (I set mine to replace spaces with underscores), but that is all that is necessary to get it working. Save your new profile, select the profile from the main window, and begin ripping your favorite discs.If you also want to capture metadata, you will need a newer version of opus-tools than what is in Wheezy. You can download the source, and build it yourself. You will need to have the wheezy-backports repository enabled to get some of the dependencies:
sudo aptitude -t wheezy-backports install libogg-dev libflac-dev libopus-devOnce the dependencies are met, you should be able to configure and install opus-tools:
cd opus-tools-src-dir
./configure
make
sudo make installNow, you can change the “Command pattern:” in Audex to “
opusenc --title "$ttitle" --artist "$tartist" --album "$title" --date "date" --genre "$genre" $i $o”. This will capture metadata and embed it in your new Opus files.Update: If you are looking to get better compression for speech recordings, such as lectures, sermons, speeches, etc, see this post.
Saturday, September 13, 2014
Watch the NFL Sunday Ticket on Linux
If you subscribe to the DirecTV NFL Sunday Ticket, you can watch all of your Sunday football games on Linux. But it only works with certain browsers because it requires Flash Player 14 which is only available on Linux as a Pepper plugin. Only the Chromium family of browsers supports this API, and the NPAPI version that is used by other browsers is no longer developed on Linux by Adobe (version 11.2 is still receiving security updates). The easiest way to get this is to install Google Chrome. It is also possible to use it with the Chromium packages provided by various Linux distributions; packages are available to install it for both Debian and Ubuntu. For Debian it is in the contrib repository and for Ubuntu it is in Multiverse. It may also be possible to use it with the developer version of Opera, which is now Chromium-based as well, but I haven’t tested this.
Of course, this doesn’t mean that you must or even should swap browsers. You can use a Chromium-based browser with Flash for the NFL Sunday Ticket and still choose another browser, like Mozilla Firefox which seemed to come out ahead in our recent benchmarks, for other things. Ultimately, we would all really like to see web applications, including video streaming, developed with HTML5 and web standards. Mozilla is probably one of the biggest forces pushing for this. Some people even refuse to use the proprietary Flash plugin at all in order to help promote this lofty goal. But if you want to watch your NFL games on Linux this year, now you know how.
Of course, this doesn’t mean that you must or even should swap browsers. You can use a Chromium-based browser with Flash for the NFL Sunday Ticket and still choose another browser, like Mozilla Firefox which seemed to come out ahead in our recent benchmarks, for other things. Ultimately, we would all really like to see web applications, including video streaming, developed with HTML5 and web standards. Mozilla is probably one of the biggest forces pushing for this. Some people even refuse to use the proprietary Flash plugin at all in order to help promote this lofty goal. But if you want to watch your NFL games on Linux this year, now you know how.
Friday, July 18, 2014
Create your Own Word Searches on Debian, Ubuntu, Mac OS X, or Windows
Creating your own word search is really simple. They can be easily generated by software, given a simple word list, and I’m going to share just such an application with you today. Word Search Creator is a desktop word search generator licensed under the GPLv2 (so it is free as in freedom, as well as price). The downloads page has packages specifically for Ubuntu, Windows, or Mac OS X. These are pretty straight-forward to install. Ironically, there is no package for Debian (the parent distro from which Ubuntu is derived), and the Ubuntu package is not installable on Debian stable. But no worries, this is open source software! So for Debian we will just install from source.
Now, download the source, unpack it and cd to the unpacked source directory. To build the application, just:
In order to install it system wide, as root:
If you are running KDE, run
The menus give you a number of other options you can set. By default, words are only hidden left to right or top to bottom, but you can choose which directions are allowed. You can also choose how the word list is ordered, and edit the formatting. Perhaps one of the coolest features is the ability to change the shape of the puzzle by excluding squares from the grid.
You can also save it as a word search file, export it to pdf or svg, or copy it to the clipboard as an image (Ctrl + C). Working with it as an image, you can also use an image editor to decorate your word search. Here, I have simply filled in the empty squares and given it a yellow background color to highlight the smiley face.
And here is a full page puzzle.
Try it out yourself, and have fun!
Installing from source on Debian
Before we can install Word Search Creator, we need to install the Qt4 developer tools:aptitude install qt4-dev-toolsNow, download the source, unpack it and cd to the unpacked source directory. To build the application, just:
qmake
makeIn order to install it system wide, as root:
make installIf you are running KDE, run
kbuildsycoca4 to rebuild your application menus.Create a Word Search
When you first open Word Search Creator, there is a control box on the right side that you use to create the word search. Here you can type in a word list and set the size of the grid (or set it to automatically enlarge based on the words you give it). Type in a title and hit Create/Shuffle to generate your word search (hitting it again will, as the name suggests, shuffle your word search).The menus give you a number of other options you can set. By default, words are only hidden left to right or top to bottom, but you can choose which directions are allowed. You can also choose how the word list is ordered, and edit the formatting. Perhaps one of the coolest features is the ability to change the shape of the puzzle by excluding squares from the grid.
Having fun with it
You can work the puzzle right there on screen, highlighting the words as you find them, and they will automatically get struck off the list.You can also save it as a word search file, export it to pdf or svg, or copy it to the clipboard as an image (Ctrl + C). Working with it as an image, you can also use an image editor to decorate your word search. Here, I have simply filled in the empty squares and given it a yellow background color to highlight the smiley face.
And here is a full page puzzle.
Try it out yourself, and have fun!
Sunday, September 15, 2013
Creating animated GIFs and APNGs from videos
Linux Setup
For this project we will need two or three tools. We will need avconv to pull frames from a video file, and we will need gifsicle if we want to created animated GIFs and apngasm if we want to create animate PNGs. If you are on Debian, you can install libav-tools (which provides avconv) and gifsicle in the normal way, but see my previous post on how to install apngasm from source (you will also find an explanation of the differences between animated GIFs and PNGs, and when to use each). If you use another Linux distribution, check your package management system.Windows Setup
To get this to work similarly on Windows, we will need some extra tools and the setup is a bit more complicated. To get glob expansion and redirection, we will install Cygwin. Cygwin provides a Linux-like environment on Windows, including the Bash shell and the GNU coreutils (basic commands like ls, cp, rm, mv, etc). The installer also serves as a package manager, allowing you to select the various software packages you want to install or upgrade. If you are not sure what you want, just install the default packages. This will provide a lot more than we need, but you will have a useful environment if you need it later. You can always run the installer again later if you want to install more packages.You will need to install 7zip, since Libav binaries come in a .7z archive you will need 7zip to extract them. When using the most recent version of Libav (0.9.7) on Windows, all of the GIFs came out in grayscale, so I tried the same version that was included with Debian Wheezy (0.8.6) and found it to be working on Windows (YMMV). Gifsicle and apngasm come in .zip archives. Gifsicle and apngasm both contain a single binary you can extract to wherever you would like. Libav is a bit more complicated, you will need to extract the bin, lib, and share directories. For simplicity, you could extract all of these directories to C:\, and then put the gifsicle.exe and apngasm.exe in C:\bin (or choose whatever directory structure seems suitable for you).
Now, it would be nice to put the directory (or directories) containing our new tools in the system path variable, so Windows (and Cygwin) will know where to find them without us having to type the full path to the command. You can do that in cmd.exe like this:
setx path "%PATH%;C:\bin"Now, for any of the following commands, we will use the Cygwin Terminal. If you are from a Windows background, you will notice that all of the paths are separated with forward slashes instead of back slashes (C:/Users/Name/Documents, rather than C:\Users\Name\Documents). If you have used Cygwin before, you will need to note that these are not Cygwin binaries we are using, so the path arguments they take will use Windows drive designations (C:/Users/Name/Documents, rather than /cygdrive/c/Users/Name/Documents). However, this only applied to arguments passed to the commands, if you are giving the full path to the command, you will be using the Cygwin form (/cygdrive/c/bin/avconv.exe).
Essentially, when you are running the following commands in Cygwin terminal on Windows, you will just add the drive letter (C:) in front of the file paths, and the commands will end with the .exe extension.
Extracting Images from the Video
The first step is to convert our video to a series of image files. Now when we do this, we need to know what frame rate we want our animation to run at, and how if we want to make it faster (or slower) than the original video. If we want it to run at the same speed, we will use the same frame rate when extracting the images as we will use when we create the animation. If we want to alter it's speed or playing time, we'll want to do a little math. For instance, suppose I want to make an animation of these roses blooming from youtube. The video runs for about a minute and a half, but let's say we want to see the whole process in about ten seconds in our animation. If we want our animation to run at 30 frames per second, then we need 300 frames for a 10 second animation. To find the frame rate we want to pull from the video, we take 300 frames divided by 90 seconds, which gives us a frame rate of 3.33 fps.Now that we have chosen the frame rate, let's look at the command:
avconv -i /path/to/rosesblooming.mp4 -r 3 -vsync 1 /path/to/rosesblooming%03d.pngOf course, if you are creating an animated GIF, you will use the same command with a .gif extension. Now you should have a collection of PNG and/or GIF images extracted from your video.
Putting together an animated GIF
Now when we create the animated GIF, gifsicle takes a delay in centiseconds (or hundredths of a second) rather than a frame rate. So a frame rate of 30 fps is equivalent to 1 second divided by 30 and multiplied by 100, or about 3 centiseconds.Here is the command:
gifsicle -d 3 -l /path/to/rosesblooming*.gif > /path/to/rosesblooming.gifPutting together an animated PNG
When we create the animated PNG, apngasm takes a delay as two integers composing a fraction of a second, so if we have chosen a frame rate, the first integer is one and the second is the frame rate.Here is the command:
apngasm /path/to/rosesblooming.png /path/to/rosesblooming*.png 1 30Creating a thumbnail in an animated PNG
The APNG format allows you to specify that the first frame will be skipped during the animation so it is only shown in viewers that don't support animation. To those viewers, the APNG we just created with look like a bunch of leaves. If we want them to see the fully opened roses instead, copy the last frame to /path/to/rosesblooming000.png and add the /f option to the command, like this:apngasm /path/to/rosesblooming.png /path/to/rosesblooming*.png 1 30 /fLooping
The above commands create animations that repeat indefinitely. This is the default for apngasm, for gifsicle the -l option specifies this behavior. If you want the animation to play through only once, you can just omit the -l for gifsicle since this is the default, but for apngasm you will add /l1 to specify this. For apngasm, you can use any number in place of 1 to play through a given number of times. For gifsicle, the -l option will take a number as well, but it is separated by a space.Conclusion
Now you should have all of the tools you need to create your own animated GIF and PNG images. And you can always learn more by reading the documentation for these tools.
Labels:
animated gif,
apng,
apngasm,
avconv,
computers,
Cygwin,
Debian,
gifsicle,
Linux,
Wheezy,
Windows
Sunday, September 8, 2013
Installing APNG Assembler (apngasm) on Debian Wheezy
Why you would use animated PNG instead of GIF
If you are reading this post, it is likely you may already know the virtues of APNG, but in case you've found this an aren't sure let me give a quick explanation. While animated PNGs are not as widely supported as animated GIFs, they are technically superior. GIF files support only 256 colors, while PNG supports 16,777,216. PNG files support alpha transparency, which means that parts of the image can be semi-transparent. With GIF files, a pixel is either completely transparent or completely opaque, which results in jagged outlines on images with transparency when the background is unknown. You can see the differences for yourself with this demonstration.Unfortunately, as previously mentioned, support for APNG is somewhat limited. It was developed by Mozilla and has been supported by Firefox since 3.0. Opera supported it from 9.5-12.1, but unfortunately they gave up support for APNG when they moved from their own Presto engine to the Blink (formerly WebKit) engine used by Chrome. It is not natively supported by Chrome, currently the most popular browser in use, but there is an extension that will add support for APNG.
So, if you want the widest support, you may still want to use an animated GIF. But if you want quality, you need APNG and you can suggest your users try Firefox or the APNG extension for Chrome.
Installing APNG Assembler on Debian
APNG Assembler, or apngasm on the command-line, is a simple tool for creating APNGs from a series of PNG files. However, you might notice that it is not available in the official Debian repositories for Wheezy. The project has a Linux binary, but it didn't work for me on Debian Wheezy. However, building it from source is incredibly simple. Go to the project files on sourceforge, select the latest version, and download apngasm-x.x-src.zip. Then use the following commands (these work for 2.7, adjust accordingly if using a newer version):unzip apngasm-2.7-src.zip
make
sudo cp apngasm /usr/local/binNow apngasm is installed and ready for use. (Note that you must be in the sudo group to use the last command.)
Usage
APNG Assembler doesn't come with a man page, but the command is documented in the readme.txt that comes with the source. Nevertheless, here is a quick overview.In order to make an animated PNG, you need a series of PNG images whose names end with sequential numbers, like this:
frame01.png
frame02.png
frame03.pngand so forth.
Basic usage is:
apngasm animation.png frame*.pngThis produces an animated PNG that loops at 10 frames per second forever. If you want to change the delay between frames, you add two number to the command that represent a fraction of a second delay time. So, to produce an animated PNG that loops at 25fps (1/25 second delay) you would use:
apngasm animation.png frame*.png 1 25If you what the animation to loop a limited number of times and then stop, you can use the /l options like this:
apngasm animation.png frame*.png /l2This will cause the animation to play through twice, and then stop.
For backwards compatibility, animated PNGs can be displayed as a regular, non-animated PNG, but only the first frame will be shown. However, animated PNG also has a feature that allows you to skip the first frame. This way, you can use the first frame to display a thumbnail to non-supporting applications while omitting it from the animation. This thumbnail could be a single frame from the middle or end of the animation, possibly with a message informing the viewer that the image contains an animation their browser or viewer is not able to display. Once you have created this thumbnail as your first frame, simply add the /f option:
apngasm animation.png frame*.png /fNow the first frame will be displayed for viewers that don't support APNG, but omitted from the animation.
Now you are ready go and fill the internet with much better animated images!
Friday, July 26, 2013
Installing Kazam screencaster on Debian Wheezy from CrunchBang repos
When I went looking for a cool screen recording app for Linux that had native support for WebM, I didn't find anything in the Debian repositories that fit my criteria. Gnome 3 has a very handy built-in screen recorder that supports WebM, but I don't know of an easy way to use it outside of Gnome. However, there where a few cool-looking options available for Ubuntu, so I decided to see if I could find a way to install one of them on Debian. Kazam looked pretty cool, so I decided to give it a try. A little searching found that it is available for CrunchBang, a distribution derived from Debian, and the packages are apparently compatible.
However, I did it slightly different from how it was described as I didn't want to go installing third-party packages willy-nilly or by accident. I could have just installed kazam and then removed (or commented out) the CrunchBang repository, but then it wouldn't get updates. So what I did was to use apt-pinning to tell the package manager that I don't want any CrunchBang packages installed unless I explicitly install them (or they are pulled in as dependencies of something I explicitly install).
To do this, I first added:
to my /etc/apt/sources.list with a comment to explain what it is doing there. Next, I added the CrunchBang key with:
Now, to set my preferences, I created /etc/apt/preferences like so:
Setting Pin-Priority less than zero is what indicates I don't want packages installed from this repository unless specifically requested. Note that this also means that it will not be upgraded by the usual commands, you must use the command you originally used to install it, but it will be possible to upgrade it with a single command without updating any configuration files again.
Now, I update the package list and explicitly install kazam from CrunchBang Waldorf (Waldorf is the CrunchBang release corresponding to Debian Wheezy):
Now you should have Kazam available to record your own screencasts. All of the options are right there when you open it, to select video and audio sources, codec (VP8/WebM or H264/MP4), framerate, use a countdown timer, capture the mouse (or not), or select a region of the screen to record.
However, I did it slightly different from how it was described as I didn't want to go installing third-party packages willy-nilly or by accident. I could have just installed kazam and then removed (or commented out) the CrunchBang repository, but then it wouldn't get updates. So what I did was to use apt-pinning to tell the package manager that I don't want any CrunchBang packages installed unless I explicitly install them (or they are pulled in as dependencies of something I explicitly install).
To do this, I first added:
deb http://packages.crunchbang.org/waldorf waldorf mainto my /etc/apt/sources.list with a comment to explain what it is doing there. Next, I added the CrunchBang key with:
wget -O - http://packages.crunchbang.org/statler-dev/crunchbang.key | sudo apt-key add -Now, to set my preferences, I created /etc/apt/preferences like so:
Package: *
Pin: release n=wheezy
Pin-Priority: 900
Package: *
Pin: release n=waldorf
Pin-Priority: -10Setting Pin-Priority less than zero is what indicates I don't want packages installed from this repository unless specifically requested. Note that this also means that it will not be upgraded by the usual commands, you must use the command you originally used to install it, but it will be possible to upgrade it with a single command without updating any configuration files again.
Now, I update the package list and explicitly install kazam from CrunchBang Waldorf (Waldorf is the CrunchBang release corresponding to Debian Wheezy):
aptitude update
aptitude -t waldorf install kazamNow you should have Kazam available to record your own screencasts. All of the options are right there when you open it, to select video and audio sources, codec (VP8/WebM or H264/MP4), framerate, use a countdown timer, capture the mouse (or not), or select a region of the screen to record.
Kazam on Debian (KDE 4)
Note that all of the above commands (including editing files) need to be done as root, except for wget. Also, the line starting with wget uses sudo to run the apt-key command, so you need to be in the sudo group or else run the whole thing as root without using sudo.
Thursday, July 25, 2013
Installing the Tor Browser Bundle for all users on Linux
The Tor Browser Bundle provides a great way to browse the web anonymously through the Tor network. It is super simple to use and in addition to providing anonymity by routing your connection through multiple computers on the network it also blocks a lot of potential data leaks that could reveal your identity. It includes a patched version of Firefox with the HTTPS Everywhere and NoScript extensions.
Now the Tor Browser Bundle is intended to run without installation, even from a flash drive, but what if you want to install the Tor Browser Bundle to be available for all users on the system and show up in their application menus? I often install the official Mozilla build of Firefox and Thunderbird in /usr/local/bin, owned by my primary user (as described here). That way, all users on the system can use the applications and automatic updates work for my user, which updates the application for everyone. However, this approach will not work for the Tor Browser Bundle as it needs to be owned by the user to work properly. It may be possible to get a single installation to work globally by adjusting permissions (although I'm not certain if this might still introduce a security flaw), but the way I went was to configure the system to install it for all new users automatically.
First, put the Tor Browser Bundle directory in /etc/skel. The contents of this directory are automatically copied to each new user's home directory when it is created. Of course, you will have to do this manually for existing users (or perhaps write a script to do it, if you have a lot of users already set up). Next, create the file /etc/skel/.local/share/applications/torbrowser.desktop with these contents:
Now copy /etc/skel/tor-browser_en-US/App/Firefox/icons/mozicon128.png to /usr/local/share/icons/torbrowser128.png. Each new user will get their own copy of the Tor Browser Bundle in their home directory, with a launch icon in the applications menu.
Note that you will have to adjust these directions if your locale is not en-US. As a final caveat, browsing through Tor is slower due to being routed through multiple computers and popular plugins like Flash are disabled for security reasons. But this is the best way to browse the web with a reasonable degree of anonymity.
Now the Tor Browser Bundle is intended to run without installation, even from a flash drive, but what if you want to install the Tor Browser Bundle to be available for all users on the system and show up in their application menus? I often install the official Mozilla build of Firefox and Thunderbird in /usr/local/bin, owned by my primary user (as described here). That way, all users on the system can use the applications and automatic updates work for my user, which updates the application for everyone. However, this approach will not work for the Tor Browser Bundle as it needs to be owned by the user to work properly. It may be possible to get a single installation to work globally by adjusting permissions (although I'm not certain if this might still introduce a security flaw), but the way I went was to configure the system to install it for all new users automatically.
First, put the Tor Browser Bundle directory in /etc/skel. The contents of this directory are automatically copied to each new user's home directory when it is created. Of course, you will have to do this manually for existing users (or perhaps write a script to do it, if you have a lot of users already set up). Next, create the file /etc/skel/.local/share/applications/torbrowser.desktop with these contents:
[Desktop Entry]
Type=Application
Name=Tor Browser
GenericName=Anonymous Web Browser
Exec=./tor-browser_en-US/start-tor-browser %u
Icon=/usr/local/share/icons/torbrowser128.png
Comment=Browse the Web Anonymously
Terminal=false
X-MultipleArgs=false
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/vnd.mozilla.xul+xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;
StartupWMClass=Firefox-bin
StartupNotify=trueNow copy /etc/skel/tor-browser_en-US/App/Firefox/icons/mozicon128.png to /usr/local/share/icons/torbrowser128.png. Each new user will get their own copy of the Tor Browser Bundle in their home directory, with a launch icon in the applications menu.
Tor Browser on the Gnome 3 menu
Tor Browser on the KDE 4 menu
Tor Browser running on KDE 4
Wednesday, July 24, 2013
Installing official Mozilla builds of Firefox and Thunderbird on Debian
The Debian GNU/Linux distribution includes their own versions of Firefox and Thunderbird, rebranded as Iceweasel and Icedove, which are maintained with security updates for the life of the release. However, some people prefer to use the official Mozilla releases to get the most up-to-date versions. They come in a simple archive file that you can unpack and run right from your home directory, but what if you want to install them system-wide and have them included in the applications menu? Here is how I do it.
First, download the appropriate tarball for your system. The 32-bit builds are easy enough to find (see links above), but if you want to get a 64-bit build they can be found at https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=en-US and https://download.mozilla.org/?product=thunderbird-latest&os=linux64&lang=en-US (note the locale at the end). Simply place the unpacked directories in /usr/local/bin.
The easiest way to keep Firefox and Thunderbird up-to-date is to use the built-in automatic update feature. In order for this to work, Firefox and Thunderbird need to be owned by a user who will actually run them on a regular basis. In my case, they are owned by my user account. Other users who have an account on my machine can use them, but all of the updates get installed by my user. You can just chown -R user /usr/local/bin/firefox, etc.
Now we just need to get them put into the applications menus. For this, we just need to put .desktop files in /usr/local/share/applications.
firefox.desktop should look something like:
thunderbird.desktop should look something like:
For KDE 4, you may need to run kbuildsycoca4 to update the menus. Now you should see the official builds of Firefox and Thunderbird in the applications menus.
First, download the appropriate tarball for your system. The 32-bit builds are easy enough to find (see links above), but if you want to get a 64-bit build they can be found at https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=en-US and https://download.mozilla.org/?product=thunderbird-latest&os=linux64&lang=en-US (note the locale at the end). Simply place the unpacked directories in /usr/local/bin.
The easiest way to keep Firefox and Thunderbird up-to-date is to use the built-in automatic update feature. In order for this to work, Firefox and Thunderbird need to be owned by a user who will actually run them on a regular basis. In my case, they are owned by my user account. Other users who have an account on my machine can use them, but all of the updates get installed by my user. You can just chown -R user /usr/local/bin/firefox, etc.
Now we just need to get them put into the applications menus. For this, we just need to put .desktop files in /usr/local/share/applications.
firefox.desktop should look something like:
[Desktop Entry]
Type=Application
Name=Firefox
GenericName=Web Browser
Exec=/usr/local/bin/firefox/firefox %u
Icon=/usr/local/bin/firefox/browser/icons/mozicon128.png
Comment=Browse the World Wide Web
Terminal=false
X-MultipleArgs=false
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/vnd.mozilla.xul+xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;
StartupWMClass=Firefox-bin
StartupNotify=truethunderbird.desktop should look something like:
[Desktop Entry]
Type=Application
Name=Thunderbird
GenericName=Mail Client
Exec=/usr/local/bin/thunderbird/thunderbird %u
Icon=/usr/local/bin/thunderbird/chrome/icons/default/default256.png
Comment=Read/Write Mail/News with Thunderbird
Terminal=false
X-MultipleArgs=false
Categories=Network;Email;News;GTK;
MimeType=message/rfc822;x-scheme-handler/mailto;
StartupWMClass=thunderbird-bin
StartupNotify=trueFor KDE 4, you may need to run kbuildsycoca4 to update the menus. Now you should see the official builds of Firefox and Thunderbird in the applications menus.
Firefox icon on Gnome 3 menu on Debian Wheezy
Firefox and Thunderbird icons on KDE 4 menu on Debian Wheezy
Update: I now have a video on DailyMotion demonstrating these steps.
Subscribe to:
Comments (Atom)












