LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Background for LXDM and in Fluxbox (https://www.linuxquestions.org/questions/linux-desktop-74/background-for-lxdm-and-in-fluxbox-4175477880/)

RAFAL 09-20-2013 10:18 AM

Background for LXDM and in Fluxbox
 
Hello
I have very strange issue which I do not know how to solve. It looks like a bug, but before I report anything I would like to check what you guys think about it.

System: openSUSE 12.3 32 bit
It runs on my small ZBOX PC.

First of all, I have adjusted my xorg config. I have edited the files in the directory /etc/X11/xorg.conf.d/. I have added new modeline in 50-monitor.conf
Code:

Modeline "1280x800_75.00" 106.50 1280 1360 1488 1696  800 803 809 838 -hsync +vsync
As next I changed my 50-screen.conf:

Code:

Section "Screen"
  Identifier "Default Screen"
  SubSection "Display"
    Depth 24
    Modes "1280x800"
  EndSubSection
EndSection

Both files were originally empty. I have added the entries, because when I used LXDM with LXDE , every time when I saw log in screen it was resolution: 800x600. A little bit annoying.

As a result of this when I see logon screen , it is not display on the whole screen. Around 15-20% of it is black (it is on the bottom).
I do not know why.

As next I have change from LXDE to FLUXBOX (I am running this Linux on ZBOX, so it is not very powerful PC).
Here I see something similar: when I set background like this:
Code:

fbsetbg -f /home/rafal/mypicture.jpg
I observe the same behavior like for logon screen (LXDM).

I have changed DISPLAYMANGER from LXDM to XDM. Now the logon screen is fine (in resolution 1280x800). It takes whole screen.

When I log in to FLUXBOX and change background with this command:
Code:

fbsetbg -f /home/rafal/mypicture.jpg
...then again I have issue. Around 80% takes mypicture.jpg and 20% part of mypicture.jpg. It looks like two pictures - one on the other (on this 20% of the screen, I see only part of mypicture.jpg).

Ok...now I tried this:
Code:

display -window root /home/rafal/mypicture.jpg
and it works perfectly! I see the background as I want (whole screen).

The resolution of this example file (mypicture.jpg) is exactly 1280x800 (the same as screen resolution).

What can be an issue here ?
Any ideas?

regards
Rafal

Pap 09-20-2013 05:25 PM

Technically, drawing the background was never window manager's job. The display command you used is actually part of the Imagemagick graphics suite, which is present in virtually every Linux machine...

It sounds like a display manager issue to me. I never used LXDM myself, but had similar issues with gdm3 (and that was actually the reason I decided to switch to something simpler, namely Slim.)

RAFAL 09-21-2013 02:40 AM

Hi,
Thanks for reply.
This is not display manager issue. I think that rather issue with the tool used by LXDM.As I wrote "I have changed DISPLAYMANGER from LXDM to XDM." Now - using XDM with fluxbox I have exactly the same issue with a command:

Code:

fbsetbg -f /home/rafal/mypicture.jpg
my workaround is to use:
Code:

display -window root /home/rafal/mypicture.jpg
Another workaround I will try will be to customize XDM (when I log in to fluxbox I see the same background as on logon screen).
regards
Rafal

Pap 09-21-2013 04:07 AM

Quote:

Originally Posted by RAFAL (Post 5031879)
my workaround is to use:
Code:

display -window root /home/rafal/mypicture.jpg

Like I said, setting the background is technically not window manager's job. Even if fluxbox provides a command to do this, fbsetbg, that's essentially a wrapper that tries to find a suitable background-setting application and tries to set the wallpaper using that application; if you have more than one suitable applications for that, fbsetbg picks the first one it finds. So your workaround using the display command is not actually a workaround: instead of letting fbsetbg to pick a wallpaper setting application, you pick one yourself, in this case display.

Where exactly you put that fbsetbg or the display command you posted? Also, what
Code:

fbsetbg -i
says?

RAFAL 09-21-2013 04:13 AM

another interesting observation:
When I use "maximize window" button (ie. for Firefox) it takes exactly the same area of the window as background set with fbsetbg. any ideas ?

RAFAL 09-21-2013 04:16 AM

Hi,
here is the outcome
Code:

rafal@zbox:~> fbsetbg -i
wmsetbg is a nice wallpapersetter. You won't have any problems.

At the moment I execute both commands using gnome-terminal (I am using it because I do not like that much standard terminal).

I do not know it this plays any role but when I use fbsetbg in xterm following warning is displayed:
wmsetbg(getValueForKey(wmsetbg.c:1001)): warning: could not open domain file /home/rafal/GNUstep/Defaults/WindowMaker

regards
Rafal

Pap 09-21-2013 05:03 AM

Quote:

Originally Posted by RAFAL (Post 5031920)
here is the outcome
Code:

rafal@zbox:~> fbsetbg -i
wmsetbg is a nice wallpapersetter. You won't have any problems.


So, in your case fbsetbg is actually a wrapper for WindowMaker's wmsetbg application.

Quote:

Originally Posted by RAFAL (Post 5031920)
At the moment I execute both commands using gnome-terminal (I am using it because I do not like that much standard terminal)

To make your wallpaper permanent, you have to follow the guidelines documented here. You basically have two options:
  1. Modify your ~/.fluxbox/overlay file, then use fbsetbg or display once (it should remember your setting each time you login after that.) Details on how to do that are in sections "Setting the Wallpaper on Startup" and "Setting the Wallpaper on Startup, another way" in said link.
  2. Put background definition in your style, if you use a custom one (you should, in my opinion, to make fluxbox look the way you want.) See the "Setting the background in a style" section in said link. This will involve further reading on how to customize a fluxbox style, but the result would be a look exactly as you want it; for quick results, you may also pick a ready-made style, usually found in /usr/share/fluxbox/styles. To avoid complications, pick a simple style for now, copy it in your ~/.fluxbox/styles folder, and modify it adding background settings; select that style in fluxbox's menu, logout fluxbox and relog. It should work now.

Once any of the above is done, tell us if maximizing a window works as expected now.

Pap 09-21-2013 05:18 AM

Quote:

Originally Posted by RAFAL (Post 5031920)
I do not know it this plays any role but when I use fbsetbg in xterm following warning is displayed:
wmsetbg(getValueForKey(wmsetbg.c:1001)): warning: could not open domain file /home/rafal/GNUstep/Defaults/WindowMaker

Of course it is important! Like I said, in your case fbsetbg is just a wrapper that simply picks the first background setting application it finds, and uses that one to do the job. In your case, it uses wmsetbg, which is a small program coming with another window manager, namely WindowMaker. Now, wmsetbg should work on fluxbox too, but in order to work, it needs to know some information about your WindowMaker settings; all these settings are stored in ~/GNUstep. My guess is you never tried to use WindowMaker itself, although it is somehow installed in your system, so wmsetbg complains it cannot find essential information. The fast way to fix the error you get is to use WindowMaker as your window manager once. This will create the missing folder ~/GNUstep, and set default settings in it. After that, logout WindowMaker, try fluxbox again, and fbsetbg should work.

PS: if something goes wrong, always use a terminal to enter the command that doesn't work as expected, otherwise you won't see any error message it reports, like the above one.

RAFAL 09-21-2013 06:00 AM

I have edited /etc/sysconfig/windowmanager and set there "WindowMaker" instead of "fluxbox".
I log in into "WindowMaker". Afterwords I set "fluxbox" as my window manager.
Now in xterm I do not see any warnings when I use fbsetbg , but my original issue is not solved.

I have checked ~/.fluxbox/overlay. I saw there following:
Code:

! The following line will prevent styles from setting the background.
! background: none

In bash "#" means comment...so here I guess it is "!". In order to be sure I deleted both lines.
I have also checked ~/.fluxbox/lastwallpaper.

Code:

rafal@zbox:~/.fluxbox> cat  ~/.fluxbox/lastwallpaper
$full $full|/home/rafal/wyglad/LINUX-obrazki/wp2_ver4_1280x800.jpg||:0
$full $full|/home/rafal/wyglad/LINUX-obrazki/wp2_ver4_1280x800.jpg||:0.0

It shows me exactly the files I used in fbsetbg.

Can it be that I have general issue with FLUXBOX ? I installed it from http://software.opensuse.org/package/fluxbox
It is marked as "unstable". Maybe I should compile it by myself ?

What I have tried now is lxrandr. In FluxBox I executed this program few times.
I have set resolution to 1280x768.
I have changed it back to 1280x800...and now I tried with another wallpaper. It is using whole screen. No issue! Maximalizing Firefox takes as well whole screen.
lxrandr is used in LXDE. When I worked with LXDE I have always seen logon screen (LXDM) in resolution 800x600, but when i log in I had what I wanted and set in lxrandr.

Pap 09-21-2013 07:17 AM

Quote:

Originally Posted by RAFAL (Post 5031949)
I have edited /etc/sysconfig/windowmanager and set there "WindowMaker" instead of "fluxbox".
I log in into "WindowMaker". Afterwords I set "fluxbox" as my window manager.
Now in xterm I do not see any warnings when I use fbsetbg , but my original issue is not solved.

It is as I guessed then, fbsetbg didn't work before because it tries to run wbsetbg internally, and wbsetbg could not find valuable info in order to work, because ~/GNUStep folder was not there.

Quote:

Originally Posted by RAFAL (Post 5031949)
I have checked ~/.fluxbox/overlay. I saw there following:
Code:

! The following line will prevent styles from setting the background.
! background: none

In bash "#" means comment...so here I guess it is "!". In order to be sure I deleted both lines.
I have also checked ~/.fluxbox/lastwallpaper.

Yes, "!" is the comment mark in fluxbox's configuration files. You should not delete the "background: none" line though; you should uncomment it, save the file, then run fbsetbg. Or you should add background settings in that file, or you should do the same in your custom fluxbox style, as I explained in a previous post. Either of those methods should work. I doubt it is a fluxbox issue.

Quote:

Originally Posted by RAFAL (Post 5031949)
What I have tried now is lxrandr. In FluxBox I executed this program few times.
I have set resolution to 1280x768.
I have changed it back to 1280x800...and now I tried with another wallpaper. It is using whole screen. No issue! Maximalizing Firefox takes as well whole screen.
lxrandr is used in LXDE. When I worked with LXDE I have always seen logon screen (LXDM) in resolution 800x600, but when i log in I had what I wanted and set in lxrandr.

lxrandr is used to set screen resolution and external monitors, not to set the background. Just right click on desktop and select "Desktop Preferences" to set the background permanently. If you don't see "Desktop Preferences" in the popup menu, default LXDE settings in OpenSuSE are probably different that expected, so you will need to edit ~/.config/lxsession/LXDE so that it reads
Code:

@pcmanfm --desktop --profile LXDE
(don't touch any other lines in the file.) This basically sets up LXDE's default file manager, pcmanfm, which is responsible for setting the background.
See this LQ thread for more details; it is 3 years old but still has valuable information.

RAFAL 09-22-2013 01:59 AM

Hello,
I know that lxrandr is used to set screen resolution and external monitors ;-) But since changes in this tool affect fbsetbg I did another testing.

I have performed some other tests and now I found a root cause for the issue with background, though I do not yet know what is the solution.

After lxrandr I see following information

DISPLAY SETTINGS:
The following monitors are detected

...and here I see two monitors are marked
VGA Monitor
Turn On checked , resolution 1280x800
DVI Monitor
Turn On checked , resolution 1280x720

I said before when I changed settings in lxrandr (resolution), then fbsetbg sets the background correctly. I was wrong. What I have to do is to turn off "DVI Monitor" and then execute fbsetbg again. After I switch off "DVI Monitor" everything works perfectly. Apparently fbsetbg reads the screen resolution from "DVI Monitor" settings.

Now I am wondering why lxranr detects two monitors, thouugh I have only one. I can switch it off and SAVE, but everytime I reboot PC and start lxrandr, I see two monitors.
If I will be able to disable "DVI monitor" or to change there resolution to 1280x800 (is not available on the list), then it will solve my issue.
Any ideas ?

Regarding setting background permanently, after I removed the comment in ~/.fluxbox/overlay (background: none) everything works great. Fluxbox remembers my last settings.

regards
Rafal

RAFAL 09-22-2013 02:31 AM

Hi,
I have workaround for the issue, but I am still wondering how xrandr detects two monitors, though I have only one ?

My workaround in openSUSE 12.3 :

First I have checked output from this:
Code:

xrandr --prop
I saw there two monitors: LVDS1 and VGA1

In order to disable DVI Monitor I executed following command:
Code:

xrandr --output LVDS1 --off
In order to make this change permanently I have edited the file /etc/X11/xinit/xinitrc.
In this file the is a section :

Code:

#
# Add your own lines here...
#

So I added the command there and now everything works fine.

maybe somebody knows other solution or can tell me why xrandr detects two monitors ?

regards
Rafal


All times are GMT -5. The time now is 11:24 PM.