REALLY tricky question: different files depending on system

REALLY tricky question: different files depending on system

Post by Tomas Halvarss » Sun, 08 Dec 1996 04:00:00



I'm having a really hard problem for all you gurus out there:

Here at my university, we have both sun4m, sun4c, sgi and rs6000 machines.
And due to different setups, I need different settings for the same program
depending on which machine I'm currently using.

My biggest problem is with Netscape: I need different .mailcap and .mime.types
files depending on the machine I'm currently using. At the moment, I have a
shell script that simply copies the right files to the right place when
necessary.
But I would want to be able to have these lines in my ~/.netscape/preferences
file:

PERSONAL_MIME_TYPES:    ~/.netscape/.mime.types.current
PERSONAL_MAILCAP:       ~/.netscape/.mailcap.current

with .mailcap.current and .mime.types.current being some sort of dynamic links,
pointing to either .mailcap.sgi or .mailcap.rs6000 etc... depending on system.

I know, I could put this in some startup file, to be executed when I log in,
copying files to the right place, but sometimes I'm logged in on 2 machines at
the same time...

I've tried using these lines:

PERSONAL_MIME_TYPES:    ~/.netscape/.mime.types.`arch -k`
PERSONAL_MAILCAP:       ~/.netscape/.mailcap.`arch -k`

and:

PERSONAL_MIME_TYPES:    ~/.netscape/.mime.types.$HOSTTYPE
PERSONAL_MAILCAP:       ~/.netscape/.mailcap.$HOSTTYPE

but, as you may guess, no luck!

I also have a minor problem: using gcc as a preprocessor to replace all
occurences of "DIMENSION" with "65x80" in my fvwm2rc file. I have tried the
following in the fvwm2rc file:

#ifdef SUN4M
        #define DIMENSION 65x80
#endif
[...]
+       "Big XTerm"           Exec xterm -geometry DIMENSION+0+1024 &

but that gives the line:

+   "Big XTerm"     Exec xterm -geometry 65x80 +0+1024 &

and fvwm2 complains...
The command I use to put the file through gcc is:

gcc -x c -E -DSUN4M ~/fvwm2rc

I am very grateful for ANY help on these problems. Please relpy both by e-mail
and to this newsgroup, since the news server here is kind of unstable.

/Tomas Halvarsson

-----------------------------------------------------------------------

"Only the paranoid survive"



www:    http://www.pobox.com/~psycho

Student at the Department of Computing Science, Umea University, Sweden

-----------------------------------------------------------------------

 
 
 

REALLY tricky question: different files depending on system

Post by Andreas Schw » Tue, 10 Dec 1996 04:00:00


|> I also have a minor problem: using gcc as a preprocessor to replace all
|> occurences of "DIMENSION" with "65x80" in my fvwm2rc file. I have tried the
|> following in the fvwm2rc file:

|> #ifdef SUN4M
|>   #define DIMENSION 65x80
|> #endif
|> [...]
|> + "Big XTerm"           Exec xterm -geometry DIMENSION+0+1024 &

|> but that gives the line:

|> +   "Big XTerm"     Exec xterm -geometry 65x80 +0+1024 &

|> and fvwm2 complains...
|> The command I use to put the file through gcc is:

|> gcc -x c -E -DSUN4M ~/fvwm2rc

GCC by default operates in ANSI mode, where macro replacements are always
surrounded by spaces.  If you want the traditional mode, use gcc -traditional.
--
Andreas Schwab                                      "And now for something


 
 
 

1. Different css file depending on which browser is being used using Apache

Hi,

I'm wanting to find a solution on the server level that will allow us
to call a style sheet from within HTML and have the server return a
different file based on whether the user has Netscape, MSIE, and
whether the user is on a Mac or PC on an Apache server.

The basic idea is that the HTML file would call "mainstylesheet.css"
and what would happen is that it would figure out whether to return
the contents of mainstylesheet_PCNetscape.css,
mainstylesheet_PCMSIE.css or one of the Mac versions.

I'm assuming that this is something to be done using the mime type for
css but I don't have a solution yet and I'm not sure what the best
solution would be.

Thanks,

Mark Thompson

2. Dual M/B recommendation please

3. different X config files depending docked/undocked

4. How to change swap space?

5. jfs, vxfs, different file system , different ways of increasing

6. IPSec Linux - Longhorn one way.

7. Problems moving files to trash when on different file systems

8. lsmod and Matrox

9. tricky system call question, non-blocking connect()

10. Do Partition Table and File System Depend on the CPU?

11. Enhanced Filing system - file system like DEC Advanced File system for Linux

12. Different ip-source-address depending on destination possible?

13. df prints different things depending on runlevel