You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cdm/ChangeLog-0.6

119 lines
4.6 KiB
Groff

Version 0.6 (2012-04-08)
* Add support for user-defined cdmrc:
Since cdm(1) is run with user priviledge, users can still circumvent
administrator's settings by simply running a modified version of cdm(1)
and use his own config. Therefore it's technically meaningless to specify
everything in a config file located in /etc/.
Multilevel config can be more flexible (see the implementation of submenus
after Casper's modifications), just like with bash(1), zsh(1), etc.
* Classify menu items into console programs and X programs:
Console programs are directly `exec'ed. X programs are run in a way
similar to that in cdm 0.5.3. Programs are specified in the bash array
`$binlist', and their names are in the array `$namelist'. Their types (
aka "flags"), as denoted by `C' (console programs) or `X' (X programs),
are specified in the array `$flaglist'.
So with the current architecture, cdm(1) submenus can be implemented by
letting one cdm(1) `exec' another cdm(1) with a different config file (see
the "user-defined cdmrc" section).
Also, one can log in his account and autostart cdm(1) (using `exec cdm' in
.profile or so), and let cdm(1) launch his desktop, or just drop to his
$SHELL by `exec $SHELL'. So the architecture is more flexible than cdm
0.5.3.
Right way to *auto*start cdm(1) -- use `exec cdm':
login(1) -/spawn/-> $SHELL -/exec/-> cdm(1) -/exec/-> console program
login(1) -/spawn/-> $SHELL -/exec/-> cdm(1) -> /exit/
| ^
/spawn/ /return/
v |
cdm-xlaunch(1)
|
/Launch and put to background/
v
X program
Wrong way to *auto*start cdm(1) -- just run (spawn) `cdm':
login(1) -/spawn/-> $SHELL /So the shell does not exit (note 1)/
| ^
/spawn/ /return/
v |
cdm(1) -/run console program or X program/
Note 1: Cannot configure $SHELL to exit conditionally on the exit of
cdm(1), because cdm might `exec' to arbitrary program as
specified by the user, of which the return values' meanings
could not be predicted.
It is also not advisable to let cdm(1) to wait for the running
program to exit (instead of `exec' the program or use the
method in cdm-xlaunch(1) to put the program to background),
since that just adds a (mostly) useless sleeping cdm(1) on the
process table when the program is running.
* Change `$menu' to a bash array:
This makes escaping and quoting in the menu possible and elegant for both
cdm(1) and cdmrc, which adds possibility for providing arguments to
programs in `$binlist' (formerly known as `$wmbinlist').
`$usexinit' and related code is removed accordingly.
* Use a better way to safely launch a program in the background:
See <http://linuxshellaccount.blogspot.com/2007/12/
what-to-do-when-nohup-hangs-up-anyway.html>.
`$loginshell' is removed accordingly.
* Remove `$allowconsole', `shutdownmenu()', etc.:
Since the related things can be set in config files as "console programs",
`$binlist' supports commands with whitespaces, and submenus can be
elegantly implemented with cdm `exec'ing another cdm with a different
config file.
* Code separation:
Code messing with X would only be run if an X program is to be run.
`xstart()' code is moved to `cdm-xlaunch(1)', since it's relatively
independent code and thus would be sometimes useful for running as a
standalone program.
* Replace self-made info formatting code with `functions.sh':
checkyesno() is removed too since gentoo's `functions.sh' already provides
it.
`functions.sh' can be substituted with custom ones of course.
* Use signal names (not numbers) in `trap'.
* Changes to variable names:
The changed are generally intended to make it easier to reason about the
actually effects of the variables.
`$theme' -> `$dialogrc': bacause the "theme" file is essentially a
dialogrc file. This is mainly affected by the Arch philosophy: "simplicity
as without unnecessary additions, modifications, or complications".
BTW, `$dialogrc' should now be set to an absolute path, making it possible
to make use of dialogrc's in the whole file system.
`$cosolekittime' -> `$cktimeout': indicate "timeout" here.
* Reformat comments:
Expanded tabs to avoid problem with editors.