leovoel / BeautifulDiscord

Adds custom CSS support to Discord.
MIT License
699 stars 73 forks source link

Could not find discord application version (Linux) #107

Closed antoninhrlt closed 2 years ago

antoninhrlt commented 3 years ago

I've installed BeautifulDiscord and when I try to run beautifuldiscord --css discord.css It return me

Found Discord under /app/discord
Traceback (most recent call last):
  File "/home/anton/.local/bin/beautifuldiscord", line 33, in <module>
    sys.exit(load_entry_point('BeautifulDiscord==0.2.0', 'console_scripts', 'beautifuldiscord')())
  File "/home/anton/.local/lib/python3.9/site-packages/beautifuldiscord/app.py", line 249, in main
    os.chdir(discord.script_path)
  File "/home/anton/.local/lib/python3.9/site-packages/beautifuldiscord/app.py", line 104, in script_path
    raise RuntimeError('Could not find discord application version under "{}".'.format(config))
RuntimeError: Could not find discord application version under "/home/anton/.config/discord".

I've installed Discord with flatpack on Fedora, it's that the problem ? The .config/discord folder is empty

antoninhrlt commented 3 years ago

I use DiscordBetter now but it's interesting to know why this happen. Flatpak it's probably the problem, it doesn't install Discord normally (like other download tools)

movq commented 2 years ago

Yeah, Flatpak is definitely the problem here. As a workaround I've been able to get it to work by temporarily overriding the XDG_CONFIG_HOME environment variable, e.g.

env XDG_CONFIG_HOME=~/.var/app/com.discordapp.DiscordCanary/config/ beautifuldiscord

(change DiscordCanary to Discord if you're using the non-canary version)

It will fail to restart Discord, but the CSS file is successfully injected.

antoninhrlt commented 2 years ago

thanks