Xfce4-panel default layout without asking a user (during the first login)
Solution 1
Create a temporary user (eg test
) and log in as that user. Configure xfce-panel
as you would like it to be for all new users.
These settings should be in:
~/.config/xfce4/
Copy this whole tree to:
/etc/skel/
So that you have:
/etc/skel/.config/xfce4/
Now (hopefully) all your new users will have the same default xfce4-panel
settings.
Solution 2
Both answers so far advocate for putting default files below /etc/skel
. That is a generic place only used to populate user's home directories when they get created using useradd
.
But you might have existing users, or centralised users with NIS/NFS. If you want to change XFCE defaults for anyone who hasn't started it yet, put your files below /etc/xdg
.
Solution 3
see: https://askubuntu.com/a/1205840/1093368
The defaults for the panel is stored in
/etc/xdg/xfce4/panel/default.xml
. So to restore that default, just do:
cp /etc/xdg/xfce4/panel/default.xml ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml
I'm using ansible to prepare the user configuration with the following tasks:
- name: Ensure directory for default panel configuration exists
become: no
ansible.builtin.file:
path: ~/.config/xfce4/xfconf/xfce-perchannel-xml
state: directory
recurse: yes
- name: Use default panel configuration
become: no
ansible.builtin.copy:
src: /etc/xdg/xfce4/panel/default.xml
dest: ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml
Related videos on Youtube
Dfire
Updated on September 18, 2022Comments
-
Dfire over 1 year
I need some help. I have two classes with onetomany relationship:
@Entity public class Parent extends Model{ @Id public Long id; @OneToMany(fetch = FeatchType.LAZY, cascade = CascadeType.ALL, orphanRemoval = true) public List<Child> children; }
and
@Entity public class Child extends Model{ @Id public Long id; }
So when i call remove() Child entity do not remove from DB.
Parent parent = Parent.find.byId(id); parent.children.remove(parent.children.get(0)); parent.save();
And next time I find.byId - all children is there, like they never been deleted :(
Play 2.0.4, inMemory database.
Please make me know if any other informaition is needed.
-
stian about 11 yearsupdated answer is really a new answer.. anyway, please try it!
-
Dfire about 11 yearsOh! Thanks a lot! It alive!