Archive for the ‘Ubuntu’ tag
ubuntu 9.10 nvidia monitor settings dont save
Was having the issue of not being able to save my dual monitor configuration with a default installation of 9.10. The xorg.conf seems to be unable to be parsed by nvidia-settings tool, so to get around this we can run nvidia-xconfig to reset the config file to something that it can work with.
sudo nvidia-xconfig
after that
gksudo nvidia-settings
and we can save to xorg.conf successfully.
Using linux like a pro with mplayer, find & play mp3 files from command line in Ubuntu Linux 9.04 Jaunty
Save precious CPU and memory by using mplayer to play mp3s, also keep your playlist file up to date with all your mp3 media files.
First and foremost we need to have mplayer installed, if your on a ubuntu-debian based system use the following command
to install mplayer, if not then you can download the appropriate packages and install them.
apt-get install mplayer
Lets make a home for our script file, and set the appropiate permissions
mkdir ~/scripts; touch ~/scripts/playme.sh; chmod +x ~/scripts/playme.sh; gedit ~/scripts/playme.sh
Paste the following code into your new script file, if you keep your Music files in a different location then change the variable musdir to match your setup.
#/bin/bash
# VARS ##########################################
tmpdir='/tmp'
musdir='/home/osamad/Music'
filename='playlist.m3u'
# CODE ##########################################
find $musdir -name '*.mp3' -o -name '*.ogg' 2>/dev/null >> $tmpdir/$filename
mplayer -playlist $tmpdir/$filename -shuffle -loop 0 -radio volume=80
Using find we build a list of all our mp3s, in this case we have multiple types of media files we want to play so we can specify that by adding the -o -name flags and add them in.
- -playlist ;flag we set the playlist file we just created
- -shuffle ; enables shuffle mode
- -loop 0 ; enables loop 0=forever
- -radio volume=80 ; set the default volume to 80% (use * or / to adjust when playing)
RunTime
Push ALT+F2 or launch from a terminal
./scripts/playme.sh
MORE
To find out more information, or to customize your mplayer settings
man mplayer
Create a custom launcher and run your script from the gnome-panel
Gnome Do, with Docky in Ubuntu Ibex 8.10 setup guide
I recently found out about an amazingly slick desktop dock, called Gnome Do. Not only is it great looking, but its functionality is what sold me on this one. With the ability to launch any app, from the launcher simply by typing the name Gnome Do has totally converted me.
I set this up on my Ubuntu Ibex Desktop with a couple easy steps.
Adding repository to Apt
Open up a gnome-terminal window, and then lets open up the file /etc/apt/sources.list . Paste the following into your terminal.
gksudo /etc/apt/sources.list
Copy and paste the following repositories at the end of your file in gedit.
# GNOME DO ######################################################
deb http://ppa.launchpad.net/do-core/ppa/ubuntu intrepid main
deb-src http://ppa.launchpad.net/do-core/ppa/ubuntu intrepid main

Adding GPG Key to apt (Optional)
1. Open up gedit then copy and paste this PGP key to a text file, gnome-do.key and save it
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: SKS 1.0.10
mI0ESXUVdQEEAN8ALfH3wueKsSgDwA/HVEHdB7nlppqGKW/tubvGTy0ayf4M9ylX45szZK97
uL9/UHh5/B7eGMSB45EMJ0/qvTiflS6SwCxRCoKCW1PpYZlVcOLh5UUBkyREPJZcki1lK7pf
xvG9LkYKnvBP89s2PnO5LlDheEsVR4SqDGEtich/ABEBAAG0JExhdW5jaHBhZCBQUEEgZm9y
IEdOT01FIERvIENvcmUgVGVhbYi2BBMBAgAgBQJJdRV1AhsDBgsJCAcDAgQVAggDBBYCAwEC
HgECF4AACgkQKKggUHdVjdCVeAP+ONJtMFx9MGSJe33YiskagXEG5cQGYdDi5sWWUAP80bP1
Qe+Dsnjs3VKQ9ZZW3M8UNXsoFFN501hgJFBwUUCWIRSGZkzVgKoZZtZOe0Dws39xfV//8JFS
Te/r0oPzrr10iTFupTe/wBR0M9JbKGdY7SvooyqU+W2rf8/LldGx7KE=
=3C2V
-----END PGP PUBLIC KEY BLOCK-----
2. Open up the Software Sources Configuration Menu, and click on the Authentication tab. Then Import Key,
Installing Gnome Do
Open up a gnome-terminal window and type
sudo apt-get update
then type
sudo apt-get install gnome-do
Removing the default gnome panel
Dont worry, you can easily bring it back, we’re just gonna hide it, push ALT+F2 or from a gnome-terminal run
gconf-editor
Navigate to ‘ Apps > Panel > TopLevels > top_panel_screen0 ‘ These are the values I changed to make it dissappear
auto_hide = checked
auto_hide_size = 1
hide_delay = 1
unhide_delay = 10000
x = 0
y = 10000

Select Docky
Launch gnome-do from the terminal or from ALT-F2
gnome-do
Right click on the Gnome Do , launcher, then click on preferences, then click on the Appearence Tab, and select Docky. Now you have a desktop that looks almost as good as mine!! ![]()

Check out the website for most customization, and features. http://do.davebsd.com/
Using Cisco vpn client with Ubuntu Linux Desktop
Configuration
Download and install the Cisco vpn Client. im using vpnclient-linux-x86_64-4.8.02.0030-k9 at the time of this article.
(if u need it send me an email). unpack, and install in my installation i opted out of the option for starting as a daemon so i start it manually everytime.
mnk0@tree:~$ sudo /etc/init.d/vpnclient_init start
Using my PROFILE.pcf file
Then we can copy our Cisco VPN Profile over to the profile directory.
mnk0@tree:~$ cp PROFILE.pcf /etc/opt/cisco-vpnclient/Profiles/
Now we are ready to connect to our connection. Note we dont add the .pcf extension to the profile we’re going to use
mnk0@tree:~$ /etc/opt/cisco-vpnclient connect PROFILE
Initializing the VPN connection.
Contacting the gateway at 4.23.45.21
Contacting the gateway at 4.23.45.21 (balancing)
User Authentication for PROFILE...
The server has requested the following information to complete the user authentication:
Username [mnk0]:
Passcode []:
Authenticating user.
Negotiating security policies.
Securing communication channel.
Your VPN connection is secure.
VPN tunnel information.
Client address: 10.10.10.46
Server address: 4.23.45.21
Encryption: 256-bit AES
Authentication: HMAC-SHA
IP Compression: None
NAT passthrough is active on port UDP 4500
Local LAN Access is disabled
Exiting
When we are ready to exit, just hit CTRL+C on your terminal session, and shutdown the daemon.
mnk0@tree:~$ sudo /etc/init.d/vpnclient_init stop
mnk0@tree:~$ Done
Using a swapfile to increase the swap space on your system
This can be a very handy function if we want to use a file, instead of a partition, and with modern filesystems the performance is almost on par with using a dedicated partition for your swap area.
1. Using dd lets make a zero’d file for the swap
dd if=/dev/zero of=/swapfile bs=1048576 count=1000
This example would create a swapfile of 1 gig using a blocksize of a megabyte (1048576).
2. Make file as a swapfile
mkswp /swapfile
3. Activate swapfile
swapon /swapfile
4. Verify that our swapfile has been activated
swapon -s
We should see something like this in the list ..
Filename Type Size Used Priority
/swapfile file 9999992 0 -2
If you want to have this a permanent solution, then adding the entry to fstab would probally be a better idea,
open up /etc/fstab in your favourite editor and add the following line.
/swapfile swap swap defaults 0 0
How to check and monitor cpu core temperatures in Ubuntu
Ok, so this weekend i decided to take the plunge and get myself a nice new box! I decided to go with Intel Core 2 Duo e5200 , and an Asus P5QL-E mother board, so anyways got everything mounted up and just installed Ubuntu Ibex 8.10 .. so now i wanna see what the temperature ratings are, and this is a snap with Ubuntu.
Open up a terminal and type
sudo apt-get install lm-sensors sensord
After installation of those packages we have to setup our sensors with our cpu
sudo sensors-detect
you’ll have to actually type Yes for all the next part, which is just asking about loading modules and drivers, for your cpu
So after all that we’ll have a little bit of editing to do, sensors will come up and tell you that you need to make some changes to /etc/modules, and will give you a snippet to paste into the file
sudo gedit /etc/modules
and then paste the code into the bottom of the file, for example this is what mine said
# Chip drivers
coretemp
#
Reboot and your all set, open up a terminal and type sensors to see your core temps! if you want to be real slick type watch sensors .. so you can watch the updates in the core temps every 2s .
Ubuntu Ibex 8.10 with ATI Radeon HD 2400 XT
So, I finally decided to crack out the new Ubuntu release, and the installer seemed to be successfull and it was time to reboot the machine which is where things went terribly wrong. My login screen was a blank screen.
So I then pushed CTRL+ALT+F1 to get to a shell, and noticed that by default the ati opensource video driver in xorg.conf wasnt happy at all.
Section "Device"
Identifier "Configured Video Device"
Driver "vesa"
EndSection
Section "Monitor"
Identifier "Configured Monitor"
EndSection
Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
EndSection
So after googling a bit, i discoverd that support for this Radeon Series of cards was updated in later releases of the fglrx driver. Which can be enabled in 5 easy steps.
1. Remove all references to the older fglrx driver.
sudo apt-get remove xorg-driver-fglrx fglrx-kernel-source
2.Update the sources list
sudo apt-get update
3. Reinstall the newer drivers
sudo apt-get install xorg-driver-fglrx fglrx-kernel-source jockey-gtk xserver-xorg-video-radeon
4. Enable the fglrx drivers
sudo aticonfig --initial
5. Restart gdm
sudo /etc/init.d/gdm restart
We can now verify that we have the right driver installed by using fglrxinfo.
osamad@root:~$ fglrxinfo
display: :0.0 screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI Radeon HD 2400 XT
OpenGL version string: 2.1.8087 Release
And voila, I then was able to launch the ATI Catalyst Control Center from the menu system Applications > Accessories
> ATI Catalyst Control Center , and used that to enable my dual monitors.
After that I enabled the desktop effects and installed the compizconfig-settings-manager
sudo apt-get install compizconfig-settings-manager
System > Preferences > Compiz Config Settings Manager to enable my desktop cube! And now am a happy camper!







