-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
58 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# ~/.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 | ||
|
||
# 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 | ||
|
||
# set PATH so it includes user's private bin if it exists | ||
if [ -d "$HOME/.local/bin" ] ; then | ||
PATH="$HOME/.local/bin:$PATH" | ||
fi | ||
|
||
if [ -f "${HOME}/.cargo/env" ]; then | ||
. "${HOME}/.cargo/env" | ||
fi | ||
|
||
# Pre-startup scripts don't seem to work on Plasma Wayland, | ||
# and therefore the pre-startup script has to be loaded here. | ||
. "${HOME}/Git/linux-scripts/startup/agx-user-pre-startup.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,27 @@ | ||
#!/usr/bin/env bash | ||
set -u | ||
# This should not be set, as it would cause an error when checking if SSH_AGENT_PID is set | ||
# set -u | ||
|
||
# https://kcore.org/2022/05/18/ssh-passphrases-kde/ | ||
|
||
# SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | ||
# REPO_DIR="$(dirname "${SCRIPT_DIR}")" | ||
# LOG_PATH="${REPO_DIR}/logs/agx-user-pre-startup.txt" | ||
|
||
# echo "Running agx-user-pre-startup.sh at $(date +%F_%H-%M-%S)" >> "${LOG_PATH}" | ||
|
||
export SSH_ASKPASS="/usr/bin/ksshaskpass" | ||
export SSH_ASKPASS_REQUIRE=prefer | ||
|
||
if ! pgrep -u "${USER}" ssh-agent > /dev/null; then | ||
ssh-agent > ~/.ssh-agent-info | ||
# echo "SSH agent seems not to be started. Starting, and saving its configuration." | ||
ssh-agent > ~/.ssh-agent-info | ||
fi | ||
if [[ "${SSH_AGENT_PID}" == "" ]]; then | ||
eval "$(<~/.ssh-agent-info)" | ||
# echo "SSH agent configuration seems not to be loaded. Loading." | ||
eval "$(<~/.ssh-agent-info)" > /dev/null | ||
fi | ||
|
||
# echo "SSH_AUTH_SOCK=${SSH_AUTH_SOCK}" >> "${LOG_PATH}" | ||
# echo "SSH_AGENT_PID=${SSH_AGENT_PID}" >> "${LOG_PATH}" | ||
# echo "Finished agx-user-pre-startup.sh at $(date +%F_%H-%M-%S)" >> "${LOG_PATH}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters