August 15th, 2014 — Linux
If you have backed up your entire home directory, and are restoring it onto a new computer, sometimes you do not want to copy over all of the .dotfiles (hidden files and directories that start with a period) in your home directory. This can be especially useful if you are upgrading the operating system version and many applications are also upgraded, and you want to re-configure them manually.
To restore everything BUT the .dotfiles in the main root directory you can use the following rsync command (the command must be executed from inside the backed up home directory):
rsync -av - --exclude="/.*" ./ /home/NewHomeDir
Note that this WILL copy all .dotfiles in directories under the main home directory.
I do recommend keeping all of your old home directory dotfiles in a separate “dotfile” directory, because invariably you will need something from in them (such as an SSH private key, GPG key, etc…)
You can copy JUST the .dotfiles from the home directory (including recursing into .dotdirectories) with the following command:
rsync -av /path/to/sourcedir/.??* /path/to/dest
The .??* selects only files/directories in the sourcedir that start with a dot. Note that .* alone would select ALL files and directories in the sourcedir.
August 15th, 2014 — Linux
How to set up an entirely encrypted disk using Ubuntu 12.04 (LTS):
Use the Alternative installer (text based) ISO image so that you have access to the LVM and Encrypted Disk options.
Assuming you want to keep a windows partition or some other pre-existing partitions intact, you will have to manually partition things instead of using the guided partitioner, so select “manual”.
Set up two partitions. One will be your /boot partition and should be around 250MB. This is the only data that will be unencrypted on the disk. The other will be your encrypted volume, that will hold an LVM physical volume that will contain all of your other partitions such as your swap partition, / (root) partition and any /home /var etc partitions that you want to set up. You should select “Use as:” “physical volume for encryption” when setting it up.
Then go back up to the top of the menu to the “Configure encrypted volumes” option (You may have to write changes to the partition table before you can do this.) Use the “Create encrypted volumes” option, and “check” / select the large LVM partition you just created. Then select “Finished” and it will prompt you for a pass-phrase.
Now, go back up to the top of the menu to the “Configure the Logical Volume Manager” option. This will prompt you to write changes to disk, and create an encrypted volume (defaults to using ext4).
Now, go back up to the top of the menu to the “Configure the Logical Volume Manager” option. Create a volume group (vg0 is as good of a name as any) on the /dev/mapper encrypted volume you created above.
Create a logical volume (I named mine “swap”) that will hold your swap partition. It should be at least as large as the maximum amount of RAM you ever intend on installing in your computer if you want to use suspend to disk (hibernate).
Depending upon how many other partitions you want (one big root, or /home and /var, etc…) create other partitions using the rest of the space inside of your LVM volume group, and select Finished.
Once you leave the LVM configuration area, you will see all of the LVM logical partitions that you have created. Select each of them and configure their mount point and file system type. (or use as Swap in the case of your swap partition.)
Write everything to disk (which will also format partitions) and you are ready to continue with the rest of your installation!
August 14th, 2014 — Linux
The Pentium M CPU that comes on IBM Thinkpad X31 laptops (circa 1994…) claims to not support PAE (Physical Address Extension ). Luckily however it DOES support PAE if your kernel forces it, which you can do by following the instructions here:
They explain: “A number of older Pentium M processors produced around 2003-4 (the Banias family) do not display the PAE flag, and hence a normal installation fails. However, these processors are in fact able to run the latest (and PAE-demanding) kernels if only the installation process is modified a little. The problem is not missing PAE, it’s about the processor not displaying its full capabilities.”
I can just imagine an IBM or Intel engineering thinking…it’ll be 10 years before operating systems require a PAE extension…none of these chips will still be running then…lets call it a night and not bother displaying the PAE flag…
July 2nd, 2014 — Commentary, Reviews
I have an AT&T U-Verse “Internet Pro” DSL account. In the middle of June (near the 13th) my latency suddenly improved by 10ms.
Then around the 19th of June (2014) my upstream bandwidth jumped from around 1 Mb/s to around 1.4 Mb/s:
AT&T doesn’t advertise or make any promises about their upstream bandwidth, but these are welcome changes (especially the 40% boost in upstream bandwidth). My downstream bandwidth stayed just above the advertised 3 Mb/s rate.
I don’t know if this was due to a piece of equipment near my home getting upgraded, or the result of a policy change to upgrade the “Internet Pro” account, but I’ll take it!
Anybody else see a similar boost? Or have a negative counter example?
June 3rd, 2014 — Linux, Phones, Technology
If you have a slightly older android cell phone, chances are it records videos using the “3gp” format. When editing 3gp videos in OpenShot on Ubuntu, the audio and video can become unsynced. I have found that using the WinFF application you can convert the 3gp video into “DV – Raw DV for NTSC full screen” format, which will allow OpenShot to edit it correctly without having audio sync problems.
As a side note, sometimes when shooting videos with a cell phone, you may forget to rotate the phone to “landscape” orientation and be left with a vertical video that is rotated 90 degrees when shown on a computer. OpenShot can be used to rotate videos as follows:
- right click on the clip
- click Properties
- Choose the Effect tab (far right)
- Hit the “+” sign and then scroll down to “R” for Rotate.
- In the effects settings:
- set the Rotate X, Y and Z to 0.00
- set the Fixed Rotate X variable to 90.0.
- Hit apply
May 16th, 2014 — Uncategorized
I purchased a USB MIDI keyboard (the Alesis Q25) for use with my musical Tesla coil, but also wanted to use it to learn to play the keyboard/piano when traveling with my laptop.
The MIDI keyboard has no synthesizer of it’s own, so you need a computer that will take the MIDI data stream and play (synthesize) the actual sounds of a piano or other instrument so that you can “hear” what you are playing.
There are many pieces of complicated software on Linux that will allow you to compose music with a MIDI keyboard, but all I wanted was the ability to hit a key on my keyboard and have it make music.
The easiest set of software I found to do this was vmpk (virtual midi piano keyboard) combined with Qsynth (a GUI interface to fluidsynth). I started up qsynth and vmpk at the same time. Then I used the “edit->connections” menu on vmpk to set my MIDI keyboard as the incomming connection, and the “FLUID Synth (Qsynth1)” as the output connection.
To set up qsynth I hit the “setup” button and then in the MIDI tab selected the “alsa_seq” as the MIDI Driver and “qsynth” as the MIDI Client Name ID (ALSA/CoreMidi).
I also enabled the soundfront from the /user/share/sounds/sf2 folder.
I don’t know why I had to use vmpk to make this linkup between the keyboard and Qsynth, but so far I haven’t found an easy way to tell Qsynth to just listen to midi events from the keyboard directly. On the plus side, you can use the virtual keyboard that vmpk displays on the screen to play notes if you don’t actually have a physical USB MIDI keyboard.
April 10th, 2014 — Projects
Here is the coil with my custom top facing breakout point playing the Imperial March.
Here is a photo of the Tesla Coil:
April 9th, 2014 — Commentary, Projects
I have reduced my primary to 5 turns, and using the standard 0.068 MFD tank cap, this is the general shape of my oneTesla output waveform (as captured by a scope probe hanging in the air about 3 feet away from the coil):
As you can see, the primary rings up and then the secondary oscillates for quite a while afterwards.
The next three traces are running the coil at a very low power level. Depending upon where I measure between peaks on the trace, I get different frequencies:
17.80 uS between five peaks, or 1 / (3.56 / 1000000) = 280 kHz
As the 280 is between the 277 and the 294, we’ll just say that my primary has a resonant frequency of 280 kHz, when at low power.
Next, I turned the power up a bit (around 1/3 of the way up) and got the following two measurements:
18.40 uS for 5 peaks, or 1 / (3.68 / 1000000) = 272 kHz
So my primary resonance is somewhere between 263 and 294 depending upon how I measure it, with a value of 272-280 looking to be a reasonable average.
Surprisingly, my secondary resonance measurements agreed with themselves a bit better. Here is the low power trace:
And the “Mid Power” trace.
(You can see the primary ringing extending out so that it becomes visible in the trace…)
In both cases, I measured 15.20 uS between 5 peaks or
1 / (3.04 / 1000000) = 329 kHz
So my ratio is currently 329 / 280 or 1.175 ( Secondary 17-18% higher than my primary).
April 6th, 2014 — Projects
Since I’ll be primarily using my oneTesla to play music, I wanted a top facing breakout (so the sparks will shoot up, instead of out to the side). Also, I wanted something more professional looking than a stick of metal taped to the top of the toroid. Here is the final product on the top of my toroid:
You can visit [ this post ] to see a video of it in action.
I used the lathe to get the general shape I wanted:
Then turned it to even up the 15 degree angle:
And this is my original 1″ diameter aluminum stock. I tapped it for the 14-20 bolt on the top of my Tesla coil that normally has a wing nut to hold the stamped toroid together, so the whole thing just screws onto the top.
March 28th, 2014 — Projects
This is my new extruder hot end. After enclosing my printer with an insulated box, I decided that I needed to drop more heat before the plastic entry side of the end of the barrel. I accomplished this by turning an extra long barrel out of brass, and a small heatsink out of aluminum to go between the heater and the Groove Mount.
You can see the barrel compared to the original part here:
The barrel was straightforward to turn out of a piece of 1/4″ hex stock. I put the threads on with a metric M6x1 die.
The HeatSink took more time, mostly because I had to cut the fins out of a 1″ diameter rod quite deeply with a cut-off tool.
I compressed the several hours of work on the heatsink down into a six minute video below: