~/.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 &

관련 정보