sidorares / node-x11

X11 node.js network protocol client
MIT License
519 stars 72 forks source link

Failed to install 0.0.12 on Arch #16

Closed tiye closed 11 years ago

tiye commented 11 years ago

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 , but 0.0.11 successfully installed.

➤➤ npm install x11
npm http GET https://registry.npmjs.org/x11
npm http 304 https://registry.npmjs.org/x11
npm http GET https://registry.npmjs.org/x11/-/x11-0.0.12.tgz
npm http 404 https://registry.npmjs.org/x11/-/x11-0.0.12.tgz
npm ERR! fetch failed https://registry.npmjs.org/x11/-/x11-0.0.12.tgz
npm ERR! Error: 404 Not Found
npm ERR!     at null.<anonymous> (/usr/lib/node_modules/npm/lib/utils/fetch.js:47:16)
npm ERR!     at EventEmitter.emit (events.js:126:20)
npm ERR!     at WriteStream.flush (fs.js:1517:12)
npm ERR!     at fs.close (/usr/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:90:5)
npm ERR!     at Object.oncomplete (fs.js:297:15)
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Linux 3.6.6-1-ARCH
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "x11"
npm ERR! cwd /home/chen/code/x11-window
npm ERR! node -v v0.8.14
npm ERR! npm -v 1.1.65
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/chen/code/x11-window/npm-debug.log
npm ERR! not ok code 0
➤➤ npm install x11 -V
npm http GET https://registry.npmjs.org/x11
^C➤➤ npm install x11 --verbose
npm info it worked if it ends with ok
npm verb cli [ '/usr/bin/node', '/usr/bin/npm', 'install', 'x11', '--verbose' ]
npm info using npm@1.1.65
npm info using node@v0.8.14
npm verb read json /home/chen/code/x11-window/package.json
npm verb read json /home/chen/code/x11-window/node_modules/x11/package.json
npm verb read json /home/chen/code/x11-window/package.json
npm verb cache add [ 'x11', null ]
npm verb parsed url { pathname: 'x11', path: 'x11', href: 'x11' }
npm verb lock x11 /home/chen/.npm/5c939875-x11.lock
npm verb addNamed [ 'x11', '' ]
npm verb addNamed [ null, '' ]
npm verb lock x11@ /home/chen/.npm/76d4c307-x11.lock
npm verb url raw x11
npm verb url resolving [ 'https://registry.npmjs.org/', './x11' ]
npm verb url resolved https://registry.npmjs.org/x11
npm info trying registry request attempt 1 at 20:07:16
npm verb etag "DZBF9U7V1AMGHQAPSUKBB5HMZ"
npm http GET https://registry.npmjs.org/x11
npm http 304 https://registry.npmjs.org/x11
npm verb etag x11 from cache
npm verb addNamed [ 'x11', '0.0.12' ]
npm verb addNamed [ '0.0.12', '0.0.12' ]
npm verb lock x11@0.0.12 /home/chen/.npm/99c1b350-x11-0-0-12.lock
npm verb lock https://registry.npmjs.org/x11/-/x11-0.0.12.tgz /home/chen/.npm/b122725f-try-npmjs-org-x11-x11-0-0-12-tgz.lock
npm verb addRemoteTarball [ 'https://registry.npmjs.org/x11/-/x11-0.0.12.tgz',
npm verb addRemoteTarball   '7897e7227e705418c0c66c01a6dc1a71f0bb732f' ]
npm info retry fetch attempt 1 at 20:07:17
npm verb fetch to= /home/chen/tmp/npm-7535/1354104437759-0.6482729348354042/tmp.tgz
npm http GET https://registry.npmjs.org/x11/-/x11-0.0.12.tgz
npm http 404 https://registry.npmjs.org/x11/-/x11-0.0.12.tgz
npm ERR! fetch failed https://registry.npmjs.org/x11/-/x11-0.0.12.tgz
npm ERR! Error: 404 Not Found
npm ERR!     at null.<anonymous> (/usr/lib/node_modules/npm/lib/utils/fetch.js:47:16)
npm ERR!     at EventEmitter.emit (events.js:126:20)
npm ERR!     at WriteStream.flush (fs.js:1517:12)
npm ERR!     at fs.close (/usr/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:90:5)
npm ERR!     at Object.oncomplete (fs.js:297:15)
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Linux 3.6.6-1-ARCH
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "x11" "--verbose"
npm ERR! cwd /home/chen/code/x11-window
npm ERR! node -v v0.8.14
npm ERR! npm -v 1.1.65
npm verb exit [ 1, true ]
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/chen/code/x11-window/npm-debug.log
npm ERR! not ok code 0

➤➤ npm install x11@0.0.11
npm http GET https://registry.npmjs.org/x11/0.0.11
npm http 304 https://registry.npmjs.org/x11/0.0.11
x11@0.0.11 node_modules/x11
sidorares commented 11 years ago

most likely previous publish failed (partially). I re-published @0.0.12

tiye commented 11 years ago

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?

tiye commented 11 years ago

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?

sidorares commented 11 years ago

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.

sidorares commented 11 years ago

Also good article on X initialisation process http://www.quepublishing.com/articles/article.aspx?p=21335&seqNum=3

sidorares commented 11 years ago

one more: http://en.wikibooks.org/wiki/Guide_to_X11/Starting_Sessions

CrypticSwarm commented 11 years ago

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 &
tiye commented 11 years ago

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?

sidorares commented 11 years ago

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

tiye commented 11 years ago

It's challenging. I'll try my best to understand it.