Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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.
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?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.