Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How do I copy menu entries to new Xfce4 user?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6308
Location: /usr/lib64/lv2

PostPosted: Sat Jan 02, 2016 3:37 pm    Post subject: How do I copy menu entries to new Xfce4 user? Reply with quote

Is it possible to copy all the Xfce4 menu entry settings to a non-home directory somewhere and then run a script to copy those settings to any new user created? The reason I'm looking to do this is because I'm setting up a default user for Gentoo Studio with custom menu entries that make more sense in the audio/mixing/mastering world than the default category assignments, and I'd like those to persist for new users created on a Gentoo Studio system.
_________________
Gentoo Studio: A Gentoo-based, professional digital audio workstation OS.
Back to top
View user's profile Send private message
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1692

PostPosted: Sat Jan 02, 2016 5:01 pm    Post subject: Reply with quote

Hopefully this will help you, but the files that you are looking for is the .menu and .desktop files. From my understanding of the files, the .menu files specifies the menu structure, and the .desktop defines the menu options. Now the fun part in all this, they are not all stored in the same place. For user specific .menu, is (for me, in xfce4) is located in
Code:
ct85711@Oate ~/.local $ locate .menu
/etc/xdg/menus/xfce-applications.menu
/etc/xdg/menus/xfce-settings-manager.menu
/home/ct85711/.config/menus/xfce-applications.menu
/home/ct85711/.config/menus/applications-merged/xdg-desktop-menu-dummy.menu


The .desktop files are located in
Code:
ct85711@Oate ~/.local $ locate .desktop
/etc/xdg/autostart/Gentoo-print-applet.desktop
...
/etc/xdg/autostart/xscreensaver.desktop
/home/ct85711/.config/autostart/tracker-miner-fs.desktop
...
/home/ct85711/.config/autostart/xfce4-panel.desktop
/home/ct85711/.gnome/apps/calibre-ebook-edit.desktop
...
/home/ct85711/.gnome/apps/chrome-pjkljhegncpnkpknbcohdijeoejaedia-Default.desktop
/home/ct85711/.local/share/Trash/info/exo-file-manager.desktop.trashinfo
/home/ct85711/.local/share/applications/calibre-ebook-edit.desktop
/home/ct85711/.local/share/applications/calibre-ebook-viewer.desktop
...
/usr/share/applications/CMake.desktop
...
/usr/share/applications/blueman-adapters.desktop
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6308
Location: /usr/lib64/lv2

PostPosted: Sat Jan 02, 2016 5:47 pm    Post subject: Reply with quote

Cool. So I can find all the files I need. Now how would I write a script that automatically executes the first time a new user logs in to copy the files I need so that the new user's menu appears the way I want it to?
_________________
Gentoo Studio: A Gentoo-based, professional digital audio workstation OS.
Back to top
View user's profile Send private message
Syl20
Guru
Guru


Joined: 04 Aug 2005
Posts: 550
Location: France

PostPosted: Mon Jan 04, 2016 10:14 am    Post subject: Reply with quote

When you create a new user, all the files located in /etc/skel are copied into its home directory. You could add there a script that destructs itself, and is called by .bashrc (with a test -f command, to avoid errors when removed), for example.
I think there are cleaner solutions, but that will do the job.
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6308
Location: /usr/lib64/lv2

PostPosted: Mon Jan 04, 2016 4:11 pm    Post subject: Reply with quote

I'll try that, thanks!
_________________
Gentoo Studio: A Gentoo-based, professional digital audio workstation OS.
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