Open in terminal option opening incorect directory

Issue: Open in terminal option opening incorect directory
Application: Nemo
Terminal Used: gnome-terminal

Steps to reproduce:

  1. Open Nemo
  2. Right click chosen directory
  3. Choose "open in terminal"
  4. Terminal opens to home folder instead of chosen directory

Sources:
https://www.google.com/search?q=linux+nemo+open+in+terminal+wrong+directory&sclient=gws-wiz-serp

System:
  Kernel: 6.0.11-arch1-1 arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux
    root=UUID=ee197dc0-f3e2-42c3-8a13-f72183d2c1a6 rw [email protected]
    quiet
    cryptdevice=UUID=14385f9d-8949-45d9-82e6-c24a744dccdd:luks-14385f9d-8949-45d9-82e6-c24a744dccdd
    root=/dev/mapper/luks-14385f9d-8949-45d9-82e6-c24a744dccdd quiet splash
    rd.udev.log_priority=3 vt.global_cursor_default=0
    resume=/dev/mapper/luks-53e21b32-061f-4a63-96b1-bc267509f995 loglevel=3
    ibt=off
  Desktop: Cinnamon v: 5.6.4 tk: GTK v: 3.24.35 wm: muffin vt: 7 dm: 1: GDM
    v: 43.0 note: stopped 2: LightDM v: 1.32.0 Distro: Garuda Linux
    base: Arch Linux
Machine:
  Type: Laptop System: Micro-Star product: GP63 Leopard 8RD v: REV:1.0
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: Micro-Star model: MS-16P6 v: REV:1.0 serial: <superuser required>
    UEFI: American Megatrends v: E16P6IMS.109 date: 05/22/2019
Battery:
  ID-1: BAT1 charge: 39.3 Wh (94.9%) condition: 41.4/53.4 Wh (77.5%)
    volts: 11.9 min: 10.9 model: MSI Corp. MS-16P6 type: Li-ion serial: N/A
    status: not charging
  Device-1: gip0.0 model: Microsoft X-Box One pad serial: N/A
    charge: 50% (should be ignored) rechargeable: yes status: not charging
  Device-2: hidpp_battery_0 model: Logitech Wireless Touch Keyboard K400
    serial: <filter> charge: 55% (should be ignored) rechargeable: yes
    status: discharging
CPU:
  Info: model: Intel Core i7-8750H bits: 64 type: MT MCP arch: Coffee Lake
    gen: core 8 level: v3 note: check built: 2018 process: Intel 14nm family: 6
    model-id: 0x9E (158) stepping: 0xA (10) microcode: 0xF0
  Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
    L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB L2: 1.5 MiB desc: 6x256 KiB
    L3: 9 MiB desc: 1x9 MiB
  Speed (MHz): avg: 2200 min/max: 800/4100 scaling: driver: intel_pstate
    governor: powersave cores: 1: 2200 2: 2200 3: 2200 4: 2200 5: 2200 6: 2200
    7: 2200 8: 2200 9: 2200 10: 2200 11: 2200 12: 2200 bogomips: 52815
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT
    vulnerable
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable
  Type: meltdown mitigation: PTI
  Type: mmio_stale_data mitigation: Clear CPU buffers; SMT vulnerable
  Type: retbleed mitigation: IBRS
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: IBRS, IBPB: conditional, RSB filling,
    PBRSB-eIBRS: Not affected
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel CoffeeLake-H GT2 [UHD Graphics 630] vendor: Micro-Star MSI
    driver: i915 v: kernel arch: Gen-9.5 process: Intel 14nm built: 2016-20
    ports: active: HDMI-A-2 off: eDP-1 empty: DP-1,HDMI-A-1 bus-ID: 00:02.0
    chip-ID: 8086:3e9b class-ID: 0300
  Device-2: NVIDIA GP107M [GeForce GTX 1050 Ti Mobile]
    vendor: Micro-Star MSI driver: nvidia v: 525.60.11
    alternate: nouveau,nvidia_drm non-free: 520.xx+
    status: current (as of 2022-10) arch: Pascal code: GP10x
    process: TSMC 16nm built: 2016-21 pcie: gen: 1 speed: 2.5 GT/s lanes: 16
    link-max: gen: 3 speed: 8 GT/s bus-ID: 01:00.0 chip-ID: 10de:1c8c
    class-ID: 0302
  Device-3: Acer HD Webcam type: USB driver: uvcvideo bus-ID: 1-13:7
    chip-ID: 5986:211b class-ID: 0e02
  Display: x11 server: X.Org v: 21.1.4 with: Xwayland v: 22.1.5 driver: X:
    loaded: modesetting,nvidia dri: iris gpu: i915 display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1360x768 s-dpi: 96 s-size: 360x203mm (14.17x7.99")
    s-diag: 413mm (16.27")
  Monitor-1: HDMI-A-2 mapped: HDMI-2 pos: primary model: NS-39D220NA16
    serial: <filter> built: 2015 res: 1360x768 hz: 60 dpi: 49 gamma: 1.2
    size: 698x392mm (27.48x15.43") diag: 976mm (38.4") ratio: 16:9 modes:
    max: 1360x768 min: 720x400
  Monitor-2: eDP-1 note: disabled model: LG Display 0x0590 built: 2017
    res: 1360x768 dpi: 142 gamma: 1.2 size: 344x194mm (13.54x7.64")
    diag: 395mm (15.5") ratio: 16:9 modes: 1920x1080
  API: OpenGL v: 4.6 Mesa 22.2.3 renderer: Mesa Intel UHD Graphics 630 (CFL
    GT2) direct render: Yes
Audio:
  Device-1: Intel Cannon Lake PCH cAVS vendor: Micro-Star MSI
    driver: snd_hda_intel v: kernel alternate: snd_soc_skl,snd_sof_pci_intel_cnl
    bus-ID: 00:1f.3 chip-ID: 8086:a348 class-ID: 0403
  Sound API: ALSA v: k6.0.11-arch1-1 running: yes
  Sound Interface: sndio v: N/A running: no
  Sound Server-1: PulseAudio v: 16.1 running: no
  Sound Server-2: PipeWire v: 0.3.61 running: yes
Network:
  Device-1: Intel Cannon Lake PCH CNVi WiFi driver: iwlwifi v: kernel
    bus-ID: 00:14.3 chip-ID: 8086:a370 class-ID: 0280
  IF: wlan0 state: down mac: <filter>
  Device-2: Qualcomm Atheros Killer E2400 Gigabit Ethernet
    vendor: Micro-Star MSI driver: alx v: kernel pcie: gen: 1 speed: 2.5 GT/s
    lanes: 1 port: 3000 bus-ID: 03:00.0 chip-ID: 1969:e0a1 class-ID: 0200
  IF: enp3s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IF-ID-1: virbr0 state: down mac: <filter>
Bluetooth:
  Device-1: Intel Bluetooth 9460/9560 Jefferson Peak (JfP) type: USB
    driver: btusb v: 0.8 bus-ID: 1-14:8 chip-ID: 8087:0aaa class-ID: e001
  Report: bt-adapter ID: hci0 rfk-id: 0 state: down
    bt-service: enabled,running rfk-block: hardware: no software: yes
    address: <filter>
Drives:
  Local Storage: total: 1.84 TiB used: 849.76 GiB (45.1%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: SSD 970 EVO 1TB
    size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
    lanes: 4 type: SSD serial: <filter> rev: 2B2QEXE7 temp: 40.9 C scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 model: SATA SSD size: 953.87 GiB block-size:
    physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter>
    rev: 61.3 temp: 33 C scheme: MBR
Partition:
  ID-1: / raw-size: 914.2 GiB size: 914.2 GiB (100.00%)
    used: 419.38 GiB (45.9%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0
    mapped: luks-14385f9d-8949-45d9-82e6-c24a744dccdd
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 752 KiB (0.2%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
  ID-3: /home raw-size: 914.2 GiB size: 914.2 GiB (100.00%)
    used: 419.38 GiB (45.9%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0
    mapped: luks-14385f9d-8949-45d9-82e6-c24a744dccdd
  ID-4: /var/log raw-size: 914.2 GiB size: 914.2 GiB (100.00%)
    used: 419.38 GiB (45.9%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0
    mapped: luks-14385f9d-8949-45d9-82e6-c24a744dccdd
  ID-5: /var/tmp raw-size: 914.2 GiB size: 914.2 GiB (100.00%)
    used: 419.38 GiB (45.9%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0
    mapped: luks-14385f9d-8949-45d9-82e6-c24a744dccdd
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 17.01 GiB used: 0 KiB (0.0%)
    priority: -2 dev: /dev/dm-1 maj-min: 254:1
    mapped: luks-53e21b32-061f-4a63-96b1-bc267509f995
  ID-2: swap-2 type: zram size: 15.47 GiB used: 698.5 MiB (4.4%)
    priority: 100 dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 48.0 C pch: 65.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Info:
  Processes: 383 Uptime: 18h 46m wakeups: 3312 Memory: 15.47 GiB
  used: 4.2 GiB (27.1%) Init: systemd v: 252 default: graphical
  tool: systemctl Compilers: gcc: 12.2.0 alt: 11 clang: 14.0.6 Packages: 2365
  pm: pacman pkgs: 2359 libs: 572 tools: cylon,octopi,pamac,paru,trizen,yay
  pm: flatpak pkgs: 6 Shell: Bash v: 5.1.16 running-in: gnome-terminal
  inxi: 3.3.23
Garuda (2.6.10-1):
  System install date:     2022-12-03
  Last full system update: 2022-12-05 ↻
  Is partially upgraded:   No
  Relevant software:       NetworkManager
  Windows dual boot:       No/Undetected
  Snapshots:               Snapper
  Failed units:

Please, open issue on

Thank you for this resource. After digging through it I found the answer.

Solution for me:

  1. Open gnome-terminal
  2. Select "edit" > "preferences"
  3. Select "command" tab
  4. Uncheck "Run a custom command instead of my shell"

Open in terminal option within Nemo is now opening with correct directory.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.