viges / obkey

Automatically exported from code.google.com/p/obkey
Other
0 stars 0 forks source link

openbox is not rebooted or forced to load configuration #6

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Press "Save" in obkeys
2.
3.

What is the expected output? What do you see instead?
It should reconfigure openbox, but it does not

What version of the product are you using? On what operating system?
Ubuntu + lxde

Please provide any additional information below.
I think the problem is in obkey_classes.py last function should be (I think) 
just:
os.system( "openbox --reconfigure" )

Original issue reported on code.google.com by baltasarq on 29 Nov 2010 at 3:55

GoogleCodeExporter commented 8 years ago
It sends a singal to openbox. Works on my setup. I took a snippet for that from 
obmenu. 

See the last function in a file obkey_classes.py. If you can investigate why it 
doesn't work for you, please do it.

Original comment by no.smile...@gmail.com on 29 Nov 2010 at 6:45

GoogleCodeExporter commented 8 years ago
Okay, found the answer:

==
>>> l2 = [l for l in lines if "openbox" in l]
>>> l2
['1000      1540  0.0  0.2  15120  8756 ?        S    Nov18   0:52 openbox 
--confi']
>>> ob
'/usr/bin/openbox'
>>> l2 = [l for l in lines if ob in l]
>>> l2
[]
==

As you can see, your hack is not going to work, at least in a system using 
ubuntu with lxde. Probably slightly different configurations.

> I took a snippet for that from obmenu.

Then I guess obmenu would be equally flawed in my system (though I haven't used 
it).

Anyway, this is an unnecessarily complex. Just do:

os.system("openbox --reconfigure")

And that's all.
I've changed it in my local copy, and it works perfectly now.

Original comment by baltasarq on 30 Nov 2010 at 10:43

GoogleCodeExporter commented 8 years ago
Sounds reasonable, applied in commit f27fe38.

Original comment by no.smile...@gmail.com on 30 Nov 2010 at 10:58