You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My dotfiles folder in /mnt/e/Projects/dotfiles.
When I run
cd /mnt/e/Projects/dotfiles
sudo ./install
it run without error with this logs:
[sudo] password for latipun7:
Link /root/Brewfile -> /mnt/e/Projects/dotfiles/linux/linuxbrew/Brewfile not removed.
Link /root/.gitconfig -> /mnt/e/Projects/dotfiles/linux/git/linux.gitconfig not removed.
Link /root/.bin -> /mnt/e/Projects/dotfiles/linux/bin not removed.
Link /root/.zshrc -> /mnt/e/Projects/dotfiles/linux/zsh/zshrc.zsh not removed.
Link /root/.p10k.zsh -> /mnt/e/Projects/dotfiles/linux/zsh/p10k.zsh not removed.
Link /root/.oh-my-zsh-custom -> /mnt/e/Projects/dotfiles/linux/oh-my-zsh not removed.
Link /root/.ansi-arts -> /mnt/e/Projects/dotfiles/ansi-arts not removed.
Link /root/.config/neofetch -> /mnt/e/Projects/dotfiles/linux/neofetch not removed.
All targets have been cleaned
Removing ~/.ansi-arts
Creating link ~/.ansi-arts -> /e/Projects/dotfiles/ansi-arts
Removing ~/.bin
Creating link ~/.bin -> /e/Projects/dotfiles/linux/bin
Removing ~/.config/neofetch
Creating link ~/.config/neofetch -> /e/Projects/dotfiles/linux/neofetch
Removing ~/.oh-my-zsh-custom
Creating link ~/.oh-my-zsh-custom -> /e/Projects/dotfiles/linux/oh-my-zsh
Removing ~/.p10k.zsh
Creating link ~/.p10k.zsh -> /e/Projects/dotfiles/linux/zsh/p10k.zsh
Removing ~/.zshrc
Creating link ~/.zshrc -> /e/Projects/dotfiles/linux/zsh/zshrc.zsh
Removing ~/Brewfile
Creating link ~/Brewfile -> /e/Projects/dotfiles/linux/linuxbrew/Brewfile
Removing ~/.gitconfig
Creating link ~/.gitconfig -> /e/Projects/dotfiles/linux/git/linux.gitconfig
All links have been set up
Path exists /root/projects
Path exists /root/downloads
All paths have been set up
Synchronize the URLs of submodules [git submodule sync --recursive]
Update the submodules [git submodule update --init --recursive]
All commands have been executed
==> All tasks executed successfully
But when I want to see the configuration with cat ~/.gitconfig, the file didn't exist. Then, when I list the directory of my home, all those files didn't exist. ls -la ~:
total 64
drwxr-xr-x 7 latipun7 latipun7 4096 May 28 23:15 .
drwxr-xr-x 3 root root 4096 May 28 20:15 ..
-rw------- 1 latipun7 latipun7 2108 May 29 05:51 .bash_history
-rw-r--r-- 1 latipun7 latipun7 220 May 28 20:15 .bash_logout
-rw-r--r-- 1 latipun7 latipun7 3771 May 28 20:15 .bashrc
drwxr-xr-x 2 latipun7 latipun7 4096 May 28 20:15 .landscape
-rw-r--r-- 1 latipun7 latipun7 0 May 29 05:49 .motd_shown
-rw-r--r-- 1 latipun7 latipun7 807 May 28 20:15 .profile
-rw------- 1 latipun7 latipun7 5 May 28 22:07 .python_history
drwxr-xr-x 3 latipun7 latipun7 4096 May 28 22:22 .quokka
-rw-r--r-- 1 latipun7 latipun7 0 May 28 20:34 .sudo_as_admin_successful
drwxr-xr-x 5 latipun7 latipun7 4096 May 28 21:43 .vscode-server
drwxr-xr-x 2 latipun7 latipun7 4096 May 28 21:49 .vsliveshare
-rw-r--r-- 1 latipun7 latipun7 58 May 28 21:49 .wakatime.cfg
-rw-r--r-- 1 latipun7 latipun7 4096 May 28 23:15 .wakatime.db
-rw-r--r-- 1 latipun7 latipun7 0 May 28 22:22 .wakatime.log
drwxr-xr-x 2 latipun7 latipun7 4096 May 28 22:22 .wallaby
-rw-r--r-- 1 latipun7 latipun7 183 May 28 21:43 .wget-hsts
Notice, the directories of projects and downloads not created too in $HOME. By looking on that logs, it seems link and create are messing on /root/ instead of $HOME.
I use sudo ./install because just like in #125 , I have configuration that modify in /etc/ and need sudo, so I add the following lines on install script:
if [[ "$(uname -a)"=*[M,m]icrosoft* ]];then
cp --remove-destination "$BASEDIR/linux/wsl/wsl.conf" /etc/wsl.conf
fi
Please tell me if you want more information.
Thank you.
The text was updated successfully, but these errors were encountered:
When the script is run with sudo, it's run as the root user. The root user's $HOME is in /root on your machine, so that's why the symlinks are going there. If you want to use Dotbot to put links in /etc or other locations only writable by root, you could use this approach of having two separate YAML configs, and having separate install scripts, so you can run ./install to set up the regular symlinks, and then run sudo ./install-sudo to run the stuff that must be done as root.
I run Ubuntu 20.04 on Windows Subsystem Linux 2 (WSL2).
I have
install.conf.yaml
like this:My dotfiles folder in
/mnt/e/Projects/dotfiles
.When I run
cd /mnt/e/Projects/dotfiles sudo ./install
it run without error with this logs:
But when I want to see the configuration with
cat ~/.gitconfig
, the file didn't exist. Then, when I list the directory of my home, all those files didn't exist.ls -la ~
:total 64 drwxr-xr-x 7 latipun7 latipun7 4096 May 28 23:15 . drwxr-xr-x 3 root root 4096 May 28 20:15 .. -rw------- 1 latipun7 latipun7 2108 May 29 05:51 .bash_history -rw-r--r-- 1 latipun7 latipun7 220 May 28 20:15 .bash_logout -rw-r--r-- 1 latipun7 latipun7 3771 May 28 20:15 .bashrc drwxr-xr-x 2 latipun7 latipun7 4096 May 28 20:15 .landscape -rw-r--r-- 1 latipun7 latipun7 0 May 29 05:49 .motd_shown -rw-r--r-- 1 latipun7 latipun7 807 May 28 20:15 .profile -rw------- 1 latipun7 latipun7 5 May 28 22:07 .python_history drwxr-xr-x 3 latipun7 latipun7 4096 May 28 22:22 .quokka -rw-r--r-- 1 latipun7 latipun7 0 May 28 20:34 .sudo_as_admin_successful drwxr-xr-x 5 latipun7 latipun7 4096 May 28 21:43 .vscode-server drwxr-xr-x 2 latipun7 latipun7 4096 May 28 21:49 .vsliveshare -rw-r--r-- 1 latipun7 latipun7 58 May 28 21:49 .wakatime.cfg -rw-r--r-- 1 latipun7 latipun7 4096 May 28 23:15 .wakatime.db -rw-r--r-- 1 latipun7 latipun7 0 May 28 22:22 .wakatime.log drwxr-xr-x 2 latipun7 latipun7 4096 May 28 22:22 .wallaby -rw-r--r-- 1 latipun7 latipun7 183 May 28 21:43 .wget-hsts
Notice, the directories of
projects
anddownloads
not created too in$HOME
. By looking on that logs, it seemslink
andcreate
are messing on/root/
instead of$HOME
.I use
sudo ./install
because just like in #125 , I have configuration that modify in/etc/
and need sudo, so I add the following lines oninstall
script:Please tell me if you want more information.
Thank you.
The text was updated successfully, but these errors were encountered: