在 ~/.profile 中调用脚本会停止我的登录

在 ~/.profile 中调用脚本会停止我的登录

我在我的 .bashrc 文件中调用了 bash 脚本~/.profile

该脚本执行 CLI 程序以在登录时调暗我的屏幕。但是,运行脚本后,Gnome 不会继续让我登录到标准桌面。

有没有办法让~/.profile脚本调用非阻塞?我很高兴提供更多细节来帮助您回答这个问题。我的发行版是 Linux Mint。

编辑

内容.profile.

# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022

# Me
bash /home/eoin/repos/scripts/autostart.sh

# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
    . "$HOME/.bashrc"
    fi
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi

我的脚本/home/eoin/repos/scripts/autostart.sh

#!/bin/bash
bash ~/repos/scripts/redshift/redshift.sh

这又调用另一个脚本:-P

#!/bin/bash
redshift -v

答案1

脚本的背景,即

# Me
bash /home/eoin/repos/scripts/autostart.sh &

相关内容