Spread Linux

Categories


Recent Comments:



FeedWind
FeedWind
Get Linux

Baudizm at Blogged

December 1, 2008

Quick Tip: Use DPKG to replicate between Ubuntu installs

Filed under: Linux, Tips and Tricks - baudizm @ 9:22 pm

This is just a quick tip I’m putting up in replicating existing packages between Ubuntu installs. I tend to keep forgetting how to do it every time I do a total reinstall of my Ubuntu box. The following simple commands will list down all installed packages and export it to a file, copy to a USB thumbdrive, and import later after doing a reinstall/upgrade. In other words, the following steps will automate your package reinstall that will mimic your old Ubuntu install.

hw@myubuntu:~$ dpkg --get-selections > pkginstalled

The above snippet uses the dpkg command with the --get-selections parameter to read the installed packages and dumps them to a plaintext file. You can then proceed and copy pkginstalled to an USB thumbdrive for later, and proceed with the reinstall or system wipeout/upgrade.

After your new system has been reinstalled, instead of manually installing all the applications that you had previously, just do the following commands to automate the process.

hw@newbox:~$ dpkg --set-selections < /media/disk/pkginstalled
hw@newbox:~$ apt-get dselect-upgrade

The above snippet imports the list of packages from the file pkginstalled from /media/disk (USB thumbdrive) or replace it with the path where you copied you package list file. The next command does the actual package installation based on the list of packages imported.

NOTE: If you were using non-official repositories, please add the necessary third-party repo prior to doing the steps mentioned above.

Enjoy!

Technorati Technorati , , , , , , ,
Site Search Tags: , , , , , , ,


December 20, 2007

Ubuntu Quick Hacks

Filed under: Linux, Tips and Tricks - baudizm @ 3:04 pm

The following article contains opinions and personal views of the author and will be taken as such. There is no guarantee to the accuracy, timeliness of some of the information that may be found within the article. The methods that are discussed here might not be applicable in your case. The author will not be held liable for any damage caused by using the method/(s) described in this article . Use the methods at your own risk. - hardwyrd

Here are some Ubuntu quick hacks.

Changing your GUI from GNOME to KDE

1. Install KDE.

sudo apt-get install kubuntu-desktop kde-core

2. After the installation, Log out.
3. On the login screen, click on Options. Choose Sessions on the menu, then select KDE, then use Change Session.
4. Login using KDE.
5. To get rid of GNOME (though I see no reason why), do

dpkg --get-selections '*gnome*' | awk '{print $1}' | xargs sudo apt-get remove

You don’t really need to remove GNOME. Keeping GNOME, will allow you to also use GNOME apps in KDE.

Allowing your USB drive to be accessible by other systems
FAT is fully accessible by Linux, Windows, or Mac. Therefore we will setup our USB drive to use the FAT file system ensuring that when we plug our USB to other computers running another OS, we wont encounter read/write access problems.

1. Install dosfstools. We need mkdosfs which is included in dosfstools.

sudo apt-get install dosfstools

2. If our USB drive is mounted, unmount it. If you are in the GUI, simply right click on the USB drive icon and click ‘Unmount’.

sudo umount /dev/sda1

3. Format our drive. We can use either FAT16 or FAT32. Just choose one type.

mkdosfs -F 16 /dev/sda1
mkdosfs -F 32 /dev/sda1

For USB Floppy drives, include the -I option with your mkdosfs command.

mkdosfs -I -F 32 /dev/sda1

Determine your version of Ubuntu
Certain issues crop up when upgrading or checking if your version is supported by an application you recently downloaded. To verify your version of Ubuntu, do

$ lsb_release -a

Converting Audio Files with Sox
1. Edit /etc/apt/sources.list and modify

deb http://us.archive.ubuntu.com/ubuntu/ feisty universe
deb-src http://us.archive.ubuntu.com/ubuntu/ feisty universe

2. Update apt.

sudo apt-get update

3. Install sox.

sudo apt-get install sox

4. Use sox to convert your audio file to another format.

sox <file1> <file2>

5. Test your output file using play.

play <file2>

Modify your desktop from the command line

1. Modify the wallpaper.

gconftool-2 -t str --set /desktop/gnome/background/picture_filename /path_to_your_/picture.png

2. Modify the background color. Setting primary_color and secondary_color with different color values will generate a gradient.

gconftool-2 -t str --set /desktop/gnome/background/primary_color "#AABBCC"
gconftool-2 -t str --set /desktop/gnome/background/secondary_color "#112233"

TechnoratiTechnorati: , , , , ,
Site Search Tags: , , , , ,


November 27, 2005

The Ubuntu 5.10 Switch (Part 1)

Filed under: Hard and Soft - baudizm @ 3:59 pm

I finally made the switch to Ubuntu 5.10 “Breezy Badger” and ditched “Hoary Hedgehog”. For starters, there were quite some changes between Breezy and Hedgehog.

When I shifted, I didn’t do the “apt-get way” where one only needs to change “Hoary” to “Breezy” in your /etc/apt/sources.list declaration. I considered going that path to be time consuming, and a bandwidth waster specially since I only have a not so modest broadband link. Good thing a friend got hold of 5.10 ahead of me (sir botp already gave me a copy but didn’t try it. The one I got was the 5.10 distro set sent via snail mail/parcel.)

So, off I go backing up some important files, bookmarks and proceeded doing a complete re-install. I even used my ATI-Radeon 9200 SE (which by the way gathered dust on the shelf) for this experiment. You might be asking why I didn’t use the Radeon before in my Hoary. Well, the system hangs when I used the Radeon on Hoary, and acceleration isn’t a big issue for me so I did not use it. But this time, since Breeezy is new, I thought they might have fixed some bugs so I decided to put the Radeon in.

Everything about the pre-install phase went on smoothly as always until the time the system had to reboot to complete the installation. I expected a login screen to appear, but lo and behold, nothing happened. All I saw was a light grey screen with my mouse cursor displayed at the center. I tried to move the mouse, and it responded. However, I pressed the NumLock key several times and no response. Technicians know that kf the NumLock indicator doesn’t respond, chances are, your system already hanged. Though this problem is new to me, I suspected the Radeon, or perhaps the driver (ati) that came with Breezy might be the culprit. I remember the problem I had with this card when I used it with Hoary that caused me to ditch it in the first place.

What I did is reboot, press ESC while Grub is trying to load and went to Recovery Mode. I logged in using my account and tried su root but it keeps telling me “Authentication Failed” so I fired up sudo passwd root, changed the password to root and poof!, I’m on root. What I did next is to update, the driver for my Radeon. The default driver loaded was “ati” when I checked /etc/X11/xorg.conf.

Section “Device”
Identifier “ATI Technologies, Inc. Radeon 9200 SE (RV280)”
Driver “ati”
BusID “PCI:1:0:0″
EndSection

Next step is I did the following:

root@Ubuntu:/$ apt-get update
root@Ubuntu:/$ apt-cache search fglrx

apt-get update will update the package list that are present in the repositories declared in your /etc/apt/sources.list file.

apt-cache search fglrx will search for fglrx which is the driver package for ATI Video Accelerators.

After identifying the packages I need for my distro, I did the rest:

root@Ubuntu:/$ apt-get install xorg-driver-fglrx
:
:
root@Ubuntu:/$ apt-get install fglrx-control
:
root@Ubuntu:/$ dpkg-reconfigure xserver-xorg

Putting it short, I downloaded and installed xorg-driver-fglrx, fglrx-control, and then used dpkg-reconfigure to choose and use the newly installed driver for the graphics card and also make changes to some settings for X.

That’s the only hardware problem I encountered so far. And I think that problem’s solved.

What I found out also with Breezy default install is that a lot fo the icons were new, the Terminal is found on Accessories and not in the System Tools, there’s no Root Terminal in the System Tools menu that leaves the user only the Terminal to use with, added also is Serpentine Audio-CD Creator in the Sound and Video menu. Another obvious change is you can now add applications by clicking “Add Applications” button in the Applications menu which obviously is the “Add/Remove Programs” in System Tools in Hoary and it is now where “Run Application…” used to be in Hoary, you can now also edit the Applications Menu by using Applications Menu Editor found in System Tools menu, you can also now choose your language by using “Language Selector” in System/Administration menu, “Disks” and “Add Application” are also newcomers in the System/Administration menu.

One last observation I have with Breezy default is that it now comes with OpenOffice.org 2.0 which is good news for me.

So far those are still the only things I’ve observed to be obvious changes with breezy from Hoary. Perhaps a lot of fixes underneath the hood, but I seldom venture that far. I have so much things to do besides tinkering under the hood. As long as Breezy will be doing good, I’ll be sticking with it.

As soon as I’ll find some more oddities, new features, and I’ll problems with Breezy, I’ll put that in Part II. But for now, lets just wait, see, and keep using Ubuntu.



Get free blog up and running in minutes with Blogsome | Theme designs available here