Ticket #2426 (new enhancement)

Opened 14 years ago

Last modified 12 years ago

default panels.ini

Reported by: LwarX Owned by:
Priority: trivial Milestone: Future Releases
Component: mc-config-ini Version: 4.7.4
Keywords: Cc: gotar@…, rutsky.vladimir@…
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

Folks, is it possible to make panels.ini behave in the same way as mc.ini? I.e. when user has no panels.ini in his home folder, automatically copy /etc/mc/panels.ini as default one (if present).

Change History

comment:1 in reply to: ↑ description Changed 14 years ago by andrew_b

Replying to LwarX:

Folks, is it possible to make panels.ini behave in the same way as mc.ini? I.e. when user has no panels.ini in his home folder, automatically copy /etc/mc/panels.ini as default one (if present).

There is no any default ini file. All default options are set in code. Also there is no any default panels.ini file because all default panel options are also set in code.

Do you mean that panels.ini is not created in some cases? If yes, this is duplicate of #1939.

comment:2 follow-up: ↓ 3 Changed 14 years ago by LwarX

According to strace, at least mc-4.7.4 looks for /etc/mc/mc.ini or /etc/mc/mc.lib if there is no .mc/ini in user's home directory and then uses them as default ones.

comment:3 in reply to: ↑ 2 ; follow-up: ↓ 6 Changed 14 years ago by andrew_b

/etc/mc/mc.ini is not some default ini. This file can contain some host-specific options but it is not provided in mc distribution tarball. If /etc/mc/mc.ini exists it is read only but not copied into user home directory.

comment:4 Changed 14 years ago by LwarX

Yes, it is read only and used only to populate in-memory settings when midnight commander is started and when there is no user ini file. Can we have same behavior for panel related host-specific options?

comment:5 Changed 14 years ago by LwarX

In other words, if there is a way to specify system-wide ini options, to be consistent we also need to specify system-wide panel options. Default theme, layout and some settings already can be specified in /etc/mc/, but other panel options (columns, status, list mode, ordering) are impossible to specify without tweaking user-specific files.

comment:6 in reply to: ↑ 3 Changed 14 years ago by gotar

  • Priority changed from minor to trivial
  • Cc gotar@… added

Replying to andrew_b:

If /etc/mc/mc.ini exists it is read only but not copied into user home directory.

And - if user is fresh and doesn't have his own configuration, system-wide setting will be saved in his home (unless system-wide disables auto_save_setup of course).

The same should happen with panels.ini, in general every ini file should behave the same way and have the same sources.

comment:7 Changed 13 years ago by andrew_b

  • Branch state set to no branch
  • Milestone changed from 4.7.5 to Future Releases

comment:8 Changed 12 years ago by rutsky

  • Cc rutsky.vladimir@… added
Note: See TracTickets for help on using tickets.