Categories
Command Line Linux Posts Ubuntu

How To: Install Pyrobot in Ubuntu

A quick guide for getting pyrobot running in Ubuntu, I’ve managed to get it running on 32bit and 64bit Ubuntu (10.10) so follow the guide accordingly to whichever architecture you’re using (64bit is about half way down the post).

32-bit

1. Download this file, or copy the below into a file and save it as pyroinstall.sh to your home dir.

#!/bin/sh

currentdir=$(pwd)

sudo apt-get install build-essential python2.6 python2.6-dev python-tk python-numeric libjpeg62-dev libncurses5-dev swig

wget http://pyrorobotics.org/download/pyrobot-latest.tgz

tar -zxvf pyrobot-latest.tgz

cd pyrobot

python configure.py

make

sed -ie 's/-e #!/#!/g' $currentdir/pyrobot/bin/pyrobot
sed -ie 's/-e # /# /g' $currentdir/pyrobot/system/version.py

echo 'export PATH=${PATH}:'$currentdir'/pyrobot/bin' >> $currentdir/.bashrc

Note: The ‘ in the code highlighter I have above won’t work in terminal, there isn’t much I can do about it so you’ll have to re-write it. Also if you’re doing this manually change the “$currentdir” to “~” if you are doing it in your home directory.

2. Make sure this file is in your home directory (e.g /home/alex/pyroinstall.sh) and make it executable:

 chmod +x pyroinstall.sh

3. Run the usual way (as super user because it has to install stuff etc):

 sudo ./pyroinstall.sh

4. It’ll ask you some questions, below are the answers I used – you can use other configurations if you know what you need. I also put the full output in pastebin ’cause it was bunging up the guide – http://pastebin.com/Kc5jyhja

1. 	2.6
2. 	/usr/include/python2.6
3. 	/usr/bin/python2.6
4. 	/etc/X11
5. 	none
6.01	n
6.02	n
6.03	n
6.04	n
6.05	n
6.06	n
6.07	n
6.08	n
6.09	n
6.10	n
6.11	y
6.12	y

5. Once it’s done reboot or run:

 source ~/.bashrc

6. Allow read/write/execute permissions for the pyrobot folder:

 sudo chmod -R 777 ~/pyrobot

You should all be done, try typing the following to get it running!

 pyrobot

64-bit

In order to get pyrobot running on 64bit, you basically need to add -fPIC to CFLAGS in all the relative Makefiles as explained in this mailing list post – http://www.mail-archive.com/pyro-users@pyrorobotics.org/msg00344.html – Lucky for you I’ve already gone through the effort of doing it and compressed it (download here you won’t need to if you are going to run the script though, it’ll do it for you..).

This script should download the file, configure and make and output the path to the .bashrc file for you (similar to the 32bit one does) so download this file, or copy and paste the script below into a file in your home directory:

#!/bin/sh

currentdir=$(pwd)

sudo apt-get install build-essential python2.6 python2.6-dev python-tk python-numeric libjpeg62-dev libncurses5-dev swig

wget http://dl.dropbox.com/u/307455/pyrobot-5.0.0_64bit.tar

tar -zxvf pyrobot-5.0.0_64bit.tar

cd pyrobot

python configure.py

make

echo 'export PATH=${PATH}:'$currentdir'/pyrobot/bin' >> $currentdir/.bashrc

2. Make sure this file is in your home directory (e.g /home/alex/pyroinstall64.sh) and make it executable:

 chmod +x pyroinstall64.sh

3. Run the usual way (as super user because it has to install stuff etc):

 sudo ./pyroinstall64.sh

Steps 4. 5. and 6. are the same as above..

Change Default Editor

If you want to change the default editor from emacs to anything else (this will change the default editor used in other terminal applications too..) use the following commands, just change gedit to whatever you’d like (vi, vim, kedit etc):

echo "export EDITOR=/usr/bin/gedit" >> ~/.bashrc
source ~/.bashrc

Any problems leave a comment and I’ll try and help as best as I can..

Categories
HowTo Linux Posts Ubuntu

How To: Fix “Unknown keyword in configuration file.” Ubuntu USB Boot

Attempting Boot From USB Device

SYSLINUX 3.63 Debian-2008-07-15 EBIOS Copyright (C) 1994-2008 H. Peter Anvin
Unknown keyword in configuration file.
boot:
_

After creating a USB bootable version of Ubuntu from the Startup Disk Creator (or usb-creator-gtk) and attempting to boot, I was greeted by the error above. It might look a bit scary but it’s really easy to fix, just plug the USB flash drive into a computer (windows or linux, mac too probably but I haven’t tried that.)

Solution 1:
  1. Open the the syslinux folder in the root of the flash drive.
  2. Inside is a file called syslinux.cfg you’ll want to edit that.
  3. Find the line “ui gfxboot bootlogo” and simply remove the “ui “.
  4. Save and try booting again.

Below is how my syslinux.cfg file looks after editing:

# D-I config version 2.0
include menu.cfg
default vesamenu.c32
prompt 0
timeout 50
gfxboot bootlogo


Solution 2

Alternatively it looks as though there is another way of fixing this issue if there is no “ui” in the file, this is to do as followed (as pointed out in the comments below):

  1. Type “help” and press enter
  2. Hit Enter again

This should boot correctly and shouldn’t need to be done every time.

Categories
Linux Posts Ubuntu

gedit – failed to load type module: menu_proxy_module_load | Ubuntu

(gedit:2205): Gtk-WARNING **: Failed to load type module: (null)

`menu_proxy_module_load’: gedit: undefined symbol: menu_proxy_module_load

Annoying error, seems to has no serious effect on it running but just nice to clean stuff up so just install ‘appmenu-gtk’.
sudo apt-get install appmenu-gtk

Categories
HowTo Posts Ubuntu Video

HowTo: Switch the Window Menu Buttons Back to the Right – Ubuntu 10.04 / 10.10 / 11.04

I’m not an OSX person and personally prefer my minimise, maximise and close buttons to be in that order on the right, which they are not as default on the new Ubuntu 10.04 (Lucid Lynx) so here’s how you can swap them back to their rightful place (pun intended).

This can be done either of two ways:
Use the following one line command to edit gconf (for more info type man gconftool):

gconftool -s /apps/met>gconftool -s /apps/met>gconftool -s /apps/metacity/general/button_layout -t string menu:minimize,maximize,close

OR
Using gconf-editor (the GUI version):

  1. In terminal type: gconf-editor
  2. Navigate to /apps/metacity/general
  3. Change button_layout to: menu:minimize,maximize,close
  4. Hit enter and you are done.