LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation
User Name
Password
Slackware - Installation This forum is for the discussion of installation issues with Slackware.

Notices


Reply
  Search this Thread
Old 08-10-2004, 06:41 AM   #1
rsamurti
Member
 
Registered: Dec 2003
Location: Mysore
Distribution: Mandrake, Libranet, Slackware
Posts: 148

Rep: Reputation: 22
Where to put this command?


Hello,

I am using Slackware 10. In this, I need to do

xset fp rehash

every time when I login to my account in X in order to make scalable fonts available to XFig. Where shall I put this command so that it is done automatically every time when I login through GDM? Is it possible to do this for all users at the time of booting? How?

Thanks for your help.

Anand
 
Old 08-10-2004, 09:03 AM   #2
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
If you use Gnome you could run that command when you login to a gnome session. If you run gnome-session-properties and click the Startup Programs tab then click Add and put xset fp rehash in the Startup Command box, that command will be run every time you login to Gnome. I used to use this to run xset s 0 to stop the screen going blank after ten minutes, but then I descovered that if I put
Option "BlankTime" "0"
in the serverflags section of /etc/XF86Config it did the same thing.
But why do you need to run xset fp rehash? I'm not saying you're wrong, I'm just curious to know. According to man xset, "The rehash argument resets the font path to its current value, causing the server to reread the font databases in the current font path. This is generally only used when adding new fonts to a font directory (after running mkfontdir to recreate the font database)." You may find that if you alter your font path or reconfigure something in /etc/fonts/fonts.conf it may be simpler
 
Old 08-10-2004, 09:52 AM   #3
rsamurti
Member
 
Registered: Dec 2003
Location: Mysore
Distribution: Mandrake, Libranet, Slackware
Posts: 148

Original Poster
Rep: Reputation: 22
Font problem in XFig

Thanks Mr. Benton for your reply.

This is my problem:

I want to run XFig. XFig looks for scalable ghostscript Type1 fonts in /usr/lib/X11/fonts/Type1 directory. But in Slackware 10, these fonts are installed in /usr/share/ghostscript/fonts directory. So, I copied the required *.pfb files from this directory to /usr/lib/X11/fonts/Type1 directory. Then, I updated fonts.dir and fonts.scale. After this, if I execute xset fp rehash the fonts are available in XFig. But strangely next time when I login, XFig does not locate the fonts unless I execute xset fp rehash again. I do not know why.

What is the best way to solve this problem?

Thanks again for your help.

Regards,

Anand
 
Old 08-10-2004, 11:34 AM   #4
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
Have you tried adding /usr/share/ghostscript/fonts to X's font path in /etc/X11/xorg.conf?

Section "Files"

FontPath "/usr/share/ghostscript/fonts/"
FontPath "/usr/X11R6/lib/X11/fonts/misc/"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
FontPath "/usr/X11R6/li...and so on
 
Old 08-10-2004, 12:45 PM   #5
rsamurti
Member
 
Registered: Dec 2003
Location: Mysore
Distribution: Mandrake, Libranet, Slackware
Posts: 148

Original Poster
Rep: Reputation: 22
My solution

I renamed xfig binary as startxfig and then I wrote a script file named xfig like this:

#!/bin/sh
xset fp rehash
startxfig

This may not be the best solution. But still it is working now without modifying x.org file as suggested by you.

Anand
 
  


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
Put the command for installing the CLAWPACK realtug Linux - General 2 10-24-2005 03:39 AM
Where to put some sh ... tareqth Linux - Software 4 07-23-2005 12:10 PM
Where do I Put the Command Application Startup bpellet314 Linux - Newbie 6 07-07-2005 10:30 AM
Command to put texfile in the clipboard? enemorales Linux - Software 0 02-09-2005 03:21 AM
Can I put execl command output into a file? CrazyDragon Programming 1 12-17-2003 04:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation

All times are GMT -5. The time now is 07:23 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