BunsenLabs / bunsen-utilities

https://pkg.bunsenlabs.org/debian/pool/main/b/bunsen-utilities/
GNU General Public License v3.0
30 stars 21 forks source link

bl-obthemes: function countMonitors() fails if no primary monitor is set #30

Closed capn-damo closed 5 years ago

capn-damo commented 8 years ago

Situation: on a new install with dual monitors, but before setting the screen layout with arandr/xrandr. What happens: bl-obthemes doesn't start, with the error

/usr/bin/bl-obthemes: line 200: / 3 : syntax error: operand expected (error token is "/ 3 ")

  Error= 255

In function countMonitors() is PRIMARY=$(xrandr -q | awk '/ connected/ {if ($3=="primary") print $4}') but there is no "primary" field found.

Setting --primary specifically with xrandr results in bl-obthemes running OK.

Quick workaround: get a monitor dimension (which may not be the desired one) by changing line #180 to PRIMARY=$(xrandr -q | awk '/ connected/ {if ($3=="primary") print $4;else print $3}')

ToDo: test for "main" monitor - either the largest, or the one at +0+0?

hhhorb commented 8 years ago

Great catch, Jean.

johnraff commented 8 years ago

That top post appears to be from @capn-damo , but certainly looks like something from xaosfiftytwo. I now see he isn't in the BunsenLabs membership, so I've just sent him an invitation.

@capn-damo do you have a time-scale on when that fix might arrive in bunsen-utilities? Does it look like a showstopper that should go in before the packages are built for RC2?

capn-damo commented 8 years ago

It was me that spotted the bug. New install with 2 monitors, and the desktop on each, ie no configuration yet.

Changing that line fixed it, but that is just a quick workaround. I haven't been able to test any more today, and may be AFK tomorrow as well. I suspect the --primary parameter was added by nvidia-xconfig originally, and that was the setup I had been developing on.

I hope to have a better test for monitors in the test function, to cover more eventualities, in the next couple of days.

Presumably it isn't a show-stopper, because no-one has yet mentioned bl-obthemes failing to start (to my knowledge). I can push a change to that single line immediately if things are being held up?

That top post appears to be from @capn-damo , but certainly looks like something from xaosfiftytwo.

You've made my day :)

hhhorb commented 8 years ago

Lol, sorry damo, I must have had 2 tabs open!

Great catch, damo!

johnraff commented 8 years ago

Noticed xaos wasn't registered or something when the username autocomplete didn't work.

I was hoping to get all the packages tidied up today for @2ion to build ( @hhhorb has been breathing down my neck ) but @capn-damo as you say, no-one has posted a bug so can we leave this fix to after RC2? (ie it will be fixed when we announce the Actual Release)

hhhorb commented 8 years ago

hhhorb has been breathing down my neck

Lol, sorry John!

capn-damo commented 8 years ago

@johnraff

OK. I'll start working on it in a new branch though, but leave master as it is for now.

johnraff commented 8 years ago

^cool.

btw github packages are now ready for building: https://github.com/2ion/bunsen-org/issues/131

xaosfiftytwo commented 8 years ago

stop flattering me, guys, esp for sth I did not do. :) I have some free time this week. Will have a look at the script.

hhhorb commented 8 years ago

stop flattering me, guys

My sarcasm gaskets couldn't handle the levels, they all blew. Thank goodness.

-edit- ^Writing this, I thought it was a gentle nudge at Jean. Reading it, I thought "You DICK!" (<--Me. btw)

xaosfiftytwo commented 8 years ago

Ahaa. Foud a method to remove a pull request. You will have noticed that the pr I filed a couple days ago has vanished into thin air. (Alas all comments on it are gone as well) I would not recommend this to anyone, except as a last resort.

By recreating the master branch in my private repo xaisiftytwo/bunsen-utilities, making it a copy of Bunsenlabs/bunsen-utilities, all references to the pull request are gone.

I am sure there are better methods to do this, but I had a commit for bl-exit in my private repo from october 8th, that was never merged with the main repo, but that was included with any pull request. That problem in bl-exit was solved by Jente.

I will post a new request with a solution for the bug in countMonitors shortly.

Jean

johnraff commented 8 years ago

Has that fix now been comitted? If so we can close this issue.

capn-damo commented 8 years ago

We have been using my workaround: https://github.com/BunsenLabs/bunsen-utilities/issues/30#issue-128412269

The whole multi-monitor/xinerama issue needs work though. There are similar problems dealing with monitors in the bl-exit/merlin branch.

johnraff commented 8 years ago

OK so we'll keep this open. I've assigned @xaosfiftytwo and @capn-damo to this, but feel free to remove yourselves if you like!

johnraff commented 7 years ago

The whole multi-monitor/xinerama issue needs work though. There are similar problems dealing with monitors in the bl-exit/merlin branch.

Has this been done? Can we close this?

johnraff commented 5 years ago

Closing this issue and labelling "wontfix", as the original authors are now inaccessible, and no further reports have come in.