Problems with ST/X and Solutions

Linux stx-546 alternative PDF viewer

Postby marvin_littlewood » 8. Jan 2010, 01:23

Hi!

Looking at the source code, it would appear that a future version may allow the user to set which application to use for particular MIME Types via the OS. In the meantime, for those that don't use Acroread on Linux, here is a way to make ST/X 5.4.6 use "evince", which seems to do a "good enough" job on Ubuntu 9.10.

1) Find the method: "initializeDefaultCommands" for class: MIMETypes, in the section: "initialization".

Change the following:
Code: Select all
unixCommands at:'application/pdf'              put:'acroread -display %2 %1'.

to:
Code: Select all
unixCommands at:'application/pdf'              put:'evince --display=%2 %1'.

FWIW: You don't have to use "evince". In principle, any PDF viewer will do but... Not being a Linux Guru, I am not sure what the --display=%2 bit does or whether it is used by ST/X. I cannot say whether this part is crucial. I included it because evince and acroread appear to have the same command and respond to it in the same way.

2) :!: IMPORTANT Open a workspace and evaluate:
Code: Select all
MIMETypes initializeDefaultCommands.

To test these changes, open up the help and see if you can read a PDF file.

Hope this helps & Happy New Year!

Marv
marvin_littlewood
 
Posts: 6
Joined: 6. Jan 2010, 01:34

Re: Linux stx-546 alternative PDF viewer

Postby cgittinger » 13. Jan 2010, 11:54

thanks for the hint.
let me add, that you can also put that stuff into your "private.rc", so you'll get that automatically added with the next cold start.

regards,
Claus
cgittinger
 
Posts: 61
Joined: 12. Nov 2008, 17:05

Re: Linux stx-546 alternative PDF viewer

Postby marvin_littlewood » 15. Jan 2010, 13:41

Hi Claus

FWIW I saved my image...

Thanks for the comment. Sorry to bother you, but can you explain a bit more or refer me to appropriate documents? I appear not to have a private.rc in my $HOME directory and even if I did, I am not sure I would know what to put in it!!

Am I right in guessing that you are implying that the MIMETypes collection now picks up its settings from the OS?

Many thanks

Marv
marvin_littlewood
 
Posts: 6
Joined: 6. Jan 2010, 01:34


Return to Troubleshooting

Users browsing this forum: No registered users and 0 guests

Design by GB