Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
background images for dualhead lightdm
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
ExecutorElassus
Veteran
Veteran


Joined: 11 Mar 2004
Posts: 1432
Location: Berlin, Germany

PostPosted: Mon Oct 15, 2018 10:03 am    Post subject: background images for dualhead lightdm Reply with quote

I have two monitors, which are reported by xrandr as DVI-I-3 and DVI-I-2. They are the same model, both connected to a single GPU. xrandr, when run from a window on the left monitor, returns this:

Code:
 # xrandr
Screen 0: minimum 8 x 8, current 1920 x 1200, maximum 16384 x 16384
DVI-I-0 disconnected primary (normal left inverted right x axis y axis)
DVI-I-1 disconnected (normal left inverted right x axis y axis)
DVI-I-3 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 519mm x 324mm
   1920x1200     59.95*+
   1920x1080     60.00 
   1680x1050     59.95 
   1600x1200     60.00 
   1600x900      60.00 
   1280x1024     60.02 
   1280x800      59.81 
   1280x720      60.00 
   1024x768      60.00 
   800x600       60.32 
   640x480       59.94 


On the right, I get this:
Code:
# xrandr
Screen 1: minimum 8 x 8, current 1920 x 1200, maximum 16384 x 16384
DVI-I-2 connected primary 1920x1200+0+0 (normal left inverted right x axis y axis) 519mm x 324mm
   1920x1200     59.95*+
   1920x1080     60.00 
   1680x1050     59.95 
   1600x1200     60.00 
   1600x900      60.00 
   1280x1024     60.02 
   1280x800      59.81 
   1280x720      60.00 
   1024x768      60.00 
   800x600       60.32 
   640x480       59.94 


I would like to set up lightdm to have a wallpaper on both at login. I have two files:

/usr/share/pixmaps/atlantis_nebula_3_dual_monitor-wallpaper-3840x1200-left.png
/usr/share/pixmaps/atlantis_nebula_3_dual_monitor-wallpaper-3840x1200-right.png

In /etc/lightdm/lightdm-gtk-greeter.conf, I have the following lines:

Code:
[monitor: DVI-I-3]
background=/usr/share/pixmaps/atlantis_nebula_3_dual_monitor-wallpaper-3840x1200-left.png

[monitor: DVI-I-2]
background=/usr/share/pixmaps/atlantis_nebula_3_dual_monitor-wallpaper-3840x1200-right.png


This displays correctly on the left monitor (also where the login panel is), but the right monitor remains blank. I can move the mouse there, so I know it's active.

How do I set this properly?

Cheers,

EE
UPDATE: I've made some progress, though not exactly addressing the problem. I finally figured out that the small app lightdm-gtk-greeter-settings has to be invoked from /etc, or otherwise it won't find the lightdm-gtk-greeter.conf file, and will bizarrely return an erroneous message about missing permissions (but that's another issue!).

That app, however, does have a link in its setup page that allows me to set dualhead backgrounds. But when I click it, it returns the following error in the console:

Code:
Traceback (most recent call last):
  File "/[$HOME]/downloads/lightdm-gtk-settings/lightdm-gtk-greeter-settings-1.2.2/lightdm_gtk_greeter_settings/GtkGreeterSettingsWindow.py", line 591, in on_entry_changed_greeter_background
    entry.error = helpers.check_path_accessibility(value)
  File "/[$HOME]/downloads/lightdm-gtk-settings/lightdm-gtk-greeter-settings-1.2.2/lightdm_gtk_greeter_settings/helpers.py", line 193, in check_path_accessibility
    pw = pwd.getpwnam(username)
KeyError: 'getpwnam(): name not found: lightdm'
Traceback (most recent call last):
  File "/[$HOME]/downloads/lightdm-gtk-settings/lightdm-gtk-greeter-settings-1.2.2/lightdm_gtk_greeter_settings/helpers.py", line 185, in check_path_accessibility
    uid, gids = check_path_accessibility.id_cached_data
AttributeError: 'function' object has no attribute 'id_cached_data'


the relevant code is as follows:

Code:
def check_path_accessibility(path, file=True, executable=False):
    """Return None  if file is readable by greeter and error message otherwise"""

    # LP: #1709864, Support gtk-3.* themes
    if "gtk-3.*" in path:
        for x in range(0, 40):
            if os.path.exists(path.replace("gtk-3.*", "gtk-3.%i" % x)):
                path = path.replace("gtk-3.*", "gtk-3.%i" % x)
                return check_path_accessibility(path, file, executable)

    if not os.path.exists(path):
        return _('File not found: {path}').format(path=path)

    try:
        uid, gids = check_path_accessibility.id_cached_data
    except AttributeError:
        files = glob.glob('/etc/lightdm/lightdm.d/*.conf')
        files += ['/etc/lightdm/lightdm.conf']
        config = configparser.RawConfigParser(strict=False)
        config.read(files)
        username = config.get('LightDM', 'greeter-user', fallback='lightdm')


The referenced line is the one right after "try:"

So, what can I do here? The gui app seems badly broken, but is there some way to edit the file /etc/lightdm/lightdm-gtk-greeter.conf so that I can get a wallpaper set on each screen?

Or let me ask another way: the greeter is (I think) starting up two x sessions, one for each monitor, and then only running the greeter on the primary. Is there a way to set the background on the other monitor before login? Like, while the greeter sets the background for its window, setting the background for the X screen on the other monitor independently?

Thanks,

EE
UPDATE2: so, it turns out if I edit the last line of that last code block and just put in my own username, I stop getting that error, and I can use the app. I used it to edit the file /etc/lightdm/lightdm-gtk-greeter.conf to have two background statements for my two monitors, which appear to be identical except for changing [-left/-right] and the monitor ID. Still, no image on the secondary monitor. Any suggestions?

Cheers,

EE
Back to top
View user's profile Send private message
ExecutorElassus
Veteran
Veteran


Joined: 11 Mar 2004
Posts: 1432
Location: Berlin, Germany

PostPosted: Sun Sep 27, 2020 7:20 pm    Post subject: Reply with quote

[Moderator note: a first time poster (sanches) posted what appears to be a spam link as a response to the original post. This post was a response to that spam. The spam post was split and moved to the Dustbin. -Hu]

hi sanches,

thank you for the tip, but you're missing what I'm saying. No matter what I set for the backgrounds (even a widescreen image) it only shows on the screen with the login window. The other screen -- although I can move my mouse there -- is completely black.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum