wnayes / bond-wm

An X Window Manager built on web technologies.
https://wnayes.github.io/bond-wm/
MIT License
67 stars 2 forks source link

HELP ME #1

Closed yessGlory17 closed 2 years ago

yessGlory17 commented 2 years ago

npm run start

electron-wm@1.0.0 start DISPLAY=:1 electron .

{ _: [], 'console-logging': false, consoleLogging: false, '$0': '.' } (node:33551) UnhandledPromiseRejectionWarning: TypeError: Cannot read properties of undefined (reading 'client') at /home/ozgur/Downloads/electron-wm-main/dist/wm/wm.js:141:25 at Socket. (/home/ozgur/Downloads/electron-wm-main/node_modules/x11/lib/xcore.js:659:17) at Socket.emit (node:events:390:28) at emitErrorNT (node:internal/streams/destroy:157:8) at emitErrorCloseNT (node:internal/streams/destroy:122:3) at processTicksAndRejections (node:internal/process/task_queues:83:21) (Use electron --trace-warnings ... to show where the warning was created) (node:33551) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)

wnayes commented 2 years ago

The npm run start command currently is meant to be tied with doing npm run startx or similar and is more intended for a development workflow. npm run start is assuming that a :1 display exists, which may not be the case if something like Xephyr wasn't ran before.

When I use this for daily use, I have an .xinitrc and it runs something like the following (adjusted for the paths in your post):

exec /home/ozgur/Downloads/electron-wm-main/node_modules/.bin/electron /home/ozgur/Downloads/electron-wm-main

(So essentially the same as npm run start, but without the DISPLAY=:1 environment variable.)

yessGlory17 commented 2 years ago

Thanks :+1: