Refracta Development, Scripts, etc.
Post a reply

/etc/skel and second user

Tue Oct 25, 2011 4:05 pm

I added some files from ~/.config and ~/.local to /etc/skel. See the output of tree far below for the list of files. (You'll have to install tree if you want to use it; I'll add it to the final or next version of refracta.) I copied some of the directories just below .config (autostart, geany, Terminal, Thunar, xfce4), and I copied applications and xfce4 under .local/share/. There was one other "/home/user" removed from .config/geany/geany.conf. (project_file_path, I think.)

Here's the launcher for geany the way it looked when I copied it. Note the Path. That results in some problems when you create a new user - in this case, geany will try to save phred's files in /home/user instead of in /home/phred. Leaving the path blank solved that issue. ("Path=") Once I did that and created a new user, the files get saved in the new user's home, and the path shown in ~/.config/xfce4/panel/launcher-blah was /home/newuser. I did the same with the other two launcher files that contained "Path=/home/user". They're the ones with the long numbers in the name.

Another interesting effect is that newuser can open firefox from the panel button. newuser does not see user's bookmarks, newuser can save his own bookmarks, and user can't see newuser's bookmarks. Can someone please confirm this behavior?

/etc/skel/.config/xfce4/panel/launcher-blah
Code:
[Global]
MoveFirst=false
ArrowPosition=0

[Entry 0]
Name=Geany
Comment=Text Editor
Icon=text-editor
Exec=geany
Path=/home/user
Terminal=false
StartupNotify=false




Code:
[refracta-606-beta2: /etc/skel]$ tree .config
.config
├── autostart
│   ├── deja-dup-monitor.desktop
│   ├── DoZap.desktop
│   ├── wicd-tray.desktop
│   ├── xfce4-settings-helper-autostart.desktop
│   ├── xfce4-tips-autostart.desktop
│   └── xfconf-migration-4.6.desktop
├── geany
│   ├── colorschemes
│   ├── filedefs
│   │   └── filetypes.README
│   ├── geany.conf
│   ├── tags
│   ├── templates
│   │   ├── bsd
│   │   ├── changelog
│   │   ├── fileheader
│   │   ├── files
│   │   ├── function
│   │   ├── gpl
│   │   └── templates.README
│   └── ui_toolbar.xml
├── Terminal
│   └── terminalrc
├── Thunar
│   ├── accels.scm
│   ├── renamerrc
│   ├── thunarrc
│   ├── uca.xml
│   └── volmanrc
└── xfce4
    ├── desktop
    │   └── icons.screen0.rc
    ├── helpers.rc
    ├── panel
    │   ├── actions-12.rc
    │   ├── clock-14.rc
    │   ├── cpugraph-13139372601.rc
    │   ├── launcher-10.rc
    │   ├── launcher-13139357020.rc
    │   ├── launcher-13141951090.rc
    │   ├── launcher-13157765892.rc
    │   ├── launcher-7.rc
    │   ├── launcher-9.rc
    │   ├── netload-13139373582.rc
    │   ├── pager-2.rc
    │   ├── panels.xml
    │   ├── separator-11.rc
    │   ├── separator-13.rc
    │   ├── separator-6.rc
    │   ├── systray-4.rc
    │   ├── tasklist-3.rc
    │   └── xfce4-menu-5.rc
    ├── Xcursor.xrdb
    ├── xfconf
    │   └── xfce-perchannel-xml
    │       ├── displays.xml
    │       ├── xfce4-desktop.xml
    │       ├── xfce4-keyboard-shortcuts.xml
    │       ├── xfce4-session.xml
    │       ├── xfce4-settings-manager.xml
    │       ├── xfwm4.xml
    │       └── xsettings.xml
    ├── Xft.xrdb
    └── xfwm4

15 directories, 50 files


Code:
[refracta-606-beta2: /etc/skel]$ tree .local
.local
└── share
    ├── applications
    │   ├── defaults.list
    │   └── firefox.desktop
    └── xfce4
        └── helpers
            └── custom-WebBrowser.desktop

4 directories, 3 files

Re: /etc/skel and second user

Tue Oct 25, 2011 7:07 pm

Confirmed here, exactly as you say. Seconduser's desktop looks identical to main user's. Firefox runs from "/home/mainuser/firefox" just as it would if from /usr/bin and a new profile gets created in /home/seconduser/.mozilla

Observation : If going down the road of /etc/skel configs, having a preconfigured user at all seems of little point. You can do the whole job from skel, liveboot|config does the rest automatically. I already tried that with a remix, having deleted the user account, and added stuff to skel. It works (except no firefox). But there might be good reasons for keeping "user" that I missed.

Suggestion : whatever is done for skel, a deb package (e.g. refracta-userdefaults with a dpkg-divert of original) would keep a "cleaner" system

Re: /etc/skel and second user

Wed Oct 26, 2011 4:31 am

Looks like the refracta desktop to me.

I won't be able to confirm anything regarding firefox until I get around to a new install. I already chucked firefox and installed midori.

Re: /etc/skel and second user

Wed Oct 26, 2011 1:35 pm

Thanks for verifying that for me. The best reason I can think of for having a preconfigured user is to have a place for me to work while I'm building the system. There are usually a few files in my home, and then I clear them out before making a snapshot.

This is the first I've ever heard of dpkg-divert. From what I gather, it's not really needed here, since I didn't replace any files in /etc/skel, I just added a few. I suppose that putting those files into a deb package would make it easier to remove them, but I don't know why I'd want to do that.
Post a reply