leovoel / BeautifulDiscord

Adds custom CSS support to Discord.
MIT License
700 stars 72 forks source link

Doesn't work on linux #15

Open RhythmLunatic opened 7 years ago

RhythmLunatic commented 7 years ago
$ sudo python3.5 beautifuldiscord --css /home/arc/Documents/discord.css
Found Discord under /usr/share/discord

Done!

You may now edit your /home/arc/Documents/discord.css file,
which will be reloaded whenever it's saved.

Relaunching Discord now...

And the CSS stays unchanged.

leovoel commented 7 years ago

can you clarify? not sure i understand your issue

RhythmLunatic commented 7 years ago

I ran beautifuldiscord using "sudo python3.5 beautifuldiscord --css /home/arc/Documents/discord.css". It installed, but discord remains unchanged.

After restarting Discord a second time it won't start and gives this error. https://arcofswords.s-ul.eu/c27mhN05.png

Rapptz commented 7 years ago

This is because the process termination failed. You should terminate all the processes Discord has yourself.

RhythmLunatic commented 7 years ago

The second issue is caused by incorrect folder permissions (beautifuldiscord cannot write to discord app without root), but still the CSS doesn't actually work.

window.applyAndWatchCSS() doesn't do anything either.

leovoel commented 7 years ago

was the app.asar extracted? if it was, can you check inside index.js and look for mainWindow.webContents.on('dom-ready',?

if both of those are true it should be working, strange...

syl3n7 commented 7 years ago

well, i can assure you that i have python-utils installed .. [ (yaourt output) 2 community/python-psutil 5.2.2-1 [installed] A cross-platform process and system utilities module for Python 3 community/python2-psutil 5.2.2-1 [installed] A cross-platform process and system utilities module for Python2 ]

do i really need an older version for it to work ?

[syl3nt@machine ~]$ beautifuldiscord --css /home/syl3nt/myown.css Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/pkg_resources/init.py", line 654, in _build_master ws.require(requires) File "/usr/lib/python3.6/site-packages/pkg_resources/init.py", line 968, in require needed = self.resolve(parse_requirements(requirements)) File "/usr/lib/python3.6/site-packages/pkg_resources/init.py", line 859, in resolve raise VersionConflict(dist, req).with_context(dependent_req) pkg_resources.ContextualVersionConflict: (psutil 5.2.1 (/usr/lib/python3.6/site-packages), Requirement.parse('psutil==5.1.0'), {'BeautifulDiscord'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/bin/beautifuldiscord", line 6, in from pkg_resources import load_entry_point File "/usr/lib/python3.6/site-packages/pkg_resources/init.py", line 3036, in @_call_aside File "/usr/lib/python3.6/site-packages/pkg_resources/init.py", line 3020, in _call_aside f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/pkg_resources/init.py", line 3049, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/usr/lib/python3.6/site-packages/pkg_resources/init.py", line 656, in _build_master return cls._build_from_requirements(requires) File "/usr/lib/python3.6/site-packages/pkg_resources/init.py", line 669, in _build_from_requirements dists = ws.resolve(reqs, Environment()) File "/usr/lib/python3.6/site-packages/pkg_resources/init.py", line 854, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'psutil==5.1.0' distribution was not found and is required by BeautifulDiscord

help ? anybody ?

[edit]

fixed by reverting python2-psutil to a previous version