Ubuntu 11.10 post install configuration

 

Here are my post configuration steps of Ubuntu:

1. Move close, minimise and maximise window buttons to right. Install gconf from ubuntu software and run:

 gconftool-2 --set /apps/metacity/general/button_layout --type string "menu:minimize,maximize,close" 

2. Install restricted extras

 sudo apt-get install ubuntu-restricted-extras 

3. Install Chrome browser and codecs

sudo apt-get install chromium-browser
sudo apt-get install chromium-codecs-ffmpeg-extra

4. Install VLC Player

 sudo apt-get install vlc 

5. Install gnome tweak tool

 sudo apt-get install gnome-tweak-tool 

6. Install gnome3?

 sudo apt-get install gnome-shell 

7. 15 other things to do:
http://www.techdrivein.com/2011/10/15-things-i-did-after-installing-new.html
8 Things after GnomeShell is running Ubuntu 11.10
http://www.techdrivein.com/2011/11/8-things-i-did-after-installing-gnome.html

gnome shell extensions
https://extensions.gnome.org

8. Install vim full editor instead of using tinyvi

 sudo apt-get install vim 

9. Add date and time to Bash history
Edit ~/.bashrc and at the bottom of the file add:
export HISTTIMEFORMAT=”%h %d %H:%M:%S ”

10. Change Sudo Remembering Time in Ubuntu
http://www.tuxtree.com/2010/11/how-to-change-sudo-remembering-time-in.html

11. Disable Guest Login
http://www.tuxtree.com/2011/12/remove-the-guest-session-from-the-logon-screen.html

12. Login sounds disappear with Ubuntu 11.10 or after installing and using gnome
Run this command to allow the sound files to be read by gnome login:

 sudo cp /usr/share/sounds/ubuntu/stereo/* /usr/share/sounds/ 

13 Install these useful apps:
– Zim Desktop Wiki/Notes utility
– Pinta Image editor

Apache Access Control

Access-Control – Password protecting a directory with Apache

Access Control allows you to regulate who can view directories and content on an Apache server. The Directory directive provides granular access to folders and content.

The .htaccess file could also be used, but it’s not recommended due to performance and security issues.

To configure Access Control:

1. Create the restricted directory if not already created e.g. /admin
mkdir /var/www/admin

2. Edit the Apache site configuration file, in this case vim /etc/apache2/sites-enabled/000-default and add the directory section as show here:

<Directory /var/www/admin>
AuthType Basic
AuthName "websec"
AuthUserFile /etc/apache2/websec
Require valid-user
</Directory>

3. Ensure the permissions on the /var/www/admin are set for the Apache user in this case www-data

 chown www-data:www-data /var/www/admin 

4. Create the password file in the /etc/apache2 directory

cd /etc/apache2
htpasswd -c websec keith

*Note* to add more users remove the -c option as it creates the file initially and will overwrite it if you add it again. For example to add another user of say Julie you would use:

 htpasswd websec julie 

Now change the permission and ownership of the password file:

chmod 600 websec
chown www-data:www-data websec

5. Restart Apache

 /etc/init.d apache2 restart 

6. Test the retricted area by using your browser and enterinig the url http://server/admin (Where server is the FQDN or resolving name or ip address of the server) It should ask for username and password, in this case enter username keith and the password you entered in step 4.

*NOTE* the above is based on using a Debian/Ubuntu based distro, other distros may vary slightly

Set VIM syntax colour and line numbers

With VIM or VI (I like VIM better) there are two features that I can’t live without, which are syntax colours and line numbers.

If you start vim or open a file with vim you can manually turn these features on with:

 :syntax on 
 :set number 

However to make this permanent you can add these lines to the .vimrc file in your home directory with:

 vim ~/.vimrc 

Enter or append the following as listed above syntax on and set number

syntax on
set number

Now certain files such as script files will be much easier to work with, here is an example of a script file: