Author Topic: OpenBox screen color  (Read 2588 times)

Online Yankee

  • Hero Member
  • *****
  • Posts: 1483
  • In theory, theory=practice, in practice ???
OpenBox screen color
« on: April 14, 2012, 01:05:00 PM »

Hi,

When PCManFM is not used as desktop manager,
where does one change the screen color from #303030
to another color at boot.

THX.
ASUS EeePc 900HA netbook  1.6 Ghz Atom CPU  1GB RAM
160 GB internal HD    Seagate 250 GB USB portable drive 
Intel ‎Mobile 945GSE Integrated Graphics Controller
Atheros AR242x/AR542x Wireless Network Adapter
Intel (N10/ICH7 Family) High Definition Audio
Dynex 5-Button Wired Optical Mouse
LXDE

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: OpenBox screen color
« Reply #1 on: April 14, 2012, 01:19:45 PM »
Hi,

Do you mean the background color ? The root background (X) doesn't have a color, it's grayish, depending on the (hardware) screen. If you want feh to manage the background, in order to have a light component, you could make a background of your own with gimp, pick the color you want, and add this wall to the path in the feh command line of the autostart.sh file under ~/.config/openbox.

Does this help you ? Or is it not this one screen you were talking about ?

Regards,
Mélodie

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Online Yankee

  • Hero Member
  • *****
  • Posts: 1483
  • In theory, theory=practice, in practice ???
Re: OpenBox screen color
« Reply #2 on: April 14, 2012, 01:37:07 PM »
Hi,

Do you mean the background color ? The root background (X) doesn't have a color, it's grayish, depending on the (hardware) screen. If you want feh to manage the background, in order to have a light component, you could make a background of your own with gimp, pick the color you want, and add this wall to the path in the feh command line of the autostart.sh file under ~/.config/openbox.

Does this help you ? Or is it not this one screen you were talking about ?

Regards,
Mélodie



Hi,

In usr/lib/openbox-autostart there is a BG="" script which addresses the
background color, except I can't find a place to properly run it.    I've run it
in etc/xdg/openbox/autostart.sh but it doesn't work there on Bonsai.

Code: [Select]
#!/bin/sh

# Set a background color
BG=""
if which hsetroot >/dev/null; then
  BG=hsetroot
elif which esetroot >/dev/null; then
  BG=esetroot
elif which xsetroot >/dev/null; then
  BG=xsetroot
fi
test -z $BG || $BG -solid "#000000"

The last line was #303030 so I changed it to #000000.

I've tried several places to put it with no success.   Where
would you run it from ?

THX.
ASUS EeePc 900HA netbook  1.6 Ghz Atom CPU  1GB RAM
160 GB internal HD    Seagate 250 GB USB portable drive 
Intel ‎Mobile 945GSE Integrated Graphics Controller
Atheros AR242x/AR542x Wireless Network Adapter
Intel (N10/ICH7 Family) High Definition Audio
Dynex 5-Button Wired Optical Mouse
LXDE

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: OpenBox screen color
« Reply #3 on: April 14, 2012, 02:37:23 PM »
Hi,
I would run it from the home of the user. This is the proper place to overwrite the general configurations.

;)

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Online Yankee

  • Hero Member
  • *****
  • Posts: 1483
  • In theory, theory=practice, in practice ???
Re: OpenBox screen color
« Reply #4 on: April 14, 2012, 02:57:17 PM »
Hi,
I would run it from the home of the user. This is the proper place to overwrite the general configurations.

;)


Well it works but when I hit the menu the grey color reappears.
I run this in my other OpenBox but always in /etc somewhere.
Any other place in /etc that's available.

THX.
ASUS EeePc 900HA netbook  1.6 Ghz Atom CPU  1GB RAM
160 GB internal HD    Seagate 250 GB USB portable drive 
Intel ‎Mobile 945GSE Integrated Graphics Controller
Atheros AR242x/AR542x Wireless Network Adapter
Intel (N10/ICH7 Family) High Definition Audio
Dynex 5-Button Wired Optical Mouse
LXDE

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: OpenBox screen color
« Reply #5 on: April 14, 2012, 03:25:20 PM »
Hi,

Which menu ?

You should not setup colors for users (you or other users) else than in your home (AND in /etc/skel if you want these configurations for all new users created).

http://www.colorschemer.com/online.html

the #303030 is almost black...

I don't understand what becomes grey...

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Online Yankee

  • Hero Member
  • *****
  • Posts: 1483
  • In theory, theory=practice, in practice ???
Re: OpenBox screen color
« Reply #6 on: April 14, 2012, 04:26:12 PM »
Hi,

Which menu ?

You should not setup colors for users (you or other users) else than in your home (AND in /etc/skel if you want these configurations for all new users created).

http://www.colorschemer.com/online.html

the #303030 is almost black...

I don't understand what becomes grey...




When I put the BG script in my home it works, the right click
menu starts turning the #303030 color back on however.

I suspect it has to run when OpenBox starts to be permanently
global, which is what it does on my other OpenBox.  

Where could I run it other than /home or /root  ?
« Last Edit: April 14, 2012, 04:32:57 PM by Ferdes Fides »
ASUS EeePc 900HA netbook  1.6 Ghz Atom CPU  1GB RAM
160 GB internal HD    Seagate 250 GB USB portable drive 
Intel ‎Mobile 945GSE Integrated Graphics Controller
Atheros AR242x/AR542x Wireless Network Adapter
Intel (N10/ICH7 Family) High Definition Audio
Dynex 5-Button Wired Optical Mouse
LXDE

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: OpenBox screen color
« Reply #7 on: April 15, 2012, 09:09:48 AM »
When I put the BG script in my home it works, the right click
menu starts turning the #303030 color back on however.

Hi,
If I could understand you I might be able to help.

* about right-click menu : when I right-click to get the menu, the menu has the colors brought by the GTK theme configured, which you can get either by editing ~/.gtkrc-2.0 file or better, ~/.gtkrc-2.0.mine which should be called from ~/.gtkrc-2.0 with an "include" line.
example:
Code: [Select]
include "/home/melodie/.gtkrc-2.0.mine"
or you can modify the ~/.gtkrc-2.0 file by using Lxappearance.

Quote
I suspect it has to run when OpenBox starts to be permanently
global, which is what it does on my other OpenBox.

Sorry, this does not make sense to me. What do you mean with "permanently global" ?

Quote
Where could I run it other than /home or /root  ?

as I said above : nowhere else. What result are you trying to get ? This is the main point. If I understand what you have and what you try to get instead of what you have, maybe I could suggest something.

Can you also paste your full script here, or to pastebin if it is too long, and provide the link ? What program did you install which installs this script ?

PS: I just looked at the openbox-autostart script in /usr/lib and I might have a start of answer for you. I am not too good at reading bash yet, but look at these two lines:
Code: [Select]
GLOBALAUTOSTART="/etc/xdg/openbox/autostart"
AUTOSTART="${XDG_CONFIG_HOME:-"$HOME/.config"}/openbox/autostart"

The last file read is the autostart in your home. This file is the one which takes over the other ones. Does that clarify ?



« Last Edit: April 15, 2012, 09:14:33 AM by melodie »
melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Online Yankee

  • Hero Member
  • *****
  • Posts: 1483
  • In theory, theory=practice, in practice ???
Re: OpenBox screen color
« Reply #8 on: April 15, 2012, 02:22:47 PM »
What result are you trying to get ? This is the main point. If I understand what you have and what you try to get instead of what you have, maybe I could suggest something.

1) During boot the grey default screen color actually flickers before displaying
the user selected wallpaper.

2) When switching users the grey default screen also flickers on and off before displaying
the root or user selected wallpaper.

3) If I comment out PCManFM as the desktop manager and not use feh the grey color appears.

This is the only script I have:
Code: [Select]
#!/bin/sh

# Set a background color
BG=""
if which hsetroot >/dev/null; then
  BG=hsetroot
elif which esetroot >/dev/null; then
  BG=esetroot
elif which xsetroot >/dev/null; then
  BG=xsetroot
fi
test -z $BG || $BG -solid "#000000"

4) I've run it successfully in etc/xdg/openbox/autostart.sh on a different OpenBox distro
with 100% success turning the OpenBox default screen black forever.   Now with PCL Openbox
you said we cannot run it there.   Fine.

It must not be the right script to run in /root or /home for openbox/autostart.sh because
it doesn't work 100% there.   It renders a black screen but turns grey again with usage.
All the other themes, colors, fonts, etc. are working OK when set OK.

Not a major problem but I thought it would be nice to learn how to do so and reduce some
some screen flicker at the same time.

regards,

Ferdes

ASUS EeePc 900HA netbook  1.6 Ghz Atom CPU  1GB RAM
160 GB internal HD    Seagate 250 GB USB portable drive 
Intel ‎Mobile 945GSE Integrated Graphics Controller
Atheros AR242x/AR542x Wireless Network Adapter
Intel (N10/ICH7 Family) High Definition Audio
Dynex 5-Button Wired Optical Mouse
LXDE

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: OpenBox screen color
« Reply #9 on: April 15, 2012, 03:30:03 PM »
Hi Ferdes Fides,
Quote
$ pwd
/etc/xdg/openbox
$ ls -l
total 44
-rwxr-xr-x 1 root root   453 août  30  2011 autostart*
-rwxr-xr-x 1 root root   379 août  30  2011 environment*
-rw-r--r-- 1 root root  9617 août  30  2011 menu.xml
-rw-r--r-- 1 root root 23366 août  30  2011 rc.xml
$

Try renaming the autostart.sh which is in your home (.config/openbox) to autostart, copy your piece of script there. (Try copying it at the beginning, just under the polkit authentication lines, before the #Desktop)

If this does not help, I'll ask someone else I know for having some knowledge about the root window (the grey screen is the lower layer of the desktop).

Regards,
Mélodie

PS:

Code: [Select]
$ apt-cache search hsetroot
$ apt-cache search esetroot
$ apt-cache search xsetroot
xsetroot - Root window parameter setting utility for X
$
We have only xsetroot available in the repositories. Do you have it installed into your system ?

« Last Edit: April 15, 2012, 03:38:13 PM by melodie »
melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: OpenBox screen color
« Reply #10 on: April 15, 2012, 05:07:54 PM »
Hi,
I do have another idea.

If you still use GDM as a login manager, in a user console type "dbus-launch gdmsetup". You will be prompted for the root password. Then in the window go to the tab "Local" and there under the different choices for a theme image, you will see "Background color". Just for a test, try red. If that works, you can go back there and use plain black. This might work. The settings which are changed in that one window are saved to the file /etc/X11/gdm/custom.conf.

Regards,
Mélodie

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Online Yankee

  • Hero Member
  • *****
  • Posts: 1483
  • In theory, theory=practice, in practice ???
Re: OpenBox screen color
« Reply #11 on: April 20, 2012, 02:24:03 PM »

We have only xsetroot available in the repositories. Do you have it installed into your system ?


Yes, and it sure should work, thru an init script, in root, or user autostart.sh

I'm thinking possibly a library is missing for xsetroot.

Tried it every which way and the screen still doesn't set 100% and has that
flicker from that default color when changing users and during boot.

thanks for the response.

Patrick
ASUS EeePc 900HA netbook  1.6 Ghz Atom CPU  1GB RAM
160 GB internal HD    Seagate 250 GB USB portable drive 
Intel ‎Mobile 945GSE Integrated Graphics Controller
Atheros AR242x/AR542x Wireless Network Adapter
Intel (N10/ICH7 Family) High Definition Audio
Dynex 5-Button Wired Optical Mouse
LXDE

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: OpenBox screen color
« Reply #12 on: April 20, 2012, 05:50:42 PM »
Yes, and it sure should work, thru an init script, in root, or user autostart.sh

I'm thinking possibly a library is missing for xsetroot.

Tried it every which way and the screen still doesn't set 100% and has that
flicker from that default color when changing users and during boot.

thanks for the response.

Patrick

Hi,

I don't know if something is missing to xsetroot ? Have you tried what I suggested with the gdmsetup tool ?

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Online Yankee

  • Hero Member
  • *****
  • Posts: 1483
  • In theory, theory=practice, in practice ???
Re: OpenBox screen color
« Reply #13 on: April 22, 2012, 09:35:36 PM »

I don't know if something is missing to xsetroot ? Have you tried what I suggested with the gdmsetup tool ?


gdmsetup - turns the screen red momentarily then boots and goes
to the user setting.

I got xsetroot -bg "#000000" to run as user in autostart but it wouldn't
run correctly with tint.   Left tint a silvery color.   LXPanel it ran OK.

It makes LXDE flicker during boot also, that default silver color.

regards,

FF
ASUS EeePc 900HA netbook  1.6 Ghz Atom CPU  1GB RAM
160 GB internal HD    Seagate 250 GB USB portable drive 
Intel ‎Mobile 945GSE Integrated Graphics Controller
Atheros AR242x/AR542x Wireless Network Adapter
Intel (N10/ICH7 Family) High Definition Audio
Dynex 5-Button Wired Optical Mouse
LXDE