Vencord / Installer

A cross platform gui/cli app for installing Vencord
GNU General Public License v3.0
507 stars 78 forks source link

Vencord installing to /root/.config/Vencord on Linux #109

Closed LazarusCat59 closed 11 months ago

LazarusCat59 commented 11 months ago

First of all, this issue is very similar to #12 but it was closed. Running sudo VencordInstallerCli-linux gives me the following output:

VencordInstaller was run with root privileges, actual user is misturket
Looking up HOME of misturket
Actual HOME is /home/misturket
Using UserConfig
Checking if /root/.config/Vencord/dist exists: Yes
Is Dev Install:  false
Fetching https://api.github.com/repos/Vendicated/Vencord/releases/latest
Checking if /opt/discord/resources exists: Yes
Checking if /opt/discord/resources/app exists: No
Checking if /opt/discord/resources/app.asar is directory: No
Found Discord install at  /opt/discord
Checking if /opt/discord-ptb/resources exists: Yes
Checking if /opt/discord-ptb/resources/app exists: No
Checking if /opt/discord-ptb/resources/app.asar is directory: No
Found Discord install at  /opt/discord-ptb
Finished fetching GitHub Data
Latest hash is fcf2bdd Local Install is outdated!
Vencord Installer cli v1.3.1 (ca03a38)
Please choose a Discord install to patch
[1] /opt/discord (stable)
[2] /opt/discord-ptb (ptb)
[3] Custom Location

If I continue, it will install to /root/.config/Vencord and discord fails to open due to permission issues. I set the XDG_CONFIG_HOME variable in /etc/security/pam_env.conf following instructions from Environment Variables - ArchWiki which I think is why the root user sets the XDG_CONFIG_HOME variable as /root/.config. I'd be glad to help with testing if a fix is released, thanks!

lewisakura commented 11 months ago

use install.sh: sh -c "$(curl -sS https://raw.githubusercontent.com/Vencord/Installer/main/install.sh)"

LazarusCat59 commented 11 months ago

While install.sh script works perfectly fine, I would suggest removing the relevant section from https://vencord.dev/download if the CLI installer will not be supported.

lewisakura commented 11 months ago

install.sh is powered by the CLI installer, so it's very much supported, but i agree the wording on the site could be better

nope i am stupid, but the CLI installer works in the same way with the environment variable setup, so you should be overriding XDG_CONFIG_HOME with your own

LazarusCat59 commented 11 months ago

the CLI installer works in the same way with the environment variable setup, so you should be overriding XDG_CONFIG_HOME with your own

Explicitly mentioning that on the install page would be great, thanks!

lewisakura commented 11 months ago

https://github.com/Vencord/vencord.dev/commit/d4fc487f0174a0d7cce31d41a9a85d1280f57b58

LazarusCat59 commented 11 months ago

Thanks a lot for the quick fix!