Showing posts with label howto. Show all posts
Showing posts with label howto. Show all posts

Sunday, April 13, 2014

HOWTO: Stream Twitch.tv to Chromecast

I recently picked up a Chromecast and one of the things I was looking for was to stream Twitch.tv from my laptop to my TV using the device. Thankfully setting this setup is fairly simple thanks to the aide of the TCast Chrome plugin.

Step 0 - Install Chrome/Chromium

Streaming to the Chromecast from your PC currently requires a Chrome based browser. Install either Google Chrome or Chromium.

Step 1 - Install Google Cast and TCast Extensions

Select each of the addon links below and add them to your browser:

Step 2 - Enable Streaming from your Channel of Choice

Open the twitch.tv stream URL you want to cast to your Chromecast. Play your stream and then click the Chromecast button underneath the video player. You will then see the following appear over your stream:


Next, click the Chromecast icon in the upper right hand corner of your browser and select the Chromecast device you want to stream to:


Your Chromecast should then take a minute to load up the stream and then it should soon be playing! In your browser page you will then see the following screen from which you can adjust the stream quality and play/pause the stream:


And you are all set - enjoy streaming twitch on your Chromecast device! Have any questions or issues please feel free to leave a comment below and I'll do my best to help.

I've only tested the above instructions on my Linux based PC, but these extensions should work on any platform that supports Chrome/Chromium.

Cheers,
~Jeff Hoogland

Friday, March 7, 2014

HOWTO: Add Bodhi's Enlightenment Desktop to Ubuntu 14.04

One question we often had users ask us in the past was if it was possible to convert an existing Ubuntu LTS install into Bodhi Linux. Previously the answer to this question had always been "No", but with our 3.0.0 release built on top of Ubuntu 14.04 we are finally looking to change this. The following is how you can add the latest Bodhi desktop to your existing Ubuntu 14.04 install.

Step 1: Add the Bodhi Repo to your Sources

Open a terminal and run:

sudo nano /etc/apt/sources.list

At the bottom of the file that is opened, add the line:

deb http://packages.bodhilinux.com/bodhi trusty main 

Step 2: Sync package lists

Next you will need to sync your package lists with the command:

sudo apt-get update

Step 3: Install the Bodhi Desktop

Install Bodhi's E19 Desktop with the command:

sudo apt-get install packagekit && sudo apt-get install bodhi-desktop

If you have an older computer or just prefer E17 you can install that instead with the command:

sudo apt-get install bodhi-desktop-e17

After this completes an "enlightenment" session should now be available in your login manager. 

Enjoy your new enlightenment powered Ubuntu!

~Jeff Hoogland

Friday, February 14, 2014

HOWTO: Switch to HDMI audio out automatically on Linux

First things first, this is not a tutorial for getting your audio working over your HDMI if it isn't already. This assumes you already have audio over HDMI working via PulseAudio, but currently have to manually assign the new output after attaching your HDMI cable.

TL/DR

If you are using a Debian based distro and don't care about the details of how this works, then you can simply install the .deb file I've prepared here. After that finishes installing you should be good to go - attach your HDMI cable and the system should automatically switch from playing over the speakers/headphones to piping audio over the HDMI.

The Details or How we make things work on not Debian

How this works is a combination of PulseAudio, Bash, and a little bit of udev.

First things first, we need a bash script that with switch between PulseAudio outputs for us. Save the following bit of code to /usr/bin/hdmi_sound_toggle :

#!/bin/bash
#   Switches between soundcards when run. All streams are moved to the new default sound-card.

# $totalsc: Number of sound cards available
totalsc=$(pacmd "list-sinks" | grep card: | wc -l) # total of sound cards: $totalsc
if [ $totalsc -le 1 ]; then # Check whether there are actually multiple cards available
  exit
fi
# $scindex: The Pulseaudio index of the current default sound card
scindex=$(pacmd list-sinks | awk '$1 == "*" && $2 == "index:" {print $3}')
# $cards: A list of card Pulseaudio indexes
cards=$(pacmd list-sinks | sed 's|*||' | awk '$1 == "index:" {print $2}')
PICKNEXTCARD=1 # Is true when the previous card is default
count=0 # count of number of iterations
for CARD in $cards; do
  if [ $PICKNEXTCARD == 1 ]; then
# $nextsc: The pulseaudio index of the next sound card (to be switched to)
    nextsc=$CARD
    PICKNEXTCARD=0
# $nextind: The numerical index (1 to totalsc) of the next card
    nextind=$count
  fi
  if [ $CARD == $scindex ]; then # Choose the next card as default
    PICKNEXTCARD=1
  fi
  count=$((count+1))
done
pacmd "set-default-sink $nextsc" # switch default sound card to next

# $inputs: A list of currently playing inputs
inputs=$(pacmd list-sink-inputs | awk '$1 == "index:" {print $2}')
for INPUT in $inputs; do # Move all current inputs to the new default sound card
  pacmd move-sink-input $INPUT $nextsc
done
exit
Make our script executable with the command:

sudo chmod +x /usr/bin/hdmi_sound_toggle

Before moving on, confirm the script works as intended. While your HDMI cable is active run the command hdmi_sound_toggle and you should start hearing sound pipe out of the HDMI output.

Next, because PulseAudio is almost always run as a user level daemon, we need something that will move all users' Pulse sessions over to the new output when the HDMI is attached/detached. To do this we create the script /usr/bin/hdmi_sound_toggle_all with the contents:
#!/bin/bash

for dir in /home/*/
do
    dir=${dir%*/}
    sudo -u ${dir##*/} /usr/bin/hdmi_sound_toggle
done
Make this script executable as well:

sudo chmod +x /usr/bin/hdmi_sound_toggle_all

Confirm this script works as well, it needs to be run as root though, so run sudo hdmi_sound_toggle_all while your HDMI is attached - it should switch your output.

Finally, we need to create a udev rule that triggers our scripts when an HDMI cable is attached/detached. To do this we create the file /lib/udev/rules.d/hdmi_sound.rules with the contents:
SUBSYSTEM=="drm", ACTION=="change", RUN+="/usr/bin/hdmi_sound_toggle_all"
Note that having the full file path in the execute part is important. So if you placed your scripts somewhere other than /usr/bin like I recommended above - adjust this part accordingly.

You should be good to go, enjoy having audio over your HDMI happen automatically like it should by default. Have any questions, feel free to post a comment below and I'll do my best to help.

~Jeff Hoogland

Sunday, January 26, 2014

HOWTO: Bodhi Linux on the Acer C720 Chromebook

Early last week I acquired my latest tech toy an Acer C720 Chromebook:


I've been on kind of a Chromebook kick lately and I must say I love this Acer C720 even more than Samsung Chromebook. Why you ask? Well - the primary reason is the processor architecture. The Acer C720 is a traditional x86 processor, meaning you are able to easily boot alternative OSes on it.

This also means that under a Linux OS I am able to run applications like the latest Google Chrome browser, Google Hangouts (or Skype), Steam, and even Netflix.

I plan on writing a formal review of the C720, similar to the one I did for the Samsung Chromebook, later next month. Today however I would like to share how you can go about installing Bodhi Linux on the Acer C720 Chromebook.

Please note following these steps WILL permanently delete all local data and configurations of your ChromeOS!


Step 1 - Enable Developer Mode

Make sure your chromebook is off. Then hold the escape and refresh keys (where f3 should be) and power on the device. This should get you to a recovery screen - press ctrl+d followed by enter. The system should now reboot with developer mode enabled.

Step 2 - Enable SeaBIOS


After changing to developer mode, configure Chrome OS so that you can log in.

To enable the legacy bios:
  • Open a crosh window with Ctrl+Alt+T.
  • Open a bash shell with the shell command.
  • Become superuser with sudo bash
  • Enable legacy boot with:
crossystem dev_boot_usb=1 dev_boot_legacy=1

Step 3 - Create a Bodhi image for the C720

While the C720 uses an x86 processor, some of the hardware it uses doesn't have drivers in the mainline Linux kernel yet. Because of this you need to download a custom ISO image I've prepared for the C720 from here. You then need to write it to a flash drive using the dd command.

Change to the directory where you have downloaded the ISO image to and run:

dd if=bodhi-c720-chromebook.iso of=/dev/sdX

Where X is replaced with the drive letter of your USB stick. If you prefer a GUI tool or are using OSX/Windows to create the flash drive you can find detailed information on this process here.

Step 4 - Boot and install Bodhi

Plug the USB stick you prepared in step 3 into your Chromebook. At the startup screen press the key combination ctrl+l (that is a lowercase "L") to tell the system to boot from the legacy BIOS. Then press the escape key to select to bring up the boot menu, select your USB device from the list it provides.

From this point you can follow the normal Bodhi install instructions starting with step II.

Notes

When your Chromebook starts up you will need to press ctrl+l to boot into the legacy BIOS/Bodhi. Still looking for a work around to remove this step - if you know of one please let me know!

When I installed Bodhi on my Chromebook I wiped out all the Chrome partitions and gave Bodhi the full drive. I've not experimented with a dual boot setup. I don't really have a need for ChromeOS with how functional Bodhi is on this hardware.

The custom ISO image for the C720 differs from the normal Bodhi desktop release in a few ways. First is that it utilizes the 3.11 Linux kernel with a few custom patches to support the C720 hardware. Second is that it utilizes pulseaudio for the default sound system as alsa has a few issues. It has slightly newer Intel/Mesa drivers to support OpenGLES on the C720 by default. Finally, it comes with a custom E profile that has key bindings for Chrome OS function keys configured.

A picture is worth a thousand words, so here is the default desktop you will see on your Bodhi Chromebook install:


Finally, if you have any issues getting Bodhi setup/installed on your Chromebook I would ask that you please open a support request on our user forums as opposed to simply pasting a comment below.

Cheers,
~Jeff Hoogland

Sunday, January 12, 2014

HOWTO: Bodhi Linux on Samsung ARM Chromebook

The battery recently died in my old Asus Netbook which gave me some fire to finally get together a functional filesystem for the Samsung Chromebook I've had for a little over a year. I published a rough file system with install instructions here last December. Since then a few things have changed in the structure of ChromeOS and the install script/file systems needed some updates.

The following instructions install a Debian Wheezy based ARMHF file system with the Bodhi branded E17.6 desktop powered by the EFL 1.8.4

It is also worth noting that this updated installer script now supports installing the file system to an external media. When you run the second command in step three, simply provide an install target as the first argument (such as /dev/sda for a flash drive) and then press ctrl+u to boot tell the Chromebook to boot from an external media at start up.

Please note following these steps WILL permanently delete all local data and configurations of your ChromeOS! It essentially restores the system to factory defaults.



Step 1 - Boot in Recovery Mode

Make sure your chromebook is off. Then hold the escape and refresh keys (where f3 should be) and power on the device. This should get you to a recovery screen - press ctrl+d followed by enter. The system should now reboot into recovery mode.

Step 2 - Get to a TTY with Internet

Once the system reboots in recovery mode it will take a few moments to get everything configured (this requires no user input, just waiting - so grab a snack). Once the system starts up select a wireless access point to connect to, but do not log into a Google account. Now that we have an internet connection you need to drop to a TTY. To do this press ctrl+alt+-> (The "->" key is where f2 would be on a standard keyboard).

For the username type chronos and then press enter - no password is needed.

Step 3 - Download and run Bodhi installer

From the tty run:
wget http://goo.gl/HFG6a

Followed by:
sudo bash HFG6a

Both of the above commands are case sensitive so make sure you type them correctly! After running the second command you will be provided with some information about your Chromebook - you should be asked if you want to install our stable or testing release.

At this point I would recommend using the Testing release because it offers fuller hardware support (such at 3D) and a newer Chromium version. I'd only recommend using the stable release if you need exactly Debian Wheezy as a base for some reason.

Step 4 - Choose how much space you are giving Bodhi

The installer will prompt you for how much space you want to give to Bodhi. Enter an integer amount for how many gigs you would like to give Bodhi. On the 16gig smartbook the most I would recommend giving to Bodhi is 9gigs (with the max being 10).  For reference the base Bodhi install occupies around 1.6gigs. Once you select an amount of space to give Bodhi the drive will be re-partitioned automagically and then your system will restart. When it starts back up again you will need to walk through the ChromeOS setup process once more - again get as far as the Google login screen but do not log in.

Step 5 - Getting the Bodhi Filesystem

Get to a TTY again by following the instructions outlined in step 2 once more. Then run the same two commands provided in step 3. This time the Bodhi installer will see your drive has already been partitioned and it will begin downloading the Bodhi Chromebook image which it will then install. Note that this will take awhile depending on your internet connection speed as a 300MB tarball needs to be downloaded and extracted. After it finishes installing your system will reboot and you will be greeted by the Enlightenment desktop!

User Information

Default username:
armhf

Default password:
bodhilinux

The default user has sudo rights.

Getting back to ChromeOS

If you need to get back into ChromeOS after installing Bodhi on your Chromebook - don't worry it is still there. In a terminal client on Bodhi run:

sudo cgpt add -i 6 -P 0 -S 1 /dev/mmcblk0

Once you are done with ChromeOS you can run the following in the ChromeOS TTY to get back to Bodhi:

sudo cgpt add -i 6 -P 5 -S 1 /dev/mmcblk0

Notes

I am really happy with the state of this image. Audio works, screen backlight is functional, Chromium browser works, and Flashplayer works. Sadly opengles still escapes me, but I have no need to play games on my netbook.

Wrapping Up

As always, please do not post support requests here! Please direct them to the ARM section of our forums. I'd also like to say many thanks to Bodhi community member Seekamp for posting here about the many improvements he came across in the last year for Bodhi on the Chromebook.

Cheers,
~Jeff Hoogland

Sunday, December 1, 2013

HOWTO: Watch Netflix on Bodhi Linux

Not being able to utilize the Netflix video streaming service has been an issue on the Linux desktop for the past few years. This is due to the fact that Netflix utilizes Microsoft's Silverlight technology for video playback.

For the last few months though we have been able to watch Netflix in our native browsers on Linux using a Wine pluggin wrapper called Pipelight. Today I would like to walk you through the short process of using Pipelight to watch Netflix under Bodhi Linux.

Step 1 - Install Chromium or Firefox

Pipelight needs Chromium or Firefox to work. So if you are still using Bodhi's default browser Midori - you will need to install one of these other two browser. You can obtain your browser of choice by clicking on one of the links below:



Step 2 - Install Pipelight

Next we need to install the Pipelight plugin by clicking on the link below:


Pipelight depends on the Microsoft corefonts package. This means that if you do not already have these fonts installed they will be installed as part of the installation of Pipelight. When installing these fonts you need to agree to an EULA, to navigate to the Accept button you will need to use the tab key, and then press the enter button to select it.

Step 3 - Setup a User Agent Changer

The User Agent is a little code in your browser that tells the page you are viewing what browser you are using. In order for Netflix to even offer us the Silverlight player it needs to think we are on Windows. To do this we install a user agent changer browser plugin. Install the proper plugin linked below for your browser:



After you have the user agent changer installed - set your browser to detect as "Windows Firefox".

Step 4 - Watch Netflix!


Step 5 (Optional) - Add Netflix to the Permanent Spoof List

If you are like me then you hate having to manually click a button and change your user agent string back and forth every time you visit the Netflix site. Thankfully the User Agent Switcher for Chromium as a "Permanent Spoof List". Simply add the URLs shown in the image below to identify as Windows Firefox 3.5 (note the * at the end of the URLs - it is important):


Enjoy! If you have any questions or issues feel free to drop a comment below or open a support request on the Bodhi user forums.

Cheers,
~Jeff Hoogland

Tuesday, November 26, 2013

HOWTO: Test E18, EFL 1.8.0, and Terminology 0.4.0 on Bodhi Linux

As of this past weekend the testing builds of the Enlightenment window manager DR18 (E18 for short) are in the Bodhi Linux testing repository. The following are the steps you need to take if you would like to install and help test the future of the Enlightenment desktop on your Bodhi Linux install.

Step 1 - Add the testing Repository

First we need to add the testing repository to our software sources. Open our sources.list with sudo using the following command:

gksudo leafpad /etc/apt/sources.list

Towards the bottom of the file you will find a line that reads:

deb http://packages.bodhilinux.com/bodhi precise stable

After the "stable" component we want to add the "testing" component. To do this we edit the above line to be:

deb http://packages.bodhilinux.com/bodhi precise stable testing

Save and close the file.

Step 2 - Upgrade to EFL 1.8.0

Open your terminal emulator of choice and run the following command:

sudo apt-get update && sudo apt-get dist-upgrade

This command will tell you that it wants to remove a number of packages (ecore edje eet eeze efreet eina eio embryo emotion eobj ethumb evas). This is fine - all of these packages have been merged into one "efl" package. Let the upgrade command complete.

Step 3 - Install E18

The default "enlightenment" package in Bodhi Linux will remain as the DR17 desktop - we will not be forcing anyone to upgrade to E18 so long as E17 still builds with the latest Enlightenment Foundation Libraries. This means to replace E17 with E18 we need to install the E18 package. In your favorite terminal run:

sudo apt-get install e18

It will tell you it wants to remove the "enlightenment" package - let it. After it finishes installing you should restart your desktop environment. 

Congrats, you now have the E18 desktop to play with!

A few Notes

I would like to remind everyone that this is pre-release software and you should expect to encounter issues. You can report/discuss the issues you are having in the testing section of the Bodhi forums.

At this current point a number of the extra modules (such as places and the engage dock) that the Bodhi profiles use are not currently built for E18. We will be working on adding support for these over the next few weeks.

In this same vein - a number of the existing E17 themes will have issues running under E18. They will all need updates to function with the latest version of the desktop. So when trying to confirm bugs it is always best that you are using the "default" E18 theme when testing things.

If you run into issues getting the testing repo added or the software installed I would encourage you to please open a thread on our user forums as opposed to simply posting a comment below. It is much easier to debug software issues on a forum than in a comments section.

Cheers,
~Jeff Hoogland

Tuesday, December 18, 2012

Bodhi ARMHF Alpha for Nexus 7

Earlier this month we collected enough donations that I was able to pick up a Nexus 7 to do some development work on for Bodhi. Today I would like to share our first public images for the Nexus 7. They install, they boot up, and they are semi functional. By that I mean the touchscreen and wireless work OOTB and the interface runs smoothly on the device. I haven't had time to try and make audio work fully yet - but I have gotten some noise to come out of the speakers.

With the help of my lovely fiance I filmed the following short demo video of Bodhi running on the device:



Anywho - installing Bodhi on the Nexus 7 follows the same process as installing Ubuntu on the device. I don't have an automated installer finished just yet so you will need to install the Bodhi images using a manual install process. This can be done using the following steps:


Step 0 - Getting the Tools

Installing Bodhi on the Nexus 7 can be done from any Linux distribution so long as you have the proper android tools installed (if you are using Bodhi on your desktop the Android tools can be found in our repositories). Namely you need the fastboot command.

Step 1 - Unlocking your Nexus 7

The bootloader on the Nexus 7 needs to be unlocked to accept other operating systems. Start with your device off, then while holding the volume down button power the device on - you will soon see the bootloader screen. Attach the Nexus 7 to your computer with a micro USB cable and run the command:

sudo fastboot oem unlock

After you run this command your Nexus 7 will ask you to confirm you want to unlock the bootloader - do so. Then run:

sudo fastboot reboot-bootloader

to finish the unlocking process.

Step 2 - Get the Bodhi Files

You need to download and then extract both the tarballs found here.

Step 3 - Writing the data to the Nexus 7

Open a terminal to the directory where you extracted both the files you downloaded above. Then run the following commands in order:

sudo fastboot erase boot
sudo fastboot erase userdata
sudo fastboot flash boot boot.img
sudo fastboot flash userdata rootfs.img
sudo fastboot reboot


After you run the last command your Nexus 7 will reboot and automagically extract and install the Bodhi file system on your device (this will take a few minutes). When it is finished it will boot right into the Bodhi desktop for you.


User Information

Default username:
armhf

Default password:
bodhilinux

The default user has sudo rights.



Getting Support

Please, please, please do not make a comment on this post asking for support with an issue you encounter with installing/running Bodhi on your Nexus 7! Comments asking for support will be removed from this post. Instead please open a support request thread in the Nexus 7 section of our user forums. It is much easier to manage/search/solve issues in a message board format than a comments section.


Other Notes

I do consider this an alpha quality release. As noted above the sound still doesn't work by default and I am sure there are some other minor niggles that need to be worked out.

Cheers,
~Jeff Hoogland

Sunday, December 16, 2012

Bodhi ARMHF Alpha for Samsung Chromebook

As I mentioned in a post last weekend, I've got my hands on the new Samsung Chromebook. The hardware in this device is simply awesome (full formal review forthcoming), but ChromeOS left me wanting a real operating system with non-cloud applications. Thankfully I've been working on Bodhi's ARM branch for awhile now and it proved fairly simple to get at least a base system up and rolling on the Chromebook (largely due to the fact that ChromeOS is Linux based).

Now, unfortunately the current install process for getting an alternative operating system to boot on the Chromebook isn't as easy as our Genesi images - but if you follow the instructions I provide below to the letter you should have Bodhi booting on your Chromebook in no time!

Please note following these steps WILL permanently delete all local data and configurations of your ChromeOS! It essentially restores the system to factory defaults.



Step 1 - Boot in Recovery Mode

Make sure your chromebook is off. Then hold the escape and refresh keys (where f3 should be) and power on the device. This should get you to a recovery screen - press ctrl+d followed by enter. The system should now reboot into recovery mode.

Step 2 - Get to a TTY with Internet

Once the system reboots in recovery mode it will take a few moments to get everything configured (this requires no user input, just waiting - so grab a snack). Once the system starts up select a wireless access point to connect to, but do not log into a Google account. Now that we have an internet connection you need to drop to a TTY. To do this press ctrl+alt+-> (The "->" key is where f2 would be on a standard keyboard).

For the username type chronos and then press enter - no password is needed.

Step 3 - Download and run Bodhi installer

From the tty run:
wget http://goo.gl/HFG6a

Followed by:
sudo bash HFG6a

Both of the above commands are case sensitive so make sure you type them correctly! After running the second command you will be provided with some information about your Chromebook - press enter to continue.

Step 4 - Choose how much space you are giving Bodhi

The installer will prompt you for how much space you want to give to Bodhi. Enter an integer amount for how many gigs you would like to give Bodhi. On the 16gig smartbook the most I would recommend giving to Bodhi is 9gigs (with the max being 10).  For reference the base Bodhi install occupies around 1.6gigs. Once you select an amount of space to give Bodhi the drive will be re-partitioned automagically and then your system will restart. When it starts back up again you will need to walk through the ChromeOS setup process once more - again get as far as the Google login screen but do not log in.

Step 5 - Getting the Bodhi Filesystem

Get to a TTY again by following the instructions outlined in step 2 once more. Then run the same two commands provided in step 3. This time the Bodhi installer will see your drive has already been partitioned and it will begin downloading the Bodhi Chromebook image which it will then install. Note that this will take awhile depending on your internet connection speed as a 300MB tarball needs to be downloaded and extracted. After it finishes installing your system will reboot and you will be greeted by the Enlightenment desktop!

User Information

Default username:
armhf

Default password:
bodhilinux

The default user has sudo rights.

Getting back to ChromeOS

If you need to get back into ChromeOS after installing Bodhi on your Chromebook - don't worry it is still there. In a terminal client on Bodhi run:

sudo cgpt add -i 6 -P 0 -S 1 /dev/mmcblk0

Once you are done with ChromeOS you can run the following in the ChromeOS TTY to get back to Bodhi:

sudo cgpt add -i 6 -P 5 -S 1 /dev/mmcblk0

Getting Support

Please, please, please do not make a comment on this post asking for support with an issue you encounter with installing/running Bodhi on your Chromebook! Comments asking for support will be removed from this post. Instead please open a support request thread in the ARM section of our user forums. It is much easier to manage/search/solve issues in a message board format than a comments section.

Other Notes

In the current image the track pad is kinda fickle (tap to click doesn't work) and OpenGL support is currently non-functional. Other than that the image is very functional - I have been using it for my day to day activities for the last week now and I have been very pleased with the results. With that being said - please note I consider this an alpha quality release and as such Bodhi's ARMHF testing repos are enabled by default in the current Chromebook image.

One other thing to note is that the top row of keys acts as "function" keys (f1-f10) in Bodhi as though it was a normal keyboard. I personally use the volume up/down/mute keys often on my systems though - as such I have bound the alt key to act as a "function" key normally would on a laptop. Meaning alt+volume key will perform it's indicated action. Also - to make any noise come out of the speakers see this.

Closing Remarks

I would like to extend my thanks the author of this post who created a script for getting Ubuntu setup on the Chromebook. My own Bodhi install script is based directly on his.

Cheers,
~Jeff Hoogland

Friday, December 7, 2012

HOWTO: Start an SSH Session from ChromeOS

My lovely fiance knows how much I love my toys and opted to get me one of the new ARM based Chrome books as an early Christmas present. I'd been talking a lot about the device because the hardware on it is fairly fantastic for the 250$ price tag it comes with. At any rate - I'll be writing up a full formal review of the device at a later date (once I have had a chance to use it more). I also plan to create Bodhi ARM images for the device once time permits.

Until I have time to get Bodhi running on the device though I am stuck with ChromeOS - which while interesting leaves some to be desired. At the very least I need my operating system to have a web browser and a ssh connection - the former ChromeOS provides very obviously (the whole OS is one giant web browser). Getting an SSH connection from the device was not as straight forward however. I started by searching for a terminal emulator on the Chrome Web Store. As you can see - there are a few options there, but none of them would successfully open a ssh connection to my build servers from my Chrome Book.

A little bit off searching on the Linux answer machine yielded me a proper solution from the comment section of a posting. To get a SSH connection on ChromeOS you do not need to add any software! Pressing the key combination:

ctrl+alt+t

Will open a browser based terminal emulator called "crosh" in a new tab of your browser on ChromeOS. Now my build servers are accessed from a non-default ssh port. On any Debian based operating system I would use the following to connect:

ssh -p username@myserveraddy.com

The ssh client on ChromeOS doesn't seem to like the -p argument for a port number though. I found two ways to connect to a ssh server using a different port number. The first is simply:

ssh username@myserveraddy.com

The second is a whole lot less intuitive. In order you type:

ssh
host myserveraddy.com
user username
port  
connect

Have fun sshing from ChromeOS!
~Jeff Hoogland

Wednesday, November 28, 2012

HOWTO: Check Hard Drive Health with Linux

I've been experiencing full system lockups on my netbook off and on for the last few weeks now. Up until recently though they had been few and far between so I'd just been ignoring the issue. A few days ago however they got bad enough to the point where I had to restart my system three times in the same hour.

Needless to say shortly after that I started running system checks. A quick boot into memtest showed that my RAM was A-OK (which is good considering one stick of RAM is stuck to the netbook's mother board). The next piece of hardware I checked was my netbook's SSD. Almost all modern hard drives have "SMART" controls today to allow you to check their current health status.

I booted my netbook from a Bodhi live USB drive and did a quick:

sudo apt-get install gsmartcontrol

GSmartControl is a GUI front end for smartmontools - a library that lets you interface with your drive's SMART controls and run various health checks on the drive. The interface is fairly straight forward and right clicking on one of the displayed drives gives you the ability to begin checking it.


There are options for a short test (which takes a minute or two) or a longer test (which can take up to several hours on larger drives to complete - depends on the size of your drive).


After my netbook finished the longer test I was greeted with some bad news - my SSD was failing in one area and getting close to failing in others:


At any rate GSmartControl is a fantastic tool for checking the health of your drive that is fairly easy to use. Hopefully the results of your drive check will be better than my own!

~Jeff Hoogland

Friday, August 3, 2012

HOWTO: Launch OMXPlayer via a GUI

I'm going to be on an ARM kick for the next two weeks before my fall classes start up. In addition to porting Bodhi to the Pi one of my goals is also to replace my media PC with a Pi. Even though the processor in the Pi is fairly weak, it can decode HD video using it's GPU chip if you use the proper media player. This means that your old favorites like VLC and mPlayer will not work, so we must turn to a tool designed just for the Pi: OMXPlayer.

Now because OMXPlayer is still very new, it is still very basic. So basic in fact it's key bindings (for play/pause/stop/quit) only function if the program is launched via the CLI. Knowing my Fiance and friends who often use the media PC would give me no end of grief if they had to open a terminal to play movies - I set about finding a solution. Today I'd like to share that fairly simple solution with you!

To allow users to simply "double click" on a media file via the file manager and have it open in OMXPlayer you need to create a .desktop file for OMXPlayer. Open a terminal on your pi and run:

sudo nano /usr/share/applications/omxplayer.desktop

For it's contents paste:

[Desktop Entry]
Type=Application
Name=OMXPlayer
Categories=AudioVideo;Player;
Exec=omxplayer -o hdmi %f
Terminal=true
Icon=emblem-video

Save and close the file (ctrl+x in nano) and you should be good to go! When you double click on a media file in your file browser simply select Open With: OMXPlayer! Please note some users have reported this doesn't work with LXDE - I cannot confirm this though as I only use E17 and it works fine there :)

Cheers,
~Jeff Hoogland

Wednesday, August 1, 2012

HOWTO: Clone all Programs Installed via Apt

Today I would like to share a nifty trick for cloning your application selections installed via the apt-get package manager. It is as simple as running two commands. First on the system you wish to clone, open a terminal and run this command (which is on pastebin due to blogger formatting issues).

Next, simply copy the package-list to the system you wish to setup a copy on. Finally open a terminal and run:

xargs apt-get install -y < package-list

In the same directory you copied the package-list file too. Please note that this trick only works when your two systems in question have exactly the same sources/operating system version.

Cheers,
~Jeff Hoogland

Tuesday, July 31, 2012

HOWTO: Create and use .IMG files from the CLI

Now that Bodhi's second stable release for the desktop is settling down, I am going to be putting a bit of focus on our ARM releases for the next couple of weeks. ARM images typically are provided in the form of .IMG files. Using a downloaded .IMG file is fairly simple. You can write it to a drive of your choice with a single command:

sudo dd if=myfile.img of=/path/to/drive

One thing worth noting though is that /path/to/drive should not include any partition number. An example path would be something like:

/dev/sdb

Note that writing large images can take a good deal of time depending on the speed of your drive and that this command will not give you any feedback until it finishes.

Now, perhaps you are like myself and have some interest in creating/distributing .IMG files of your own. Creating image files is also fairly easily and uses the same dd command. An example of how to create an image file is:

sudo dd if=/path/to/drive of=image.img

Note that this command copies the entire contents of the drive - meaning if your drive is large your .IMG file will be equally large! Now, what do you do if you only want to copy part of your drive? Simply add one argument to the above command of course! For example to only copy the first two gigs of data on a drive to a .IMG file use:

sudo dd if=/path/to/drive of=image.img bs=1M count=2048


I am by no means an expert at using dd, but if you run into any issues feel free to drop a comment below and I'll do my best to help you out.

Cheers,
~Jeff Hoogland

Sunday, July 8, 2012

HOWTO: Make your QT Applications Blend In

Since Bodhi Linux includes GTK applications by default, you will find they have a fairly neutral tone that blends fairly well with the rest of the system. Beyond this Enlightenment has a built in tool for changing the look of GTK applications.

What is a person to do though when they install VLC or some other QT application for the first time and it looks like this:


First off - don't panic! It is a fairly simple/quick fix to get your QT applications to blend in with the rest of your desktop. You first simply need to install the QT theme manager - on Debian based systems such as Bodhi this can be done from the command line via:

sudo apt-get install qt4-qtconfig

Once this package is installed a new option should appear in your menu under "Preferences" labeled "Qt 4 Settings". Launching this will present you with a window the looks something like this:


Only your "GUI Style" will be something other "GTK+" by default. To change this simply select "GTK+" from the drop down menu and then close the settings manager.

You should now be all set with nicer looking QT applications:


Cheers,
~Jeff Hoogland

Wednesday, May 30, 2012

HOWTO: Give Network Manager Sufficient Privileges

Nm-applet is easily one of the most flexible network connection tools available under modern Linux distributions today. Because of this it is my network manager of choice. The only issue is that under a good deal of modern window managers (such as E17) nm-applet doesn't let your normal user connect to new networks without a bit of additional configuration.

The following is how to get around the message:

Failed to add new connection: (32) Insufficient privileges.

From the 0.9.x revision of the network manager.

It is a fairly simple fix that simply involves creating a configuration file. Crack open your terminal emulator of choice and run:

sudo nano /etc/polkit-1/localauthority/50-local.d/org.freedesktop.NetworkManager.pkla

For the contents of this file simply paste this and then save+close the file.

Note if your user will need to be part of the netdev group for that code to function (if you don't have a netdev group, any group your user is a part of will work). To check the groups your current user is in simply run groups myusername in terminal (replace myusername with the name of your user clearly).

~Jeff Hoogland

Monday, May 14, 2012

HOWTO: Diablo 3 on Linux

Like many nerds around the world this evening I am prepping for what, odds are, will be the first of many all-nighters involving Blizzard's soon-to-be-released Diablo III (which releases tonight at midnight!). If you have been by my blog before then odds are you will know that I prefer to do as much of my gaming as possible on my operating system of choice: Linux. Something else you may or may not know is that I am also a large fan of the company Code Weavers that produces the commercial Wine software Crossover.

Want to know the reason I am such a fan of Crossover? A few weekends ago I spent about 6 hours trying to get Wine sources to compile with various patches to make the Diablo 3 open beta work on Linux. The result? I ended up hanging my head in defeat and just playing on my OSx86 system so I didn't miss the weekend event. At that point Diablo 3 didn't work OOTB on default Wine builds or Crossover.

This morning I dropped by #crossover on FreeNode to check in with the Crossover folks to see what their plans were for the Diablo 3 release due out tonight - were us Linux folks going to have to wait?

Nope!

The Diablo 3 release is something they had been very aware of and had been testing rigorously in-house. I was informed they had internal builds of Crossover where Diablo 3 was functional enough to play this very day. In fact within three hours of my speaking with them they had an "unsupported build" release that was functional with the Diablo 3 installer (note: if you are not a current Crossover customer that above link will not work for you).

I promptly installed the update and was on my merry way:


As of now if you are using Crossover 11.1 or newer Diablo 3 is now officially supported,

Now - if you are not interested in supporting Crossover - you can attempt to succeed where I failed and compile Wine with some of the patches listed on the Diablo 3 Beta AppDB page. Odds are if you wait for the next Wine developmental release or two, Diablo 3 will just start working by default - the Crossover folks are one of the lead contributors to the Wine project and most of their code improvements go upstream.

Trouble Shooting Tips:
If you are having issues getting it to run via the latest Wine builds it might be worth your while to use winetricks to install the "vcrun2008" package.

If your login attempt is hanging at the "authenticating credentials" step, exit Diablo, open a terminal and run:

echo 0|sudo tee /proc/sys/kernel/yama/ptrace_scope

~Jeff Hoogland

Wednesday, March 28, 2012

HOWTO: TI-83 Emulator on Linux

When you are trying to show a classroom full of students how to enter a complicated equation into their calculator it is pretty much always best to give an example. In order to do this in an effective manner I like to be able to display the calculator on the projector. Most students today have a TI83/84 model so being able to have an emulator for one of these on my laptop is essential. The following is how I went about getting a TI-83 emulator setup on my Bodhi Linux machine:

First - Download, Compile, and install Tilem

My TI emulator of choice is called "Tilem". It is an open source project and you can download the latest source code here. Extract it's contents and do the:

./configure
make
sudo make install

dance that compiles so much software. If the software doesn't compile for you first try be sure to check the README file and the configure script output - odds are you are simply missing a build dependency. If you can't figure out the issue on your own pastebin the error message and post it in the comments - I'll do my best to lend a hand.

Second - Obtain and use a ROM Image

There are a few different ways to get an image of a TI-ROM. You can dump the ROM off of a physical calculator you own (mildly complicated, check that README file for details on this) or you can hit Google. I found a good TI83 download here.

Next simply launch

tilem2

and point it to the location of your calculator ROM file. Once you select it your TI emulator should appear on screen:




Enjoy!

~Jeff Hoogland

Thursday, February 9, 2012

HOWTO: Run your Games in a new Xserver

When I play a game that runs full screen on Linux but still want to have things running in the background I'd like to check on here and there without closing my game I typically launch my game into a new Xserver instance. This fairly simple setup allows you to change between Xserver instances by using ctrl+alt+f7 and ctrl+alt+f8.

To launch your application into a new Xserver instance you simply need to launch the program as follows (I'll use Desura in my example):

xinit /home/honey/desura/desura %U -- :1

Once you run this your screen will flick once or twice as the new X instance is created and the program is automatically launched within it. This new X will be accessible via the keyboard shortcut ctrl+alt+f8, to get back to your previous X instance simply press ctrl+alt+f7.

Now, one other thing to note is that on some Linux distributions you may be greeted with the following message when you try to run xinit as a normal user:

X: user not authorized to run the X server, aborting.

Don't panic, the fix for this is also simple. In terminal run:

sudo nano /etc/X11/Xwrapper.config

This will open a file for editing - we only need to adjust one line. Make sure somewhere in this file is the line:
allowed_users=anybody

Save and close the file and the above xinit file should now work. Happy gaming folks!

~Jeff Hoogland

Tuesday, February 7, 2012

LibreOffice Math/Formula Editor Examples

While I love technology another one of my passions is mathematics. I am currently working on a graduate degree in this field. I like to type a good deal of my course work so it looks presentable.

I know the industry standard for typing mathematics is using a software such a LaTex or Lyx, but I haven't quite made the leap from using LibreOffice as my every day word processor as of yet. Thankfully, LibreOffice comes with a fairly power equation editor - if you know how to use it! The following is my personal cheat sheet for using the editor - enjoy!





If you'd like to download a copy of this you can easily copy and paste I've got an ODT version here and a PDF version here.

~Jeff Hoogland