Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X11: LXpanel and Desktop Wallpaper Support #270

Open
mattie47 opened this issue Nov 25, 2024 · 1 comment
Open

X11: LXpanel and Desktop Wallpaper Support #270

mattie47 opened this issue Nov 25, 2024 · 1 comment

Comments

@mattie47
Copy link

Hi,

I wanted to point out some observations with X11.

We have the following docs for LXDE:

https://github.com/gitbls/sdm/blob/master/Docs/Plugins.md#lxde

As well as further info on config here:
https://github.com/gitbls/sdm/blob/master/Docs/Using-LXDE-Config.md

For LXDE to be complete, ideally we would also copy the /home/pi/.config/lxpanel/LXDE-pi/panels/panel file into the image.

This file is responsible for the configuration of the taskbar (such as screen location, and notifications).

Example panel file:

# lxpanel <profile> config file. Manually editing is not recommended.
# Use preference dialog in lxpanel to adjust config when you can.

Global {
  edge=bottom
  align=left
  margin=0
  widthtype=percent
  width=100
  height=36
  transparent=0
  tintcolor=#000000
  alpha=0
  autohide=0
  heightwhenhidden=2
  setdocktype=1
  setpartialstrut=1
  usefontcolor=0
  fontsize=12
  fontcolor=#ffffff
  usefontsize=0
  background=0
  backgroundfile=/usr/share/lxpanel/images/background.png
  iconsize=36
  monitor=0
  point_at_menu=0
  notifications=0
}
Plugin {
  type=smenu
  Config {
    padding=4
    image=start-here
    system {
    }
    separator {
    }
    item {
      image=system-run
      command=run
    }
    separator {
    }
    item {
      image=system-shutdown
      command=logout
    }
  }
}
Plugin {
  type=space
  Config {
    Size=4
  }
}
Plugin {
  type=launchbar
  Config {
    Button {
      id=lxde-x-www-browser.desktop
    }
    Button {
      id=pcmanfm.desktop
    }
    Button {
      id=lxterminal.desktop
    }
  }
}
Plugin {
  type=space
  Config {
    Size=8
  }
}
Plugin {
  type=taskbar
  expand=1
  Config {
    tooltips=0
    IconsOnly=0
    ShowAllDesks=0
    UseMouseWheel=1
    UseUrgencyHint=1
    FlatButton=0
    MaxTaskWidth=200
    spacing=1
    GroupedTasks=0
  }
}
Plugin {
  type=space
  Config {
    Size=2
  }
}
Plugin {
  type=tray
  Config {
  }
}
Plugin {
  type=updater
  Config {
  }
}
Plugin {
  type=ejecter
  Config {
    AutoHide=1
  }
}
Plugin {
  type=space
  Config {
    Size=2
  }
}
Plugin {
  type=bluetooth
  Config {
  }
}
Plugin {
  type=space
  Config {
    Size=2
  }
}
Plugin {
  type=netman
  Config {
  }
}
Plugin {
  type=dhcpcdui
  Config {
  }
}
Plugin {
  type=space
  Config {
    Size=2
  }
}
Plugin {
  type=volumepulse
  Config {
  }
}
Plugin {
  type=space
  Config {
    Size=2
  }
}
Plugin {
  type=dclock
  Config {
    ClockFmt=%R
    TooltipFmt=%A %x
    BoldFont=0
    IconOnly=0
    CenterText=1
  }
}
Plugin {
  type=space
  Config {
    Size=2
  }
}
Plugin {
  type=ptbatt
  Config {
  }
}
Plugin {
  type=space
  Config {
    Size=2
  }
}
Plugin {
  type=magnifier
  Config {
  }
}

The docs also seem to be incorrect for pcmanfm config (although perhaps this changed in Bookworm...I haven't checked).

The config files can be found at
-pcmanfm: /home/user/.config/LXDE-pi/pcmanfm.conf
+pcmanfm: /home/user/.config/pcmanfm/LXDE-pi/pcmanfm.conf
libfm: /home/user/.config/libfm.conf
lxterminal: /home/user/.config/lxterminal/lxterminal.conf

One thing that is quite confusing is the relationship between:

  • Graphics
  • lxde
  • labwc

Reading in between the lines:

If you want to use X11:
--plugin graphics:"graphics=X11"

Then specify your configurations using the lxde plugin.

Examples of files and their purpose:

# libfm: Core Library for pcmanfm File Manager
--plugin lxde:"lxde-config=libfm:$LXDE_CONFIG_FILE"
# pcmanfm: File Manager config
--plugin lxde:"lxde-config=pcmanfm:$PCMANFM_CONFIG_FILE"
# lxterminal: Terminal config
--plugin lxde:"lxde-config=lxterminal:$LXTERM_CONFIG_FILE"

# Desktop Wallpaper and Notification settings (Not supported)
-- Copy file to `/home/pi/.config/pcmanfm/LXDE-pi/desktop-items-0.conf`

# Task Bar Configuration (Not supported)
-- Copy file to `/home/user/.config/lxpanel/LXDE-pi/panels/panel`

If you want to use Wayland with LABWC (the now default for RPI OS):

  • Unlike X11, don't worry about specifying graphics plugin. Wayland is the default.

Configure labwc instead of lxde.

For configurations, it's easiest to use the /usr/local/sdm/sdm-collect-labwc-config tool on a Pi that you've configured how you want things to be, to then collect all relevant configuration files.

Then copy them off the test Pi, and stored them somewhere on your SDM server.

Following which, use the labwc plugin to copy in all the files and apply on images with something like below:

--plugin labwc:"all-config=$CONFIG_LOCATION/labwc"

Thanks,

Matt

@gitbls
Copy link
Owner

gitbls commented Nov 26, 2024

Thanks for pointing out some potential issues. The lxde plugin is going to go away in favor of labwc, so I'm not too inclined to do much with the lxde plugin.

If there's an actionable question you have in the OP, please highlight it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants