1

I'm using fish for some days upon Ubuntu gnome but I don't know if that's possible to keep the feature "open the terminal in a specific folder". Inside Files app, I right click inside a folder a press Open in terminal.

I've overided in my terminal the custom command used when the terminal is open :

  • From top menu: Edit -> Profile Preference.
  • Then command tab, check the Run custom command instead of my shell and set fish as custom command.

custom fish command

When I open a terminal, I always end up in my home dir, even when I open my terminal from another directory

I've tried to setup a custom shell script to retrieve params /home/me/runFish.sh $@ but it's not working

2
  • To get fish to open a specified folder on startup, use the -C flag with the cd command, e.g. for the home folder fish -C 'cd $HOME'. I’m not a Linux user, so I have no idea what magic variable will pass the selected folder to the command (that “open here” thing works out of the box with fish on the Mac), but you might be able to figure it out from there.
    – kopischke
    Commented Oct 10, 2021 at 14:35
  • Yes I don't know how to access to the folder passed as a param, as this is not documented on gnome-terminal
    – Ser
    Commented Oct 11, 2021 at 14:51

1 Answer 1

1

I might be a bit late to the party yet what worked for me was (I was doing it with guake) to set the custom command as:

bash -c "guake -n $PWD -r $(basename $PWD) --show"

where running it from bash is what did the trick, that way I was able to pass the $PWD to the (probably guake specific) -n option to tell it where to open

So that it looks as follows: enter image description here

Note: I also had the Preserve working directory set as Always yet I am not seeing that option on your image

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .