-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Change default user to icpc:icpc
- Loading branch information
Showing
9 changed files
with
68 additions
and
149 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
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,4 +1,3 @@ | ||
html/fonts | ||
config.local.sh | ||
config.sh | ||
misc/vnoi_cup.pub |
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
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
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,32 @@ | ||
#!/bin/sh | ||
|
||
logger -p local0.info "MKVNOIUSER: Create a new icpc user" | ||
|
||
# Create vnoi account | ||
useradd -m icpc | ||
|
||
# Setup desktop background | ||
sudo -Hu icpc xvfb-run gsettings set org.gnome.desktop.session idle-delay 900 | ||
sudo -Hu icpc xvfb-run gsettings set org.gnome.desktop.screensaver lock-delay 30 | ||
if [ -f /opt/vnoi/config/screenlock ]; then | ||
sudo -Hu icpc xvfb-run gsettings set org.gnome.desktop.screensaver lock-enabled true | ||
else | ||
sudo -Hu icpc xvfb-run gsettings set org.gnome.desktop.screensaver lock-enabled false | ||
fi | ||
|
||
# set default fullname | ||
chfn -f "icpc" icpc | ||
|
||
# Update path | ||
echo 'TZ=$(cat /opt/vnoi/config/timezone)' >> ~icpc/.profile | ||
echo 'export TZ' >> ~icpc/.profile | ||
|
||
# Mark Gnome's initial setup as complete | ||
sudo -Hu icpc bash -c 'echo yes > ~/.config/gnome-initial-setup-done' | ||
|
||
# Copy VSCode extensions | ||
mkdir -p ~icpc/.vscode/extensions | ||
tar jxf /opt/vnoi/misc/vscode-extensions.tar.bz2 -C ~icpc/.vscode/extensions | ||
chown -R icpc.icpc ~icpc/.vscode | ||
|
||
logger -p local0.info "MKICPCUSER: ICPC user created" |
This file was deleted.
Oops, something went wrong.
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