Understanding desktop-session-antix

Forum Forums New users New Users and General Questions Understanding desktop-session-antix

  • This topic has 22 replies, 4 voices, and was last updated Sep 24-1:54 am by Dave.
Viewing 8 posts - 16 through 23 (of 23 total)
  • Author
    Posts
  • #67733
    Forum Admin
    Dave
    Helpful
    Up
    0

    The menu-applications are regenerated in desktop-session from lines 222 – 236.
    I think the main menu is initially set in live init. Then it is altered in the installer to remove the installer entry.
    Perhaps it is also still in the control centre for when you change your locale from there but it has been quite a while since I have looked in there. It *used* to be (from my memory) when you changed the locale via a gtkdialog it would change the locale, keyboard layout, and copy the menu from /usr/share/* to ~/.wm/menu, then rebuild the applications menu.

    Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown

    #67743
    Member
    Xecure
    Helpful
    Up
    0

    Thanks, Dave.

    I thought that, when changing the locale (in /etc/default/locale), rebooting, and then creating a new user, the menus would be in the language selected, but I couldn’t get this to work. I wanted to see if the user-antix or desktop-session would automate the change but to my surprise it didn’t, so I though maybe I did something wrong.
    Can anyone confirm that this is the normal behavior (loading a localized menu for the new user) or if I had false expectations?

    If this wasn’t the default behavior, I will send a merge request to desktop-session-antix to include this function.

    antiX Live system enthusiast.
    General Live Boot Parameters for antiX.

    #67752
    Forum Admin
    Dave
    Helpful
    Up
    0

    I think there is no longer a method for changing locales post install without alot of manual steps.
    Ah, this was set years ago in the antix-system management program (line 258-298).
    https://gitlab.com/antiX-Linux/system-antix/-/blob/master/bin/antix-system.sh
    It seems in the past I was trying to move to python instead of gtk dialog but did not get very far at all (was spending time on user-management-antix/group-management-antix IIRC).
    https://github.com/antiX-Dave/antix-system/blob/master/antix-system

    Is desktop-session the place to handle this? Should it be moved to desktop-menu and linked from desktop-session instead?
    The live-init system would need to be investigated as it is likely far better at setting up the locale than was done in the past via antix-system, etc.

    Edit:
    Also in the past is was frowned upon to alter certain aspects of the user’s home directory.
    So we will need to keep in mind if the system locale is altered that we do not override / overwrite any custom changes in the home directory.

    • This reply was modified 3 weeks, 2 days ago by Dave.

    Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown

    #67775
    Member
    Xecure
    Helpful
    Up
    0

    Thanks, Dave. I will start looking at what you have linked.

    Is desktop-session the place to handle this? Should it be moved to desktop-menu and linked from desktop-session instead?

    Yes. You are right. This is a better place for it.

    Also in the past is was frowned upon to alter certain aspects of the user’s home directory.
    So we will need to keep in mind if the system locale is altered that we do not override / overwrite any custom changes in the home directory.

    You are right. I was thinking not to do this automatically, only on first desktop-session launch for a user, but if the user has a custom /etc/skel/.<wm>/menu, then this “forced translation” is a not desirable at all. I will have to think about it. Maybe only include this option in the locale-antix script I am making.

    Thanks for pointing me in the right direction.

    antiX Live system enthusiast.
    General Live Boot Parameters for antiX.

    #67780
    Forum Admin
    Dave
    Helpful
    Up
    0

    You are right. I was thinking not to do this automatically, only on first desktop-session launch

    Indeed then should we make it part of the desktop-menu package and have a hook in /usr/lib/desktop-session/first-run-script to update the locale of the menus.
    Subsequent changes should then be allowed/enabled via running the same code via a desktop-menu script/option manually. After changing system locale, or accidentally installing using the wrong locale for example.

    There is a section in desktop-session that does not get much use. It allows the program/package maintainer to update/notify the home directory files if given user consent to do so.
    This is found on lines 255-287. It corresponds with the SESSION_PROTECT option in desktop-session.conf. Items are set in /etc/desktop-session/file_compare with overrides in ~/.desktop-session/file_compare IIRC. Though this may be outdated information. Basically ~/.desktop-session/file_compare was meant to store the files that you do not want to update to avoid annoying nagging if SESSION_PROTECT is set to ask. It *might* be useful for this situation, but also maybe not.

    Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown

    #67787
    Member
    Xecure
    Helpful
    Up
    0

    Thanks, Dave.

    SESSION_PROTECT

    When I was reading the desktop-session code, I always feared touching this would be too dangerous, so I am not too keen on introducing bugs as I did in another project. For now, I will see about including the script in desktop-menu-antix and perform a few tests calling it from outside manually.

    antiX Live system enthusiast.
    General Live Boot Parameters for antiX.

    #67830
    Member
    skidoo
    Helpful
    Up
    0

    Is it solved by by just modifying the desktop-session script? It could consult $LANG and, unconditionally (without regard to wm or min-*, nor first-run status) call desktop-session-menu “– update global”

    (I don’t know: Does the menu update operation take a looooong time to complete on low-spec systems?)

    #67832
    Forum Admin
    Dave
    Helpful
    Up
    0

    desktop-session already calls desktop-session-menu –update-global based on a change to LANG; generally by live init. (/etc/live/config/lang or ~/.desktop-session/lang)
    This changes the applications menu (filename: menu-applications) and regenerates it to the selected language. This can also be changed at a later time without too much issue as the standard applications menu is known to auto generate (or a least that is what is intended so apt automatically adds the installed applications to the menu) Though this too can break between 2 users as the applications menu is a symlink to /usr/share/desktop-menu/* and if you have 2 users with different locales then they should remove the symlink and keep local copies.

    The main problem (I think) is that this is not where the root menu (filename: menu) is changed. It is set in live init and / or install and is not touched afterward, generally because this is a static menu that is regularly altered by the user. As noted this causes problems as /etc/skel is not altered for the locale; nor is it when the system locale is changed and/or a second user uses a different locale. Then the localized menu file (and probably the other window manager files) would need to be manually copied over after adding a fresh user.

    • This reply was modified 3 weeks, 1 day ago by Dave.

    Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown

Viewing 8 posts - 16 through 23 (of 23 total)
  • You must be logged in to reply to this topic.