LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-20-2002, 06:49 PM   #1
breany
LQ Newbie
 
Registered: Jun 2002
Location: Pittsburgh
Distribution: Mandrake (8.2)
Posts: 13

Rep: Reputation: 0
Unhappy Link to application


Creating a "Link to application" (Mandrake 8.2), we enter the command in the "Execute" panel. The app I want to execute - XPDF - requires a filename as a parameter, to know which file to open. (The program doesn't seem to have an "Open file" panel that will let you search for, and select, an input file to be loaded once the app has started). Is there a parameter that I can enter after the "xpdf" command that will open such a file selection box, and pass the selected filename to the OPEN of XPDF?

Thanks in advance;


"BEER; the only reason to get up every afternoon"

Last edited by breany; 08-20-2002 at 06:52 PM.
 
Old 08-21-2002, 04:42 AM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
breany, are you saying that the program 'xpdf' doesn't have an "open" command? If so, it does. I just tried it. You have to "right click" or type "o" to get it to come up.

HTH

Cool
 
Old 08-21-2002, 05:00 AM   #3
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 270Reputation: 270Reputation: 270
Yeah, xpdf works like The Gimp, you right click to pull up the menu to open files and such.. save... etc.
So creating a link to the program itself would make more sense, instead of creating a link to a specific file to open everytime.
 
Old 08-21-2002, 07:43 AM   #4
breany
LQ Newbie
 
Registered: Jun 2002
Location: Pittsburgh
Distribution: Mandrake (8.2)
Posts: 13

Original Poster
Rep: Reputation: 0
Thanks - I hadn't seen that option. it takes care of the immediate problem - but leaves the original question unanswered.

If I want a desktop link to a program, and that program requires the user to enter a filename as a parameter (I.E., "xpdf $HOME/selected_file.pdf"), how would I allow the user that clicks on the link to select the name of the target file that would be passed to the xpdf command, when it is finally executed?

Let's see - -

The link's EXECUTE panel would have the name of a script for xpdf function. That script would call an existing routine that opens a window which lets the user find and select any file that they choose, returning the name of the full pathname of the file to the script. the script then invokes xpdf with the parameter of the name returned.

OK, that should work.

Now, we have 2 functions.

First is "Find a filename, and return it". This is graphikal, on the desktop. It passes the full pathname of the desired target file back to our script as a variable "targetname".

Second is "xpdf ${targetname}".

The second part is already coded, - and I've seen the first part in apps that I've worked with before. Since I hate inconsistancy in a platform's operating environment , I should try to find the name of a desktop script for an existing routine that does this.

Is there someplace in the Mandrake system (short of the KDE source code) where I could look up such a routine? If there isn't, does anyone know what the routine used by KDE is called?

Thanks again.
 
Old 08-21-2002, 10:02 AM   #5
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Whoa! You wanna do what to who and where? If you are speaking of possibly making a symlink to a file on your desktop and making xpdf open the file when you click the symlink, you could simply associate all .pdf files with that application. I am too newb to actually write code, so I can't give you the exact answer to your question, but this would be how I would do it.

You can set the program to open .pdf files in the KDE Control Panel. Go to File Browsing, then to File Associations. Scroll through the list until you come upon .pdf (Mine is in Application in Slack 8.1 KDE3), then put xpdf to the top of the application list. Now if you make a symlink to a .pdf file in your filesystem, onto your desktop, it will open, and open with xpdf.

Does this help at all?
 
Old 08-21-2002, 12:58 PM   #6
breany
LQ Newbie
 
Registered: Jun 2002
Location: Pittsburgh
Distribution: Mandrake (8.2)
Posts: 13

Original Poster
Rep: Reputation: 0
It's a second work-around - and actually better than my proposed solution.
Thanks!!!
 
Old 08-21-2002, 09:03 PM   #7
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Sweet, glad I could be of some help, but I am still ashamed i do not know any scripting.

But, you're welcome
 
  


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
how to link helpblocks application to gtk application m.harshavardhan Linux - Software 0 08-16-2005 08:39 AM
My Link Directory Application: Please Help Beta Test This vharishankar General 12 07-18-2005 10:46 AM
easy; link to application Niels82 Linux - General 2 05-23-2004 11:52 AM
trouble creating a link to an application evilmrhenry Linux - Software 3 02-15-2004 01:19 AM
Link to application does not work gmichel Linux - Newbie 2 01-13-2004 11:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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