Elive E16 login scripts problem

I found a fairly exotic bug in the E16 login scripts/

When changing the username and dito /home/directories, the scripts look for old $HOME despite making changes to the .e16/startup-applications.list.

A short explanation:

Doing a new install on my laptop I did a typo when creating the user, which I only noticed a few days later...... I created the user "riantares" not, as I always do: "triantares"

So I modified the username and the corresponding $HOME thus:
"usermod -l triantares -d /home/triantares -m riantares"

and after reboot edited ".e16/startup-applications.list" (after the first error telling me "/home/riantares/.local/share/applications/elxsrt.desktop" couldn't be started)...and pointed it to /home/triantares.

  • Alas after clearing all caches and rebooting .... the same error looking for the wrong directory keep coming back!! :shocked:

I don't know exactly which scripts are responsible but they would probably require a change to ~ or $HOME
EDIT:
It turns out the elxstrt script itself, still has the old path to "riantares" on the "exec" line.

Bump @Thanatermesis

That's not good. We should always look for $HOME because it's very reliable. (Of course, we should make sure the dir exists first!)

Aye, but I just found out the hard way that those .desktop entries only accept full links i.e those files need to be (re)generated correctly because they don't pass through the shell when executing.

I don't think this can be consdered a bug at all, why? because its very common that "user conf files" points to statically writed home names... an example of that is that if you run elive in live mode, and from the home of user you run "ack eliveuser" you will see many conf files pointing to the user home

In fact Elive has a good own way to manage that, from elive-skel (elive-skel upgrade, etc) which is a tool used in the background (could be good to rewrite it better, but stills doing the job very well), for example in a new user creating time or conf updated, the "eliveuser" entries in the default confs are replaced to your users name to fit correctly those /home addresses

I agree and apparently there's not much we can do, when it comes to a lot file types that don't use the local shell.

Like I said the "bug" is exotic, specifically E16 and elxstrt is all-in-all the only one that gets excluded
(AFAICT) from the "usermod" actions.
It's not going to be an issue as I suspect (most folks would just re-install or create a new user) but I did think it was worth mentioning.....keeping Murphy's law in mind here. :madness:

  • The effects are minimal and there's a pop-up warning about elxstrt not found on login, that's all.

Are you sure usermod changes (replaces) the contents of the home of user? i ask that because is a dangerous action :slight_smile: and i dont think it actually does that, so it can change the user home directory, but not your user files inside contents

the popup saying about elxstrt not found should be from the .desktop file:

~ ❯❯❯ grep "/home/" ~/.local/share/applications/*desktop
.local/share/applications/elxstrt.desktop:Exec=/home/thana/.elxstrt

So like i said, changing the username will affect to many user home files, example:

~ ❯❯❯ grep -RnE "/home/thana/" .config/* | wc -l
881

881 matches of "/home/thana/" entries in some my conf files, are you sure all your conf files are correctly configured now to your new username? :thinking:

No, quite right but in my case it was an almost pristine install so there are less config files.
I found 8 entries in the config files pointing to the previous name (and 661 entries pointing to "triantares") none of which I've used yet, so not noticed.
Excepting the missing bookmarks in Thunar.:smile_cat:

Here's the output of those with the same search:

  • .config/cairo-dock/current_theme/plug-ins/stack/stack.conf:107:stack dir=/home/riantares/.config/cairo-dock/stack
  • Binary file .config/chromium/Default/History matches
  • Binary file .config/dconf/user matches
  • .config/gtk-3.0/gtk-bookmarks:1:file:///home/riantares/Documents
  • .config/gtk-3.0/gtk-bookmarks:2:file:///home/riantares/Videos
  • .config/gtk-3.0/gtk-bookmarks:3:file:///home/riantares/Downloads
  • .config/smplayer/smplayer.ini:29:screenshot_folder=/home/riantares/
  • .config/yad.conf:28:output-uri=file:///home/riantares/.invoice/yad.pdf

.config/dconf/user has 2 entries, one for the battery in cairo-dock and one for fileroller.
I'll look into how to change those or generate a new dconf

.....which, I discovered apparently gets regenerated on a new login (after simply deleting the whole dconf dir) and reflects changes to the other plain-text files as well as gnome based stuff I've got running, like guake and cairo-dock (which I don't use).

Just found another one:
"/etc/lightdm/lightdm.conf" keeps the old entry too.