Monday, July 27, 2015

Minecraft 1.8 Forge, Liteloader, Optifine (and throw in Voxel Map --- might as well).

Say you wanted to install the Optifine mod for Minecraft and you've read my previous post on setting up Forge, Liteloader and VoxelMap for Minecraft 1.8 (or maybe you already have working mods).  Installing the Optifine mod could be as simple as getting the latest 1.8 version of Optfine .jar file (specifically the 1.8 version since as of this writing the other 1.8 versions aren't supported yet by Forge or Liteloader) and sticking it into the mods directory.

Now, there is a good chance that this didn't work for you at all especially if you just read the setup post.  I saw a number of posts on the 'net where people are asking why their Optifine doesn't work and people give answers who some say works and some says they don't.  The main reason is that if you got the latest version of Forge and Liteloader there is a good chance that Optifine isn't compatible with it.

Go to the Optifind Download page and you'll see a link to the changelog link besides each version of Optifine.  Read it and it will say which version of Forge it works with.  If you have a version of Forge that is newer then that, Optifine won't work.

The solution is the install the latest version of Forge that works along with the latest version of Liteloader that works with that version of Forge.  Then you can drop Optifine's jar file into the mods directory.

Friday, July 24, 2015

Use VIM-like HJKL Instead Of Arrow Keys in Linux and OSX

Okay, I admit it...  I move around the file even while in the insert mode of Vim instead of going back to normal mode.  I don't always stay in insert mode, but if I'm typing and notices a typo a few characters back I will go back to the typo without leaving insert mode.  I do this by mapping the CTRL-[HJKL] to left, down, up, right so at least my fingers stays on the home row and not move to the arrows (I have disabled arrow keys in normal mode when I was training myself on Vim and never re-enabled it).

I found that after spending time in VIM if  I switch to other apps I will start using HJKL for navigation.  Of course that usually doesn't work and I end up using the arrow keys (e.g. when moving down menu options in the browser).  Naturally if I'm using those apps a lot more then when I go back into Vim I'll get lazy and start trying to use the arrow keys.  I decided what I want is to use HJKL even when I'm not in Vim and I wanted it to be consistent across Linux and OSX.

On OSX, this is easy to do.  Simply install Karabiner and select the option to use VI mode using the control key.  Then, in any app, simply use CTRL-[HJLK] for the equivalent behavior as using the arrow keys.  To add more consistency between OSX and Linux, I remapped Caps-Lock to the CTRL key (which is also easier to type on a mabook pro).

On Linux, it's a little more work.  I use Caps_Lock as the Switch_mode (SM) key and then defined that SM-[HJLK] combination to be like the arrow keys.  To do this:

xmodmap - pke > ~/.Xmodmap

Add this line to the top of the .Xmodmap file to disable the Caps_Lock key:

clear Lock

Then set the Caps-Lock key to be the Switch-mode key:

keycode 66 = Mode_switch Caps_Lock

This means to set the caps_lock to be the mode_switch key (and caps-lock when it is Shift-Caps_Lock)

Next, add the Left/Down/Up/Right to the third column of the key code record that maps to the letters, HJKL.

keycode 43 = h H Left
keycode 44 = j J Down
keycode 45 = k K Up
keycode 46 = l L Right

This means that for key 45, print "k" when the key is pressed, "K" when it is SHIFT-k and Up when CapsLock-k is pressed (since CapsLock is now the mode_switch key).

Once you save the file, load it with

xmodmap .Xmodmap

Most current desktops will load .Xmodmap when logging in.
You can find out what keycodes maps to what by using xev.

Monday, May 4, 2015

Installing Waypoint Map Mods for Minecraft 1.8 for Windows, Linux and OSX (Yosemite)

Once you set up Minecraft for your family, you'll inevitably be asked to install mods to further enhance the game play.

Installing mods is both simple and annoying for a few reasons:

  • Mods aren't officially supported by Minecraft so there is no single way to install mods. 
  • This means that a mod built for version A might not work for version B.
  • Different mods might require different mod loaders and they might be in conflict with each other.
  • Just like apps on your mobile phone, some mods might not do what it claims to do and can be potentially harmful.
  • Many mods are served from sites that also tries to sneak in adware and malware on your machine when you try to download even if the mods themselves are okay.
  • Minecraft is built on Java and given the security issues a lot of OSs no longer comes with Java so you'll have to install it yourself.
  • If you install the official Java from Oracle (whether OSX or Windows), they try to sneak in adware on your machine as well!
I have been avoiding using mods but when the family demands it what can one do but to get it done?  So, after spending an afternoon learning about Minecraft mods, I thought I share with folks how I installed the VoxelMap mod for Minecraft version 1.8.x. on Linux, Windows and OSX.

VoxelMap is a mod that provides you with a map of your Minecraft world and also allows you to set way points so you can easily teleport to specific locations.  There are a number of mods that do similar things which I actually tried to get first but they either made it too painful to safely download (Xaero's Minimap) or wasn't available for 1.8.4 (Rei's Minimap and Zan's Minimap).  VoxelMap is a bit fancy but it's used by Youtubers that my kids watch so there's a degree of familiarity with it.

VoxelMap requires a mod loader called Liteloader to run.  Because mods are not officially supported by Minecraft, the community have come up with various loaders that provides simpler APIs that modders can use to write mods more easily.  However, because each of these API might be different there is a degree of fragmentation and conflicts between the mods that use different mod loaders.  It seems like Minecraft Forge is emerging as the leader (quantity of mods, support, books/tutorial that teaches using it), but a number of popular mods are also built on Liteloader.  Fortunately, Liteloader is compatible with Forge and in this guide I'm going to install both.

A final note before we dive in.  As of this writing, support for 1.8 is still somewhat "beta" for both Forge, Liteload, and VoxelMap (and pretty much any mod) and also I'm only going to install "client" mods since VoxelMap is just for the players and not a "server" mod which is that the clients connect to when playing multiplayers games.  For the server, it's going to be just the vanilla Minecraft 1.8.4 server that is officially released by Mojane.

Microsoft Windows


To install VoxelMap mod for Windows, you'll need:
  1. Java 1.6+ (to run the installers for Forge, Liteloader, etc).
  2. Minecraft 1.8.x client launcher
  3. Minecraft Forge for 1.8 (see below to avoid getting mislead by the download links)
  4. Liteloader for 1.8
  5. VoxelMap for 1.8

Java 1.6+


It's possible that you don't have Java installed on your system (Microsoft suggests that unless you really need Java, don't install it for security reasons.)  You can download Java from Oracle for free, but if you're not careful you'll get stuck with crappy adware (shame on a corporation like Oracle to use such underhanded tactics).  Fortunately, Microsoft now bundles Java with Minecraft launcher and you can use that version of Java to run the Forge and Liteloader installers.

The path to the Minecraft Java is something like this:  
C:\Program Files (x86)\Minecraft\runtime\jre-x64\<version>\bin\javaw.exe
You can find this by looking at the default Minecraft profile from the launcher and see what the executable path value it has.  Then from the command prompt (Run > cmd):
set JAVA_HOME="<path to java minus the javaw.exe>"
set PATH=%PATH%;%JAVA_HOME%

Minecraft 1.8.x Client Launcher


Simply download from https://minecraft.net/download and install it.

Minecraft Forge for 1.8 


When downloading Forge, avoid the obvious download buttons as they lead to the file hosting sites that tries to get you to download a lot of crapware, malware, adware, etc.  Instead, select "All Downloads" and click on the "i" next to the Installer link (we're NOT going to use the windows installer since it won't know where Java is) and select "Direct Download".

Liteloader for 1.8


As of this writing, only the developmental builds supports 1.8 so you'll need to download the latest snapshot.  Again, you just want to download the *.jar file rather then the windows .exe file.

VoxelMap for 1.8


You can find the download link from the VoxelMap page.  Make sure you grab the 1.8 version from the "Recent files" section and not from the "Download" button which grabs the 1.7.x version.

Installing Everything


Now that you've downloaded everything, the installation for Windows is fairly simple:

  1. Click on the Minecraft installer you downloaded from minecraft.net.  This will install Minecraft.
  2. Click on the launcher that it installed to start Minecraft.
  3. Click "Edit Profile" and change the version of Minecraft from "latest" to "1.8" (this is just a one time thing because Forge needs you to have run that version at least once).
  4. Click "Play"
  5. You can quit once the game menu comes up and change the profile back to latest at this point.
  6. Quit Minecraft completely.
  7. At the command prompt, install Forge with:  java -jar <path to .jar file>.  Select "Install client" then OK.  Start up the client again, pick the "Forge" profile and make sure everything works.
  8. Quit Minecraft.
  9. At the command prompt, install Liteloader with: java -jar <path to .jar file>.
  10. From the menu's "extend to" option, pick the drop down that says Forge... and then install.
  11. Start up the client once again, select the "Liteloader 1.8 with Forge..." profile and make sure everything still works.
  12. Quit Minecraft
  13. At the command prompt, copy the VoxelMap mod to the Forge mod directory:  copy <path to VoxelMap's *.liteload file> %APPDATA%/mods/1.8
  14. You're done!  You should now be able to play Minecraft with the minimap on your screen.

Linux


Installing on Linux is the same steps as for Windows except for the following:
  • Linux might already have Java installed, but if not then use the package manager to install openjdk and you shouldn't have to do anything else beyond that for Java.
  • The path to copy the VoxelMap mod (step 13 above) is ~/.minecraft/mods/1.8 (instead of %APPDATA%/minecraft/mods/1.8).

OSX

Updated:  Sept. 27, 2015 

OSX is more of a pain to set up because it only have Java 1.6 (and not even that unless you manually install it on Yosemite).

First, go through steps 1 to 6 as described in the Windows section (You might get prompted to install Java -- see below).

Just like Windows, the Minecraft launcher for OSX also comes with Java 1.8 so it isn't necessary to download Java separately.  OSX only have Java 1.6 so you should use the version that comes with Minecraft then the default OSX Java.

Java 1.6+


To install Java 1.6, you'll get a prompt the first time you try to start the launcher to install Java if it can't find it.  Simply click "More Info" and follow the instructions to installing Java.  This is fine for playing Minecraft, but doesn't work for Liteloader's installer as it requires 1.7+.

Minecraft Forge for 1.8


You should be able to install Forge just by clicking the installer file or you can do it from the terminal just like it is described step 7 above.
java -jar forge-1.8-*-installer.jar
Then selecting "Install client".

Once installed, start up the client and pick the "Forge" profile.

Liteloader for 1.8


Liteloader is a problem because Java 1.6, which is what Apple installs, doesn't work with the installer.  You can download Java from Oracle but just like the Windows version, you have to be careful or adware will get installed.

Instead, we'll let Forge install Liteloader for us so instead of running the Liteloader installer:
  1. Right click on the installer jar file and select "Open With > Archive Utility".  This should create a folder with all the files from the jar file.
  2. Using the Terminal, go to the folder and copy the Liteloader jar files to the mod directory: cp liteloader-*.jar ~/Library/Application\ Support/minecraft/mods
  3. Now start up Minecraft but continue to use the Forge profile.
  4. If everything starts up fine and it Forge is running then quit Minecraft
Liteloader somes with an installer which you can launch by using:
java -jar <liteloader jar file>
Or you can copy the file to the mods directory and have Forge load it since they are compatible.
cp liteloader-*.jar ~/Library/Application\ Support/minecraft/mods

VoxelMap for 1.8


Just like for Windows and Linux, you just need to copy the VoxelMap mod file to the Forge mod directory:
cp <voxelmap mod file>  ~/Library/Application\ Support/minecraft/mods/1.8

You can now start up Minecraft and see that the VoxelMap mod is loaded.

You're Done!


Now you should be able to use the VoxelMap mod whether in your single player game or if you connect to the 1.8.x server.

Wednesday, March 4, 2015

Mounting Shared Drive on Linux and Headless Bittorent Daemon

There are a number of different ways to automate the download of bittorrent files.  Many bittorrent clients have the ability to "watch" a directory and if a torrent files get added there then the bittorrent will automatically begin to download.  Some even don't need to download the file as it can subscribe to a feed directly.

GUI Way

What I did before was to log into a machine, connect to a shared drive and then open Transmission which was configured to look at the shared drive for any new torrent files.  I even wrote a program that grab checked and downloaded new torrent files every 24 hours.  Setting this up was extremely simple.  As part of my login items on OSX, I had it connected to my shared drive.  Then I would start Transmission and have it point to the shared drive to automatically download the torrents.  I used watch to execute my torrent downloads:

watch -n 72000 <program to download torrents>
I didn't use cron or anything because this was originally on a OSX laptop.

When I switched to a Linux machine that is kept on, I did the exact same thing.  The problem with this is that you're expected to be logged in to the system and keeping the programs running.  If someone else need to use the computer then everything stops since you'd have to log out.

Terminal Way

This similar to the GUI way described above except you do it in a terminal running in a tmux session so that you can disconnect without loosing your transmission job.  To connect to the shared smb drive without the GUI by using transmission-cli tool.

tmux
dbus-launch bash
gvfs-mount smb://<user>@<host>/<path-to-shared-drive>
sudo yum install transmission-cli
transmission-cli
You'd put in your user name and password as it prompts you when you mount the shared drive.  You'll need to configure transmission.

Headless Way

This doesn't require any GUI or terminal and can automatically starts at each boot.

Install the transmission-daemon

sudo yum install transmission-daemon
sudo systemctl start transmission-daemon.service
sudo systemctl stop transmission-daemon.service
The service file is in /usr/lib/systemd/system/transmission-daemon.service.

I started and stopped the daemon because you need to configure it through the /var/lib/transmission/.config/transmission-daemon/settings.json and this gets created when you first start (for other locations of Transmission files click here).  This will also install the transmission user

Next you need to mount the shared drive in order for transmission to access and ONLY transmission:

sudo mount -t cifs -o -credential=<path-to-credential>,gid=`id -g transmission`,uid=`id -u transmission` <mount point>
The credential value points to a file that contains your username, password and domain for logging into the shared drive.  Make sure wherever you store it that it's not readable by others.

The gid and uid belongs to the user you want to be able to do read-and-writes to the shared drive otherwise it'll only be root that can do it.  For Fedora, the user is "transmission"

If it works and you can read-and-write, you can move this into /etc/fstab:

//<host>/<path-to-file> <mount-point> cifs credentials=<path-to-cred>,uid={user id},gid={group id}
and then reload fstab:

sudo mount -a
Once you configure the /var/lib/transmission/.config/transmission-daemon/settings.json to your liking then fire up:

sudo systemctl start transmission-daemon.service
sudo systemctl enable transmission-daemon.service
This starts up the service now and also at each machine reboot.  The one issue is that transmission-daemon might start before the drive is mounted and then it won't look for the changes.  It needs to be told to wait.

Systemd will look at /etc/fstab and automatically create an unit that can be added to the service file to tell it to wait.  Running the systemctl command will show you an unit that can be used (it'll be something with a .mount suffix).

Add that unit to the After line:

After=network.target <mount unit>

Finally, set up a cron job to regularly check for new torrents:

crontab -u <transmission user> -e
With the value being something like:

0 23 * * * <path-to-program-to-run> >> /var/lib/transmission/download.log 2>&1
which says to execute the program every night at 11pm and store the out put in /var/lib/transmission/download.log.

Since the transmission users is disabled for an interactive shell, to execute commands as the transmission user, use:

sudo -u <transmission user> <command>

Monday, March 2, 2015

Thoughts on setting up Murmur and Mumble.

Following my experiences of compiling and setting up Synergy, I found myself setting up Murmur/Mumble this past weekend.  It was a sharp contrast in experience.  Mumble seems to want folks to be able to build and run their software.  Mumble is an open source VOIP solution used often by gamers to talk to each other while playing games and Murmur is the server portion.  I needed Windows and Linux clients since those are the system that people are on when playing and a Linux version of Murmur since that's what I'm going to be running the server on.

In most cases, setting this up on Linux is as simple as using whatever package manager is used by the distro and installing the Mumble package(s), but I ran into a problem with Fedora 21.  There are no packages for Mumble since it was retired after Fedora 20.  That means compiling from source which is normally not a big deal since this is open source, but to just make things a little more difficult some packages that Mumble depends on were also retired so those needed to be built and installed as well.

In the end, I cheated and grabbed the rpm from Fedora since they still had the RPMs from before they decided to retire it from the repo.  Mumble also requires the Ice package which was also retired so make sure to install it as well.

Now, the next step was getting a Windows client and this was when things got interesting.  The Mumble team provides pre-built binaries that are hosted on Sourceforge (development snapshot are available directly from their snapshop location).   I've been fairly distrustful of Sourceforge following what happened with Filezilla and malware and reluctant to use anything hosted there especially Windows binaries so the alternative was to try to compile the client myself.  I approached with some trepidation as there is a reason that on Windows people distribute binaries more then source code.

Compiling other people's code on Windows is not easy!  In the past, the tooling was not always available but that's gotten a little better when Microsoft decided to make free "Express" editions of Visual Studios available.  Still, the effort required to build something like Mumble wasn't trivial, but I have to give kudos to the Mumble guys who has done a very good job documenting how to build Mumble on Windows.  I went though their instructions and they document a lot of potential gotchas that helped get over issues that I ran into and while it took the entire morning (a lot of time was spent just waiting on the build), I was able to get a working client running that talked to the server running on the Linux box.

Misc Thoughts

I didn't know anything about Mumble before the weekend and came across it while I was looking for something to meet my needs.  Once I found Mumble and started looking at how to get the client, I also found mumble.com which looked and sounded like Mumble (it has the binaries, let's you buy the server software, etc.) but in small fine print at the bottom it says it isn't affiliated with Mumbo.info.

It's these kind of things that always bothered me and where a trademark would actually be very helpful.

Thursday, February 26, 2015

Compiling Synergy on OSX 10.9 Maverick (and 10.10 Yosemite)

Synergy is an open source software KVM that allows you to use one keyboard/mouse across multiple computers.  Although Synergy is open source, hosted on Github and under GPL, its main developer(s) decided sometime last year to put the binary of the latest version behind a pay-wall.  There is nothing in GPL that prevents them to do so and I don't necessarily object to developers charging a fee for providing a service such as hosting for downloads (I used to buy Linux install CDs from Walnut Creek without a second thought), but I'm just not a fan on the way they're doing it.

The Synergy website looks and feel like one of those spam sites where they try to trick you into buying or downloading something with big call to action buttons while the actual link to download is kind of hidden.  For example, they have a big "Get Synergy" button which is the one that ask you to pay while links to github and a link for free binary downloads (although not of the most recent version since that's the one they want you to pay for) are tiny and hidden way a bottom of the page.  I guess it's better then those sites with a big button that says "Download Here!" (which actually takes you to some spam page) while next to it as a small font link is the actual download link.  Plus, paying for it doesn't seem to get you additional support or anything other then being able to download a pre-compiled binary.  Basically, their execution of it is the turn-off and I had to check a few times to make sure the site is legit and not a spam company trying to appear legit.

Since this is open source anyone can just download the source and build it themselves, right?  Well, not exactly.  The instructions for how to compile is not great, but worst is that the code itself doesn't build if you just get it from Github.  I'm trying to build on OSX since most Linux distro will have it already in a package to install, but Synergy doesn't have a Homebrew formula and Macports has not maintainer.  So, for OSX, you'll need to compile yourself.

The latest source doesn't work yet (I tried to build it and it errors out on compile), so I thought I get the last stable version and build from that.  Nope.  If you try to build strictly from the command line it fails trying to create the right build files because of problems with the toolchain it uses.  If you try to build with Xcode, you'll need to code sign it.  In order to build it, you'll need to patch the toolchain.  I found that someone in Korea fixed the toolchain to allow him to build Synergy for Yosimite, but his solution is actually also needed to get it to build on 10.9 Maverick

So here goes:

xcode-select --install
brew install cmake
brew install qt
Next you'll need to download the source from http://github.com/synergy/synergy.

When I grabbed the latest and tried their instructions for compiling, it didn't work.  So your choice is to pull from an earlier stable release.  That means either 1.6.2 or 1.4.x.  Note that the 1.6.x client can't speak to 1.4.x and even 1.4.18 client isn't compatible with 1.4.10 server.  Fedora 21, for example, comes with 1.4.10 so if you grabbed the latest 1.4.18 release it wont' work.

To build 1.6.2 on OSX Maveric, you'll need to change ext/toolchain/command1.py


./hm.sh conf -g1 --mac-sdk 10.9 --mac-identity Maveric
./hm.sh build
To build 1.4.18, this is the replacement ext/toolchain/command1.py

I realized after building 1.4.18 client that it won't work with 1.4.10 server, I decided to have every system on 1.6.2 even if I can't use a package manager for it.

Don't just have Synergy client talk directly to the Synergy server directly.  There's a chance that someone can be listening on your communication.  Instead, use ssh tunneling so that the communication is secure.  I also suggest using autossh so that it knows to reconnect if your client gets disconnected (e.g. laptop went to sleep).  You can install autossh through Homebrew.

brew install autossh

Saturday, February 21, 2015

After installing Fedora, it's time to install Fedora.

Installing Fedora is easy.  Boot up the Live DVD and let 'er rip.  Once it installs itself on to your drive and reboots you'll likely find yourself in Gnome Shell.  Of course, you're not really done with setting up Fedora because it is now time to update and customize!

First thing you'll ways want to do is to run the update to make sure you get all the latest patches and security fixes.
sudo yum update
Note that to use sudo you'll have to mark the account you're using as an administrator account.

Because Fedora believes very much in being purely open source, you won't find things like VLC or Google Chrome so you'll have to add those yourself.  The simplest way is to add RPM Fusion which just requires you to run a one line command to grab it and install it on your system.

Install VLC

sudo yum install vlc

Install Google Chrome

To install Google Chrome, you'll first want to install the package signing key from the Google Linux Repository:
wget https://dl-ssl.google.com/linux/linux_signing_key.pub
sudo rpm --import linux_signing_key.pub
Then you can download Google Chrome RPM package and install it.  It will add the Chrome repository for yum:
sudo yum localinstall https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
Note: this is the 64-bit version of Chrome and not the 32-bit version.

Change Desktop Environment

To switch to another desktop environment such as XCFE, you can use yum as well:
sudo yum group install "Xcfe Desktop" --exclude fedora-release-*
Then at log-in select XCFE as your choice for desktop manager.

If you prefer Cinnamon, then it'd be:

sudo yum group install "Cinnamon Desktop" --exclude fedora-release-*

To see what other environments are available, simply type:
sudo yum group list

Thoughts Fedora 21

Even though my primary home desktop the past few years has been a Macbook Pro, my favorite Operating System is Linux.  It would be my primary OS if it wasn't for a few tasks that aren't as convenient on Linux such as photo management (which any father will know has to be good or Mother will bring down the hurt), so at home it's been Homebrew to fill the void.  Because of this I haven't kept up with all the changes with my favorite distribution, Fedora.



I have tried various distributions here and there, but Fedora has always felt the most comfortable to me.  A lot of it obviously due to familiarity as I've been using Fedora when it was first conceived as Fedora Core and Redhat Linux before it (and Slackware before that).  When the time came to put together a new machine for the family for things like Minecraft and playing videos I naturally was going to go with Linux and Fedora which is now at version 21.

In version 21, Fedora now offers 3 separate versions targeted at 3 different needs:  workstation (what most home and office users will use), server and cloud.  I suppose the idea is to make the installation process easier as each version is preconfigured with the software and settings that they feel meets the most likely needs of the target audience.  I'm not sure if I really agree with this approach.  I imagine that most people who are capable and willing to get and install their own OS will be configuring their environment and this just defers that to after the installation.   At the same time, the install process is very simple.  Just a few clicks and off it goes so if you don't mind claiming every bit of disk space maybe this is perfectly fine.

It's nice that the Live CD is used to start the install because it does make the disc more useful and provides a sanity check that everything works before installing to the hard drive.  What I do miss is at install time it doesn't give you the option of adding other repos (how many Fedora users don't add RPMFusion?).  Instead, you finish installing Fedora and then install RPMFusion and then add the packages from it such as VLC.

I admit that I was a bit caught off guard by the default desktop environment: Gnome Shell.  It is simplified and familiar especially if you come from OSX with the way the settings dialog is laid out and the application dock, but might be an oversimplification for developers.  I suppose if the workstation version is targeted at the enterprise office space that it makes sense from that perspective.  Whether or not that is the right direction, I'll leave that for the market to decide.  It is telling that if you search online that one of the first things people recommend after getting Fedora installed is to add the gnome-tweak-tool to customize Fedora.

Fortunately, Fedora makes it very simple to change to another of the other popular desktop environments such as Mate, Cinnamon, Xcfe, etc.

Fedora comes with Firefox and Yahoo as the default search engine.  I have no objections to Firefox or its choice of Yahoo, but the browser is so fundamental now to anyone using a computer that offering more choices here would be best for the user.  Given that Fedora is very much about open source software, I can understand if Chrome is not a choice but Chrominum can be.

These are all very minor complaints and Fedora is still awesome.   

Asus Vivo Mini

After reading about the Asus Vivo Mini UN62 from CES, I was very excited by the idea of a small (it fits into the palm of your hand) and nearly silent PC that had enough power to be an actual computer but with such low power usage that it can be kept running all the time if need be.



It's a barebones system which means it doesn't come with an operating system, memory, or hard drive.  It does come with the CPU, has integrated video card and ethernet.  Prices for it are $160 (Celeron), $280 (i3) and $370 (i5).  Adding your own memory ($60), disk ($100) and wifi ($20) means that a complete machine will run from $340 to $550.  This machine is also Linux compatible so unless you need to run Windows that is one area for savings.

Note:  Don't just go out and buy any SDD.  This is a small machine and what you need to add in are the small components most often used in notebooks such as SODIMMs (memory) and mini pcie (wifi).

I bought the i3 version since I just needed it to do two primary things:  Minecraft and play videos from our NAS.  So far it hasn't disappointed!  Putting everything in all the components took about 10 minutes and I was able to boot off a USB DVD drive that had Fedora 21.  Everything worked immediately including WiFi and it is super quiet.

If it weren't for the small light on the power button I couldn't even tell it that was on since there was no noise.  This isn't a fan less system so there are fans but even when pushed it was still very quiet.

It comes with HDMI and display port output so I just plugged into the TV, told Linux to play sound through HDMI and pretty soon the family was playing Minecraft with sound and video.  The performance is very good and despite how everything fits into such a little box the temperature never felt hot to the touch (although as a desktop machine its probably not going to be moved around much).  It comes with a VESA mount to attach it to the back of the monitor.

ASUS also provided all the screws needed for the drive, wifi card, mount, etc.

It's a sweet little machine.

Just one note, the ASUS page makes it sound like it also has built-in WIFI.  It doesn't.  It supports it if you add your own wifi card.

Specs:
  • Intel Core i3-4030U (2 cores, 4 threads, 1.90GHz, 15W)
  • Crucial 16GB (8GBx2) DDR3-1600 204-Pin SODIMM 
  • Intel Network 7260.HMWG WiFi Wireless-AC 7260 H/T Dual Band 2x2 AC+Bluetooth HMC
  • Samsung 840 EVO Series 120GB mSATA3 SSD
  • 65W power supply

Monday, January 5, 2015

Enabling bitmap fonts on Linux

The patched Terminus Fonts for Powerline (renamed to Terminess) comes as bitmap fonts (pcf).  After installing those fonts, you might still not see them appear as an option when choosing fonts.  It could be because bitmap fonts support might be turned off on your system.

To enable:

rm /etc/fonts/conf.d/70-no-bitmaps.conf
sudo fc-cache -fv

or if you don't have admin/root access then

cp /etc/fonts/conf.avail/70-force-bitmaps.conf to ~/.fonts.conf.d
fc-cache -vf ~/.fonts

Saturday, January 3, 2015

Powerline compatible Terminus Font for OSX

My preferred programming font (and what I set for my terminals whether it's on Linux or OSX) is Terminus.  While it's not on most Linux distribution by default, it's usually available through the distribution's package management system (yum, apt-get, etc.).

On OSX, it's a little more troublesome.  A search on Google will turn up three different versions in the first three results.  In the past, I've used the one here. However, if you use something like powerline or vim-airline it doesn't have all the symbols so for some things it will just use the characters like '>>' and '>'.

To have those nice symbols, you generally need a 'patched' version of the font that has those symbols (this just means they added the characters to the font collection).  You can find versions of many popular programming fonts here.

You'll notice that Terminus is part of the collection except that the format that is included isn't compatible with OSX.  Thus, I have always had to live with the characters above.  The latest version of Terminus TTF from here now includes the powerline symbols and so I was able to install it and now my status bar looks like all those other pretty ones out there!

Thursday, January 1, 2015

OSX load order of your bashrc

If you run bash, OSX doesn't loading your .bashrc file.  The first looks for /etc/profile and then it looks in the following for the first available one:

  1. ~/.bash_profile
  2. ~/.bash_login
  3. ~/.profile
If you keep your file in a .bashrc file then probably the best way is to source it from .bash_profile.