LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-18-2006, 04:13 AM   #1
john_smith
Member
 
Registered: Apr 2006
Posts: 42

Rep: Reputation: 15
Exclamation how we wrok with tar file


Hi
ihave set of font idwonloade from website in tar format
but iwont to extract this file but idont no where to extract
and after extract the font is it work after reboot or need some step
to activate
Thanks
 
Old 11-18-2006, 04:35 AM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Ok, so you
- downloaded some .tar archives that (should) contain font files (.ttf or something)
- you want to unarchive the .tar files and
- be able to use the fonts

There might be some differencies on making the fonts work, but here's a start; try out if it works:

1) Let's unarchive the tar files; first let's create a directory called fonts under your home directory, then unarchive the tar files there (edit the below code; instead of /path/to/tar/file.tar write the full path to a tar file)
Code:
cd
mkdir fonts
cd fonts
tar -xvf /path/to/tar/file.tar
Now you should have the contents of file.tar in ~/fonts/. Repeat the last step (tar-command) for every tar archive you want to.

2) Now that we have the font files, we need to put them in a correct place where the system can find them; since this probably needs root privileges to be done, let's first become root and then find out the path where the other fonts are:
Code:
su
(now type your root password; note that nothing is printed on screen while typing)
grep FontPath /etc/X11/xorg.conf
If you're using XFree86 instead of Xorg (some distributions do, some don't), you'll need to put /etc/X11/XF86Config-4 instead of /etc/X11/xorg.conf, and possibly do this another way around, but these advices work for Xorg and if you need advices for XFree86 or something else, just ask).

Now from the above grep command (which will match a file's contents against a given pattern and by default print only those lines that contain the pattern) you should have received some lines like these (an example):

FontPath "/usr/X11R6/lib/X11/fonts/misc/"
FontPath "/usr/X11R6/lib/X11/fonts/TTF/"
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"


That tells where your fonts are (in the above example: under /usr/X11R6/lib/X11/fonts/).

3) Now let's put the fonts there; use the same terminal as in the previous code example, and be root (if you closed the terminal, use su again first).

If the unarchived tar files contained directories that contain the fonts, copy the directories; if the tar files contained font files only (no directories), then do this first (otherwise skip this code):
Code:
mkdir /usr/X11R6/lib/X11/fonts/MyFonts
Again, replace /usr/X11R6/lib/X11/fonts/MyFonts with the font path you got from the previous grep command, plus some directory name for your new fonts.

4) Then let's copy the font files there:
Code:
cp ~/fonts/* /usr/X11R6/lib/X11/fonts/MyFonts/
..and again remember to alter the last path to point to your font directory.

5) Now all we have to do is alter the configuration file of X, add there a new line that tells X where the new fonts are, save and restart X to get them work:
Code:
pico /etc/X11/xorg.conf
instead of pico you may use whatever text editor you like; for example vi, joe, gedit, kate, emacs, bluefish, ... Now when you have the file open, search the FontPath lines you saw above with the grep command. Them simply duplicate the last line (copy&paste or just write) and alter the copied line to point to the directory you entered (in my example it was /usr/X11R6/lib/X11/fonts/MyFonts/).

6) Save the file and then close it. Restart X by pressing CTRL+ALT+BACKSPACE and your new fonts should work; you may also use a console login to do
Code:
init 3 && init 5
which in most systems should result in first closing X server (jumping to runlevel 3; it should be a text-runlevel for this to work) and then re-starting it (jumping to runlevel 5; it should be a graphical runlevel for this to work).

So, to cut short: first unarchive tar files (tar -xvf filename.tar), then make a new directory to the same place where all the other fonts are in your system (should read in X's configuration file), copy the font files there, alter X's configuration file and restart X server.
 
Old 11-20-2006, 12:24 AM   #3
john_smith
Member
 
Registered: Apr 2006
Posts: 42

Original Poster
Rep: Reputation: 15
thanks ,it work
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i decompress this tar.tar file? hmmm sounds new.. tar.tar.. help ;) kublador Linux - Software 14 10-25-2016 02:48 AM
why mount can not wrok in the fedro 3 ztdep Fedora 1 07-21-2005 08:02 AM
gave wrong syntax for tar as tar -cvzf file file.tgz how to recover the file gautham Linux - General 4 04-13-2005 03:15 AM
tar -cvzf file.xml file.tar.gz RickHunter_Ve Linux - Software 1 10-06-2004 12:58 PM
problem unzipping a tar.bz2 file tar: Error is not recov jyome Linux - Software 4 09-04-2003 01:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration