← Back to team overview

debcrafters-packages team mailing list archive

[Bug 2083705] Re: New tabs don't open in current working directory

 

As a system administrator and end user, the lack of a clean way to opt-
in/opt-out of system-level bashrc snippets has been a decades-long
frustration, and I'm disappointed that this problem has once again been
addressed with a one-off (use-case-specific) solution that doesn't
address the real issue.

I understand there is a desire to keep system-provided profile (login)
and bashrc (non-login) scripts separate, and to make them primarily opt-
in rather than opt-out.  Based on that, I do understand why
/etc/bash.bashrc should not source /etc/profile.d/*

However, as-is, if I want to opt-in or opt-out to any system-level
bashrc behavior, I have to edit /etc/bash.bashrc directly, and then
manually merge my changes into new /etc/bash.bashrc files any time that
file is updated by the package.

It would be much cleaner if there were a /etc/bash.bashrc.d/ path that I
(as a system admin) could drop script snippets into without touching the
default /etc/bash.bashrc.  This would also allow package maintainers to
move default snippets into /etc/bash.bashrc.d/ files, which would make
opt-out cleaner as well (eg. potentially avoiding the need to edit
/etc/bash.bashrc if I did NOT want to source /etc/profile.d/vte*.sh on
my system).

That solution (using /etc/bash.bashrc.d/) was suggested many years ago at the beginning of https://bugs-devel.debian.org/cgi-bin/bugreport.cgi?bug=675008
The discussion eventually turned to the sourcing of /etc/profile.d/* in /etc/bash.bashrc (to avoid duplication between /etc/profile.d/ and /etc/bash.bashrc.d/).  However, after the /etc/profile.d/ idea was rejected, the discussion never returned to the idea of using /etc/bash.bashrc.d/.

Is there a reason not to have the package-provided/system-provided
/etc/bash.bashrc source /etc/bash.bashrc.d/* ?

** Bug watch added: bugs-devel.debian.org/ #675008
   https://bugs-devel.debian.org/cgi-bin/bugreport.cgi?bug=675008

-- 
You received this bug notification because you are a member of
Debcrafters packages, which is subscribed to bash in Ubuntu.
https://bugs.launchpad.net/bugs/2083705

Title:
  New tabs don't open in current working directory

Status in bash package in Ubuntu:
  Fix Released
Status in bash package in Debian:
  New
Status in ptyxis package in Debian:
  Fix Released

Bug description:
  In GNOME Terminal, opening a new tab opens the new tab using the same
  working directory as the current tab.

  This only works because we added a distro patch to GNOME Terminal in
  2013. VTE prefers to use /etc/bashrc.d/ but Debian and Ubuntu's bash
  don't support that feature currently.

  Workaround
  ==========
  You can add this line to your ~/.bashrc

  source /etc/profile.d/vte-2.91.sh

  This will enable this feature to work in all VTE apps: Ptyxis, GNOME
  Console, etc.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/2083705/+subscriptions