Filed under: *Nix, Ubuntu | Tags: 12.04, 3.4, beta, gnome, gnome-shell, pangolin, precise, sony, Ubuntu, vaio, vpcea36fg
Well, as you may know, my current ubuntu install, maverick meerkat will no longer be supported by Canonical, starting April 10th 2012… which sucks, since my attempts to like 11.xx version of ubuntu have been hindered by how sucky Unity and Gnome-Shell are, and foremostly, how kernel 2.6.8x to 3.x slash my battery life in half. I have also tried various versions of Mint, but nothing stick so far, and did not bother with suse and fedora.
Obviously, I have to inevitably pick something up, or stay on maverick sans security patches. Coincidently, Canonical has just released the 2nd beta for Ubuntu 12.04, Precise Pangolin with linux kernel 3.2 that supposedly fix the power management problem. So, here goes nothing!
Installation
Installation went okay, and I was greeted by the beautiful and aptly named Unity-Greeter login screen. Precise picked up every single devices on the 36FG, including the multitouch touchpad. Very nice. My USB SB X-Fi 5.1 sound card is also supported out of the box. Just make sure that on Sound Setting, output tab, The X-Fi 5.1 is highlighted, and on hardware tab “Analog Surround 5.1 output” is selected
However, installing ATI binary driver turned out to be not as straight forward as other task. The restricted driver window shows two entries for ATI binary driver, with one labeled as post-release updates. I assume this one is the most update compared to the other. Pressing “activate” will start the download process, which will then stop and points me to look at /var/log/jockey.log to look for error messages. I didn’t bother with that, and proceed to download the driver directly from AMD
10 minutes later, the graphic chip is up and running with the latest driver from AMD.
Out with Unity, in with Gnome-Shell
After 30 minutes fussing with Unity, I can confirm myself that I really really really don’t like Unity. I then proceed to install Gnome-Shell. The installation is quite straight forward:
ikhsan@Mach5-NX-0:~$ sudo apt-get install gnome-shell gconf-editor gnome-tweak-tool
Next, log out, click on the litle “ubuntu logo on the top right of your name, select Gnome, and log back in. Now you’re on Gnome-Shell
I’m gonna make a separate post for what I did to my Gnome-Shell install, to make it bearable
What works and what don’ts
Well, I can happily says that battery life is now showing approximately 3 hours when fully charged, hibernate and wake up works. Switching from plugged in to battery oddly did not drop the brightness level of the screen, so you need to dim the screen manually to conserve power.
Multiple display is well .. a mess
My 36FG is connected to a Samsung LCD tv with maximum resolution of 1920 x 1080. If you’re using the same hardware that I use, make sure that you set your display up using the Catalyst Control Center, as using the “display” app on Gnome froze my desktop. Also if you happened to encounter a desktop crash after mucking your display setting, and Gnome-Shell refuses to start after that, just log on to unity, and do:
ikhsan@Mach5-NX-0:~$ sudo aticonfig --initial -f
Log back in to Gnome-Shell, and start over. Another thing to note is that at least for HDMI, sometime, connecting the second monitor after you log in may also crash the desktop. This is with HDMI, and I haven’t tried this with the VGA connector
Conclusion
I have pretty mixed feelings about Ubuntu and Gnome-Shell. Yes it is beta, and I hope there will be significant improvements on the release version. As for now, I’m gonna keep my maverick install just a tad longer, until everything sorted out on Precise.
Filed under: *Nix, Red Hat, Ubuntu | Tags: busy, device, rhel, Ubuntu, umount
So, one of these days, you will find yourself wanting to unmount a partition on your linux box. Problem is, most of the time, the partition is most likely still being used by some process, or by someone. So first, you need to find out which processes are keeping the drive busy, by:
root@Mach5-NX:~# fuser -m /media/prison /media/prison__: 3196c 3285c root@Mach5-NX:~# ps -ef | grep 3285 ikhsan 3285 3196 0 07:07 pts/1 00:00:00 vi lgf.conf
With that information in hand, you can start shutting down services, or killing the process that’s preventing you from unmounting the partititon:
root@Mach5-NX:~# kill 3285
Repeat the step above for each process listed on the previous command.
Or, if you’re feeling nasty, you can always kill all the process that’s using the partition, by issuing:
root@Mach5-NX:~# fuser -km /media/prison /media/prison__: 3350c 3437c
Unmount the drive normally
root@Mach5-NX:~# umount /media/prison
…And we’re done
Filed under: *Nix, gaming, Ubuntu | Tags: frozen synapse, frozenbyte, humblebundle
The Humble Bundle has released their newest Bundle. The Humble Frozen Synapse Bundle. Well Technically it isn’t a bundle since there is only one game, Frozen Synapse. But, if you pay more than the average (which is USD4.5) You will also receive the Humble Frozenbyte Bundle which includes Trine, Shadowgrounds, Shadowgrounds: Survivor, Splot, and Jack Claw.
I think I’m gonna skip this one, since I already have the Frozenbyte bundle, and Frozen Synapse.. well.. doesn’t excite me.
Filed under: *Nix, Ubuntu, time out | Tags: Ubuntu, maverick, maverick meerkat, pulseaudio, alsa, creative, surround, 5.1, stereo
So I decided to spend my Ied bonus to beef up my PC audio setup. To do this, I need:
- At least 5.1 capable sound card. Since I’m going to hook this up on my Vaio, VPCEA36FG, USB connectivity is a must
- A 5.1 speaker set, analog or digital
After a bit of googling and browsing, I have two choices for sound card. The first one is Creative Sound Blaster X-Fi 5.1 Surround Pro, and the second one is a cheap C-Media 5.1 external sound card. I heard much success with the later, while installing the former might require me to ditch Pulse Audio, updating ALSA, etc etc. Also I can’t find a single forum post regarding the X-Fi and Maverick. There are a lot of posts about the X-Fi with Jaunty or Lucid, but no Maverick.
Anyway, finding shops or stores that sell the C-Media or the X-Fi card turned out to be quite a task. The X-Fi has not been in stock for quite sometime, and my search for the C-Media on every local brick and mortar and online shops in Indonesia, came out with empty. At the end, I asked a friend to get me the C-Media via dealextreme.com (since I don’t own a credit card)
Next, the speakers. There are several choices available on my price range from Creative, Edifier and Logitech, and I went with Logitech Z506. It’s cheap and quite easy to setup, and has a very decent sound output for the price. Plus, it support multiple inputs, so I can hook up the 36GF and my TV at the same time. Luckily, during my speaker hunt, I found one shop that carry the X-Fi 5.1!
Setting up the Logitech Z506 is very easy and straight forward, since everything is color coded. The Z506 can accept sound input via 2 RCA connector or from 1 (for stereo) or 3 (for analog 5.1 Surround) audio jacks from a sound card. Connecting the front audio jack to the 36FG internal sound card produced stereo output from all of the satellites, so everything is working. Next, surround sound
The X-Fi SP 5.1 connects and draws power via USB, so you need to plug it directly to the notebook, or like me, hook it to a powered USB hub ( mine is a Roccat Apuri). The X-Fi should be automatically detected by Maverick, you can check it by typing “lsusb”
ikhsan@Mach5-NX:~$ lsusb
Bus 002 Device 118: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 002 Device 117: ID 1058:1102 Western Digital Technologies, Inc.
Bus 002 Device 116: ID 041e:30df Creative Technology, Ltd
Bus 002 Device 115: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 0489:e00f Foxconn / Hon Hai
Bus 001 Device 003: ID 0c45:6409 Microdia
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
or go to System > Preferences > Sound, and open the “hardware” tab. The X-Fi is listed, but on the profile dropdown menu, you will see that no profile for 5.1 sound is available… yet.
To make things easier, install the Pulseaudio Volume Control by opening terminal, and do:
ikhsan@Mach5-NX:~$ sudo apt-get install pavucontrol
Next, edit the /etc/pulse/daemon.conf
ikhsan@Mach5-NX:~$ sudo nano /etc/pulse/daemon.conf
Find “; default-sample-channels = 2″ and change it to “; default-sample-channels = 6″, save, and restart Pulseaudio. Open the “pavucontrol” by pressing Alt+F2, and type “pavucontrol”. On the configuration tab, select “Analog Surround 5.1 Output + Analog Stereo Input” for the X-Fi profile. You can also do this via Sound Preferences.
..Next, connecting the X-Fi to the Z506. This is straight forward, as everything is color coded. Connect all of the three audio jacks from the Z506 to its corresponding port on the X-Fi. Now to test the 5.1 output, open System > Preferences > Sound, select the hardware tab, select the X-Fi from the list, make sure the 5.1 Surround profile is selected, and then press the “Test Speakers” button. Press each “test” button to test all of the speaker components
..And done. To set the X-Fi as the default sound output, go to System > Preferences > Sound, and select the X-Fi on the output tab.
To individually set the output level of the satellites and the sub, open “pavucontrol”, and find the X-Fi entry on the “Output Devices” tab
Next on the list is to try some 5.1 encoded videos. I’ll report back as soon as I’m done!
Filed under: *Nix, Ubuntu | Tags: desktop, gnome-shell, maverick, natty, sony, Ubuntu, unity, vaio, vpcea36fg
So I screwed up my maverick install, and had to start from scratch. The problem is, I didn’t have the CD (and the .ISO file) with me, and due to electricity problem, my attempt at downloading the image stopped when it reached 80%. ARGH! . And to make it worse, I need to bring the laptop with me to work the next day, so I had to fix it that night
So I look around my drives, and found an .ISO for Natty. I was planning to skip Natty, since the review for Unity is so bad, and Maverick provides everything that I need. But It can’t be helped. So burned the .ISO to a DVD, and away I.. went.
Anyway, on my fairly-specced VPCEA36FG, Natty installed smoothly. Everything is automatically detected and just work. And to my surprise, hibernate works perfectly. On the negative side, operating feels a bit sluggish and everything seems so slow. And I just can’t stand Unity. I can’t stand that the launcher bar hides and reveals ever so slowly, and sometimes refuses to show at all. I can’t stand how it stutters when shifting between workspaces, and I can’t stand Firefox needing a full 5 seconds to launch. To sum up:
Improvement from Maverick:
- All of the VPCEA36FG peripherals are detected
- Hibernate works perfectly
- …that’s about it
What I hate:
- Unity sucks. Or maybe require more that a lil bit of getting used to
- Slow. Frustratingly slow
- Battery life down from more than 3 hours to over one and a half hours. I managed to bump it to a little over 2 hour by installing laptop-mode-tools package (which remove acpi-support and pm-utils) from Synaptics
- It seems that the laptop run hotter that it used to. The fans are almost always active
- Lot’s of tool that I use extensively on Gnome2 such as the global proxy setting tool are missing
So, finally, I was able to restore my Maverick install, but then decided to keep Natty to toy around. Since I hate Unity, and since Gnome 2 will stop receiving updates, I think it’s time for me to explore the alternatives. My first choice went to Gnome 3′s Gnome Shell.
Equally despised just like Unity, I’ve read a lot of bad things about the dumbed down interface of Gnome-shell. To my surprise, I quite like it. Yes, it’s not as versatile as Gnome2, but it has it’s own charm. One major problem though. Currently Gnome-Shell does not work with FGLRX, so I need to use the open source ati drivers, which admirably works quite well for Google Earth and a few 2D games that I throw at it.
I like how everything seems to work together and behave in similar manner. It didn’t feel like someone took desktop components from here and there and created a mash-up. Yes, currently it lacks a proper configuration tool like Emerald theme manager or CCSM, but that didn’t keep some people from making customization in the form of Gnome-Shell extensions.
I think I’m going to keep Gnome-Shell for a while, and went to XFCE next.
creating 1 or 2 new users on your system is a fairly simple task. But when you need to create 50 or 100 accounts on a system, creating it one by one by hand will surely annoy even the most patient sysadmin.
First, create a plain text file that contains all the informations required in a format of standard /etc/passwd file. For example, create a text file newuser.txt
[root@foxbat scripts] vi /root/newuser.txt
that contains:
ambon:afd43:673:673::/home/ambon:/bin/bash amurang:ixl89:674:674::/home/amurang:/bin/bash bandungcc:cfr45:675:675::/home/bandungcc:/bin/bash baubau:ndk73:676:676::/home/baubau:/bin/bash
“ambon” is the account name, “afd43″ is the new password for the account, “636″ refers to the account UID & GID. I skipped on the user info and leave it as blank. Next, the “/home/ambon” is the path to the home directory of that particular account, and “/bin/bash is the path to the account shell. Please note that since the password on this plain text is not encrypted, make sure that root and only root is the only user that has access to this file. You can chmod 600 this file to prevent access from another account.
Next, create the accounts by simply doing:
[root@foxbat scripts] newusers /root/newuser.txt
..And we’re done!
Filed under: *Nix, Red Hat, rhel, time out | Tags: export, import, redhat, rhel, volume group
This is a fairly straight-forward process.
- Exporting the volume group from its current host
- Unmount any LV residing on that particular VG. In my case, there’s only one LV on VG vg0
- list all lv in the vg
[root@hqhcmdev1 ~]# lvdisplay --- Logical volume --- LV Name /dev/vg0/lvol0 VG Name vg0 LV UUID 7HltCU-Elaq-x1pr-S7Wm-xvOt-NGk6-Fwufyd LV Write Access read/write LV Status NOT available LV Size 97.47 GB Current LE 6238 Segments 1 Allocation inherit Read ahead sectors 0 - unmount the lv
[root@hqhcmdev1 ~]# umount /u01 - if there’s any, remove the fstab entry for that particular partition, so that the booting process will not try to mount the partition
[root@hqhcmdev1 ~]# vi /etc/fstabThe /etc/fstab should look like this:
# This file is edited by fstab-sync - see 'man fstab-sync' for details /dev/VolGroup00/LogVol00 / ext3 defaults 1 1 LABEL=/boot /boot ext3 defaults 1 2 none /dev/pts devpts gid=5,mode=620 0 0 none /dev/shm tmpfs defaults 0 0 none /proc proc defaults 0 0 none /sys sysfs defaults 0 0 /dev/VolGroup00/LogVol01 swap swap defaults 0 0 #LABEL=/u01 /u01 ext3 defaults 1 1
- list all lv in the vg
- Deactivate, and export the volume group
- Deactivating vg0
[root@hqhcmdev1 ~]# vgchange -an vg0 0 logical volume(s) in volume group "vg0" now active - exporting vg0
[root@hqhcmdev1 ~]# vgexport vg0 file system Volume group "vg0" successfully exported
- Deactivating vg0
- Unmount any LV residing on that particular VG. In my case, there’s only one LV on VG vg0
- Import the volume group to the new server
- Present the exported partition to the new server
- Search for the new partition This step depends on what hardware are you using for the storage. Some SANs provide it’s own tool, and others use linux generic command such as:
[root@hqhcmdev2 ~]# echo "- - -" > /sys/class/scsi_host/host0/scan - Check whether the partition has been detected by the target server using pvscan
[root@hqhcmdev2 ~]# pvscan PV /dev/sda2 VG VolGroup00 lvm2 [19.88 GB / 0 free] PV /dev/sdb1 is in exported VG vg0 [99.98 GB / 2.52 GB free] PV /dev/sdd1 VG VolGroup00 lvm2 [3.97 GB / 128.00 MB free] Total: 3 [123.83 GB] / in use: 3 [123.83 GB] / in no VG: 0 [0 ]
- Search for the new partition This step depends on what hardware are you using for the storage. Some SANs provide it’s own tool, and others use linux generic command such as:
- Activate and import the volumegroup
- Import the VG
[root@hqhcmdev2 ~]# vgimport vg0 Volume group "vg0" successfully imported - Activate the VG
[root@hqhcmdev2 ~]# vgchange -ay vg0
- Import the VG
- Mount the imported partition
- Create a mountpoint for the imported partition
[root@hqhcmdev2 ~]# mkdir /t01 - label the partition First, look for the logical volume residing on the newly imported partition
[root@hqhcmdev2 ~]# lvdisplay vg0 --- Logical volume --- LV Name /dev/vg0/lvol0 VG Name vg0 LV UUID 7HltCU-Elaq-x1pr-S7Wm-xvOt-NGk6-Fwufyd LV Write Access read/write LV Status available # open 1 LV Size 97.47 GB Current LE 6238 Segments 1 Allocation inherit Read ahead sectors 0 Block device 253:2Next, create a label for that LV
[root@hqhcmdev2 ~]# e2label /dev/vg0/lvol0 /t01 - optionally, create a fstab entry for the partition, if you want it to be automatically mounted on reboot
[root@hqhcmdev2 ~]# vi /etc/fstabThe /etc/fstab should look like this:
This file is edited by fstab-sync - see 'man fstab-sync' for details /dev/VolGroup00/LogVol00 / ext3 defaults 1 1 LABEL=/boot /boot ext3 defaults 1 2 none /dev/pts devpts gid=5,mode=620 0 0 none /dev/shm tmpfs defaults 0 0 none /proc proc defaults 0 0 none /sys sysfs defaults 0 0 /dev/VolGroup00/LogVol01 swap swap defaults 0 0 LABEL=/t01 /t01 ext3 defaults 1 1 - Mount the partition
[root@hqhcmdev1 ~]# mount /t01
- Create a mountpoint for the imported partition
- Present the exported partition to the new server
If you’re into linux server administration, then sysstat is a very handy tool to have. It allows you to collect realtime and historical data about your server performance, and it’s readily available on all major linux distribution. What’s written in this blog is based on RHEL 4.7, but it should be applicable to other distros with some minor tweaks.
Packages to install on RHEL 4.7 :
- sysstat-5.0.5-19.el4.i386.rpm
to install:
[root@localhost RPMS]# rpm -ivh sysstat-5.0.5-19.el4.i386.rpm
warning: sysstat-5.0.5-19.el4.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing... ########################################### [100%]
1:sysstat ########################################### [100%]
The first step that you’ll need to do is to make sure the sysstat is collecting data from your machine. Check the the content of /etc/crond.d/sysstat, it should be similar to this:
[root@localhost /]# more /etc/cron.d/sysstat
# run system activity accounting tool every 10 minutes
*/10 * * * * root /usr/lib/sa/sa1 1 1
# generate a daily summary of process accounting at 23:53
53 23 * * * root /usr/lib/sa/sa2 -A
based on the above cron entry, the sa1 command is collecting data on your server in 10 minutes interval. You can change the interval by changing the */10 to whatever value you desire, ie: */5 for every 5 minutes. The data gathered by sa1 command is stored on saxx files, stored on /var/log/sa directory on your server, with xx refering to the date of the month (ie: sa01 for data gathered on the first day of the month)
The second cron line means that on 23:53 the sa2 command will generate a daily report, stored on a plain textfile named sarxx, with xx also refering to the date of the month.
The second step is to check whether the saxx files is created by sysstat
[root@localhost sa]# ls -la /var/log/sa
total 24
drwxr-xr-x 2 root root 4096 Apr 1 18:20 .
drwxr-xr-x 12 root root 4096 Apr 1 18:10 ..
-rw-r--r-- 1 root root 2064 Apr 1 18:20 sa01
Ok, so now sysstat is up and running on your server.
sysstat provides several tools to help you monitor your server, such as:
vmstat
used to monitor overall activity of the server
iostat
iostat can be used to monitor the disk activity of the server
mpstat
used to monitor processor(s) activities
Detailed functions of each tool can be found on their man pages.
I personally use sysstat for the sarxx files. It contains historical data of your server performance on a plain textfiles. You can load up the data to spreadsheet, and perform analysis to determine which part of your server is the performance bottleneck.
One tool that I often use to do this is kSar. kSar is a java application that can be used to translated your sysstat data to a graph. It’s very useful if you need to analyse the data at a glance.
To run kSar, make sure you have java installed on your box. Then, download kSar from here, unzip, and run it by typing:
surfer@Mach5-M:~/apps/kSar-5.0.6$ java -jar kSar.jar
Then load one of a sarxx files created by sysstat (usually located on /var/log/sa for RHEL and its derivatives, /var/log/sysstat on ubuntu) by selecting Data > Load from textfile.
One of my friend from plurk mentioned ommwriter, a simple text editor for windows and mac. Unlike any other text editor, ommwriter is a fullscreen text editor, aiming to make writing a pleasure once again, by removing anything on your computer that might prevent you from concentrating.
I tried to run ommwriter with wine on my maverick install. No such luck. So I googled around, and found several alternatives, such as KoalaWriter, FocusWriter, and my choice, Marave.
At this moment, the author of marave doesn’t provide a .deb package for marave, so to get it to work on Ubuntu 10.10 Maverick Meerkat, I’ll need to compile it from the source.
First step, to get required packages, such as:
- python-qt4
- python-qt4-phonon
- python-enchant
- phonon
- phonon-backend-gstreamer
To do that, open a terminal window, and type this:
surfer@Mach5-M:/$ sudo apt-get install python-qt4 python-qt4-phonon python-enchant phonon phonon-backend-gstreamer
Then, get the source code for marave here. You’ll also need to get a patched spelltextedit.py and numberbar.py, since a bug from the current package prevents the “save” and “save as” dialog from showing correctly.
Now, to install marave, untar the package by typing:
surfer@Mach5-M:/$ tar zxvf marave-0.7.tar.gzput the patched spelltextedit.py and numberbar.py to the editor folder. You'll be asked to overwrite the current one.
surfer@Mach5-M:/$ cp spelltextedit.py marave-0.7/marave/editor/ surfer@Mach5-M:/$ cp numberbar.py marave-0.7/marave/editor/The next step is to compile marave by typing:
surfer@Mach5-M:/$ cd marave-0.7 surfer@Mach5-M:/$ sudo python setup.py install
All done, you can start marave by typing:
surfer@Mach5-M:/$ marave-editorSome minor bugs:
- typing sound doesn't seems to work correctly




















