1. Set up a script in /etc/init.d/ For example, you want to run tightVNC server on a Raspberry Pi first use a text editor to write a script sudo nano /etc/init.d/tightvncserver Then add the following lines to the file /etc/init.d/tightvncserver #!/bin/sh #/etc/init.d/tightnvcserver VNCUSER='pi' case "$1" in start) echo "Starting tightVNC Server for $VNCUSER" sudo $VNCUSER … Continue reading How to set up something to run at boot on Linux
Internet of Things
How to configure Geany to run Java
You should configure the "Set Build Commands" under "Build". This is where you specify the Java commands and execute commands. Compile: "C:\Program Files\Java\jdk1.8.0_45\bin\javac" "%d\%f" Execute: "C:\Program Files\Java\jdk1.8.0_45\bin\java" "-classpath" "%d" "%e"
Processing.js – convert Java into JavaScript
Processing.js Quick Start - Processing Developer Edition Introduction This quick start guide is written from the standpoint of a Processing developer. No HTML or JavaScript knowledge is assumed, and only basic Processing knowledge is necessary. Index For the Impatient Why Processing.js? The Web: from Java to JavaScript Processing.js uses Modern Web Standards Writing a Processing.js … Continue reading Processing.js – convert Java into JavaScript
Basic MySql commands
1. How to log in mysql mysql -u root -p Then input password. 2. How to log out mysql> exit 3. How to delete a database or a user mysql> drop schema <database_name>; mysql> drop user <a_user_name>; mysql> drop user <another_user_name>; mysql> FLUSH PRIVILEGES; Or, mysql> drop database <db_name>; mysql> FLUSH PRIVILEGES; 4. List existing … Continue reading Basic MySql commands
How to start/stop and restart a service on Linux
For example, MySql sudo service mysql start sudo service mysql stop sudo service mysql restart
Arduino, Raspberry Pi, Beaglebone, and more…
This article was originally posted at Michael Leonard’s blog and has been re-posted here There are already many articles out there comparing Arduino, Raspberry Pi, and BeagleBone Black; this is not one of those articles. I believe it is clear that Arduino is in a different league than the Raspberry Pi or BeagleBone Black, and … Continue reading Arduino, Raspberry Pi, Beaglebone, and more…
How to set up SSH on Raspberry Pi
SSH is a secure method of logging onto a remote computer. If your Pi is networked then this can be a handy way of operating it from another computer or just copying files to or from it. First you have to install the SSH service. This is done by this command: sudo apt-get install ssh … Continue reading How to set up SSH on Raspberry Pi
A more detailed tutorial on how to allow remote access
Setting up remote access to your local network is one of the coolest things you can do with your router, as it allows you to remotely view your screen, access files, control services like BitTorrent remotely, and so on. Basically, anything you can do at home can be made possible by just opening a few … Continue reading A more detailed tutorial on how to allow remote access
How do I make a Python script executable on Linux/Unix?
You need to do two things: the script file’s mode must be executable and the first line must begin with #! followed by the path of the Python interpreter. The first is done by executing “chmod +x scriptfile” or perhaps “chmod 755 scriptfile". $ chmod +x myscript.py The second can be done in a number … Continue reading How do I make a Python script executable on Linux/Unix?
How to install an init.d script in Ubuntu?
Reference link: http://askubuntu.com/questions/335242/how-to-install-an-init-d-script-in-ubuntu For example, to create a new script "vncserver" sudo editor /etc/init.d/vncserver Then enter the shell script (e.g., define start, stop, status, etc. check out one example inside that folder...). Afterwards, make sure that you make the script executable after creation. sudo chmod +x /etc/init.d/vncserver Now insert the service into the start-up system … Continue reading How to install an init.d script in Ubuntu?