mixu / nwm

Tiling window manager for X11 written in Node.js
http://mixu.net/nwm/
MIT License
789 stars 72 forks source link

Incompatibility with Ubuntu 10.4 (was: Seeing nothing after login) #12

Closed wagamama closed 12 years ago

wagamama commented 12 years ago

Hi,

I have installed nwm on my ubuntu 10.4. But whenever I log in, I cannot see anything and nothing happens while pressing keys and mouse key. Is there anything I missed to get nwm work correctly?

mixu commented 12 years ago

Hi @wagamama,

If nwm is not responding to keyboard shortcuts, you probably have the Mod4 key mapped to something other than the Windows key.

To find out what key is Mod4, run xmodmap. Sample output:

[~]$ xmodmap
xmodmap:  up to 4 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x69)
mod1        Alt_L (0x40),  Alt_R (0x6c),  Meta_L (0xcd)
mod2        Num_Lock (0x4d)
mod3      
mod4        Super_L (0x85),  Super_R (0x86),  Super_L (0xce),  Hyper_L (0xcf)
mod5        ISO_Level3_Shift (0x5c),  Mode_switch (0xcb)

EDIT: here you can see that the mod4 key is bound to Super_L and Super_R (Left Windows key and right Windows key)

There are two ways you can change the base modifier:

1) use a different mod key in nwm-user-sample.js (https://github.com/mixu/nwm/blob/master/nwm-user-sample.js#L42 )

or 2) reassign the mod4 key using xmodmap, see the Arch wiki for a guide https://wiki.archlinux.org/index.php/Xmodmap

Seeing nothing after login is normal: nwm doesn't have a desktop environment nor does it set a default wallpaper. I've just completed a screencast on nwm:

http://www.youtube.com/watch?v=sihgPfBj6yE

wagamama commented 12 years ago

Hi @mixu,

I got a weird situation. I used 'xev' to test win-key and get the keycode 133. Then by using 'xmodmap', mod4 is Super_L (0x85) and the key binding seems correct. But after logging in, I only see ubuntu wallpaper and no key combinations work, except 'ctrl + alt + f1~f6'.

mixu commented 12 years ago

Strange. Can you attach the generated log files, nwm.log and nwm.err.log? They are saved in the location specified in the startup script nwm.sh. Also, ~/.xsession-errors.old might contain some hints.

wagamama commented 12 years ago

nwm.log:

v0.6.7 [ { key: 49, modifier: 64, callback: [Function] }, { key: 50, modifier: 64, callback: [Function] }, { key: 51, modifier: 64, callback: [Function] }, { key: 52, modifier: 64, callback: [Function] }, { key: 53, modifier: 64, callback: [Function] }, { key: 54, modifier: 64, callback: [Function] }, { key: 55, modifier: 64, callback: [Function] }, { key: 56, modifier: 64, callback: [Function] }, { key: 57, modifier: 64, callback: [Function] }, { key: 49, modifier: 65, callback: [Function] }, { key: 50, modifier: 65, callback: [Function] }, { key: 51, modifier: 65, callback: [Function] }, { key: 52, modifier: 65, callback: [Function] }, { key: 53, modifier: 65, callback: [Function] }, { key: 54, modifier: 65, callback: [Function] }, { key: 55, modifier: 65, callback: [Function] }, { key: 56, modifier: 65, callback: [Function] }, { key: 57, modifier: 65, callback: [Function] }, { key: 65293, modifier: 65, callback: [Function] }, { key: 99, modifier: 65, callback: [Function] }, { key: 32, modifier: 64, callback: [Function] }, { key: 104, modifier: 64, callback: [Function] }, { key: 65479, modifier: 64, callback: [Function] }, { key: 108, modifier: 64, callback: [Function] }, { key: 65480, modifier: 64, callback: [Function] }, { key: 65289, modifier: 64, callback: [Function] }, { key: 44, modifier: 65, callback: [Function] }, { key: 46, modifier: 65, callback: [Function] }, { key: 106, modifier: 64, callback: [Function] }, { key: 107, modifier: 64, callback: [Function] }, { key: 113, modifier: 65, callback: [Function] } ] JS: addMonitor [ 748646864 ] JS: enterNotify [ 748646864 ] WARNING got focus event for nonexistent (transient) window 748646864 Focus monitor by coordinates undefined undefined JS: rearrange [ 748646864 ] Lazy init workspace 1 rearrange tile

JS: mouseDown [ 748646864 ] JS: mouseDown [ 748646864 ] list item data pointer 0x9a3c538. list item data pointer 0x9a3c558. list item data pointer 0x99e4490. list item data pointer 0x9a3c578. list item data pointer 0x99f8b58. list item data pointer 0x99f8b78. list item data pointer 0x99f8b98. list item data pointer 0x99f8bb8. list item data pointer 0x99f8bd8. list item data pointer 0x99f8bf8. list item data pointer 0x99f8c18. list item data pointer 0x9a21210. list item data pointer 0x9a21230. list item data pointer 0x9a21250. list item data pointer 0x9a21270. list item data pointer 0x9a21290. list item data pointer 0x9a212b0. list item data pointer 0x9a212d0. list item data pointer 0x9a212f0. list item data pointer 0x9a21310. list item data pointer 0x9a21330. list item data pointer 0x9a21350. list item data pointer 0x9a21370. list item data pointer 0x9a21390. list item data pointer 0x9a213b0. list item data pointer 0x9a213d0. list item data pointer 0x9a213f0. list item data pointer 0x9a21410. list item data pointer 0x9a21430. list item data pointer 0x9a21450. list item data pointer 0x9a21470. EIO INIT EIO LOOP EIO LOOP EIO LOOP

wagamama commented 12 years ago

nwm.err.log:

Xinerama active Monitors known 0, monitors found 1 Emit monitor 0 nwm_emit called with payload 0. EmitEnterNotify wid = 254 nwm_emit called with payload 11. FocusWindow: id=0 grab key -- key: 113 modifier 65 grab key -- key: 107 modifier 64 grab key -- key: 106 modifier 64 grab key -- key: 46 modifier 65 grab key -- key: 44 modifier 65 grab key -- key: 65289 modifier 64 grab key -- key: 65480 modifier 64 grab key -- key: 108 modifier 64 grab key -- key: 65479 modifier 64 grab key -- key: 104 modifier 64 grab key -- key: 32 modifier 64 grab key -- key: 99 modifier 65 grab key -- key: 65293 modifier 65 grab key -- key: 57 modifier 65 grab key -- key: 56 modifier 65 grab key -- key: 55 modifier 65 grab key -- key: 54 modifier 65 grab key -- key: 53 modifier 65 grab key -- key: 52 modifier 65 grab key -- key: 51 modifier 65 grab key -- key: 50 modifier 65 grab key -- key: 49 modifier 65 grab key -- key: 57 modifier 64 grab key -- key: 56 modifier 64 grab key -- key: 55 modifier 64 grab key -- key: 54 modifier 64 grab key -- key: 53 modifier 64 grab key -- key: 52 modifier 64 grab key -- key: 51 modifier 64 grab key -- key: 50 modifier 64 grab key -- key: 49 modifier 64 nwm_emit called with payload 6. got event ButtonPress (4). Handle(mouse)ButtonPress nwm_emit called with payload 7. FocusWindow: id=0 got event ButtonPress (4). Handle(mouse)ButtonPress nwm_emit called with payload 7. FocusWindow: id=0 XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0" after 173 requests (173 known processed) with 2 events remaining.

wagamama commented 12 years ago

xsession-errors.old:

/etc/gdm/Xsession: Beginning session setup... Setting IM through im-switch for locale=en_US. Start IM through /etc/X11/xinit/xinput.d/all_ALL linked to /etc/X11/xinit/xinput.d/default.

mixu commented 12 years ago

Very odd. Based on the logs, the binding is loading up fine and events are passed correctly to Node.js from X11.

You do have xterm installed, right? I'm really not sure why it would not open with Meta + Shift + Enter... Can you try using a different Mod key e.g. Mod1, e.g. Alt + Shift + Enter by changing nwm-user-sample.js to another Mod key? https://github.com/mixu/nwm/blob/master/nwm-user-sample.js#L42

I'm going to install Ubuntu 10.4 on a VM and see if there is something systematically wrong there.

mixu commented 12 years ago

Ok, I was able to replicate this on the Ubuntu VM.

It seems to be an issue from the refactor at the beginning of the year - events work but data is not passed correctly on Ubuntu 10.4.

I have added a branch called ubuntu10.4 which is based on older code, and it works on the same setup without any changes other than:

git checkout ubuntu10.4
rm -rf ./build
node-waf configure
node-waf build

Sorry for this and thanks for reporting the bug!

wagamama commented 12 years ago

It works!!!! Thank you very much and I like this idea.

mixu commented 12 years ago

Hi @wagamama,

If you happen to have some time, can you try out the current master? It should work now - I'm typing this from nwm within my Ubuntu 10.4 VM, but it would be nice to get confirmation that the fix worked. It seems that I had a scoping problem with the event data, which caused issue.

 git checkout master
 git reset --hard HEAD
 git pull
 rm -rf ./build
 node-waf configure build
wagamama commented 12 years ago

Hi @mixu,

I tried updated master branch and it works fine on my ubuntu 10.4. Hope this information helps you.

BTW I am just curious that why you decide using tiling layout instead of composite layout?

mixu commented 12 years ago

Awesome! I also tried with Fedora today, works.

I went with tiling because it is simpler to implement and I was already using a tiling window manager before. But I am thinking about doing something more graphical as an addon to nwm at some point...