Skip to content

Instantly share code, notes, and snippets.

@Markus-de-Koster
Created June 26, 2024 07:46
Show Gist options
  • Select an option

  • Save Markus-de-Koster/1d315a9f23b45d967ea552a3c1ee76a5 to your computer and use it in GitHub Desktop.

Select an option

Save Markus-de-Koster/1d315a9f23b45d967ea552a3c1ee76a5 to your computer and use it in GitHub Desktop.
Open Byobu in the current directory ("Open in Terminal") on Linux Ubuntu using Nautilus File Manager

Open Byobu here

Using byobu and trying to open a bash in a specific folder using "Open in Terminal" (Nautilus) will not result in the desired behaviour. Instead, byobu is opened in the current session, not at the desired location.

Steps

  1. Create the file open_byobu_here.sh (see below)
  2. chmod +x open_byobu_here.sh
  3. For Nautilus, create a script folder mkdir -p ~/.local/share/nautilus/scripts/
  4. Link the script ln -s ~/open_byobu_here.sh ~/.local/share/nautilus/scripts/Open\ in\ Byobu\ Here

Limitations

It seems like nautilus only allows scripts if a file or folder is right-clicked, not if you right click within an opened folder. Right clicking any file will open the folder that it is contained in.

#!/bin/bash
# Open byobu with a new window in the specified directory
cd "$1" # Navigate to the directory
byobu new-window # Open a new window in Byobu
@Markus-de-Koster
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment