Closed tiye closed 11 years ago
most likely previous publish failed (partially). I re-published @0.0.12
it's OK now. Thanks.
By the way I interested in the windowmanager/wm.js
and tried to run it:
X :2 &
xterm -display :2 &
# ctrl alt f3
node wm.js &
gnome-terminal
Then I got a draggable title bar of gnome-terminal
here.
It I write a WM based on node-x11, how I can run it as my default WM?
Could I just excute with node my-wm.js
after booting to start it?
it's OK now. Thanks.
By the way I interested in the windowmanager/wm.js
and tried to run it:
X :2 &
xterm -display :2 &
# ctrl alt f3
node wm.js &
gnome-terminal
Then I got a draggable title bar of gnome-terminal
here.
It I write a WM based on node-x11, how I can run it as my default WM?
Could I just excute with node my-wm.js
after booting to start it?
Window manager is a normal X11 application, you can start and kill it at any moment. See Xsessiom , xinit, startx manuals - http://pwet.fr/man/linux/formats/xsession sor startup scripts reference
As only one connection is allowed to own SubstructureRedirect event mask, you might need to kill existing wm before starting new one.
Also good article on X initialisation process http://www.quepublishing.com/articles/article.aspx?p=21335&seqNum=3
Typically when I try a new window manager I launch it inside of something like Xephyr (http://en.wikipedia.org/wiki/Xephyr). Much easier to recover if you are trying something experimental out.
Example of running programs using Xephyr:
Xephyr -br -noreset -screen 800x600 :1 &
DISPLAY=:1.0 ./node manage.js &
Thanks for the links. Since Arch replaced init with systemd, it will take me some time to figure it out. I went through node-x11's wiki. There's not much API docs as normal NPM modules. And I found it really hard to read manuals of XCB or Xlib for I didn't learn much about C/C++. Are there other guides I can follow to write a WM please?
At the moment I'm not trying to document X requests as I'm using same names for function as in X11 protocol documentation. This is essentially reference for node-x11: www.x.org/releases/X11R7.6/doc/xproto/x11protocol.pdf
However, basic entry level docs would be helpful for most users without previous xlib experience. Feel free to submit docs if you can do it :)
This may be of help to understand how to build WM: http://www.sbin.org/doc/Xlib/chapt_16.html
It's challenging. I'll try my best to understand it.
I was trying to learn building a deskop environment. But I'm only able to build demo in HTML at this moment. That's why I tried
node-x11
and maybe it's not related to the problem.Failed to install
0.0.12
, but0.0.11
successfully installed.