![.profile에 기능을 추가하는 중에 문제가 발생했습니다.](https://linux55.com/image/8434/.profile%EC%97%90%20%EA%B8%B0%EB%8A%A5%EC%9D%84%20%EC%B6%94%EA%B0%80%ED%95%98%EB%8A%94%20%EC%A4%91%EC%97%90%20%EB%AC%B8%EC%A0%9C%EA%B0%80%20%EB%B0%9C%EC%83%9D%ED%96%88%EC%8A%B5%EB%8B%88%EB%8B%A4..png)
나는 다음을 추가했습니다 ~/.profile
:
#Change desktop background f(x)
function changeBackground() {
FILE="'file://$(readlink -f "$1")'"
echo changing to "$FILE"
gsettings set org.gnome.desktop.background picture-uri "$FILE"
}
사이드 노트: 이 기능의 목적은 사용자가 이미지 파일의 경로를 지정하고 이미지 파일을 가져와 바탕 화면 배경으로 설정하는 것입니다. 예:changeBackground /backgrounds/background.png
그런 다음 실행하면 export -f changeBackground
다음 오류가 발생합니다.
./scripts/bins: line 15: export: changeBackground: not a function
왜?