Quick start xubuntu 12.04: Difference between revisions

From RidgeRun Developer Wiki
mNo edit summary
No edit summary
Line 50: Line 50:


I like auto focus and auto-raise as I move the mouse around.  I also like the close, minimize, and maximize buttons to match OSX.  I wen into menu -> Settings -> Settings Manager -> Window Manager to adjust those settings.
I like auto focus and auto-raise as I move the mouse around.  I also like the close, minimize, and maximize buttons to match OSX.  I wen into menu -> Settings -> Settings Manager -> Window Manager to adjust those settings.
== Use bash instead of dash ==
The shell scripts I use follow the bash syntax, so I need it as my default shell.
rm /bin/sh ; ln -s /bin/bash /bin/sh


== Separating operating system data from user data ==
== Separating operating system data from user data ==
Line 63: Line 69:


where /local is the mount point for a separate hard disk.  This is the same /local I used on Ubuntu 10.04, so all my personal settings and data are ready to go, along with all the tools and libraries I have installed that were not part of the distribution.
where /local is the mount point for a separate hard disk.  This is the same /local I used on Ubuntu 10.04, so all my personal settings and data are ready to go, along with all the tools and libraries I have installed that were not part of the distribution.
== Tuning bash startup script ==
<pre>
echo "alias h='history 100'" >> $HOME/.bashrc
echo "alias e='\`make env || echo ERROR: not in a top level development directory 1>&2\`'" >> $HOME/.bashrc
echo 'export PATH=$PATH:/sbin' >> $HOME/.bashrc
</pre>
When you're ready you can source the file:
<pre>
source $HOME/.bashrc
</pre>
== SDK downloads ==
I use <tt>/opt/ridgerun/downloads</tt> to hold all the packages and tarballs downloaded by the SDK.  To reduce the network downloads (allowing me to work on an airplane) I copied all contents to my laptop.  The downside is wasted disk space for older versions that the SDK doesn't use anymore
On my desktop I ran:
<pre>
cd /opt/ridgerun
tar -cf /tmp/opt.ridgerun.downloads.tar downloads
</pre>
Then copied over <tt>/tmp/opt.ridgerun.downloads.tar</tt> from my desktop to <tt>~/Desktop</tt> on my laptop.
To install the pre-filled downloads directory on the laptop:
<pre>
cd /opt
sudo mkdir ridgerun
sudo chmod ugo+rwx ridgerun
cd ridgerun
tar -xf ~/Desktop/opt.ridgerun.downloads.tar
</pre>


== Check out, configure, and build RidgeRun SDK ==
== Check out, configure, and build RidgeRun SDK ==


To see if I had everything I needed installed on my laptop, I checked out one of RidgeRun's SDKs and built the target hardware images.
To see if I had everything I needed installed, I checked out one of RidgeRun's SDKs and built the target hardware images.


<pre>
<pre>
Line 114: Line 83:
make
make
</pre>
</pre>
== Odds and ends ==
This is my first go at Unity, I found I had to install
* CompizConfig Settings Manager
to configure auto-raise like I am used to.
* I have many helper scripts (svndiff, qdiff, finds, etc) in my ~/help directory, so I copied all of them over
* I customized my ~/.basrc and ~/.emacs, so I copied them over too.
* I like to watch the CPU load in the top bar, so used Ubuntu Software Center to install system-monitor.
* Switch shell from dash to bash
<pre>
sudo rm /bin/sh
sudo ln -s /bin/bash /bin/sh
</pre>
* Installed toolchain to /opt/codesourcery/arm-2009q1
* Installed TI DVSDK required by the RidgeRun SDK


[[Category:HowTo]]
[[Category:HowTo]]

Revision as of 22:12, 22 December 2012

My Ubuntu 10.10 distro went out of support. After ignoring the problem for months, I decided today (2012 12 22) to give myself a holiday present and upgrade. I bought another 64GB SSD for the root directory (except /home and /opt, which I keep on another physical disk). I bought the second SSD, so I could get back to work using the one holding Ubuntu 10.10 if everything went wrong.

I spent several day getting my xorg.conf file working with my 3 monitors (two X screens, one with two monitors). I didn't want to spend several more days trying to get xubuntu happy.

Installing Xubuntu

Downloaded 64 bit Xubuntu 12.04 ISO from http:www.xubuntu.org and did a default install, selecting installing non Open Source packages. Updated to the latest version.

sudo apt-get upgrade

When I started Xubuntu 12.04, one monitor was black and the other two were mirrored - ugh. I checked the /etc/X11/xorg.conf file only to find none existed. I installed the nvidia drivers (I have two nvidia cards), copied over the Ubuntu 10.04 xorg.conf file, crossed my fingers, and reboot. Yeah! two X screens one with two monitors and a separate one for IM on the third monitor. The only issue I have to work out is why everything looks grayed out on the IM monitor. But I can ignore that for now and instead focus on getting Xubuntu ready for embedded Linux development.

terminator, my new friend

When I was doing some peer programming with the RidgeRun engineers, I noticed all of them use terminator for their terminal windows. I figured now was a good time to try out terminator, so I did a

sudo apt-get install terminator
nohup terminator &

Then I closed the default terminal (/usr/bin/xfce4-terminal) and hope it is the last time I use it.

sudo, my best friend

I don't want sudo to ask me for a password all the time, so I run:

sudo sh -c "echo '%admin ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers"

Capturing packages installed on desktop PC

I have been using the same desktop PC, with Ubuntu installed, for several years. The simple way to make sure my Xubuntu desktop would have what I needed while on the road was to install the same packages I have installed on my desktop.

With Ubuntu 10.10 running, I executed:

INSTALLED_PACKAGES=`aptitude search '[a-z]*'  | grep ^i | cut -c5-36`
for PACKAGE in $INSTALLED_PACKAGES ; do echo apt-get -y install $PACKAGE ; done > /tmp/get-packages.sh

Installing packages on xubuntu

I used /tmp/get-packages.sh to install the set of packages I have used in the past:

time sudo sh -x $HOME/Desktop/get-packages.sh

The only problem with this approach is when I stop using a package, I still carry it around. It also took around XXX hours to download and install. If I would have put all the packages on one command line it would have been much faster.

Windows and mouse

I like auto focus and auto-raise as I move the mouse around. I also like the close, minimize, and maximize buttons to match OSX. I wen into menu -> Settings -> Settings Manager -> Window Manager to adjust those settings.

Use bash instead of dash

The shell scripts I use follow the bash syntax, so I need it as my default shell.

rm /bin/sh ; ln -s /bin/bash /bin/sh

Separating operating system data from user data

Many years ago someone taught me the trick to keep my data in /local/opt and /local/home, where I have the following symbolic links

mv /opt /opt.old
ln -s /local/opt /opt
mv /home /home.old
ln -s /local/home /home

where /local is the mount point for a separate hard disk. This is the same /local I used on Ubuntu 10.04, so all my personal settings and data are ready to go, along with all the tools and libraries I have installed that were not part of the distribution.

Check out, configure, and build RidgeRun SDK

To see if I had everything I needed installed, I checked out one of RidgeRun's SDKs and built the target hardware images.

cd
mkdir -p work
cd work
svn co $SDK_URL dm368sdk
cd dm368sdk
make config
make