Repository navigation
fix: register ddm as a display manager via debconf #89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| #!/bin/sh | ||
| # Debian ddm package configuration script | ||
| # based on lightdm script (based on xdm script) | ||
| # Copyright 2001 Branden Robinson. | ||
| # Licensed under the GNU General Public License, version 2. | ||
|
|
||
| set -e | ||
|
|
||
| # source debconf library | ||
| . /usr/share/debconf/confmodule | ||
|
|
||
| # set default display manager | ||
| DEFAULT_DISPLAY_MANAGER_FILE=/etc/X11/default-display-manager | ||
|
|
||
| THIS_PACKAGE=ddm | ||
|
|
||
| OWNERS= | ||
| if db_metaget shared/default-x-display-manager owners; then | ||
| OWNERS="$RET" | ||
| fi | ||
|
|
||
| CHOICES= | ||
| if db_metaget shared/default-x-display-manager choices; then | ||
| CHOICES="$RET" | ||
| fi | ||
|
|
||
| if [ "$OWNERS" != "$CHOICES" ]; then | ||
| # Strip architecture qualifiers (e.g. "ddm:amd64" -> "ddm") so that the | ||
| # displayed choices and the value stored in default-display-manager file | ||
| # (plain package name) stay in sync. | ||
| OWNERS_CLEAN=$(echo "$OWNERS" | sed 's/:[[:alnum:]_-]*//g') | ||
| db_subst shared/default-x-display-manager choices "$OWNERS_CLEAN" || : | ||
| db_fset shared/default-x-display-manager seen false || : | ||
| fi | ||
|
|
||
| # debconf is not a registry; use the current contents of the default display | ||
| # manager file to pre-answer the question if possible | ||
| if [ -e "$DEFAULT_DISPLAY_MANAGER_FILE" ]; then | ||
| CURRENT_DEFAULT=$(grep -v '^[[:space:]]*#' "$DEFAULT_DISPLAY_MANAGER_FILE" | head -n 1) | ||
| if [ -n "$CURRENT_DEFAULT" ]; then | ||
| CURRENT_DEFAULT=$(basename "$CURRENT_DEFAULT") | ||
| db_set shared/default-x-display-manager "$CURRENT_DEFAULT" | ||
| fi | ||
| else | ||
| CURRENT_DEFAULT= | ||
| if db_get shared/default-x-display-manager; then | ||
| CURRENT_DEFAULT="$RET" | ||
| fi | ||
| fi | ||
|
|
||
| db_input high shared/default-x-display-manager || : | ||
| db_go || : | ||
|
|
||
| # using this display manager? | ||
| NEW_DEFAULT= | ||
| if db_get shared/default-x-display-manager; then | ||
| NEW_DEFAULT="$RET" | ||
| fi | ||
|
|
||
| # move the default display manager file if we are going to change it | ||
| if [ -n "$NEW_DEFAULT" ]; then | ||
| if [ "$NEW_DEFAULT" != "$CURRENT_DEFAULT" ]; then | ||
| if [ -e "$DEFAULT_DISPLAY_MANAGER_FILE" ]; then | ||
| mv "$DEFAULT_DISPLAY_MANAGER_FILE" \ | ||
| "${DEFAULT_DISPLAY_MANAGER_FILE}.dpkg-tmp" | ||
| fi | ||
| fi | ||
| fi | ||
This file contains hidden or 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 hidden or 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 hidden or 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 | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| Template: ddm/daemon_name | ||
| Type: string | ||
| Default: /usr/bin/ddm | ||
| Description: for internal use only | ||
|
wineee marked this conversation as resolved.
|
||
|
|
||
| Template: shared/default-x-display-manager | ||
| Type: select | ||
| Choices: ${choices} | ||
| Description: Default display manager: | ||
| A display manager is a program that provides graphical login capabilities for | ||
| the X Window System and Wayland compositors. | ||
| . | ||
| Only one display manager can manage a given X server, but multiple display | ||
| manager packages are installed. Please select which display manager should | ||
| run by default. | ||
| . | ||
| Multiple display managers can run simultaneously if they are configured to | ||
| manage different servers; to achieve this, configure the display managers | ||
| accordingly, edit each of their init scripts in /etc/init.d, and disable the | ||
| check for a default display manager. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.