xpdf's default directory


Forum: Apps
Topic: xpdf's default directory
started by: lovdsl

Posted by lovdsl on April 12 2006,01:20
When you open xpdf and click open the dialog box defaults to home/dsl..I was wondering if this can be changed to a different directory ie /home/dsl/pdf/...I looked around but only found the exec, lang files and the xpdfrc that is in /home/dsl..not sure what to add if this is the place..it currently has only what looks like a printer notation. thanks for any..
Posted by mikshaw on April 12 2006,01:45
A lot of X applications default to the current directory for their file selectors, so one way to do this is to start xpdf with the command
Code Sample
cd /home/dsl/pdf && xpdf

You could make this an alias if you want to do this every time:
Code Sample
alias xpdf='cd /home/dsl/pdf && xpdf'

I can't recall if i've ever made an alias with "&&", so i'm not certain it would work.  Another option that will work is to create a little script named xpdf and put it in front of your PATH
Code Sample
#!/bin/sh
cd /home/dsl/pdf/
exec /path/to/real/xpdf "$@"

Posted by lovdsl on April 12 2006,02:25
thanks will try those
Hmm..maby it is easier to create a shortcut to the directory?..so that when I click an icon the directory opens?.

Posted by mikshaw on April 12 2006,04:32
That still wouldn't change where YOU are...it would only open a new shell in that directory.  In order for this to work you have to start xpdf from the same shell in which you changed directories.  You can make an icon do this, but as with the alias I'm not sure if multiple commands can be run from a single icon click.  I'm going back into DSL shortly...i'll test that out while i'm there.
Posted by mikshaw on April 12 2006,14:59
If you are using the standard DSL icons, it is a simple task.  
1) Right-click on the xpdf icon and select "Properties".
2) Change the command line to look like this
Code Sample
Command: cd /home/dsl/pdf && xpdf

3) Click "Save".

The same can be done in the fluxbox menu.
1) Open .fluxbox/menu in your favorite editor.
2) Find the "PDF Viewer" line and make it look like this
Code Sample
[exec] (PDF Viewer) {cd /home/dsl/pdf && /usr/bin/xpdf}

3) Save

Posted by lovdsl on April 13 2006,00:49
Mikshaw...many thanks.
.had time to play today and used the first example.
.I use the drawer rather than icons on the desktop..I changed the line in drawer from (xpdf) to (cd /home/dsl/pdf && xpdf)  now when I click the icon it opens xpdf and when I click open it defaults to the directory filled with books....this is what I wanted to do...will play with the others on the test box later...thanks very much..most excellent

Posted by lovdsl on April 14 2006,15:32
Strangely..I opened a book today with the intent to read it but when I clicked the page turn button xpdf disappeared..I opened several books and each time I click the page turn twice xpdf vanished..I click once and then click the forward which takes me several pages ahead, then click back and can go several pages back but when I get back to the page I want to read..same thing....thought it may be due to my new cd thing so tested menu and icons as t had made the change in drawer..same thing..so deleted the change in drawer and restarted, also shutdown and reboot..still xpdf after second click of turnpage button disappears..any thoughts?
Posted by mikshaw on April 14 2006,17:52
I can't say i've had that problem, but I generally use pageup, pagedown, and arrow keys to navigate xpdf.

Open xpdf from a terminal and do the same thing.  See if it says something more useful than "Segmentation fault" when it crashes.

Posted by lovdsl on April 14 2006,18:07
The books in question were novels downloaded from planet pdf...I had redownloaded rather than copy from another machine..all these titles have this issue..
I deleted them and copied a few from another machine and they seem to work...but if I download the same book from planet pdf with firefox or opera it will act as mentioned..very odd..when I open emelfm and open the book the message is no different than a book that works..error version 1.5 xpdf uses 1.4 continueing anyway..
.I was useing the keyboard and thought maby that was the issue which prompted the use of the buttons..the same applied so I changed books..blablalba..
seems I cannot download from planet pdf..although the books were downloaded from there that I copied from the other machine..that was some time ago..will try a freash download on the other machine and copy and see if it is the site.
adding...I downloaded a book on another machine and copied and it still does not work...it seems that the free pdf downloads from planet pdf are not readable with xpdf..old downloads of these books do read so there must be a change in the available files from the site? are there any other sites offering free pdf downloads for use with xpdf? my quick search found nothing.
btw my cd /home/dsl//pdf && xpdf line works fine..there just isn't anything to read

adding...sorry.. to each his own..but for the curious in this regard here is one english site with downloadable pdf that worked for me in xpdf

< http://www2.hn.psu.edu/faculty/jmanis/jimspdf.htm >

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.