Menu

#1157 fluxbox --replace BScreen error

v1.3.7
closed-invalid
nobody
None
5
2017-02-26
2017-02-01
No

Currently using Lubuntu 16.04, but I prefer Fluxbox as window manager. v.1.3.5 in ubuntu repos. I "switch" the LXDE window manager (OpenBox by default) in accordance with Arch Wiki suggestion, typing "fluxbox --replace" in terminal. Voila, Fluxbox works WONDERFULLY as an LXDE window manager. I have done the same with PekWM, so that I can switch WMs according to whim, but probably 90%+ of my time is spent using Fluxbox.

Looking to switch to Arch-based Manaro, which currently provides Fluxbox 1.3.7 as default package. However, installation of Flux 1.3.7 in Manjaro LXDE throws an error with the "fluxbox --replace" command, and Fluxbox WILL NOT start. Terminal output as follows:

[jim@manjaro ~]$ fluxbox --replace
BScreen::BScreen: an error occured while querying the X server.
another window manager already running on display:0.0
Error: Couldn't find screens to manage.
Make sure you don't have another window manager running.

"Naked" fluxbox, selected within LXDM, works just fine, Also worthy of note, invoking "pekwm --replace" and/or "openbox --replace" in a terminal works exactly as expected. Fluxbox is the only WM behaving in this manner.

I had considered this was a difference between Fluxbox 1.3.5 in Ubuntu vs 1.3.7 in Manjaro, until I realized that Arch also provides Fluxbox 1.3.7, which is the same source for the Arch Wiki suggestion to replace LXDE WM with "wm --replace":
https://wiki.archlinux.org/index.php/LXDE#Replace_Openbox

Any thoughts as to why Flux is the ONLY window manager of the three (Openbox, fluxbox, pekwm) to throw such an error on the SAME system? More importantly, any ideas how to address this issue? I'd really like to stick with Fluxbox, as it is nearly PERFECT for me! Thanks in advance for any suggestions offered!

Discussion

  • Mathias Gumz

    Mathias Gumz - 2017-02-01

    there is no --replace flag in fluxbox. never was. the unsupported flags are just ignored.

     
    • James Shriner

      James Shriner - 2017-02-01

      thanks for responding so quickly Mathias! same day, wow! I understand there is no --replace flag in fluxbox; that is a terminal flag. Relevant section of Arch Wiki as follows:

      Alternatively, you can autostart wm --replace using the method defined in #Lxsession where wm is the name of the window manager executable being started. This method does mean that Openbox will be started first on each login and will then immediately be replaced by the autostarted window manager.

      But that terminal flag works exactly as described by the Arch Wiki in Lubuntu 16.04, with Fluxbox 1.3.5; but fails miserably in Manjaro LXDE with Fluxbox 1.3.7. I'm trying to troubleshoot what is different, with Ubuntu vs. Manjaro being obvious; perhaps 2 different versions of LXDE (or perhaps implementation of the same LXDE); and with 2 different versions of Fluxbox also being obvious.

      From what you've described above, this may not be a Fluxbox issue, but it's a little above my pay-grade to say for certain. But Fluxbox is doing SOMETHING differently in Manjaro LXDE, as Openbox and PekWM can be switched out, exactly like I do in Lubuntu, while Fluxbox fails. Contrasted with Lubuntu, where all 3 are switched out interchangeably with no issues.

      This would seem to suggest to me that something has changed within fluxbox between 1.3.5 and 1.3.7; or something is different between the way Lubuntu/LXDE implements fluxbox and the way Manjaro/LXDE implements fluxbox.

      Google searching the terminal output error provides me no indications. Any thoughts on where to look next? Thanks in advance!

       
      • Mathias Gumz

        Mathias Gumz - 2017-02-01

        fluxbox does not implement what other windowmanagers implement (see openbox' source code in openbox/screen.c or pekwm in src/ManagerWindows.cc)

        so, when you are entering fluxbox --replace on the command line, nothing happens with the --replace stuff happens. fluxbox tries to get a hold on the x11-session and fails ("another window manager already running on display:0.0").

        you can switch from fluxbox to another window manager (or even just a pure xterm for that matter) from within fluxbox' menu and the "restart" options given there. this replaces the own process with the new process (window manager or xterm) and the xsession stays up and keeps running. but that is not the same as the --replace flag of other window managers do it.

        there was no change in that regard from official fluxbox, at least not that i am aware of ... maybe someone patched <distro-here-flavour-of-fluxbox>, but in vanilla upstream fluxbox there is no such code.

        sorry.

        i ll consider this ticket here as a feature request.

         
  • James Shriner

    James Shriner - 2017-02-01

    Excellent information Mathias. Not gonna lie...most of the technical jargon is over my head, but I understand the gist of what you're saying.

    But that begs the question "why does 'fluxbox --replace' work in Lubuntu"? Perhaps because Ubuntu patched their flavor of fluxbox 1.3.5?

    More importantly, the default method for LXDE sessions is to start the LXDE session --profile, with openbox as the default. While I have used the "restart window manager function" from root menu (switching on the fly), I have found it easier to allow LXDE start with its default Openbox configuration, but put @fluxbox --replace in the autostart section of LXsession; effectively starting LXDE with openbox, then IMMEDIATELY automatically switching over to fluxbox.

    If "fluxbox --replace" doesn't work in the Manjaro terminal, may I assume it won't work in the Manjaro LXDE autostart file invocation either?

    Lastly, I appreciate the ticket for a feature request. IMO, the current behavior of fluxbox is DIFFERENT than the Arch Wiki, which is a widely known, respected, and utilized resource. More importantly, the current behavior seems to "lag behind" Openbox & PekWM behaviors.

    FWIW, I have come to LOVE Fluxbox...to the point of preferring it over all others. But it wasn't always that way. I used to be an OpenBox user, but added Fluxbox as an option based on a blog that suggested it. That is where I learned the Arch Wiki instruction for "windowmanager --replace", and I started switching on the fly from OpenBox to Fluxbox. The more I used it, the more I learned about features/customizations, the more I grew to appreciate it. But based on what I've learned from you today, that NEVER would've happened if "windowmanager --replace" didn't work in Lubuntu.

    Please make this a feature in the next version of Fluxbox. It will bring Fluxbox behavior in compliance with the Arch Wiki representation; and it will bring it "on par" with OpenBox and PekWM behaviors. THANK YOU Mathias!

     
  • James Shriner

    James Shriner - 2017-02-07

    Would an offer to pay a BOUNTY ensure, or expedite, implementation of this feature?

     
  • Den Drix

    Den Drix - 2017-02-11

    I had considered this was a difference between Fluxbox 1.3.5 in Ubuntu vs 1.3.7 in Manjaro, until I realized that Arch also provides Fluxbox 1.3.7, which is the same source for the Arch Wiki suggestion to replace LXDE WM with "wm --replace":
    https://wiki.archlinux.org/index.php/LXDE#Replace_Openbox

    nowhere on that page does it say that this method would work with ALL windowmanagers, or even fluxbox explicitely.

    • M Gumz pointed out that a suitable method for fluxbox exists, if not in the exact shape you are demanding

    • lxde has a native option to replace the windowmanager, it is pointed out in the archwiki article, and a gui also exists: menu => preferences => desktop session settings => advanced. put fluxbox there, log out/in, done. i just tried it.

     

    Last edit: Den Drix 2017-02-11
  • James Shriner

    James Shriner - 2017-02-11

    THANK YOU for the reply Den Drix!

    Of course you are correct on items #1 and #2. But with respect to item #1, the converse is also true; nowhere on that page does it explicitly say that method works with "other window managers" EXCEPT fluxbox. Coupled with the fact this method DOES work in Lubuntu, I think my confusion/concern is valid. With respect to item #2, I do not believe I have demanded anything. I think I have been polite & professional. I have requested, perhaps begged a little, and offered to pay the man for his services in implementing a feature he himself indicates is currently missing from fluxbox but present in other box-like window managers. At best this is a bribe!

    I do sincerely appreciate item #3! FWIW, this is how I originally learned about "wm --replace" in the Arch Wiki. What you described DOES NOT work in Lubuntu without issue...it has adverse effects on workspaces and my Tint2 panel, and every issue I resolved just squeezed the bubble somewhere else. I believe this can be attributed to the way Lubuntu requires an item for "workspace_manager". So once again, the implementation is different between the distros and I would've never thought of trying this in Arch, with knowledge that it didn't work in Lubuntu. But we've already established that Lubuntu & Arch don't implement the same configurations, so this isn't a surprise.

    I simply want fluxbox to be the default window manager when I boot into my LXDE-based session; with the ability to switch to other WMs "on the fly", as Mathias Gumz pointed out. Your suggestion will absolutely work for me! Thanks for taking the time to share this knowledge and to confirm it works in a vanilla Arch/LXDE configuration!

     
  • James Shriner

    James Shriner - 2017-02-11

    EDIT
    That works PERFECTLY Den Drix! If this method had worked this slick in Lubuntu, I never would've learned about "wm --replace" in the first place. THANK YOU for the tip!!!

     
  • Mathias Gumz

    Mathias Gumz - 2017-02-19

    i did not answer for the lack of spare time, sooo ....

    adding the -replace feature you are asking too is not that complicated, the relevant code is easily spotable in pekwm, openbox etc. the main reason is just the lack of time (for myself, patches are welcome of coz), coupled with the lack of "need": at least i do not run a session-manager as the main process for my x11-session, i only run fluxbox there.

    just to give you a little understanding what the "--replace" thingy does:

    when the x11-server starts, it keeps running as long as xinit is happy (ftp://www.x.org/pub/X11R7.5/doc/man/man1/xinit.1.html or ftp://www.x.org/pub/X11R7.5/doc/man/man1/xdm.1.html#sect16 for a similar situation when coming from a Display Manager (think login-screen, which is the regular way of entering an x11-session for a long time now). once xinit is done ("When this first client exits, xinit will kill the X server and then terminate.") the x11-session terminates. as long as you keep that first xclient running, everything is fine. rough sequence:

    1. xserver comes up (it's already up in the display manager scenario)
    2. xinit (or the equivalent for display manager comes up) comes up
    3. xinit launches the first xclient and keeps up as long as that first xclient is running
    4. xclient terminates
    5. xserver shuts down (or brings you back to the display-manager aka shows you a new login-screen)

    in MY situation this is how it works: at 3. fluxbox is launched. as long as the fluxbox process keeps running, x11 keeps open. when i use the "restart" option from the fluxbox menu, i replace that process with some other windowmanager (or xterm or xeyes :)). since the process itself is still alive, the xserver won't shut down and i keep fluxboxing.

    in YOUR situation the first process is somehting called a "session manager". the SM then launches a window manager to handle the let-the-user-move-the-windows-around task. and since you can kill the windowmanager and fire up a different one, the "--replace" flag might be a good idea. technically it's some sort of "kill the old windowmanager (which might take some time), bring up the new one and telling it about that there might be still another wm around for a tiny fraction of time but please try to wait for the other to die and then you are new and shiny wm".

    since most people i know don't use a session-manager in combination with fluxbox, the use of "-replace" is rather small (allthough i understand the reason why one might to want this :)). the ability to exchange the windowmanager on the fly every 5 seconds is nothing i consider a worthwile workflow :)

     
  • James Shriner

    James Shriner - 2017-02-19

    Thanks for that detailed reply Mathias! I understand. And as far as implementation of the "--replace" flag, from a developer perspective, it makes perfect sense. From a user perspective, it's a bit inconvenient (but workable, with Den Drix' solution above) and makes Flux appear to be "less than" Openbox or PekWM. I like all 3, and each has their strong points, but Flux is my "chosen one". As a Flux fanboy, I'd like to see it get more "love" from other distros. It's not available (as a default) in many distros, so I discovered it by accident in Antix. As I learned more, I LOVED the supreme configurability, using plain english text...IMO, this is a HUGE advantage over Openbox, as well as a few additional features of personal taste (tabbed windows, ahem!). I often see folks lamenting that HTML syntax is a turn-off in Openbox, so they don't tweak things. As an LXDE/Lubuntu user, that got me thinking that Fluxobx would be a BETTER choice for WM in that distro! At first I logged into Flux session and autostarted the Lx tools I wanted, but as the list grew, I started to realize that I might as well utilize the LxSession and just switch the WM from within the session. The way Lubuntu implements LXDE sessions causes problems with Workspaces and Tint2 configs when I changed the WM from "openbox-lubuntu" to "fluxbox". Most folks would give up here and just accept that Openbox should not be changed; with a small disgruntled few proclaiming that "Fluxbox sucks". I was the former until I discovered the Arch Wiki suggestion to allow LxSession to autostart services with Openbox, with "fluxbox --replace" being the last service autostarted. THIS was the holy grail in Lubuntu that allowed Fluxbox to be the default WM in that distro! Without that piece of information, I seriously doubt that I would be the Fluxbox fan that I am today, preferring it over all others! And everyone is different, but IMO, more people would use (and choose!) Fluxbox if it were easily implemented. If you "bait the hook", you'll get more nibbles, IMO. Although maybe that isn't your goal.

    My frustration/confusion revolved around the fact that "difficult to obtain knowledge" (for me, at least) for my preferred Lubuntu, obtained from Arch; for some reason does not work within an Arch distro. As an Lubuntu user, I would never have become such a Fluxbox fan without that Arch information; but as an Arch user, I still would not likely have become a Fluxbox user/fan, as the Arch Wiki information does not apply.

    I'm sure you're correct that I'm a vast minority. But I see this as a chicken & egg proposition. Am I a minority user because so few people use the Display Manager/Fluxbox combination; or do so few people/distros use the Display Manager/Fluxbox combination because it's so inconsistent to implement? I don't know that answer. I simply believe that Fluxbox is an EXCELLENT WindowManager with an unparalleled feature set, and that more people/distros would choose it if they could simply try it out without working so hard to implement it. In that spirit, I would encourage you to implement the code for that feature, especially if its "not that complicated". This would provide consistency of Fluxbox implementation across the Linux landscape, and feature parity with Openbox & PekWM (the main competitors, IMO), allowing more folks to "try before you buy". JMO...

    Please don't misunderstand me...I'm not "demanding" anything. I simply want MY preferred window manager, Fluxbox, to be more easily accessible to other prospective users. Most developers pay meticulous attention to code, less so to GUI design, and even less to marketing. If I could code, I would develop and submit a code patch for you. But I lack that knowledge. All I can offer is GUI and marketing opinions.

    With all that said and explained, I'll defer to your judgement. It is YOUR project to develop, and I respect that. I "got mine", so I'm a happy camper (thank you Den Drix!). I hope that others can "get theirs" in the future, without having to work as hard as I did to discover how much better Fluxbox is than whatever they're currently using! Regardless of whatever you decide, THANK YOU for at least listening to this user's perspective!

     
  • Thomas Luebking

    Thomas Luebking - 2017-02-26
    • status: open --> closed-invalid
     
  • Thomas Luebking

    Thomas Luebking - 2017-02-26

    Lubutu might have patched this and not upstreamed the patch, technically there's no bug.
    Feature request for "--replace" functionality is https://sourceforge.net/p/fluxbox/feature-requests/160/

     

Log in to post a comment.