Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hpc/monitor_job.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ while true; do
printf "%-10s %-8s %-10s %-8s %-10s %-8s\n" "JOBID" "TIME" "NODE" "MaxMem" "CPUTime" "CPU%"
printf "%-10s %-8s %-10s %-8s %-10s %-8s\n" "----------" "--------" "----------" "--------" "----------" "--------"

for jobid in $(squeue -u zyyu -h -o "%i"); do
for jobid in $(squeue -u "$USER" -h -o "%i"); do
elapsed=$(squeue -j $jobid -h -o "%M")
node=$(squeue -j $jobid -h -o "%N")
ncpus=$(squeue -j $jobid -h -o "%C")
Expand Down
4 changes: 2 additions & 2 deletions linux/services/email.service
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ StartLimitIntervalSec=0
Type=simple
Restart=always
RestartSec=1
User=stanfish
ExecStart=/home/stanfish/scripts/system/fetch-emails.sh
# User= # set locally: User=your-username
ExecStart=%h/scripts/system/fetch-emails.sh
Comment on lines +11 to +12
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore explicit User= for email service

Removing User= from this system unit makes the service run as root by default and changes %h in ExecStart to root’s home, so it tries to execute /root/scripts/system/fetch-emails.sh instead of the intended unprivileged user script path. In this repo state, systemd-analyze verify linux/services/email.service already resolves the command to /root/... and reports it missing, so the service fails unless each machine patches the unit locally and otherwise runs with elevated privileges.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Stop using %h in this system unit ExecStart

%h in a system service does not follow the runtime User= expectation here and resolves to the system manager’s home (/root), so even after following the inline comment and setting User=your-username, ExecStart=%h/scripts/system/fetch-emails.sh still points at /root/scripts/... and won’t run the intended per-user script. A local repro with systemd-analyze verify on a test unit with User=nobody resolves %h to /root, confirming this path strategy is incorrect for this unit type.

Useful? React with 👍 / 👎.


[Install]
WantedBy=multi-user.target
2 changes: 1 addition & 1 deletion sway/40-sway-background.conf
Original file line number Diff line number Diff line change
@@ -1 +1 @@
output * bg /home/stanfish/Git/my-configs/img/space.jpeg fill
output * bg ~/.config/sway/wallpaper.jpeg fill
6 changes: 3 additions & 3 deletions wezterm/.wezterm.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ workspace_switcher.apply_to_config(config)

config.window_decorations = "RESIZE"
config.background = {
{ source = { File = "C:/Users/zhiyu/Desktop/Git/my-configs/img/dark-green-forest.jpg" }, opacity = 0.4 },
{ source = { File = wezterm.home_dir .. "/.config/wezterm/background.jpg" }, opacity = 0.4 },
}
-- config.window_decorations = "INTEGRATED_BUTTONS | RESIZE"
-- config.integrated_title_button_alignment = "Left"
Expand Down Expand Up @@ -353,7 +353,7 @@ domains.apply_to_config(config, {
config.ssh_domains = { {
name = "greatlakes",
remote_address = "greatlakes.arc-ts.umich.edu",
username = "zyyu",
username = "username",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid hard-coding placeholder SSH username

Setting the SSH user to the literal string "username" breaks the WezTerm Great Lakes shortcut for any account that is not actually named username; both ssh_domains and the launch menu now target the wrong remote user and will fail authentication in normal setups. This redaction should use a dynamic value (or omit the user so SSH picks the local default) rather than a fixed placeholder.

Useful? React with 👍 / 👎.

} }

-- wezterm will automatically connect to unix mux server
Expand All @@ -367,7 +367,7 @@ config.default_gui_startup_args = { "connect", "unix" }
config.launch_menu = {
{
label = "greatlakes",
args = { "ssh", "zyyu@greatlakes.arc-ts.umich.edu" },
args = { "ssh", "username@greatlakes.arc-ts.umich.edu" },
},
{
label = "msvc",
Expand Down
Loading