Thursday, August 27, 2015

Rename users on Raspbian

To rename the default user pi on Raspbian to another name, run the following command
usermod -l <new_username> -d /home/<new_username> -m pi

Log into as root on Raspbian

To enable root login on Raspbian, you must give root a password.
sudo passwd

Default groups for user pi in Raspbian

groups pi
pi : pi adm dialout cdrom sudo audio video plugdev games users netdev input spi i2c gpio

Saturday, August 15, 2015

Simple Sharing with Samba

Add a new section to the end of /etc/samba/smb.conf.

    comment = Ubuntu File Server Share
    path = /mnt/disk0/backup
    writeable = yes
    guest ok = yes

Change the username of the share to nobody, and change the group of the share to nogroup.

chown -R nobody.nogroup *

Broadcast Linux Hostname to Windows

Edit /etc/nsswitch.conf

Add wins to the line
hosts:      files dns


Wednesday, July 22, 2015

Put Openelec to Sleep from Command Line

You can put an Openelec system to standby with the following command.

systemctl suspend

Sunday, December 28, 2014

Windows Resource Protection found corrupt files

I will transcribe this page. In the meantime, here is the screenshot of the problem and solution.

Getting the middle buttton on Lenovo trackpads to behave like a middle button

The default behavior of the middle button on Lenovo Trackpads does not generate a middle click. If you use linux or cygwin, you may want the middle button to behave like a middle button for pasting. If you use Windows, you may want the middle button to open new tabs in your browser.

Open the Ultranav Options, Manage Settings, Ultranav Tab, Trackpoint settings, settings in scrolling function section, choose 'smooth' button.

Firmware for Belkin N300 F7D7301 wireless router

This post contains links to the various firmwares available for the Belkin F7D7301 router.

Belkin Firmware

DD-WRT Firmware

Tomato Firmware


Calling bash from batch

I came across a neat trick for calling cygwin scripts using Windows batch files.

Saturday, December 27, 2014

Setting up wireless internet on Raspberry Pi

Confirm the compatibility of your device here.

This guide assumes using Raspbian release 2014-12-24.

If you have not yet installed wpa_supplicant, install it by running the following command.
sudo apt-get install wpasupplicant

Add the following lines to the end of /etc/wpa_supplicant/wpa_supplicant.conf.

Restart your wireless network interface by running the following commands.
sudo ifdown wlan0
sudo ifup wlan0

Good luck.


Play youtube audio from the command line on Raspberry Pi

mps-youtube allows you to play youtube content via a text terminal without needing X. As a result, without X, all you will get is audio. For me, I want to stream youtube audio to speakers, so this is one solution.

Install the latest Raspbian onto a SD card. If you are not familiar with how to do this, follow this guide.
I used Raspbian release 2014-12-24 for this guide.

1. Boot into the newly flashed Raspbian image.
2. Install python-pip by running the following command.
sudo apt-get install python3-pip
3. Install mps-youtube using pip by running the following command.
sudo pip-3.2 install mps-youtube

The version of Raspbian that I used included omxplayer as part of the default image. If you do not have it, you will need to install it by running the following command.
sudo apt-get install omxplayer

1. Invoke mps-youtube by running the following command from a terminal.
2. Configure the audio player by running the following command.
set player omxplayer
3. Search for youtube content by running the following command.
/<search terms>
4. Select one of the results to play by typing the number.

If you do not hear audio, you should check the audio output of your raspberry pi.
Similarly, you should also test omxplayer.

Good luck.

Tuesday, July 01, 2014

McAfee Host Intrusion Prevention blocks Chromecast

There are multiple reasons why Chrome may display the Chromecast "No Cast devices found" message when you try to cast a webpage. One such reason is blocking that is performed by McAfee Host Intrusion Prevention. If you are running McAfee Host Intrusion Prevention, confirm this by opening it and click on the "Activity Log" tab. You may see multiple copies of the following message.

Google Chrome (chrome.exe) Blocked Incoming UDP - Source : (xxxx) Destionation Block All Traffic

To resolve this issue, you will need to add an exception to the Firewall.

Click on the "Firewall Policy" tab. Click Add.

On the Action and Direction page, enter "chromecast" as the Name. Select Either for the Direction. For Action, click Allow and click Next.

On the Protocol and Address(es) pages, for Network Protocol, select Any Protocol. Click Next.

On the Protocol and Ports page, click Next.

On the Application page, click Next.

On the Set schedule page, click Finish.

After these changes have been made, you should be able to access the cast device in Chrome. If not, you may have another problem. To isolate the problem, try the following.
  • disable the firewall
  • disable VPN connection

Wednesday, June 18, 2014

Accessing the CFE miniWeb Server page after installing DD-WRT

If you are accessing the CFE page from the default Belkin firmware, you should configure your client with a static IP of 192.168.2.x. However, if you have already installed DD-WRT and are trying to access the CFE page, you should configure your client with a static IP of 192.168.1.x.

See instructions here on how to access the CFE page.