We make mistakes when developing before or after committing in git. We may revert changes and fix our mistake by using git. Revert entire working tree before committing We can return the entire working tree to the last committed state if we mess up the working tree: $ git reset –hard HEAD Revert changes to
Read more
Tag: Tip
Improving Font Rendering for Fedora Using Bytecode Interpreter
Posted onFedora’s font rendering isn’t very nice. At least on my laptop with Fedora 12. Bytecode Interpreter (BCI for short) is disabled by default because of patent issues. As the TrueType bytecode patents have expired. We may enable BCI in Fedora now. TrueType announced that BCI is enabled by default from 2.4. Fedora 12’s TrueType version
Read more
Linux Cluster Solutions
Posted onSolutions to Linux cluster construction and management such as unified account management, NFS home directory, network configurations are summarised in this post. The post is keeping updating while new solutions is added to this site. ===Account and storage management=== [[unified-linux-login-and-home-directory-using-openldap-and-nfsautomount|Unified Linux Login and Home Directory Using OpenLDAP and NFS/automount]] [[backup-linux-home-directory-using-rsync|Backup Linux Home Directory Using rsync]]
Read more
Finding Out the Firmware Version in Linux
Posted onIn Linux, it is often necessary to check the firmware version of your system. The firmware, also known as BIOS (Basic Input/Output System), is a software that is built into the hardware of your system and serves as an interface between the hardware and the operating system. In this post, we will explore how to
Read more
Configuring Mouse Cursor Style for GTK Applications in KDE Desktop
Posted onUpdate on Jan. 7, 2012: The package for the gtk application style setting on KDE 4.7 is kcm-gtk. The command to install this package is: “# yum install kcm-gtk”. One annoying thing when using KDE desktop is that the theme and style of GTK applications differ from KDE’s. The gtk-qt-engine can let us select the
Read more
How to Start KDE from Command Line using startx
Posted onI don’t use xdm, gdm or kdm… I prefer my Linux booting to init 3. I like logging in to the command-prompt and starting X manually with startx. In my Fedora Linux box, I always get to gnome even both gnome and KDE are installed. Actually the startx script is already written for most of
Read more
Useful Mplayer/Mencoder Commands
Posted onmplayer/mencoder are powerful tools. This is a list of useful mplayer/mencoder commands. Extract the audio, convert it to PCM and write the resulting wave file to audio.wav: mplayer -vo null -hardframedrop -ao pcm:file=audio.wav video.avi Convert .wav file to .mp3 file: lame -h out.wav out.mp3 Preview a video composed of all jpeg files from the current
Read more
Making dnf/yum Not Update Certain Packages
Posted onWe may not want to update some packages such the kernel on a stable server while updating the system. If we run “dnf update” or “yum update”, we may get suggested by dnf/yum to install all the packages with updates. In this post, how to make dnf/yum not update certain packages such the kernel when
Read more
Query Installed Files from Package and Package for Installed File in Fedora
Posted onHow to query installed files from a package and query which package one installed file is in will be introduced. Query installed files from a package $ rpm -ql package_name Query which package a installed file is in $ rpm -qf /full/path/to/installed/file
Speeding Up Firefox in Linux
Posted onFirefox can be much faster on Linux! Let’s speed up Firefox on Linux system. Part 1 and 2 only config firefox, so it can also be used on other platform such as Windows. 1. Pipe-lining network connection Most of us use a broad band width network, then why not pip line the connection from Firefox?
Read more
How to Capture Desktop Video on Linux using ffmpeg
Posted onffmpeg is a powerful tool and it can do the work of capturing Linux desktop video very well. ffmpeg is a very fast video and audio converter that can also grab from a live audio/video source. ffmpeg can grab X11 input and create a video file such as mp4 at specific fps with the specific
Read more
An I/O Performance Comparison Between loopback Backed and blktap Backed Xen File-backed VBD
Posted onI have done some I/O performance benchmark test of Xen DomU. For easier management, some of our DomU VMs are using file-backed VBDs. Previously, our VMs are using Loopback-mounted file-backed VBDs. But blktap-based support are recommended by Xen community. Before considering changing from loopback based VBD to blktap based VBD, I have done this performance
Read more
MPlayer Startup Volume and Postion
Posted onI like to set the volume of mplayer to 28% of the volume instead of the 100% which is too large for me. And I also want mplayer to put to video window on the left top of the screen. This is the method: Add these lines to the ~/.mplayer/config file: For setting the startup
Read more
lftp Disable SSL
Posted onlftp some times stalls with message “Making data connection” when “ls” the directory after logged in the ftp site. The message may appear like this: < — 227 Entering Passive Mode (xx,xx,xx,xx,xx,xx) —- Connecting data socket to (yy,yy,yy,yy) port zz `ls’ at 0 [Making data connection…] But some client such as filezilla may works on
Read more
Mostly Used MPlayer Keyboard Control Shortcuts
Posted onMPlayer has a fully configurable, command-driven control layer which allows you to control MPlayer using keyboard. But which are these shortcuts are not immediately know to users of MPlayer. Below is a list of mostly used MPlayer keyboard control shortcuts. They come from the [[man:1|mplayer|mplayer manual]] where you can find a full list of all
Read more
A Simple CPU and Memory Performance Test of Xen Dom0 and DomU
Posted onPlease refer to Setting Up Xen Dom0 on Fedora : Xen 3.4.1 with Linux Kernel 2.6.29 on Fedora 12 for the platform of this test (this test runs on Fedora 11, however). I have done some simple performance test on DomU and Dom0 and compare with the performance on physical machines. These test are simple,
Read more
Vim Removing “^M” Returns from Files
Posted onWhen editing some files fro Windows in vim, there are some ugly “^M” returns. Here is a method to remove and replace these “^M”s (please note that you should not copy/past to use the follows): :1,$s/{Ctrl+V}{Ctrl+M}//{Enter} {Ctrl+V} means keyboard operation that is push ‘ctrl’ and ‘v’ together. {Enter} is push ‘enter’. : means that it
Read more
ALSA Problem of Fedora 11 on Compaq Presario CQ35-240TX
Posted onWhen I get my new Compaq Presario CQ35-240TX, of course, the first thing is to install Fedora ;) But unfortunately, after installation there is no sound! It seems there is something wrong with the driver configuration. Here is a solution to this: Add these two line at the end of /etc/modprobe.d/dist.conf options snd-hda-intel model=hp-m4 enable=1
Read more
How to Speed Up Firefox DNS Lookup in Linux
Posted onHow to speed Up Firefox DNS Lookup in Linux: 1. Close IPV6 support # echo “alias net-pf-10 off” >> /etc/modprobe.conf # echo “alias ipv6 off” >> /etc/modprobe.conf Type “about:config” into the address line and enter. Set “network.dns.disableIPv6” to “true” 2. Some other tweaks Type “about:config” into the address line and enter. Set “network.http.pipelining” to “true”
Read more
Add More Loop Device in Linux
Posted onWe need more loop devices on Linux than the default number (most commonly 8) some time, such as we are building 12 or more virtual machines on top of xen using loop device backed VBD. In this post, we want to use 32 loops. 1. If loop device is compiled directly in the kernel Pass
Read more