Live Chat!

Discover user guides and manuals within your linux system

          0 votes

May 9th, 2008 mysurface

Do you realized that we can obtain a lots of user manuals and guideline documents from our system? There is a folder /usr/share/doc, you may find some useful docs already preinstalled by your distro. Those docs are in pdf or html format. I manage to find user manuals for valgrind, ipython, systemtap, boost etc.

I believes you can download those docs from the internet too, but since it already preinstalled in your system, why bother to download it again? To reduce inconveniences of accessing those docs, we can extract all the docs links into a html where we can access those docs by just click on the links.

This is what I do with find command line:


echo "<html><head><title>My Linux Docs</title></head><body><H1>My Linux PDF docs at /usr/share/doc</H1>" > doc.htm
find /usr/share/doc/ -name "*.pdf" -printf "<a href='file://%p'>%p</a></br>" >> doc.htm
echo "</br><H1>My Linux html docs at /usr/share/doc</H1>" >> doc.htm
find /usr/share/doc/ -name "index.htm*" -printf "<a href='file://%p'>%p</a></br>" >> doc.htm
echo "</body></html>" >> doc.htm

Posted in Common, echo, find | Hits: 3154 | 2 Comments »

Installing true type fonts for linux

          0 votes

May 4th, 2008 mysurface

While searching the ways of installing true type fonts to linux, I get all sort of solutions. Some will ask you to copy and paste to fonts:/// folders in nautilus, or fonts:/ in konqueror. Some may even ask you to copy your ttf fonts to /usr/share/fonts and run fc-cache. All sort of ways doesn’t works so well during last two years.

Nowadays, I think all sort of ways may works under particular linux distro, the steps to install font might vary between different linux distros, but its they a common way that it will works for any distro? For me, installing custom fonts should be as straight forward as ‘copy and paste’ ttf files to a specific folders without needing to run any command or configuration script.

Recently, I find the ‘copy and paste’ way. I just need to copy my downloaded ttf font files to ~/.fonts. If your home directory does not contain .fonts folder, create a new one

Read the rest of this entry »

Posted in Misc | Hits: 5057 | 5 Comments »

Simple use of find to search for files in command line

          0 votes

May 2nd, 2008 mysurface

Find is a very strong command to search for files and folders. You can search for files based on certain criteria besides filename, such as file types, atime, belongs to which groups, file modes, etc. Because find command support a lots of options, therefore sometimes find command line looks very complicated, but actually it is not. Don’t let the lengthy find command lines scares you away, find can be very easy to use.

You just need to ask yourself 3 question?
1. What is the path you want to begin your search from? current directory.
2. What is the filename you want to search? any files with keyword ‘love’
3. What is the file types? normal file

Okay, lets construct the simple find command line.

find . -name "*love*" -type f

1. Current directory can be write as a single dot (.)
2. Specified the filename by option -name and you can use wildcard to construct your keyword.
3. Use -type to force your file type for accuracy search result, but you can ignore specifying the -type.
( check out -type in man page for more info)

Do you want to know more?
Read the rest of this entry »

Posted in Misc, file, find | Hits: 5724 | No Comments »

How to transfer files and folders through ssh by drag and drop

          0 votes

April 30th, 2008 mysurface

If you are using windows and accessing linux servers through ssh, you may use ssh secure shell client, where it bundle with ssh secure shell file transfer client. The file transfer client allows you can do a file transfer drag and drop. Well in linux you can do the samething like that if you have konqueror installed.

Read the rest of this entry »

Posted in Misc | Hits: 6519 | 4 Comments »

Tribute to the Kubuntu Hardy Heron 8.04

          0 votes

April 26th, 2008 mysurface

While the world celebrating the new release of Ubuntu Hardy Heron 8.04, Kubuntu Hardy Heron 8.04 has announced its double vision release too. Kubuntu Hardy Heron provides you two choice of KDE, either you want a very stable KDE 3.5.9 or bleeding edge KDE 4.

Read the rest of this entry »

Posted in kubuntu, ubuntu | Hits: 8194 | 12 Comments »

How to safely upgrade your ubuntu to Hardy Heron 8.04?

          0 votes

April 25th, 2008 mysurface

After a long wait, Ubuntu Hardy Heron 8.04 have released! If you plan to upgrade your current Ubuntu, I suggest you don’t go for internet upgrade! Instead, you can upgrade it without internet connection, mypapit will teach you how to do it!

Yeah! You need to download Ubuntu Hardy Heron alternate CD’s iso! Get the iso from http://www.ubuntu.com/getubuntu/download, remember to check the check box if you want to download the alternate CD.

Don’t forget to verify your ISO with md5sum before you burn it to CD. In case if the md5sum results doesn’t tally with the one provided by ubuntu, download the ISO again, because damage iso may harm your upgrade! So just be careful.

How to perform md5 checksum? Follow the tutorial here. or here.

Where can I obtain the Ubuntu Hardy Heron 8.04 md5sum?


7d0ac92c56361949d099dd9337c975e7 *ubuntu-8.04-alternate-amd64.iso
166991d61e7c79a452b604f0d25d07f9 *ubuntu-8.04-alternate-i386.iso
fc43f665ba51c4be0d95c011aefef45d *ubuntu-8.04-desktop-amd64.iso
8895167a794c5d8dedcc312fc62f1f1f *ubuntu-8.04-desktop-i386.iso
8a73cf85b04f37d5d91fb436525ea395 *ubuntu-8.04-server-amd64.iso
c3162b21757746c64a0a22cdd060b164 *ubuntu-8.04-server-i386.iso
cdd32124f23b455b0aa22cc3ff35ff35 *wubi.exe

Fasten your seatbelt, and GO!

Posted in ubuntu | Hits: 9809 | 4 Comments »

vim with ctags for multi-level directory hierarchy

          0 votes

April 24th, 2008 mysurface

I have wrote a post regarding vim with ctags, introduces how ctags allows you to travel across source codes, searching for function, objects, variables definition. To jump from function call to function definition, I usually do ctrl+] in vim. It should works fine as it should have already configured by default from most of the linux distros.

Usually c/c++ projects may have multiple directories, for example, lets look at this project hierarchy:


project
  `-----misccomp
  |       `...
  `-----sysint
          `-----client
          |       `-----hdrs
          |       `-----lib
          |       `-----src
          |       `-----test
          `-----common
          |       `-----hdrs
          |       `-----lib
          |       `-----src
          |       `-----test
          `-----server
                  `-----hdrs
                  `-----lib
                  `-----src
                  `-----test

I Copied it from Exuberant Ctags FAQ

Let say source code call handle.cc in sysint/client/src may make a function call where the function definition is in sysint/common/hdrs. The simplest way to make use of ctags, you have to station yourself in sysint folder, and do this:

ctags -R *

The command line above will generate a file name tags in sysint folder. To edit let say handles.cc in client/src, you will need to issue vim at sysint directory, like this:

vim client/src/handles.cc

So that if the function call definition is at common/hdrs, you may able to travel from there, because vim will always try to find the tags file in the base folder you issue vim. Therefore, if you change directory to client/src like this

cd client/src
vim handle.cc

And you try to do ctrl+], it will complain it can’t find the tags file and refused to work! Because inside sysctl/client/src folder doesn’t contain tags file. ctags -R * at sysctl folder does not generates tags in any of its subfolders.

Exuberant Ctags FAQ guiding through you on how to generates tags file on every single sub folders, so you can travel freely at any point. The steps some how - tedious! I don’t feel that I can remember the steps very well everytime I create a new c/c++ project. So I created a bash script to does all those tedious steps.

Read the rest of this entry »

Posted in Developer, Text Manipulation, ctags, vi, vim | Hits: 8379 | 4 Comments »

rpm and yum rescue tips on Fedora

          0 votes

April 22nd, 2008 mysurface

You have to be careful when you run yum update and yum install, DON’T force kill it, kill -9 or pkill -9. Those action are consider very dangerous, may lead you to losing certain files. Seriously, I hate yum, when I really wanna cancel the process in the middle, by hitting ctrl+c doesn’t really work! So, I do pkill -9, and I bare the consequences!

Some binaries are missing although the rpm query indicates those packages are successfully installed; some icons are missing, and I have no idea what’s wrong, I almost lose hope to reinstall everything. Thanks to my comrades Kagesenshi guiding me through finding the cause and I eventually fix it. Now, I share what I have done during the rescue.

Read the rest of this entry »

Posted in Admin, awk, rpm, which, yum | Hits: 9153 | No Comments »

Listen audio player: webradio, lyrics, podcast and last.fm all at once

          0 votes

April 17th, 2008 mysurface

Listen, a feature rich audio player allows you to enjoy the most fun out of music! You can listen to the webradio, I have tried on www.shoutcast.com, it works as expected. It support last.fm social networks. It allows you to download album art from amazon ( it doesn’t work at the moment) as well as from google image. You can add you podcast feed. Yes, the lyrics can be fetch automatically from leoslyrics.com and lyrc.com.ar and searching album, artist info from wikipedia.

feature rich audio player

I am currently experiencing with listen version 0.5. Okay, you hear enough of the features, now talk about its limitations. You should expect me compare listen to Amarok. Amarok is a well known feature rich kde audio player, not to mention, it is still the best audio player for me.

The UI looks weird to me at first, I find listen looks like notice board to me, various stuff scattering into one board. There are some limitations on the context menu when I right click on the now playing playlist, It doesn’t allow me to edit the mp3 tag, I have to edit it from another block. I can’t navigate my current playing track, if I wanna listen to the track in the middle, I can’t, I need to start it from the beginning. (updates! I tried on ubuntu, the same version 0.5, it works! By the way, the control named as slider.) Odd, listen don’t have STOP button, it allow me to toggle between PLAY and PAUSE but not STOP. It doesn’t support external device like iPod, I am not sure whether it can play audio CD or not, I only tested with MP3.

Don’t get me wrong! I like this audio player very much, just I feel listen still have much room to improve and I look forward to it. Did I mention this audio player was written in python? Yeah!

You can download listen from HERE. or simply get it from your linux distro repository, enjoy!

Posted in Misc, listen | Hits: 10234 | 4 Comments »

yum, can it be faster?

          0 votes

April 16th, 2008 mysurface

Fedora

Recently I install fedora to my laptop instead of ubuntu or any debian based distro, the application that I concern the most is yum. I have bad experience on yum previous during fedora core 5, which I find it extremely slow. Therefore I search for some guidelines from my friend Kagesenshi who are extremely active in Malaysia Fedora Community.

First question I throw to him is, Can yum be faster? He throws me back lots of tips over the IRC. Yeah! there are many tips indeed to make yum run faster, he wrote a post reviews all his kungfu on yum, don’t miss out his post, click here. Yum support plugins, one of them is Fastest Mirror, what this plugin does is it scan for the nearest mirror and pick the fastest one for you.

One of the yum’s shortcomings that bothers me so much is the latency of package searching, to search for available package, let say kmess, I do this:

yum search kmess

To do the same thing under apt, I do this

apt-cache search kmess

Seriously, apt-cache really out performs yum. One of the ‘feature’ that yum provides me is ‘intelligently’ do cache update when I ask for package searching. I really don’t understand the reason of such design. Why would it want to do the cache update when I just instruct it to do the package searching?

Read the rest of this entry »

Posted in Admin, yum | Hits: 10669 | 5 Comments »