It does, and I never want to do the research for this again, so I'm posting it here and hoping I remember to look here when it happens!
$ sudo apt install python Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'python-is-python2' instead of 'python'
It turns out that since the
python package has historically been Python 2, and there's a separate
python3 package (and the commands match the package names, also
pip3 etc), that default has remained in an attempt to break things for fewer people. Which is nice, but how do I get current, stable python?
sudo apt install python-is-python3
There's a sister package called
python-is-python3 and installing that makes my
python command use version 3 as I expected! It's a fairly good solution to the problem but it took me a moment to work out how to install it so I thought I'd write it down for next time! Hope it helps you too :)
I've been using the Ruby Snap on Ubuntu for a while now, and I think it's a bit better? I've referred to my notes every time I've done it though so I thought I had better put them somewhere I'll find them even when I'm using a new notebook :)
What versions are available?
snap info ruby will show your choices of versions to install. I usually just need a
major.minor version combination so I set the version with:
sudo snap switch ruby --channel=2.5/stable sudo snap refresh
If you see a lot of "extension not built" anger then try this:
ruby.gem pristine --extensions
Using Ruby and Gem and Bundle
The snap actually ships with all these commands available as separate commands:
ruby(just check this is the right one! Should be the same as
/snap/bin/ruby- if it's not check what order things are in your
ruby.gemis the gem executable for this snap ruby
ruby.bundleis the bundler gem for this snap ruby (I use this one the most since my ruby usage is basically
bundle exec jekyll servemost of the time!)
Beware that the 2.5 channel has bundler v2 and the 2.6 channel has v1, I have no idea why but it's tripped me up at least four times now
My work machine is a Windows PC, with dual boot to the Ubuntu partition that I actually use. Sometimes, when booting Windows, it "repairs" its disks and removes my grub menu, booting straight into Windows without showing me the grub menu.
To fix this: interrupt the startup, choose the boot device and pick the Ubuntu partition from the list.
Once booted, you can
boot-repair to sort out grub - I also travel with a boot disk, just in case!
I recently sorted this out, so I thought I'd share the scripts that worked for me on Saucy Salamander Ubuntu 13.10 with Unity.
First, work out which device you actually want:
$ xsetwacom --list
Wacom Bamboo stylus id: 11 type: STYLUS
Wacom ISDv4 E6 Pen stylus id: 13 type: STYLUS
Wacom ISDv4 E6 Finger touch id: 14 type: TOUCH
Wacom Bamboo eraser id: 19 type: ERASER
Wacom Bamboo cursor id: 20 type: CURSOR
Wacom Bamboo pad id: 21 type: PAD
Wacom ISDv4 E6 Pen eraser id: 22 type: ERASER
xsetwacom to get the right touch input relating to the correct screen, even with multiple monitors:
$ xsetwacom set "Wacom ISDv4 E6 Finger touch" MapToOutput LVDS1
At this point I should point out that my touch screen is incorrectly configured and therefore needs the script above running every time I plug or unplug an external display. Since I dock my machine, move it almost daily, and regularly present ... that's kinda irritating. Any solutions on improving that are welcome.
Graphical Video Editing
For most people, it probably makes sense to use a graphical video editor, such as KDEnlive, OpenShot or Pitivi. I tried the latter two and found them sufficiently crashy that I was unable to get a video out of them that I could play back. This might be a result of my total lack of knowledge of, and respect for, containers, codecs, and ... really whatever else I needed to know and didn't. I presume the crashiness was me doing something wrong as I know that others do use these tools successfully.
I'm also a commandline sort of person. I have difficulty in using a pointing device for any length of time, and I found that I was able to capture the videos tightly enough that I just needed to glue them together rather than actually edit.
Ffmpeg is a commandline linux tool that is the biggest swiss army knife of video tools you have ever seen. There's just one problem: on ubuntu, the program called ffmpeg is actually an alias for avconv, which is a fork of ffmpeg that is missing some key elements, such as the ability to concatenate videos. The upshot of which is that I downloaded and compiled my own copy of ffmpeg for this project. Once I had that, things got easier :)
I used this guide to get my ffmpeg tool and all the dependencies set up: https://trac.ffmpeg.org/wiki/UbuntuCompilationGuide
Ffprobe is a tool that looks at a video file and gives information about it. One thing that I found about combining videos is that matching resolutions and encodings are really important - sometimes you can create what looks like a valid output file, only to have it unable to play in some players. To use it:
I found this very useful, so I thought I'd add a note about it here. I tested my videos in VLC, it seems a bit less tolerant than the standard gnome player, so it was a good way to check if the videos would play. There's also a simpler version of VLC that shows fewer controls:
cvlc (I found it handy).
Combining Videos with Ffmpeg
Once I had the genuine version of ffmpeg compiled, I used that to combine my videos. First of all, I created an input file which contained a list of videos. Here's an example of my
file 'wireshark1.mp4' file 'wireshark2.mp4' file 'wireshark3.mp4' file 'wireshark4.mp4' file 'wireshark5.mp4' file 'wireshark6.mp4' file 'wireshark7.mp4'
(can you guess what this was a video of?)
Then I used the following command to use this input file and create a resulting video of these videos played one after another:
./ffmpeg -f concat -i input.txt -c copy wireshark-demo.mp4
This can look successful and still produce a bit of a strange video if all your video files aren't precisely the same resolution and format, but I was able to get results pretty quickly once I knew I had to get those things right in recording. The time spent planning the videos paid back several times over, as it was easy to just recapture one piece of the sequence if the need arose.
Ffmpeg is a beast, powerful but superbly complex, and it was tough going to find the commands I needed even without the "wrong" fork of the project being the default with ubuntu! Hopefully this post will remind me next time what to do, and if it helps you too, then awesome :) Feel free to leave additional tips and tricks in the comments.
On an ubuntu platform, I've had a few false starts with video over the years, and mostly avoided it. But now my "Debugging HTTP" talk really does make more sense if you can see the process of something broken, what the tools show, and how to understand that information and fix the problem.