Installing Fonts in Ubuntu
Copy your fonts into the .fonts directory in the home directory and then update the font cache with this command:
sudo fc-cache -fv
To use it with LaTeX fontspec package (it can use open-type fonts directly in your document), you will need is to take note of the exact name of the font family. For that, after having installed the lcdf-typetools Ubuntu package, you can do something like
otfinfo -i /usr/share/fonts/AGaramondPro-Regular.otf | grep Family
Custom .screenrc Configuration File
Screen may be the most useful Linux applications when it comes to getting things done through the terminal. This custom screenrc configuration file will provide you with a permanent caption line at the bottom of each window. This caption line will enable you to easily keep track of each terminal window and provide other helpful information such as host and current time.
When screen is invoked, it executes initialization commands from the files “/etc/screenrc” and “.screenrc” in the user’s home directory.
Simply create a file in your home directory with vim or some other editor.
$ vim ~/.screenrc
And place the following line in the file.
caption always "%{Wb} %H %{Bk}| %{Ck}%-w%50>%{Cb} %n %t %{-}%+w%<%{- Wk}%{Bk} | %=%{Wb} %C "
Now launch a new screen session for it to take effect.
Check Bandwidth Usage In Ubuntu
Install bwm-ng and/or iftop as given below:
sudo apt-get install bwm-ng
sudo apt-get install iftop
Enjoy!
Using Coral Draw Images In Ubuntu
Use uniconverter to convert .cdr file to any other format required.
Or use SK1 (http://sk1project.org/)
A Simple Script To Get A Terminal Dictionary
First, make sure that you have the Lynx web browser:
sudo apt-get install lynx
Now, make the following script:
#!/bin/sh
lynx -dump "http://wordnet.princeton.edu/perl/webwn?s=$1" | grep -B 1000 References | grep -A 1000 relations | less
Now you can define any word from the terminal. For example, suppose I want to know the definition of ‘psychoanalysis’, I can simply run:
./define psychoanalysis
and get the definition printed out.
It’s nothing fancy; just grabs the output from an online dictionary and spits it out to the terminal, but I find it to be very useful.
Free Up Cache Memory in Ubuntu
Ever wondered how to remove the cache memory in Ubuntu? Linux kernels 2.6.16 and newer provide a mechanism to clear the inode, page, and dentry caches on demand. All you have to do is echo a value to the proc filesystem, and you’re done. Follow the recipe below:
As this is a non-destructive operation and dirty objects are not freeable, run:
sync
To free pagecache:
sudo sh -c "echo 1 > /proc/sys/vm/drop_caches"
To free dentries and inodes:
sudo sh -c "echo 2 > /proc/sys/vm/drop_caches"
To free pagecache, dentries and inodes:
sudo sh -c "echo 3 > /proc/sys/vm/drop_caches"
Hope this works for you all.
How To Check Which Software Package Is Using More Space
If you’re running out of disk space and you want to quickly see what packages are using the most space on your hard drive, use the following command
dpkg-query --show --showformat='${Package;-50}\t${Installed-Size}\n' | sort -k 2 -n | grep -v deinstall | awk '{printf "%.3f MB \t %s\n", $2/(1024), $1}'
That will sort the packages by size, putting the largest ones on the bottom. If you only want to see the top few, you can type
tail -n 10
at the end, because in all likeliness you have a *lot* of packages installed
Using Terminal To Check The Size Of A Directory
You can also use a Terminal command to check the size of an individual directory. For instance, if you wanted to check the size of your Documents directory, you would use this command:
du -hs Documents
This will give you the combined size of your Documents folder, along with any subfolders.
Adding Public Key For Ubuntu Repositories
Following recipe will help to add a public key to ‘apt’ for repositories not already included in /etc/apt/sources.list. If you get an error ‘NO_PUBKEY XXXXXXXXXXXX’ , just use XXXXXXXXXXXX public key name in the following code.
gpg --keyserver hkp://subkeys.pgp.net --recv-keys XXXXXXXXXXXXXXXXX
sudo gpg --export --armor "XXXXXXXXXXXXXXXXXXX" | sudo apt-key add -
sudo apt-get update
Enabling Spell Checking In Kile Using Aspell
Kile is a top-notch KDE frontend LaTeX editor. Enabling spell checking for it requires a small trick if you’re running Ubuntu, which is Gnome based. Several options, including spell checking, for KDE applications are configured within the KDE control center. To get the job done, proceed as follows:
1. First, you need to install the KDE control center
sudo apt-get install kcontrol
2. Then, open KDE control center by running the kcontrol command, navigate to KDE Components -> Spell Checker and set the spell checking Client to ASpell
3. Spell checking will now be enabled next time you start Kile!









