nedit-nc -tabbed no longer working

Hi Xmonadists I am a long-time fan of the -- unfortunately no longer maintained -- text editor that goes by the name of 'nedit'. Nedit is built on the Motif toolkit. Nedit can be run in client mode (the executable is named 'nc' in this case, for nedit client, on debian and some other systems called 'nedit-nc') meaning that it attaches to a running instance of nedit. If given the extra switch -tabbed, it will open another tab inside an already open nedit server session. Depending on a configuration setting, it starts a new server if none is found. A few xmonad-versions ago 'nedit-nc -tabbed' suddenly stopped working. Instead of opening the file as a new tab inside the running session, a new window is opened. If no session is already running, I get _two_ windows, one with the file I specified (on the command line) and one with a new file ('untitled'), which is quite annoying, especially in a tiling wm such as xmonad. There is, by the way, only one nedit-server session running, so the client mode works in principle, only the -tabbed mode is broken. This works fine under all other window managers I tried, including those of gnome, kde, xfce, and lxde. I tried anything I could think of to fix possible problems with my configuration but to no avail. I gave up then and went back to using kde when programming. But I am missing xmonad very much and would really like to go back to using it, so I finally decided to report this as a bug. I think the nedit client mode utilizes some X11 feature for communicating between processes over the X11 protocol, but I have no intimate knowledge of X11, so I can't tell for sure. BTW, most linux distributions still offer nedit as a package, if yours does not the latest sources (from 2005) are available from the nedit.org site. I would be extremely happy and thankful if someone finds a solution for this problem so I could again use my favourite window manager *and* my favourite text editor together. BTW, I am currently on a 64 bit amd running debian testing. Cheers Ben

On Mon, Apr 2, 2012 at 11:43, Ben Franksen
A few xmonad-versions ago 'nedit-nc -tabbed' suddenly stopped working. Instead of opening the file as a new tab inside the running session, a new window is opened. If no session is already running, I get _two_ windows, one with the file I specified (on the command line) and one with a new file ('untitled'), which is quite annoying, especially in a tiling wm such as xmonad.
I don't quite understand this claim... the most recent release was 0.10.0, and before that 0.9.2 which was close to a year older, and before that 0.9.1 which was close to *two years* earlier. I will also note that xmonad cannot normally affect the communications channel between the nc client and server, which presumably is a root window property as is done by most X11-based programs. It can *read* the property, it could even remove it itself if someone wrote the code to do so, but even then there would be a race condition between it and the server and the server would often win the race. -- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms

Brandon Allbery wrote:
On Mon, Apr 2, 2012 at 11:43, Ben Franksen
wrote: A few xmonad-versions ago 'nedit-nc -tabbed' suddenly stopped working. Instead of opening the file as a new tab inside the running session, a new window is opened. If no session is already running, I get _two_ windows, one with the file I specified (on the command line) and one with a new file ('untitled'), which is quite annoying, especially in a tiling wm such as xmonad.
I don't quite understand this claim... the most recent release was 0.10.0, and before that 0.9.2 which was close to a year older, and before that 0.9.1 which was close to *two years* earlier.
It is long ago. Could be a year or longer, maybe even 2 years.
I will also note that xmonad cannot normally affect the communications channel between the nc client and server, which presumably is a root window property as is done by most X11-based programs. It can *read* the property, it could even remove it itself if someone wrote the code to do so, but even then there would be a race condition between it and the server and the server would often win the race.
The communication via properties of the root window (which is indeed what nedit does to talk to the server) works fine. I did some printf debugging with nedit and actually found the problem (yay): Nedit expects its own windows to have a property _NET_WM_DESKTOP of type CARDINAL. This is the desktop number. But xmonad does not set that property. Whereas under e.g. kde, I get (on the first desktop): ben@sarun[1]: .../deb/hacking > xprop | grep _NET_WM_DESKTOP _NET_WM_DESKTOP(CARDINAL) = 0 So, here is my next question: is this a property that the wm should set? This page: http://standards.freedesktop.org/wm-spec/wm-spec-latest.html#id2577925 seems to say so. Cheers Ben

Ben Franksen wrote:
Brandon Allbery wrote:
On Mon, Apr 2, 2012 at 11:43, Ben Franksen
wrote: A few xmonad-versions ago 'nedit-nc -tabbed' suddenly stopped working. Instead of opening the file as a new tab inside the running session, a new window is opened. If no session is already running, I get _two_ windows, one with the file I specified (on the command line) and one with a new file ('untitled'), which is quite annoying, especially in a tiling wm such as xmonad.
I don't quite understand this claim... the most recent release was 0.10.0, and before that 0.9.2 which was close to a year older, and before that 0.9.1 which was close to *two years* earlier.
It is long ago. Could be a year or longer, maybe even 2 years.
I will also note that xmonad cannot normally affect the communications channel between the nc client and server, which presumably is a root window property as is done by most X11-based programs. It can *read* the property, it could even remove it itself if someone wrote the code to do so, but even then there would be a race condition between it and the server and the server would often win the race.
The communication via properties of the root window (which is indeed what nedit does to talk to the server) works fine.
I did some printf debugging with nedit and actually found the problem (yay):
Nedit expects its own windows to have a property _NET_WM_DESKTOP of type CARDINAL. This is the desktop number. But xmonad does not set that property. Whereas under e.g. kde, I get (on the first desktop):
ben@sarun[1]: .../deb/hacking > xprop | grep _NET_WM_DESKTOP _NET_WM_DESKTOP(CARDINAL) = 0
So, here is my next question: is this a property that the wm should set?
This page:
http://standards.freedesktop.org/wm-spec/wm-spec-latest.html#id2577925
seems to say so.
I see now that there is XMonad.Hooks.EwmhDesktops in xmonad-contrib to support "Extended Window Manager Hints", of which _NET_WM_DESKTOP is one. Will try this and report back. Cheers Ben

Ben Franksen wrote:
I see now that there is XMonad.Hooks.EwmhDesktops in xmonad-contrib to support "Extended Window Manager Hints", of which _NET_WM_DESKTOP is one. Will try this and report back.
Using this module from xmonad-contrib indeed did the trick. Yippee! Cheers Ben
participants (2)
-
Ben Franksen
-
Brandon Allbery