Find the answer to your Linux question:
Results 1 to 5 of 5
I mount folders on the networked computers with this one line sshfs stanathostname: HomeBase - sorry, can't use the url in my first post How can I make this into ...
  1. #1
    Just Joined!
    Join Date
    Jul 2010
    Posts
    3

    Execute a script from the desktop or panel?

    I mount folders on the networked computers with this one line

    sshfs stanathostname: HomeBase - sorry, can't use the url in my first post

    How can I make this into a clickable icon and put it somewhere on the desktop or in the panel or somewhere?

    It works from a terminal, and fuse.sh script I put it in works from a terminal, too, and it's executable, but none of my attempts to create a new "basic link to a file or directory" or a new "link to application" from KDE plasma panel had produced any result. At best I get a new terminal window with fuse.sh title that never closes.

    Ok, sometimes it tells me that my "HomeBase" does not exist, which isn't true, of course, but I guess it doesn't exist in relation to the file executing the script.

    HomeBase is a directory in a home folder, the link or command file is placed in Desktop, I think.

    What I really want is a clickable icon and a script that would not only do the sshfs connection but also produce some kind of status message somewhere, like "initializing", "working" and "done, your remote folders are available in your "HomeBase" directory".

    Could all of that be done in bash? When I look at bash tutorials I see lots of trivial stuff about variables and conditionals that I think is more or less common to any programming language, and I worked with php and javascript extensively.

    Ok, I'm feeling stupid for not getting the basic script to work in the first place, but I'm really looking forward to writing an application that would do reporting the status thing.

    But lets get the basic's first - how to integrate the sshfs line into the GUI environment in OpenSuse 11.3 KDE?

  2. #2
    oz
    oz is online now
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,099
    Hello and welcome to the forums!

    It's been a while since I last used KDE4, but if I remember correctly, you should be able to add a quicklaunch widget to the panel if you right-click it, and have unlocked the widgets function. You'll need to set the path to the script and it should work if the script itself is executable and working properly to begin with. You should be able to to do the same with the desktop if you have that widget enabled.

    Maybe someone that is currently using KDE4 will post with the exact steps refined a little better for you.
    oz

    new members/users: read this first | new member faq
    no private messages requesting computer support - post them on the forums!
    please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.

  3. #3
    Just Joined!
    Join Date
    Jul 2010
    Posts
    3
    No, doesn't work.

    The panel had Add New menu and there I can choose link to an application but it somehow doesn't work.

    I have exactly the same script working on 11.2, on another notebook, with a shortcut from the panel, but it just refuses to work on 11.3 which has the new KDE 4.4.

    So far I just open the terminal, type in the file name, fuse.sh, and it executes perfectly. There's a few seconds delay while the remote folders are mounted but once it's done the terminal returns to the command prompt.

    My second question was how to make the status more visible when the script is run from a shortcut, even on the notebook where it works.

    Is there a way to get bash produce some sort of a popup on a desktop when drives are finally mounted? That is more of a scripting question, not really connected to creating a link.

  4. #4
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    I think the easiest thing for what you want would be to create a .desktop file. If you look in /usr/share/applications, most the .desktop files for installed applications are there, if you need examples.

  5. #5
    Just Joined!
    Join Date
    Jul 2010
    Posts
    3
    Hmm, it's a great idea and works fine with "hello world" test but with my sshfs one line script I only get a blank terminal window, no prompt, and it disappears after a few sec without actually mounting anything.

    If I check "do not close terminal window" it stays open seemingly forever.

    If I run the script from terminal itself it works.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...