Switch back and forth between Wifi and AP on Raspberry Pi

Source: http://sirlagz.net/2013/01/22/script-starting-hostapd-when-wifi-goes-down/ Source: https://www.raspberrypi.org/forums/viewtopic.php?f=26&t=38323 I’ve had issues with my WiFi in the past, and with my Pi running headless it’s sometimes a pain to get it connected back up to WiFi, so I’ve created this little script to start hostapd and dnsmasq whenever the WiFi connection went down, which allowed me to SSH into the … Continue reading Switch back and forth between Wifi and AP on Raspberry Pi

On Nautilus-dropbox installation on Ubuntu

I'll have to say it's somewhat problematic... The installation usually would stalk somewhere and later gives you this error: E: Unable to lock the administration directory /var/lib/dpkg/lock? How to fix it: sudo rm /var/lib/dpkg/lock should do the trick. You can use ps afx|grep dpkg to check if there is still a process runnning at the … Continue reading On Nautilus-dropbox installation on Ubuntu

How to use secure VNC with SSH

Securing a VNC connection with OpenSSH I write this sitting at Maude's Cafe in downtown Gainesville via GRU's public wireless network which was just deployed. I'm doing it, coincidently enough, over VNC encrypted via SSH. This ties in nicely with my recent wireless articles, including my initial adoption and compiling and configuring drivers.So, while I … Continue reading How to use secure VNC with SSH

How to send an email in a command line?

The approach below probably is not safe, since it exposes your email address with password. 1. Install ssmtp : sudo apt-get install ssmtp 2. Edit the ssmtp config file : sudo gedit /etc/ssmtp/ssmtp.conf Enter this in the file: root=username@gmail.com mailhub=smtp.gmail.com:465 rewriteDomain=gmail.com AuthUser=username AuthPass=password FromLineOverride=YES UseTLS=YES 3. Enter the email address of the person who will … Continue reading How to send an email in a command line?

How to configure Processing to run on Raspberry Pi?

Processing is an open source programming language (processing.org) and environment for people who want to create images, animations, and interactions. This is how to install it on your Raspberry PI: install the java 6 sdk sudo apt-get install librxtx-java openjdk-6-jdk download and unzip the Linux (x86) version of Processing 1.5.1 to the /home/pi directory http://processing.googlecode.com/files/processing-1.5.1-linux.tgzContinue reading How to configure Processing to run on Raspberry Pi?

How to upload pictures from Raspberry Pi to Dropbox

Here is an easy way to upload your photos taken by using RasPiCamcorder straight to DropBox. The problem is called Dropbox-Uploader, by Andrea Fabrizi. A truly brilliant piece of work that gives you access to your DropBox account right from the command line. You do have to jump through a couple of hoops to get … Continue reading How to upload pictures from Raspberry Pi to Dropbox

How to run system commands Java (Linux environment)

In Python, we use import os os.system('sudo vncserver stop')   What about in Java. Below is one example. import java.io.*;   public class java_system_call {       public static void main(String args[]) {           String s = null;           try {                       // run the Unix "ps -ef" command             // using the Runtime exec method:             Process … Continue reading How to run system commands Java (Linux environment)