#284 Open program in current folder

closed-fixed
5
2014-08-15
2012-12-24
No

It would be really good if in the tools menu there was an 'open program in current folder' option. it could be a button that when you click on it you can type in, say 'gimp', and it will open gimp in the current folder.

Even better (but I'm sure more work), it could be a submenu which the user can put commonly used programs in. Then we only have to configure it once. After configuration we navigate to the folder we want, go to Tools -> Open program in current folder -> GIMP, and it will load gimp for us. Rather than having to 'open current folder in terminal' then typing 'gimp &', then closing the terminal.

Discussion

  • Lonely Stranger

    Lonely Stranger - 2013-12-28

    What is the reason to open GIMP from some folder? As far as I know it has no use for current path but it requires files to open instead. You probably just use graphical file manager in wrong way, I'm sorry.

     
  • Lonely Stranger

    Lonely Stranger - 2014-01-04
    • status: open --> pending
     
  • Jon Phillips

    Jon Phillips - 2014-01-04

    Well. I posted this because of annoyances on my work computer. I don't work there any more, and there seem to be no advantages for opening gimp in a particular directory at home.

    Nonetheless, there are programs which pay attention to the directory they are opened in (although the only examples I can think of at the moment are scripts and niche programs). For example, in some programs when you go to "file... open" it takes you to the current path (rather then $HOME or some other default). And it's annoying having to open these programs from the terminal, or creating specialised shortcuts in which you specify a working directory. It would be brilliant if you could do it directly from a file manager.

     
  • Jon Phillips

    Jon Phillips - 2014-01-04
    • status: pending --> open
     
  • Lonely Stranger

    Lonely Stranger - 2014-01-04

    Well, scripts that you run clicking on them should be always run in the current directory. If they don't then it's a bug and that bug was fixed long time ago.

    Scripts that are run as desktop applications for selected files should receive full paths to the selected files in arguments so they can be attuned if they need chdir (man dirname).

    Programs that should be ran from some specific directory should have that directory specified in their desktop application file.

    As I said, I see no real reason to open a terminal to start anything except for case you need a shell, if some program requires change to current directory then it is a bug in program and should be fixed in program itself or if that isn't possible then started via script-helper which does that. And since it is not possible (and is a dirty hack) to override application-specific settings on launch an application, only legal way to do exactly what you requested is to open a terminal and run the command in it - the same as you did it, it will just duplicate behavior of 'Open current folder in terminal'.

     
  • Jon Phillips

    Jon Phillips - 2014-01-04

    "Programs that should be ran from some specific directory should have that directory specified in their desktop application file."

    Yes, but programs that can be run from multiple directories do exist. They don't require a change to a certain directory, but if you do change directory before running it, useful things happen. This can be a very handy feature - e.g. 'File - open' starting in the working directory is useful when you have a large number of projects, each with their own directory. Creating a desktop application file (I assume this is a .desktop file) for every program in every project is impractical. Running the programs from a terminal is a solution, but not ideal - if there was a better way of doing it, it would be great.

    "And since it is not possible (and is a dirty hack) to override application-specific settings on launch an application, only legal way to do exactly what you requested is to open a terminal and run the command in it - the same as you did it, it will just duplicate behavior of 'Open current folder in terminal'."

    Oh. Right then. That's irritating, but fair enough.

     
  • Lonely Stranger

    Lonely Stranger - 2014-01-04

    Well, there should have been some misunderstanding here. As usual, when there aren't enough details.

    I wrote about starting some application against selected files but application have to go into current folder first.

    After re-reading your request I started to think you meant not application for selected file but run arbitrary command line without any particular mention of selected file instead. Am I right?

     
  • Jon Phillips

    Jon Phillips - 2014-01-05

    I think you're right.

    So if you're in gnome2, and you press Alt+F2 you get a box up from which you can run programs (I'm not sure if this works in gnome3 or not - I stopped using gnome a while ago). You type a one line command, press return, the box closes and the program runs. I think it would be brilliant if either

    a) a box like that could appear when you click on a menu item, the box has the same behaviour as the box in gnome (as far as the user is concerned), except that it runs the program in the current directly.

    Or

    b) there is a menu which the user has some way of adding shortcut icons to. When you click on a shortcut icon, it runs the associated command, but in the current directory.

    The only files involved are the application files themselves - you know, the ones stored in /usr/bin.

    Sorry for any confusion I caused.

     
  • Lonely Stranger

    Lonely Stranger - 2014-01-05
    • assigned_to: nobody --> lstranger
    • status: open --> closed-fixed
     
  • Lonely Stranger

    Lonely Stranger - 2014-01-05

    The feature is implemented in current GIT sources of PCManFM.
    No, it does not have any history of entered commands.
    Thank you very much.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks