Android apps to help me maintain sites when out of the office

Over the years I have noticed that everything breaks when I am away from my workstation.

To avoid have to drive back to the office, my home, or the hotel I have been looking for a good set of Android applications that will allow me access to my code and publish it back to the server or a SVN repository.

The keyboard – A.I. Keyboard Free

The first thing I needed was a full keyboard. Let’s face it you cannot edit long blocks of code or URLs with default touch screen keyboard. So, I downloaded A.I. Keyboard Free.

This keyboard allows for the most important thing needed to navigate source code. Arrow Keys. I know that does not sound like much. But, I have issues with touch devices to going to the spot that I clicked in the URL or in a paragraph.

The keyboard also offers keys to undo and redo text or cut and paste items, use extended symbols, and allow the user to adjust the keyboard size to that which best fits your typing.

SVN – OASVN Free

I will admit there are not a lot of choices for SVN on Android. But, OASVN does a good job for when you are out of the office.

To down load your repository you just need to fill out a few form fields. Set the path where you want to store everything on your mobile device. Then you are ready to check out.

The editor – DroidEdit Free

I needed an application that would do more than a simple text edit. DroidEdit does syntax highlighting, undo, and redo. As an added bonus you open file from the local path, Dropbox, and Box.

When opening a document you can have the application prompt you to select the encoding. This is helpful when working with document such as XML that require UTF-8 encoding.

SSH – ConnectBot

I use a Linux server to host and test my sites. So, I need to be able to SSH to my servers and update the local SVN repository. ConnectBot allows me to that.

Browsers – Firefox,Google Chrome,Dolphin,Opera, etc.

There are several browsers these days for Android. Each behaves and renders things a little differently. So, you will need to find the one that best fits you testing and development needs.

For my sites I like to use Dolphin. It seems to render more like a desktop browser. It allows you to toggle the User Agent between Android, Desktop, iPhone, iPad, and Custom triggering sites to load different versions or a web page. Not all sites will load correctly in Dolphin. This is because of developers limiting what browsers are support on their sites. Just another reason to test things in various browsers and on different devices/platforms.

Redmine SVN set up.

For those of you that do not know, “Redmine is a flexible project management web application. Written using the Ruby on Rails framework, it is cross-platform and cross-database.

Redmine is open source and released under the terms of the GNU General Public License v2 (GPL).”

We are using the TurnkeyLinux version of Redmine which allows us to run a pre-built Virtual Machine image.

It works pretty good right out the box. One of the nice features is being able to run Subversion (SVN). Allowing you to version control, archive and back up your code.

To tie a project into SVN you need to manually set a few images in the web interface.

Log into Redmine via web interface

  1. Create/edit a project
  2. Go to “Repository” tab
    • Select SCM as Subversion
    • file:///srv/repos/svn/{PROJECT NAME}
    • Create a Login
    • Create a Password
  3. Click Save

Next you will need to log into Redmine server via SSH and complete the following steps.

  1. Create a folder to store the new repository:

    mkdir /srv/repos/svn/{PROJECT NAME}
  2. Create the repository.

    svnadmin create /srv/repos/svn/{PROJECT NAME}
  3. If need to you can verify the repository with the following line of code.

    svnadmin verify /srv/repos/svn/{PROJECT NAME}
  4. Edit the configuration file for the repository.

    nano /srv/repos/svn/{PROJECT NAME}/conf/svnserve.conf
  5. Unhide the following items:

    anon-access = read
    auth-access = write
    password-db = passwd
  6. Save file
  7. Edit the password file to mamange user names and passwords

    nano /srv/repos/svn/{PROJECT NAME}/conf/passwd
  8. When finished adding the user accounts save the file and exit the editor
  9. You may need to restart service/server

    touch /etc/init.d/svnserve

Finally connect to the Repository via tortoiseSVN

  1. Use tortoiseSVN “repo browser” to connect to svn://{IP ADDRESS}/svn/{PROJECT NAME}
  2. Add the following folders:

    • branches
    • trunk
    • tags

  3. Set folder on development machine.

Installing Samba on Ubuntu

Samba is a Local Area Network (LAN) file sharing service for Linux and Unix.

To download the Samba pages need run the following line.

sudo apt-get install libcups2 samba samba-common

After the packages are loaded we need to edit the Samba configuration file. To do that we will use the text editor nano.

nano /etc/samba/smb.conf

In the global section, remove the “#” at the beginning of the line security = user so that it looks like this:

[...]
# "security = user" is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html
# in the samba-doc package for details.
   security = user
[...]

This enables Linux system users to log in to the Samba server.

Close the file and restart Samba.

Adding Samba Shares

If you have not already determines a share directory you may wish to create generic share for system user accounts.

mkdir -p /home/shares/allusers

Next adjust the owner of directory and all the files and subfolders for the directory share

chown -R root:users /home/shares/allusers/

Now you can set the user permissions for all the files and subfolders for the directory share

chmod -R ug+rwx,o+rx-w /home/shares/allusers/

Now we can edit the Samba configuration file to set up the share.

vi /etc/samba/smb.conf

Add the following lines of code to the end of the smb.conf file

[allusers]
  comment = All Users
  path = /home/shares/allusers
  valid users = @users
  force group = users
  create mask = 0660
  directory mask = 0771
  writable = yes

You may want to also add a line to the configuration to limit which users have permission to write to file

write list = userX

Next restart the Samba service to load you changes.

Managing Users

Setting the user account up

Before adding users to Samba you must add them to the system. Do this by running the useradd command. Then the user name. Followed by -m -G. Lastly the name of the group. In this case users

useradd userX -m -G users

Set the user account password

Now that we have created a user account we need to set a password for said account.

passwd userX userY

Adding the User Account to the Samba User Database

Now we can add the user to the Samba database. You will be prompted to create a password for the Samba account. In most cases you want the system user account password and Samba password to be the same.

smbpasswd -a userX

Connection to a Samba Share

Windows

To connect to a Samba share you will need to open the Windows Explorer program. In the address bar type \\ and the IP address of the machine you are trying to connect to.

\\10.0.0.11

Portable Apps

I had a posting on my old blog about Portable Apps and want to talk about them for those of you that do not know what they are.

Basically Portable Apps allow users to take some of their favorite apps with them where ever they go. For instance I installed the portable apps to my iPod, which I can use as a portable hard drive for backup.

I get calls from people all the time that need help fixing their computers. To avoid downloading software to install on a clients machine. I simple connect my iPod to their computer, run the Portable Apps menu, and now have access to all my applications. I can scan for viruses, trojans, malware and spyware. Check hard drives for bad sectors, recover deleted files, and defrag. Additional apps allow me to packet sniff network traffic, surf the internet, make Skype calls, manage passwords, edit and browse the photos. And if you really need to there a ton of games.

These are some of my day-to-day apps. But there are tons more at PortableApps.com

  • Fire Fox – Web browser
  • Google Chrome – Web browser
  • Opera – Web browser
  • FileZilla – FTP Client
  • Mozilla Thunderbird – Email Client
  • Pidgin – Chat with AOL, MSN, Yahoo, etc.
  • PuTTY – telnet and SSH client
  • OpenOffice – word processor, spreadsheet, presentations with Microsoft compatibility
  • LibreOffice Portable – word processor, spreadsheet, presentations with excellent compatibility
  • ClamWin Portable – Antivirus
  • Eraser Portable – securely delete files and data
  • KeePass Password Safe – Secure, easy-to-use password manager
  • Spybot – Search & Destroy – Spyware detection and removal
  • 7-Zip – File archiver and compressor
  • CrystalDiskInfo – disk health monitoring tool
  • Disk Cleaner – cache, temp file and history cleaner
  • Smart Defrag – disk defragmentation and optimization
  • TeamViewer – remote PC support and screen-sharing
  • Toucan – backup, sync and encrypt for advanced users
  • VirtuaWin – virtual desktop manager
  • Wise Registry Cleaner – registry cleaner and optimizer
  • Wise Data Recovery – data and file recovery
  • Notepad++ – A full-featured text editor with syntax highlighting

Visual Trace Route via VisualRoute.com

I some times get calls from a client telling me that their connection to a site is bad or slow. As always, testing from my office is fine. But, how do you check a server from out side you network?

Well, here is one way. As you know there is tracert for DOS and shell. But, is only for the network that you are connect to. To test out side you network you might want to use VisualRoute.com and follow these steps.

  1. Go to VisualRoute.com
  2. Click Live Demo on the gray menu bar.
  3. Select which region of world you wish to connect from (“North America”)
  4. Select a push pin to select a server to test from (“Oklahoma City, Oklahoma)
  5. Next the site will try and run the Java app that talks to the server you selected. You may be prompted to verify that you want to run this Java app.
  6. Once the app is loaded you should see field labelled Perform connection test to. The filed is per-populated with your IP address.
  7. To test a URL or IP address other than your own. Change the field value for Perform connection test to ( http://www.lighthouseknowledge.com )
  8. Click the start button to the right of the field.
  9. When the test is complete the Summary will give you a visual representation of the network path it took, a performance chart of said machines, text analysis information, and a map of the path it took. All of which are clickable for more information or to load each segment in its corresponding tab.

Visualware, the developer of VisualRoute.com, allows you purchase a desktop application from them perform the same task but from with the network you are in.

If you wish you can also download the server version from Visualware and be added to the world wide network list of trace route servers.

htop

I was looking for a tool that would allow me to SSH into a server and see what services are running and the performance output. Top does provide good general stats on memory usage and what is running on a Linux server. But, I wanted some real-time visualization on CPU usage. So, I found htop.

htop gives me a way to actively see CPU, RAM, and swap memory in a visual context. Other features allow me to tree out services and programs that are running. Function keys allow me to toggle layout and to quickly exit the program. I can even scroll the complete list of running items.

Installation notes:

sudo apt-get install htop

For more information on htop see https://en.wikipedia.org/wiki/Htop

Uninstalling VMware Player

I need to uninstall VMware Player to from my Ubuntu 13.04 Desktop. I was having problems after upgrading from Ubuntu 12.10. Seems the Kernel and C libraries are a little different. Therefore my copy of Player would not load.

I search several discussion boards and learned that if I uninstall the program and re-installed the program it might work again.

To uninstall the program open a terminal window and type the following.

sudo vmware-installer --uninstall-product vmware-player

You should not need to reboot when finished.