forked from golodhrim/cdm
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
classify menu items into console programs and X programs. Console programs are directly `exec'ed. X programs are run with cdm-xlaunch(1). $allowconsole, $usexinit, shutdownmenu(), etc., are removed.
- Loading branch information
1 parent
f54e4a2
commit 4b0e982
Showing
6 changed files
with
141 additions
and
227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,70 +1,51 @@ | |||
############################ | #!/bin/bash | ||
### GLOBAL CONFIGURATION ### | # | ||
############################ | # Example config file for cdm(1). | ||
|
# Values set here is the default as in cdm(1). | ||
# Set CDM theme and dialog options |
|
||
dialogrc=/usr/share/cdm/themes/cdm | # Style for the cdm dialog, which is printed with dialog(1). | ||
countfrom=1 | # Default to unset, causing dialog(1) to use the system wide default. | ||
|
# See /usr/share/cdm/themes for some nice choices. | ||
# List all WM binary names | dialogrc= | ||
# If this is not set all sessions in |
|
||
# /etc/X11/Sessions are offered as choices. | # Index of the first item in the menu. | ||
wmbinlist=() | countfrom=0 | ||
|
|
||
# List all WM display names | # List of programs, commands with whitespaces should be quoted or escaped. | ||
wmdisplist=() | # If unset, all sessions in /etc/X11/Sessions are offered as choices. | ||
|
# | ||
# Allow console login? | # (An example:) | ||
allowconsole=yes | # binlist=("~/.xsession" "/bin/bash --login" "/usr/bin/fbterm") | ||
|
|
||
# Allow shutdown? | # List all program display names, one-by-one matched with $binlist. | ||
# Note that this option requires sudo | # Names with whitespaces should be quoted or escaped. | ||
# to be installed and properly configured. | # | ||
allowshutdown=no | # (Continued example:) | ||
shutdowncommand='sudo shutdown -h now' | # namelist=(XSession Console FBTerm) | ||
rebootcommand='sudo shutdown -r now' |
|
||
|
# Type of the programs, one-by-one matched with $binlist. | ||
# Allow suspend? | # `C' for *C*onsole programs, which would be `exec'ed. | ||
# Note that this option requires pm-utils | # `X' for *X* programs, which would be run with cdm-xlaunch(1). | ||
# to be installed and properly configured. | # | ||
allowsuspend=no | # (Continued example:) | ||
suspendcommand='sudo pm-suspend' | # flaglist=(X C C) | ||
allowhibernate=no |
|
||
hibernatecommand='sudo pm-hibernate' | # Set default display. | ||
|
|||
############################ | |||
### SYSTEM CONFIGURATION ### | |||
############################ | |||
|
|||
# Set default display | |||
display=0 | display=0 | ||
|
|
||
# Where should first X tty be spawned? | # Where should first X tty be spawned? | ||
xtty=7 | xtty=7 | ||
|
|
||
# Restrict tty? (By default, cdm increments X tty, this setting | # Should cdm(1) stick to the specified display? | ||
# allows administrators to lock users into one specific tty by | locktty=yes | ||
# setting the display=N option on a per-user basis.) | |||
locktty=no | |||
|
|
||
# The use of consolekit has recently become manditory with hal. However, | # Use consolekit for X session? | ||
# some users might prefer not using either one. If you don't want to | |||
# use consolekit, set the following variable to "no". | |||
consolekit=yes | consolekit=yes | ||
|
|
||
# Timeout for waiting for X session to register with consoleKit | # Timeout for waiting for X session to register with consolekit. | ||
cktimeout=30 | cktimeout=5 | ||
|
|||
# Additional arguments to pass to X server | |||
# When usexinit=yes, we use ~/.xinitrc when it exists or /etc/X11/xinit/xinitrc | |||
# when it doesn't. These are passed the chosen window manager as $1; note that | |||
# the stock /etc/X11/xinit/xinitrc ignores this and always starts twm and three | |||
# xterms. Your custom xinitrc should start the window manager supplied as $1 | |||
# instead. There is a sample xinitrc included at /usr/share/cdm/xinitrc.skel. | |||
# If usexinit=no, then we instead call the chosen window manager directly. | |||
usexinit=no | |||
|
|
||
# Additional arguments to pass to X server; it will be called as: | # Additional arguments to pass to X server; it will be called as: | ||
# exec /usr/bin/X :$display $serverargs vt$((xtty+display)) | # exec /usr/bin/X :$display $serverargs vt$((xtty+display)) | ||
serverargs="-nolisten tcp" | serverargs='-nolisten tcp' | ||
|
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,7 @@ | |||
#!/bin/sh - | |||
|
|||
if [[ "$(tty)" == /dev/tty1 ]]; then | |||
[[ -n "$CDM_SPAWN" ]] && return | |||
[[ -z "$DISPLAY`pgrep xinit`$SSH_TTY" ]] && exec cdm | |||
fi | |||
|
Oops, something went wrong.