Saturday, July 18, 2009

RemotePad (iPhone + Ubuntu)

I've used synergy/quicksynergy in the past for controlling the mouse and keyboard on my desktop with the mouse and keyboard on my laptop. There is an app for the iPhone that allows me to do it with my iPhone the same way. It is called RemotePad. RemotePad is in the app store. Here's how to set up the server end on the computer you want to control (tested on Jaunty):
1. Install "build-essential" and "libXtst-dev" on your computer using synaptic or apt-get.
2. Download the RemotePad source package from the website.
3. Untar/Unzip the package (double click the the file and extract it where you want). This will create a folder called "RemotePad Server". I prefer to put programs like this in my /opt folder but somewhere in your home folder works fine too.
4. Then open a terminal and go to the sub-folder "X11" within the new "RemotePad Server" folder. Your command should be something like (remember to use quotes around "RemotePad Server"):
cd ~/"RemotePad Server"/X11
5. Run the following commands:
sudo make install
6. That's it. To start the server, use the following command:
7. You might want to put it in sessions located in System-->Preferences--Startup Applications (so that it starts when you computer does).

Ubuntu Forum Post 1
Ubuntu Forum Post 2

Tuesday, April 14, 2009

SG33G5 & Olevia

This probably affects very few people, but I'll post it anyway for my own benefit: I have a Syntax Olevia LT27HVS TV hooked up to a Shuttle SG33G5. The shuttle has a built in Intel GMA 3100 graphics card (not sure if this matters a whole lot) and this solution probably works with a LT27HV or a LT27HVX TV. To get a picture from the computer to the TV, I had to edit my xorg.conf file (the command is "sudo nano /etc/X11/xorg.conf." In ubuntu these days, this file might be blank, so here's everything from my file. The following xorg.conf worked for me regardless of whether connecting by VGA or HDMI/DVI:
Section "Device"
Identifier "Configured Video Device"

Section "Monitor"
Identifier "Configured Monitor"

Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
SubSection "Display"
Modes "1360x768" "1280x720"
Note that if you are connecting by HDMI/DVI, you can get 1360x768 resolution, but only 1280x720 if connecting by VGA.

If this doesn't work, try changing the "Monitor" section so it looks like this:
Section "Monitor"
Identifier "Configured Monitor"
HorizSync 47.7
VertRefresh 60
Note that 47.7 is if connecting by HDMI to DVI. If connecting by VGA, change the 47.7 to 45.

You could also try adding the following just before the "Modes" line:
Depth 24

Hope this helps someone!


Saturday, February 28, 2009

Synaptic Search Bug in Intrepid

There seems to be a bug in Intrepid that causes problems with the search function in synaptic. The problem usually comes up after adding a new repository. For example, after adding the medibuntu repository, none of the medibuntu packages would come up in the quick search box and only occasionally in the traditional synaptic search box. The solution is to run the following command after each time you add a new repository:
sudo update-apt-xapian-index
If that doesn't work, be sure to try both the quick search box as well as the traditional search box.

Unbutu Forums

PDFSAM and JAR files

PDF Split and Merge (PDFSAM) is a nice utility to split and merge PDFs. Just download the program and unzip it into its own folder (I'll assume you call the folder pdfsam). Stick the new folder in /opt and then create a launcher with the following command in the command box:
java -jar /opt/pdfsam/pdfsam-1.0.3.jar
Note that the name of the file will depend on what version you download.

Also, the command "java -jar" is the basic command to run jar files. You just have to have jre installed.

PDF Split and Merge
PDF Split and Merge Instructions
JAR Files

Midnight Commander

Midnight Commander is an excellent file manager for the shell. Works well if you are running a server and want a nice overview of files and folders without the command line. Install with apt. The package is called mc. It also runs with the command: mc

Friday, February 13, 2009

Transmission & Clutch on Ubuntu Server (with startup script)

Transmission, the default torrent program on Ubuntu now, also has a command line version that can be run on a server. This combined with Clutch, the web user interface for transmission, makes a nice pair. The version that is available in the repositories still has Transmission and Clutch as separate downloads, therefore, I recommend downloading directly from the Transmission site or Transmission repository. The instructions below have some references to synaptic just in case you are doing this on the desktop version. Here's how to set it up:

1. Add the Transmission repository to /etc/apt/sources.list or through synaptic. For hard the deb line is:
deb hardy main
If you are using intrepid, just replace intrepid for hardy in the line above. See the download site for more explanation.

2. Add the GPG signing key with the following commands:
gpg --keyserver --recv 976b5901365c5ca1
gpg --export --armor 976b5901365c5ca1 | sudo apt-key add -

3. Now update and upgrade apt--you can do this with the following command or by hitting reload in synaptic:
sudo apt-get update && sudo apt-get upgrade

4. Now install transmission command line version with the following:
sudo apt-get install transmission-cli

5. After it is installed, type in the following command.
After you have executed it, it might be a good idea to restart after this is done. The purpose of starting the daemon is to make sure you get some folders and files in your home directory.

6. You now need to make some edits to the settings.json file. It is located at:
It should look something like this to begin with:
"blocklist-enabled": 0,
"download-dir": "\/home\/anyone",
"download-limit": 100,
"download-limit-enabled": 0,
"encryption": 1,
"max-peers-global": 200,
"peer-port": 51422,
"pex-enabled": 1,
"port-forwarding-enabled": 0,
"rpc-authentication-required": 0,
"rpc-password": "",
"rpc-port": 9091,
"rpc-username": "",
"rpc-whitelist": "",
"upload-limit": 100,
"upload-limit-enabled": 0
You want to change it so it looks something like this:
"blocklist-enabled": 1,
"download-dir": "\/home\/anyone",
"download-limit": 100,
"download-limit-enabled": 0,
"encryption": 1,
"max-peers-global": 200,
"peer-port": 51422,
"pex-enabled": 1,
"port-forwarding-enabled": 0,
"rpc-authentication-required": 0,
"rpc-password": "",
"rpc-port": 9091,
"rpc-username": "",
"rpc-whitelist": ",198.168.1.*",
"upload-limit": 100,
"upload-limit-enabled": 0
As you can see, the first change is on the "blocklist-enabled" line. You are changing 0 to 1. This is obviously to enable blocklists. If you have something like moblock running, you can leave this as 0. I will discuss setting up blocklists further below. The second change is to the "rpc-whitelist" line. You basically need to add the ip address from which you will be accessing the server. The example listed above assumes your ip address will begin with 192.168.1. Throw in a * to cover everything else. To allow all ip addresses, you could probably add something like "*.*" although I have not tested this. In any even, change "192.168.1.*" to suit your individual ip address.

7. You now need to add a couple scripts to your system that the Transmission page provides for you. The first helps automate the startup of transmission when you boot. To do this, go to first to the Transmission Initd Script page so that you are able to copy the text of the script listed.

8. After you have copied the text, create a new file in /etc/init.d/ with the following command (nano can be substituted with gedit if you like):
sudo nano /etc/init.d/transmission-daemon
When the blank file comes up, paste in the script you copied from the transmission web page and hit save.

9. You also need to make this file executable by running the following command:
sudo chmod +x /etc/init.d/transmission-daemon

10. Now that we have the initd file, we need to add it to the appropriate spots in the system so that it starts automatically. It may work to simply add the new file/command (/etc/init.d/transmission-daemon start) to /etc/rc.local, however, the proper level is to add it to the appropriate rc runtime folders in /etc. To do this, run the following command to make sure transmission-daemon starts on startup and stops on shutdown:
sudo update-rc.d FOO defaults

11. Finally, we need a script to update the blocklist if you want one. Once again, you must copy the text of the script from the Transmission Blocklist Script page and paste it into a new file that you create. You can put this new file wherever you want, I suggest somewhere in your home directory. So you would create it with a command like this one:
sudo nano /home/yournamegoeshere/transmission-blocklist
Then paste in the text, save, and exit.

12. To automate this file, we simply need to add it to crontab. Do this with the following command:
crontab -e
Add the following line to have it update everyday at 1:00 a.m.:
00 01 * * * cd /home/yournamegoeshere && sh ./transmission-blocklist

13. Restart your system and you should have transmission running. You can access it by going to the following page:
If that doesn't work, try:
Note also that you have the appropriate port open on your firewall. You shouldn't need the 9091 port open unless accessing the server from outside of your network, but you will need to open the peer port noted in your setting file described above. In that example, the port is 51422.

Transmission Initd Script
Transmission Blocklist Script
Startup Scripts Description
Crontab Explanation

Sunday, January 25, 2009

If the number pad isn't working on the Guest OS in Virtualbox...

If the number pad isn't working on the Guest OS in Virtualbox, try the following:
Go to System-->Preferences-->Keyboard (not Keyboard Shortcuts)
Then go under the "Mouse Keys" tab and make sure "Allow to control the pointer using the keyboard" is NOT checked. That solved the problem for me.

Ubuntu forum post one
Ubuntu forum post two
(Another possible, but untested, solution)