Inlägg

Visar inlägg från 2015

DIY 12V UPS for home network equipment

Bild
I have a small cabinet for modem, router, network switch and 8-port patch panel. I've managed to squeeze in a small UPS as well. When I finally got DOCSIS 100/20 Mbit Internet, the cable modem was so big that I had to make some changes to the cabinet. It is good to have an UPS for the equipment. Internet usually works during short power outages and the equipment is not damaged by hard reboots. It also protects somewhat against voltage spikes. So when all of the equipment runs on 12 V it got me thinking. Why do I need an UPS that converts 230 V AC into 12 V DC (for the battery) and then to 230 V DC again, and then at least three small adapters to convert it separately to 12 V DC again? Instead I could replace it with one larger 12 V DC power supply combined with a battery. I found a 12 V UPS, a Mean Well AD-55A . It outputs 4 A at 13.8 V DC and a small battery can be attached (charge 13.4 V, 0 - 0.23 A). Output voltage is adjustable between 12 - 14.5V. It has of course to...

Converting a cordless drill to LiFePo4 batteries

Bild
Modern cordless power tools use Lithium batteries, but they are quite expensive. This article shows how to convert an old cordless drill to use modern batteries. The solution covered here requries soldering skills, knowledge of Lithium batteries, how to connect batteries for balanced charging, how to connect batteries in series and of course basic electrical knowledge. You might also need an assortment of small wires, connectors, shrink tubes, small tools (and small fingers!) and fabrication skills. I will not cover these details in this article. You also need charger that can handle Lithium batteries (and also the correct type). You can't use the original drill charger. The particular drill used 10 NiCd (nickel-cadmium) batteries in series for 12 V total output. It is a modest 1200 mAh battery pack and has to be charged quite often. The picture shows the drill with disassembled battery pack. The original charger was just a 12 V DC adapter without any charging circuitry. ...

Easy Minecraft installation in Linux

This is an installation script for Minecraft on Linux. It installs the Minecraft launcher in the system, so that all users can easily start and play Minecraft. It creates icons and a shortcut to the launcher. The script is an improved version of this script (github https://gist.github.com/wvega/728367 ) When the user starts Minecraft, it will download a copy of Minecraft to the user's home directory, exactly like when manually installing Minecraft. This script works fine on Fedora, but I imagine it should work on most Linux distros. The only requirement is that Java is installed somewhere. The script assumes there is a link to Java at /usr/java/latest/bin/java or in /usr/bin/java, otherwise it will exit with an error. The script downloads the Minecraft launcher, and installs it system wide. Sometimes the Minecraft launcher address has changed and then of course the script must be updated. Download the shell script here or from github . Do "chmod +x minecraft-insta...

Identifying an unknown Windows hard disk - reading Windows file versions in Linux

What do you do when you have an unkown Windows hard disk or partition, that you don't want to boot or that is unbootable? How do you identify the Windows version installed on the hard disk or partition? In Linux, we are used to mount the hard disk and then look at /etc/issue, /etc/redhat-release or something similar. You can even see the kernel version in the file names of the installed kernel images in /boot. But for a Windows OS? Well, you could look at the version of ntoskrnl.exe, for instance. Here are the version numbers for different versions of Windows [1]: 4.x: NT 4.x 5.0: Windows 2000 5.1: Windows XP 5.2: Windows 2003 Server (and R2), Windows XP 64-bit 6.0: Windows Vista, Server 2008 6.1: Windows 7, Server 2008 R2 6.2: Windows 8, Server 2012 6.3: Windows 8.1, Server 2012 R2 10.0: Windows 10, Server 10  So just mount the hard disk/partition and then look for C:\Windows\System32\ntoskrnl.exe. But how do you read the version number of a Portable Executable (PE) f...

Laptop touchpad stops working after suspend

The MSI GE60 Laptop has an Elantech touchpad that has always had some problems working in Linux after suspending and resuming the laptop. Edit: Found some notes. It seems to have worked fine in Fedora 18, but in Fedora 19 after a synaptics driver update (xorg-x11-drv-synaptics-1.7.1-3.fc19.x86_64) it went totally nuts. Edge scrolling stopped working and after suspend/resume, the touchpad notification icon was flashing over the GDM login prompt, alternating with the on and off icon image. The touchpad was also turned off after reboot and couldn't be turned on except for in the Gnome system settings. After a few updates, some of the problems were fixed, except for the problem that it is turned off after suspend/resume. At least now with Fedora 20, which is currently installed on the laptop, the touchpad always stops working when resuming from suspend, and the hardware button to turn on doesn't affect its state. It is using the psmouse kernel driver and synaptics in Xorg: ...

Commercial software on Linux - RAR

I found that I had an old registration key for WinRAR laying around. Since I don't use Windows any more at home, I checked and found that there is indeed a commercial Linux version of the software available nowadays. RAR is a proprietary archive format that was widely used in the 90's and the next decade when the Internet became a popular place to share software and media files. It has better compression ratio than ZIP, has strong encryption and very good error recovery capabilities. I have some memories from my time as a student of keeping a WinRAR binary on a floppy and use it to decompress and compress files transferred from and to the Internet. I'm not going to debate over FOSS vs. commercial software in this post. If we weigh in such arguments, there are no reasons to use anything else than the LGPL licensed 7Z (p7zip) or tar with bzip2, gzip or xz (and their parallel variants), but that was not the point of this post. There is also a freeware unrar program and l...

Preventing normal users from Shutting Down or Rebooting PC

The default policy in linux is often that normal users can shut down or reboot a PC, even if other people are logged in. When using a desktop PC as a server or if you often leave your applications open, you don't want that to happen. This is a question that comes up many times on the Internet. The problem is that the components in linux change and not every distribution uses the same components. In linux, only root has the power to shut down or reboot. Many linux distributions use Policykit for rules to override this and let the normal users shut down and reboot. In Fedora 21, to override the default rules, create a new rule with the following command: sudo nano /etc/polkit-1/rules.d/60-noreboot_norestart.rules  Paste the following text: polkit.addRule(function(action, subject) {     if (action.id == "org.freedesktop.login1.reboot" ||         action.id == "org.freedesktop.login1.reboot-multiple-sessions" ||   ...