Installation of Ubuntu Studio 8.10 / Edmund Laugasson

Edmund Laugasson ed.lau at mail.ee
Fri Dec 26 20:05:54 UTC 2008


PREAMBULA
1) You don't need any CD/DVD, because all program packets will be downloaded over the internet and 
they are always up-to-date
2) you need definitely a working internet connection, because all program packets will be downloaded 
over the internet

IN SHORT:

1) when you see Kubuntu log in screen, press CTRL+ALT+F1 and you will see the command line interface

2) log in with the user you created, when you installed the system

Kill the graphical user interface by typing:
sudo killall kdm

... because we currently don't need it

3) download the scripts:
wget http://linux.zeroconf.ee/scripts/install_ubuntu_studio.sh
wget http://linux.zeroconf.ee/scripts/system_upgrade.sh

4) run the script:
./install_ubuntu_studio.sh

... enter your user password

5) after restart repeat the steps 1-2 and then run the second script
./system_upgrade.sh

... enter your user password

6) after system is restarted, you should have freshly installed and updated Ubuntu Studio


For more explanations, please read further.

> ----------------------------------
> Better this:
> 
> sudo apt-get update && sudo apt-get -y install ubuntustudio-desktop && 
> sudo ldconfig && sudo dpkg
> --configure -a && sudo apt-get clean && sudo reboot
> 
> Copy this to the terminal window, press enter, enter your password and 
> watch the action and after PC
> automatically restarts, you have Ubuntu Studio :)
> ----------------------------------
> 
> I am confused. At what stage do I enter the above to the Terminal 
> Window?


As soon as you logged in. You don't need immediately to log in into graphical user interface (GUI) 
but it's more comfortable for beginner to use GUI.

I made it simple for you:

1) After your system is booted up - you don't need immediately to log in through GUI - much easier 
is to guide you using CLI - command line interface.

So, after your system booted up and you'll see Kubuntu login screen, then usually you type your 
username and password to graphical log in fields - don't type them and instead of this press 
CTRL+ALT+F1. Then you will see also login prompt but at command line. Log in as regular user what 
you created when you installed the system (then it's sure, that this user has administrator rights). 
Normally users are default in admin group, so they have administrator rights using user password. 
But if you created user later yourself, it may not have necessary admin rights.

You can always switch back to GUI by using ALT+F7 keys.

After login you will be at your home directory - you may check it by typing pwd (it means print 
working directory) and press enter. Then you will see, where you are. You can type it anytime to 
check, where you are.

Kill the graphical user interface by typing:
sudo killall kdm

We don't need GUI to do all the job, so we can just kill it. If you need it, just run:
sudo ls

...then enter your password. Now we have admin rights and you may type:
sudo kdm &

... this will run K Display Manager (kdm) into background (&) and you can after that log off from 
command line.

By using CTRL+ALT+F1 you can then switch back to the command line and log off from command line and 
continue to use GUI by switching back to the GUI by pressing ALT+F7. You may use up to 6 virtual 
consoles by pressing CTRL+ALT+F1....F6. Seventh console is the X session.

2) Download these scripts:
wget http://linux.zeroconf.ee/scripts/install_ubuntu_studio.sh
wget http://linux.zeroconf.ee/scripts/system_upgrade.sh

They will be probably downloaded into your home directory, where you are after log in.
These scripts are made executable, you may check it:

ls -l install_ubuntu_studio.sh system_upgrade.sh

-rwxr-xr-x 1 username group 160 2008-12-26 20:23 install_ubuntu_studio.sh
-rwxr-xr-x 1 username group 144 2008-12-26 20:24 system_upgrade.sh

first "rwx" tells us, that file owner (named "username") has rights to read (r), write (w), execute 
(x). The group (named "group", which is usually the same as username in Ubuntu), to where the owner 
belongs, has read and execute rights but not write right, because instead of "w" is "-". Also all 
others have same rights - read and execute.

If you downloaded these scripts (which are actually text files), then owner and group is the user 
you logged in and you can freely change these scripts and their permissions.


to give read and execute rights to all users, you can type:
chmod a+rx install_ubuntu_studio.sh system_upgrade.sh

If you need to be in administrator rights in future, just use sudo before:
sudo chmod a+rx install_ubuntu_studio.sh system_upgrade.sh

More reading about file and folder permissions can be read at:
http://en.wikipedia.org/wiki/Chmod
http://www.catcode.com/teachmod/
http://www.ss64.com/bash/chmod.html

changing owner of the file/folder:
http://en.wikipedia.org/wiki/Chown
http://www.linfo.org/chown.html
http://www.ss64.com/bash/chown.html
http://www.computerhope.com/unix/uchown.htm

3) You can always look inside the script by typing:
less <scipt_name>   --> e.g. less install_ubuntu_studio.sh
To quit from less, press q and enter

Or better use:
cat install_ubuntu_studio.sh
... because these scipts contain short text and less is useful for longer text

Run first script by typing:

./install_ubuntu_studio.sh

or

sh install_ubuntu_studio.sh

Enter your user password and watch the magic the script makes for you.

You can use TAB-completion - just type first letter or letters of the script name and then press TAB 
and Linux will write the rest of scipt name. In this way you can avoid typos and error messages due 
to incorrect typing.

after that run the upgrade script:

./system_upgrade.sh

or

sh system_upgrade.sh

Enter your user password and watch the magic the script makes for you.


Sometimes there is needed to fix broken packages:
sudo apt-get install -f

You can download also after install configure script separately for everyday usage:

wget http://linux.zeroconf.ee/scripts/after_install.sh

###

Better idea is to use alias to run long commands fast

1) after login open in terminal (no matter GUI or CLI) the file .bashrc:

nano .bashrc

find the rows:

# if [ -f ~/.bash_aliases ]; then
#    . ~/.bash_aliases
# fi

Remove the "#" from the beginning:

if [ -f ~/.bash_aliases ]; then
     . ~/.bash_aliases
fi


2) save the following text into text file called .bash_aliases

a) nano ~/.bash_aliases

b) copy this text into memory by selecting it and CTRL+C
alias ar='sudo apt-get -y autoremove'
alias e='sudo apt-get remove'
alias f='sudo apt-get install -f'
alias i='sudo apt-get install'
alias ai='sudo ldconfig && sudo dpkg --configure -a && sudo apt-get clean'
alias lk='sudo apt-cache show'
alias sr='sudo apt-cache search'
alias p='sudo apt-cache policy'
alias u='sudo apt-get update && sudo apt-get dist-upgrade'

explanations:
ar - autoremove
e - erase
f - fix
i - install
ai - after install
lk - look
sr - search
p - policy
u - update and upgrade

You may use your own short commands, what fits best your needs.

c) insert it into nano by pressing SHIFT+INSERT
Watch also that the last row is empty - just press Enter in the end to get it. You can use arrow 
keys to check - is there empty row in the end of file.

You can also enable color prompt by removing "#" from the line:
#force_color_prompt=yes
to
force_color_prompt=yes

Remove also here the "#":
# some more ls aliases
#alias ll='ls -l'
#alias la='ls -A'
#alias l='ls -CF'

to

# some more ls aliases
alias ll='ls -l'
alias la='ls -A'
alias l='ls -CF'

d) press F3 to save the file in nano

e) press F2 to exit from nano

3) close terminal, in KDE it is Konsole. Then open it again. Type alias and you'll see current 
aliases. Now you can just e.g. update and upgrade by typing the letter u and pressing enter. Easy!

You can also switch to the CLI by using CTRL+ALT+F1...F6 and also there is color prompt and those 
aliases.

###

You can also copy those bash configuration files to the root user:
sudo cp ~/.bashrc /root/.bashrc
sudo cp ~/.bash_aliases /root/.bash_aliases

then change owner:
sudo chown root:root /root/.bashrc /root/.bash_aliases

That's it!

No you can log in as root (actually simulate):
sudo -i

Root account is locked by default in Ubuntu and to be sure, you may lock it yourself:
sudo passwd -l root

It's more secure, because anybody knows, that God in UNIX-like systems is username "root" (without 
quotes certainly). But if the username isn't root, then cracker needs to guess also username, not 
only password.

To unlock user:
sudo passwd -u <username>

e.g. sudo passwd -u john

...where "john" is the username and should be replaced with your username, what you used.

User will be unlocked with the same password and user can then log in with his/her old password.



Best Regards,
Edmund




More information about the kubuntu-users mailing list