Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
0
votes
2
answers
2600
views
Prevent ``/etc/profile.d`` from being sourced on login
I just noticed my environment is behaving erratically because at some point this alias got introduced in ``/etc/profile.d/vim.sh``: $ command -v vim alias vim='__vi_internal_vim_alias' Looking through the files in ``/etc/profile.d``, they’re of no use to me as everything I need is already taken care...
I just noticed my environment is behaving erratically because at
some point this alias got introduced in
`
/etc/profile.d/vim.sh
`:
$ command -v vim
alias vim='__vi_internal_vim_alias'
Looking through the files in `/etc/profile.d
`, they’re of no
use to me as everything I need is already taken care of in my
`.bashrc
`. As a consequence, Bash starts out in an
unnecessarily polluted state after login. I’d like Bash to
completely ignore the directory and just execute `.bashrc
`.
However, as the manpage states it will blindly source everything
in that path before it continues with user controlled rc files.
This is a corporate environment so I have no control over the OS
just my user account.
There’s an option `--noprofile
` but I can’t seem to get it
added to passwd:
$ chsh
Changing shell for philipp.
New shell [/bin/bash]
> /bin/bash --noprofile
chsh: "/bin/bash --noprofile" does not exist
Through SSH I could add `bash --noprofile
` manually but that
becomes tedious as I have dozens if not hundreds of SSH
connections over the course of a regular workday.
It would be ok if I could just make Bash forget those settings at
the top of `.bashrc
` and then continue with a clean environment.
What I would prefer to avoid is having to play whack-a-mole with
whatever definitions `/etc/profile.d
` might possibly add on all
the systems I’m using.
phg
(1915 rep)
Dec 29, 2020, 09:06 AM
• Last activity: Jul 31, 2025, 12:06 AM
1
votes
0
answers
45
views
Debian 12 profile locale file location?
I finally got profile locale settings to my liking. Now it shows ISO standard everywhere. But where is the conf file so I can copy it to another machine? ` administrator@debian12kde:~$ locale -a C C.utf8 en_IE en_IE@euro en_IE.iso88591 en_IE.iso885915@euro en_IE.utf8 en_IN en_IN.utf8 en_US.utf8 To a...
I finally got profile locale settings to my liking.
Now it shows ISO standard everywhere. But where is the conf file so I can copy it to another machine? `
administrator@debian12kde:~$ locale -a
C
C.utf8
en_IE
en_IE@euro
en_IE.iso88591
en_IE.iso885915@euro
en_IE.utf8
en_IN
en_IN.utf8
en_US.utf8
To achieve the state I want to conserve, I adjusted the settings in Debian12 KDE "System Settings - Region & Language" manually.
SamTzu
(81 rep)
Jul 5, 2025, 12:11 PM
• Last activity: Jul 8, 2025, 08:11 AM
9
votes
3
answers
3253
views
Open Firefox twice (with same profile)
There are tons of resources that tell how to run several instances of Firefox in parrallel. I can't find *any* that tells me how to configure a command (on a command line, start menu item, or panel button) so that: - the first click opens Firefox with a predetermined profile * New Window" in Firefox...
There are tons of resources that tell how to run several instances of Firefox in parrallel. I can't find *any* that tells me how to configure a command (on a command line, start menu item, or panel button) so that:
- the first click opens Firefox with a predetermined profile *New Window" in Firefox, except triggered from a command line. To be explicit, I do not want to involve other profiles.
My motivation is that I have lots of desktops and lots of browser windows, and often finding that one window for the profile I want is a lot harder than to just click a button that is always going to be in the same place - on the panel.
For the first bullet, I currently use the command "firefox --no-remote -P "thisprofile" %u" and it has always worked as intended. However, for the second bullet, I invariably get the error *"Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system"*.
**Clarification:** I have two panel buttons that start separate Firefox profiles. These use "firefox --no-remote -P "ThisOrThatProfile" %u". If I omit any other parameters and just supply "--new-window", it correctly starts new windows *of the default profile* (whether that profile is already running or not). The thing is, I cannot figure out how to start new windows *for specific (non-default) profiles*.
KlaymenDK
(699 rep)
Mar 21, 2015, 12:12 AM
• Last activity: Jun 29, 2025, 10:05 AM
0
votes
2
answers
694
views
Why RStudio is not picking up environment variables defined in $HOME/.bashrc
I use Arch Linux. I use SSDM as display manager, but I have disabled it with: ``` sudo systemctl disable sddm ``` I have put code in `/etc/profile`, `$HOME/.bash_profile` and `$HOME/.bashrc` to echo when those files are sourced. My `$HOME/.bash_profile` is sourcing `$HOME/.bashrc` (it came like that...
I use Arch Linux.
I use SSDM as display manager, but I have disabled it with:
sudo systemctl disable sddm
I have put code in /etc/profile
, $HOME/.bash_profile
and $HOME/.bashrc
to echo when those files are sourced.
My $HOME/.bash_profile
is sourcing $HOME/.bashrc
(it came like that, I just added the code to echo when this happens):
if [[ -f ~/.bashrc ]]; then
echo "$HOME/.bash_profile is sourcing $HOME/.bashrc"
. ~/.bashrc
fi
I am exporting the following variable in my $HOME/.bashrc
:
export R_LIBS_USER='MY_VALUE'
----
I boot my PC.
It shows a prompt (in a TUI/command line) that asks for username and then password.
I put them in and press enter.
/etc/profile
is source.
$HOME/.bash_profile
is source.
The latter sources $HOME/.bashrc
.
This means that R_LIBS_USER
is being exported.
I'm redirected to a prompt.
I do:
sudo systemctl start ssdm
Since SSDM is a child of that shell, it should inherit R_LIBS_USER
.
SSDM opens and I start a Wayland KDE session.
Since this session is a child of SSDM, it should inherit R_LIBS_USER
.
I open RStudio from KDE.
But R_LIBS_USER
is still at the default value, not the one I have defined in $HOME/.bashrc
.
I show the value of the variable in R with:
Sys.getenv("R_LIBS_USER")
Where is my reasoning failing?
robertspierre
(379 rep)
Jun 16, 2023, 04:22 PM
• Last activity: May 5, 2025, 08:30 AM
5
votes
1
answers
2192
views
Terminal shows "__vte_prompt_command" error, unless "/etc/profile.d/vte.sh" is explicitly sourced
Every time I open a command terminal or press enter, this error message shows up: ```none bash: __vte_prompt_command: command not found ``` It does no harm, but it's very annoying. `~/.bash_profile` is here: # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # U...
Every time I open a command terminal or press enter, this error message shows up:
bash: __vte_prompt_command: command not found
It does no harm, but it's very annoying.
~/.bash_profile
is here:
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
This is the area that causes the error in /etc/bashrc
:
if [ -e /etc/sysconfig/bash-prompt-xterm ]; then
PROMPT_COMMAND=/etc/sysconfig/bash-prompt-xterm
elif [ "${VTE_VERSION:-0}" -ge 3405 ]; then
PROMPT_COMMAND="__vte_prompt_command"
else
PROMPT_COMMAND='printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"'
fi
If I add this line to ~/.bashrc,
the problem is fixed:
source /etc/profile.d/vte.sh
Apparantly, _vte_prompt_comand
is only defined in vte.sh
.
__vte_prompt_command() {
local command=$(HISTTIMEFORMAT= history 1 | sed 's/^ *[0-9]\+ *//')
command="${command//;/ }"
local pwd='~'
[ "$PWD" != "$HOME" ] && pwd=${PWD/#$HOME\//\~\/}
printf "\033]777;notify;Command completed;%s\007\033]0;%s@%s:%s\007%s" "${command}" "${USER}" "${HOSTNAME%%.*}" "${pwd}" "$(__vte_osc7)"
}
What does this command do? Aren't these /etc/profile.d/*.sh
files loaded at startup? Can someone explain why it is behaving this way?
shadow_wxh
(191 rep)
May 14, 2020, 11:48 PM
• Last activity: Apr 24, 2025, 12:12 PM
0
votes
2
answers
2312
views
How do I get my old firefox profile to run in snap environments of re-installations/other users on my machine?
My ambition is to reinstall my system and then, in the fresh installation, restore the home-folder of my current main-user from its backup created with borg. But before I boot the live USB stick, format the drive to commence this, I thought that I first wanted to make sure that I will be able to pro...
My ambition is to reinstall my system and then, in the fresh installation, restore the home-folder of my current main-user from its backup created with borg.
But before I boot the live USB stick, format the drive to commence this, I thought that I first wanted to make sure that I will be able to properly access my firefox profile as well as my mail profiles in thunderbird.
In preparation I created a new user, let's call it
user2
in possession of its' own /home/
-folder and set up the file permissions between main-user
and user2
such that I can create backups through the user2
-account into that user's home
-folder of files and folders owned by my actual main-user
-account. (because they both are in group borg
and chown -R 750 ...
and chown -R 770 ...
respectively)
But NOW to solutions for my actual problem.
My approach was to simply try to copy the firefox profile folder in /home/main-user/firefox/current/
to /home/user1/firefox/current/
with rsync
and adjust the profile.ini
file accordingly.
This doesn't work with the sandboxing of the /snap
-directory very well obviously !
Either snapd seems to prevent these sort of things as the folder is only a SquashFS
mountpoint for stuff that is actually maintained in /var/lib/snapd/snaps/
Through issuing readlink /home/main-user/snap/firefox/current
I found out that the firefox version in current
points to the 3779
-Version and thus probably either to /home/main-user/snap/firefox/3779
or to /var/lib/snapd/snaps/firefox_3779.snap
(as mount source or something?)
Could you please tell me how I properly get my current firefox profile to work in another snap sandbox / mounted package either after re-installation or simply because I want in another user's /home/userX/snap/
directory ?
Big Thanks
von spotz
(515 rep)
Feb 12, 2024, 03:37 PM
• Last activity: Apr 19, 2025, 06:01 AM
1
votes
2
answers
814
views
Gentoo invalid profile
So. Been going at the gentoo install without proper instructions until very recently. After `emerge-webrsync` stage of the install a message pops up saying "your current profile is invalid". It appears to be a blocker on emerging to kick off the rest of the install. This doesn't seem to be an issue...
So. Been going at the gentoo install without proper instructions until very recently. After
emerge-webrsync
stage of the install a message pops up saying "your current profile is invalid". It appears to be a blocker on emerging to kick off the rest of the install.
This doesn't seem to be an issue with the laptop (NIC is working and changing ssd does nothing for this issue) and I've validated the SHA-512 against the DIGEST.asc
associated with the downloaded tarball. It seems unlikely the livecd I'm using to install would have been rewritten over this network connection. eselect
is functioning, and experimentation with the 35 defaults yields no results. Have created a custom profile but am having issues having it appear on eselect
. Confused somewhat on the documentation for this, continuing to experiment. Suggestions welcome.
Have already run eselect profile list
and eselect profile set
for the default profiles.
The issue persists after an emerge --sync
.
In fact the issue first occurred after an emerge --sync
.
Have readlink
'd the make.profile
in portage and tried a few different symlinks.
Resources:
* https://wiki.gentoo.org/wiki/Profile_(Portage)
* https://wiki.gentoo.org/wiki/Project:Eselect/User_guide
* https://wiki.gentoo.org/wiki/User:Sakaki/Sakaki%27s_EFI_Install_Guide/Installing_the_Gentoo_Stage_3_Files
Linuxn00b
(11 rep)
Jul 8, 2021, 08:33 AM
• Last activity: Nov 27, 2024, 07:13 PM
-1
votes
2
answers
217
views
Where is the prompt configured in ash's login shell?
I can login on an alpine based docker container by either a non-login or non-login shell, i.e. `ash` vs `ash -l`. ``` $ docker run -it --rm alpine /bin/ash / # ``` Now when I use the login shell, I see a weird string in the left on the prompt: ``` $ docker run -it --rm alpine /bin/ash -l 46d4c6007f7...
I can login on an alpine based docker container by either a non-login or non-login shell, i.e.
ash
vs ash -l
.
$ docker run -it --rm alpine /bin/ash
/ #
Now when I use the login shell, I see a weird string in the left on the prompt:
$ docker run -it --rm alpine /bin/ash -l
46d4c6007f75:/#
I wonder where that is coming from, I assumed it was the username but whoami
says it is root
.
I want to modify the appearance of the login shell for my alpine based container for the login shell, yet I have no clue where its defined.
k0pernikus
(16501 rep)
Sep 11, 2024, 02:14 AM
• Last activity: Sep 11, 2024, 02:24 AM
47
votes
6
answers
224076
views
How to write a shell script that gets executed on login?
I am trying to write bash shell script in Ubuntu 11.10 Linux distro, that will get executed automatically on logging into the system. But I am not able to figure out that what to write in script that by it will get automatically executed on logging in.
I am trying to write bash shell script in Ubuntu 11.10 Linux distro, that will get executed automatically on logging into the system. But I am not able to figure out that what to write in script that by it will get automatically executed on logging in.
dubex
(711 rep)
Nov 19, 2012, 09:01 AM
• Last activity: Aug 29, 2024, 01:10 PM
0
votes
1
answers
93
views
How to ignore Error found when loading /home/(username)/.profile
[![enter image description here][1]][1]I have some command in `.profile` that can fail or succeed, I don't care about the error, if it failed just ignore it. However, even if I put it in an if block and redirect its output to `/dev/null`, there's still an error shown up. I also tried wrap around tha...

.profile
that can fail or succeed, I don't care about the error, if it failed just ignore it. However, even if I put it in an if block and redirect its output to /dev/null
, there's still an error shown up. I also tried wrap around that command with set +e
and set -e
but doesn't work.
I don't want to remove the command.
if command > /dev/null 2>/dev/null; then
:
else
:
fi
Sy Tran
(101 rep)
Aug 5, 2024, 03:32 PM
• Last activity: Aug 10, 2024, 03:40 AM
2
votes
3
answers
10472
views
Ubuntu terminal not showing path
I have added one line in bashrc and after that terminal is not working as expected, no path is showing and I am unable to run any command: Below line i have added in bashrc: ``` . ~/.profile ``` [![enter image description here][1]][1] [1]: https://i.sstatic.net/AwKLK.png
I have added one line in bashrc and after that terminal is not working as expected, no path is showing and I am unable to run any command:
Below line i have added in bashrc:
. ~/.profile

Kumar Harsh
(131 rep)
Jul 2, 2020, 01:35 PM
• Last activity: Jun 12, 2024, 12:14 AM
47
votes
5
answers
114589
views
Why doesn't my ~/.bash_profile work?
I'm using Linux Mint. My login shell (`cat /etc/passwd | grep myUserName`) is bash. After I start my graphical desktop environment and run a terminal emulator from it, I can see that `.bash_profile` is not sourced (environment vars that are `export`ed in it are unset). But if I log in from a text co...
I'm using Linux Mint. My login shell (
cat /etc/passwd | grep myUserName
) is bash.
After I start my graphical desktop environment and run a terminal emulator from it, I can see that .bash_profile
is not sourced (environment vars that are export
ed in it are unset). But if I log in from a text console (ctrl+alt+F1) or manually run bash -l
from the terminal emulator, .bash_profile
works fine.
Am I wrong when I think that .bash_profile
should be sourced when X starts and all export
'ed vars should be available in the terminal, running from X?
P.S. Placing everything in .bashrc
and sourcing it from .bash_profile
is not good idea : environment stuff should be sourced only once.
AntonioK
(1213 rep)
Aug 25, 2013, 08:09 AM
• Last activity: Feb 27, 2024, 02:37 PM
9
votes
2
answers
535
views
How do you set up the environment for es?
I've been playing with [es](http://wryun.github.com/es-shell/) the last couple of days, and it (like rc) has the quirk/feature that it only runs its startup script (`.esrc`) on login. The usual way to run code in each interactive session is to put that code in the `%prompt` function. Of course, ther...
I've been playing with [es](http://wryun.github.com/es-shell/) the last couple of days, and it (like rc) has the quirk/feature that it only runs its startup script (
.esrc
) on login. The usual way to run code in each interactive session is to put that code in the %prompt
function.
Of course, there's no %prompt
function if es -l
has never been run.
So, the question: how do you set the login environment when you come in via gdm or similar, which only source .profile (or .xprofile, .xsession, etc.)? The best I've come up with is:
if [ -f "$HOME/.esrc" ]; then
eval "`es -l <<-x
sh <<<'export -p'
x`"
fi
Which seems... horrifying. Any better approaches?
james.haggerty
(211 rep)
Aug 22, 2012, 02:07 AM
• Last activity: Dec 9, 2023, 10:43 PM
1
votes
1
answers
289
views
PulseAudio: digital profiles/ports no longer appear in pavucontrol
Until recently I could use pavucontrol to select a device's digital profile (in the configuration tab) or port (in the "output devices" tab). That latter tab also allowed me to indicate what formats a device was capable to handle beyond PCM. These possibilities have disappeared, I can't exactly say...
Until recently I could use pavucontrol to select a device's digital profile (in the configuration tab) or port (in the "output devices" tab). That latter tab also allowed me to indicate what formats a device was capable to handle beyond PCM.
These possibilities have disappeared, I can't exactly say when so I can't link it to something I may have (un)installed but I do know that I haven't updated PulseAudio (v16.1) nor pavucontrol (v5.0). Last changes I can remember making to
/etc/pulse/default.pa
was disabling Jack functionality as well as Bluetooth support.
EDIT: Upgrading to PA 16.99.1 or downgrading to 13.99.1 didn't change anything so we must be dealing with something external OR a configuration change.
Does PulseAudio need to have specific modules loaded in order to support digital device profiles/ports, and if so, which?
RJVB
(254 rep)
Dec 6, 2023, 11:38 PM
• Last activity: Dec 8, 2023, 01:16 PM
0
votes
2
answers
503
views
Why .profile and .bash_profile have non-owner R permissions?
On the Linux systems I've seen the files `.profile` and `.bash_profile` in `~` have permissions `-rw-r--r--`. People seem to put various env vars into these files quite often, including smth like AWS keys, etc. Those non-owner R bits don't make these files widely readable, because home directories t...
On the Linux systems I've seen the files
.profile
and .bash_profile
in ~
have permissions -rw-r--r--
.
People seem to put various env vars into these files quite often, including smth like AWS keys, etc.
Those non-owner R bits don't make these files widely readable, because home directories themselves prevent that by having drwx------
. Which makes sense.
HOWEVER.
Doesn't this increase the potential attack surface? What's the reason for having those R bits on by default across many Linux distributions? Any specific use-cases valid today?
Btw, .bash_history
has -rw-------
. So it looks more private than the files in subject. Not clear why.
Anton K
(351 rep)
Nov 28, 2023, 10:47 PM
• Last activity: Nov 29, 2023, 04:57 AM
15
votes
1
answers
13447
views
Where do /root/.bashrc and /root/.profile come from on a Debian system?
Normally when you add a user on a Debian system, the contents of `/etc/skel/` are copied into the new user's home directory. But `/root/.bashrc` does not match `/etc/skel/.bashrc` and `/root/.profile` does not match `/etc/skel/.profile`. Also neither file is known to `dpkg`. So where do they come fr...
Normally when you add a user on a Debian system, the contents of
/etc/skel/
are copied into the new user's home directory. But /root/.bashrc
does not match /etc/skel/.bashrc
and /root/.profile
does not match /etc/skel/.profile
. Also neither file is known to dpkg
. So where do they come from?
ali1234
(1194 rep)
Aug 24, 2016, 08:44 PM
• Last activity: Nov 21, 2023, 12:25 PM
12
votes
3
answers
5582
views
How to I force Terminator to reload configuration on the fly?
I use Terminator as a terminal emulator and I like it a lot, I would just like to do one thing and I haven't been able to find out how to do it. So, I know how I can right-click, go to preferences, and select the color profile and font. Then when I'm done, the terminator instance that I accessed pre...
I use Terminator as a terminal emulator and I like it a lot, I would just like to do one thing and I haven't been able to find out how to do it.
So, I know how I can right-click, go to preferences, and select the color profile and font. Then when I'm done, the terminator instance that I accessed preferences from reflects the updates that I've just made (i.e. the colors/fonts are different). I'd like to be able to do this but by manually editing the configuration file at
~/.config/terminator/config
and then having an active terminator session reload the config file, then reflect those changes without having to restart the emulator.
Is there a way to do this?--Some sort of command to send to terminator to tell it to reload itself from the config file without having to close the actual program? I feel like this should be possible because if I manually edit the configurations through the GUI, the changes are reflected without the process needing to be restarted.
John Allard
(1408 rep)
Apr 19, 2016, 01:23 AM
• Last activity: Aug 27, 2023, 03:34 PM
0
votes
4
answers
388
views
split PATH variable INTO few lines
I have split my PATH variable into few lines, in the file to make them easier to read because it's very long, as I had seen [here][1]. This is what I changed in my `/etc/profile`: # PATH="/usr/share/python-wheels:/usr/share/gcc/python/usr/lib/python3/dist-pa> # PATH="/usr/share/doc:/usr/lib/python3:...
I have split my PATH variable into few lines, in the file to make them easier to read because it's very long,
as I had seen here .
This is what I changed in my
/etc/profile
:
# PATH="/usr/share/python-wheels:/usr/share/gcc/python/usr/lib/python3/dist-pa>
# PATH="/usr/share/doc:/usr/lib/python3:/usr/lib/python3/dist-packages:/usr/lib/cups/backend:usr/lib/python3.11:/usr/src/python3.11:/sbin:/bin"
path+=(
/usr/local/bin
/usr/bin
/bin
/usr/local/games
/usr/games
/home/lm/local/pipx/venvs/esptool
/usr/share/python-wheels
/usr/share/gcc/python
/usr/lib/python3/dist-packages/pip/_vendor/pygments/lexers
/usr/share/doc
/usr/lib/python3
/usr/lib/python3/dist-packages
/usr/lib/cups/backend
/usr/lib/python3.11
/usr/src/python3.11
/sbin
/bin
)
export PATH
Then I ran
source ~/.profile
and echo $PATH
has not changed:
root@debian:/home/lm# echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/lm/.local/bin:/root/.local/bin:/root/.local/bin:/root/.local/bin:/root/.local/bin:/root/.local/bin
root@debian:/etc/default# source /etc/profile
root@debian:/etc/default# echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/lm/.local/bin:/root/.local/bin
even after restart XFCE OR after reboot PATH still default value.
What's wrong and how can I fix this for PATH new settings will be accepted?
my system is Debian 12 and XFCE
ant
(27 rep)
Aug 24, 2023, 10:33 AM
• Last activity: Aug 24, 2023, 06:22 PM
0
votes
1
answers
135
views
/etc/profile.d/sh.local
I am trying to delete/remove `/etc/profile.d/sh.local` (not using it and a security scan flags it) from the system when the system is built but, it is not working. I thought `/etc/profile.d/sh.local` is created from `/etc/profile` (snippet of `/etc/profile`): for i in /etc/profile.d/*.sh /etc/profil...
I am trying to delete/remove
/etc/profile.d/sh.local
(not using it and a security scan flags it) from the system when the system is built but, it is not working. I thought /etc/profile.d/sh.local
is created from /etc/profile
(snippet of /etc/profile
):
for i in /etc/profile.d/*.sh /etc/profile.d/sh.local ; do
if [ -r "$i" ]; then
if [ "${-#*i}" != "$-" ]; then
. "$i"
else
. "$i" >/dev/null
fi
fi
done
I created a new /etc/profile
by removing the section for /etc/profile.d/sh.local
from /etc/profile
and build a new server without a sh.local
section but when I login I still see /etc/profile.d/sh.local
.
Obviously this file gets created by other processes that I am missing?
user2037551
(1 rep)
Jul 12, 2023, 12:42 PM
• Last activity: Jul 12, 2023, 01:24 PM
1
votes
1
answers
158
views
Why this exec command only works in zshrc but not in profile?
This question is going to be so simple but I need to know how this just works in on side but in other place don't, to end ssh sesion when tmux closes I used the answer proposed in this link: https://stackoverflow.com/a/17465215 I placed similar code inside my /etc/zsh/zprofile and it works, but if I...
This question is going to be so simple but I need to know how this just works in on side but in other place don't, to end ssh sesion when tmux closes I used the answer proposed in this link: https://stackoverflow.com/a/17465215
I placed similar code inside my /etc/zsh/zprofile and it works, but if I put the same code in /etc/profile the tmux session ends immediately after ssh login, what is happening?
PS: The code in question is this:
if [[ -z $TMUX && -n $SSH_TTY ]]; then
exec tmux -2 new-session -s $TTY
fi
AxelAGBL
(33 rep)
Jun 29, 2023, 02:45 PM
• Last activity: Jul 2, 2023, 01:35 AM
Showing page 1 of 20 total questions