Apps :: xpdf's default directory



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..
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 "$@"

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?.

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.
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

Next Page...
original here.