Strangely all the distributions of Linux that I’ve used don’t come with an application to decompress rar files. To install a simple application to decompress them in Ubuntu simply type:
sudo apt-get install unrar
Once installed you can decompress your rar file by typing:
unrar x <File>
Where <File> is the name of the file you want to decompress.
Note that by using the e flag instead of x will extract while ignoring directory structures, so all the files will be extracted to the same directory.
This application does the job but unfortunately doesn’t have a GUI.
To start off lets install the dependencies. Starlink requires C Shell (csh) to run. C Shell is an alternative to the more commonly used bash. To install C Shell type the following:
sudo apt-get install csh
Once installed download the latest version of Starlink. Once your download has finished move it into /usr/local/bin and untar it (Remember to change Linux-32bit-glibc2_5.tar.gz to which ever version you downloaded):
sudo mv Linux-32bit-glibc2_5.tar.gz /usr/local/bin
cd /usr/local/bin
tar -zxvf Linux-32bit-glibc2_5.tar.gz
The final step is to source the Starlink profile to set up the environment variables needed by Starlink. This can be done automatically by editing your bashrc file. This file is executed every time bash starts, such as when you log in. To edit your bashrc file type:
gedit ~/.bashrc
Add the following to the bottom of your file then save and exit.
Code:
#source the Starlink profile so we get the Starlink env vars | |
STARLINK_DIR="/usr/local/bin/star" | |
source /usr/local/bin/star/etc/profile |
That’s it. To run Starlink you need to execute bash to set up the environment variables. This is done every time you log in but as you are already logged in type into your terminal;
bash
Now to run the Starlink applications simply type the name of the application you want. The applications available are:
gaia
photom
A useful command I have come across recently is the exclamation mark. When it precedes a command it executs the command with the same arguments that were used the previous time the command was used, as recorded in history.
For example, if you often connect to MySQL from the command line you might type something similar to:
mysql -uusername -ppassword DATABASENAME
This can get annoying if you have to type this out a couple of times a day. This is where the ! command comes in useful. After the above example is in your history you can just type:
!mysql
Obviously you have to be careful with this. If you use the command without knowing for sure what the last arguments were then you can end up damaging your system so it is best to only use it with commands you have typed in your current session.
Unlike many other video card manufactures NVIDIA produces easy to install drivers for Linux. This makes NVIDIA very popular to Linux users.
To install your NVIDIA card’s drivers first download the correct driver for your card from the NVIDIA website.
Before you start your installation make sure you have the package ‘libc6-dev’ installed. To do this type:
sudo apt-get install libc6-dev
This command will check to see if the package is installed and if not it will install it for you.
Before you install the drivers you will need to kill your xserver. This will mean you will no longer have access to your GUI so it will be a good idea to print out these instructions before doing so.
To kill your xserver just stop the process. If you are using the KDE desktop type:
sudo /etc/init.d/kdm stop
Or if you are using Gnome desktop type:
sudo /etc/init.d/gdm stop
Your GUI will disappear and be replaced with a simple text prompt. Press Ctrl + Alt + F2 and you will be able to log in. Once you have logged in navigate to wherever you downloaded your driver to and make the driver executable by typing:
chmod a+x NVIDIA-Linux-x86-169.09-pkg1.run
You can now install the driver by typing:
./NVIDIA-Linux-x86-169.09-pkg1.run
Run through the installation, answering any of the questions. When the installation is complete you can start your xserver again. To start your xserver in KDE type:
sudo /etc/init.d/kdm start
Or if you want to use Gnome desktop type:
sudo /etc/init.d/gdm start
Your xserver should now boot up with the latest drivers for your graphics card installed.
If you want to create an array of directories using bash you might try:
directories=`ls`
However, this will create a variable containing each file separated by spaces like this:
$ directories=`ls /var`
$ echo $directories
adm agentx cache games lib lock log mail opt run spool tmp X11R6 yp
To place each item into its own element you simply need to add some brackets:
directories=(`ls`)
You can test this has worked with a simple loop:
$ directories=(`ls /var`)
$ for (( i=0; i<${#directories[@]}; i+=1 )); do echo ${directories[${i}]} ; done
adm
agentx
cache
games
lib
lock
log
opt
run
spool
tmp
X11R6
yp