Xfce Forum

Sub domains
 

You are not logged in.

#1 2024-05-13 12:52:41

Zbyszek
Member
Registered: 2024-05-13
Posts: 4

Default background for RDP sessions

Hi, I created docker's image with xfce. I connect to this docker with xrdp.
Now I want to set the same background for all logged in users by RDP to this docker.
How to do it ? Where is the file with default settings ?
I know how to do it after login in ( Display settings ) - but how to set it as a default ?         

Thanks.

Offline

#2 2024-05-13 13:05:38

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,313

Re: Default background for RDP sessions

Hello and welcome.

For existing users, the easiest way will be to add a autostart application that runs an xfconf-query command to change the wallpaper. To figure out the command, first run:

xfconf-query -c xfce4-desktop -mv

...and change the wallpaper using Desktop Settings. You will see something like

set: /backdrop/screen0/monitorrdp0/workspace0/last-image (/usr/share/backgrounds/1366x768_2.jpg)

The first path showing is the property to set, the second the wallpaper (make sure the wallpaper is in accessible location). So the command would be:

xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitorrdp0/workspace0/last-image -s "/usr/share/backgrounds/1366x768_2.jpg"

If its for new users not yet logged in, there are a number of other options that you can try:

  1. Copy the xfce4-desktop.xml file from your $HOME/.config/xfce4/xfconf/xfce-perchannel-xml directory to the xdg new user skeleton files located at /etc/xdg/xfce4/xfconf/xfce-perchannel-xml (note: this location may be different depending on the distro you are using).

  2. You can do something similar but put it in /etc/skel so its copied over during new user account creation.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2024-05-20 05:36:53

Zbyszek
Member
Registered: 2024-05-13
Posts: 4

Re: Default background for RDP sessions

Hi.
In my first approach I tried to use xconf-query - but this command works good in graphical environment ( eg in terminal  window in GUI ) only. When I start docker I don't  have the  graphic session.
I think that default background of xfce desktop is set up somewhere in some file and in this place I should place the change.  Do you know this place ?

Last edited by Zbyszek (2024-05-20 05:37:20)

Offline

#4 2024-05-20 10:38:53

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,313

Re: Default background for RDP sessions

Zbyszek wrote:

I think that default background of xfce desktop is set up somewhere in some file and in this place I should place the change.  Do you know this place ?

For existing users, it is $HOME/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml.

For new users, the above file will be auto-created on first run of xfdesktop (if it doesn't exist).


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2024-05-20 17:07:11

Zbyszek
Member
Registered: 2024-05-13
Posts: 4

Re: Default background for RDP sessions

I think existing user means logged in at least once  (not just created) - but I want the first time the user logs in - the user already has the correct background.
Do you know how the xfce4-desktop.xml file is created?

Offline

#6 2024-05-20 18:33:51

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,313

Re: Default background for RDP sessions

Zbyszek wrote:

Do you know how the xfce4-desktop.xml file is created?

If it doesn't exist, it is manually created by the code - specific to the system (specific in the sense that the monitor name(s) are specific to any given system).

If you are looking for the specific code, I believe its the "xfce_workspace_migrate_*" functions in https://gitlab.xfce.org/xfce/xfdesktop/ … orkspace.c that specify default values to use if ones cannot be found.

but I want the first time the user logs in - the user already has the correct background.

I had suggested you copy the default file that gets created when a test user logs in to either of two locations (/etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml or /etc/xdg/xfce4/xfconf/xfce-perchannel-xml) so that when you create a new user account, that file will automatically get copied over to the new user's directory as part of normal new user setup routines.

So basically, create a test user and configure the desktop settings that you want, and log out - that should create the xfce4-desktop.xml file in the test user's .config/xfce4/xfconf/xfce-perchannel-xml directory. Then use that file as your default file.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#7 2024-05-20 18:37:23

Zbyszek
Member
Registered: 2024-05-13
Posts: 4

Re: Default background for RDP sessions

thank you  - I'll test it

Offline

#8 2024-05-20 19:00:25

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,313

Re: Default background for RDP sessions

Found a related thread that might be helpful.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

Board footer

Powered by FluxBB