| Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context. |
| 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
06-10-2008, 02:23 PM
|
#1
|
|
Member
Registered: Sep 2005
Distribution: Arch
Posts: 94
Rep:
|
Create Desktop Links to Web URLs in DFM
Yes, that's right... DFM...
None of the newer guys/girls will probably even know what DFM is since it hasn't been updated since 2001, but I figured I'd throw this question out there and hope for the best.
I work for a software company that develops Retail POS software (among other Retail apps) and our legacy POS system runs on systems as old as RH 6 and as new as RHEL 4. Despite the version of Red Hat, we have stuck with an IceWM/DFM desktop over the years (don't ask me why).
My issue is that I have a request to create shortcuts on the desktops of some systems that will point to web URLs. I know you can do this on all the modern desktops like Gnome and KDE, but I couldn't find a way to do this with DFM. It's quite possibly a feature that doesn't exist, but I figured I'd check.
If anyone knows a way to create these in DFM or possibly even how to create a web link with "ln" (or some other command line tool) it would be greatly appreciated. This is for a massive number of production systems, so changing the Desktop or File Manager is not an option.
Thanks!
Swill
|
|
|
|
06-10-2008, 04:19 PM
|
#2
|
|
Gentoo support team
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 3,965
|
Quote:
Originally Posted by Mr. Swillis
Yes, that's right... DFM...
None of the newer guys/girls will probably even know what DFM is since it hasn't been updated since 2001, but I figured I'd throw this question out there and hope for the best.
|
I perfectly remember about it
Quote:
|
My issue is that I have a request to create shortcuts on the desktops of some systems that will point to web URLs. I know you can do this on all the modern desktops like Gnome and KDE, but I couldn't find a way to do this with DFM. It's quite possibly a feature that doesn't exist, but I figured I'd check.
|
It's hard to remember the limits and capabilities of dfm after so many years. But, in the worst case, you should always be able to use bash scripts or something like that. A simple script would be this:
Code:
#!/bin/bash
$BROWSER http://www.google.com
Save it, chmod u+x it and then put it into your desktop just like any other executable file. If this is not enough for you, then you must elaborate a bit more on what do you want to do. You would need at least, some kind of file to hold the url like the lnk ur url files that some other desktops use, and you would also need to use a mime type association to associate a given program (the browser) to this kind of file. I can't remember what mime capabilities did dfm have. But even the simplest association mechanism should suffice, maybe needing a bit of bash scripting. I will try to remind a bit about my dfm times and will let you know if I find a simple way to do this.
There's probably not a justification to change the file manager just for this.
|
|
|
|
06-10-2008, 06:14 PM
|
#3
|
|
Member
Registered: Sep 2005
Distribution: Arch
Posts: 94
Original Poster
Rep:
|
Hmm, that bash method might just do the trick. I'm not yet sure how pretty it needs to really be, but we'll be hitting a mix of Galleon, Netscape, and Firefox browsers due to the varying default browsers in Red Hat over the years. I'll see how the script approach works and post back.
Thanks!
Swill
|
|
|
|
06-10-2008, 07:03 PM
|
#4
|
|
Member
Registered: Sep 2005
Distribution: Arch
Posts: 94
Original Poster
Rep:
|
Well, that worked just fine with Firefox. I still need to test with galleon and netscape, but my guess is that it will work just fine. Now I feel kinda dumb for not thinking to pass the URL as a command line argument
Thanks again!
Swill
|
|
|
|
06-10-2008, 11:43 PM
|
#5
|
|
Gentoo support team
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 3,965
|
Quote:
Originally Posted by Mr. Swillis
Well, that worked just fine with Firefox. I still need to test with galleon and netscape, but my guess is that it will work just fine. Now I feel kinda dumb for not thinking to pass the URL as a command line argument
Thanks again!
Swill
|
Glad that it worked for you.
The $BROWSER variable is usually set by your distro, if not, the users can always do it themselves in .bashrc or .bash_profile
You can as well just hardcode the browser, that that's less flexible.
The best solution would be to add some checks into the script to:
Code:
if the $BROWSER string is not empty
if $BROWSER is executable
run it
else
if firefox is executable run it
else
if konqueror executable run it
else
xmessage "no working browser was found"
This is easy to code in bash, a -x test checks if a file is executable. If successful, that directly implies it's somewhere on the user $PATH and it's readable and executable by that user.
To check for non empty variables use -n, to check for zero length use -z. The rest is just if...else...fi. This way, you ensure that the script is going to behave under extreme circumstances.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 10:38 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|