Comments (9)
OK. --batch
should preclude the color from changing at all. I've modified the code in sdm to honor --batch
so it won't change at all.
This will be in the next update to sdm later this week.
from sdm.
Thanks for trying sdm. Sorry to hear that you're having an issue.
Unfortunately, the problem you are seeing with konsole
appears to be due to a deficiency in the konsole terminal emulator. From my testing, konsole returns the correct FG and BG colors, but does not return the cursor color. Further, when sdm presents the appropriate colors to konsole for restoring, they are not honored by konsole.
This code works correctly when using the xterm
terminal emulator and others, which properly and completely honor the color escape sequences.
To avoid this unpleasant mis-colorization sdm will be updated to enable the console colorizing to be disabled using a specific setting (--mcolors 0
for mount and --ecolors 0
for explore and customize). In this case sdm will not modify the terminal colors and they will remain at whatever they are prior to running sdm.
Addenda: Curiously, the following bash function (which you can add to your .bashrc if desired) does work on konsole. But this is the same code that sdm uses, and I've verified that sdm is doing the right thing. I don't understand why it works with this function and not in sdm, but the above workaround will be implemented in lieu of spending time chasing down the root cause, which is likely to be some konsole oddity.
function xtset() {
#
# set xterm color. can specify 3 sets of pairs (e.g., fg yellow bg black cursor red)
# $1=fg|bg|cursor
# $2=color to set
# if 'xtset reset' is used, the terminal colors are reset to white bg and black fg
# Colors are listed in /etc/X11/rgb.txt (or /usr/share/X11/rgb.txt)
#
function xtsetx() {
case "$1" in
fg) printf "\e]10;${2}\a"
;;
bg) printf "\e]11;${2}\a"
;;
cur*) printf "\e]12;${2}\a"
;;
*) echo "Usage: xtset fg|bg|cur*sor color..."
;;
esac
}
[ "$1" == "reset" ] && xtsetx fg black && xtsetx bg white && return
[ "$1" != "" ] && xtsetx "$1" "$2"
[ "$3" != "" ] && xtsetx "$3" "$4"
[ "$5" != "" ] && xtsetx "$5" "$6"
} ; declare -fx xtset
from sdm.
Thanks. A switch to disable colorizing completely would be a good solution. Personally I use the sdm in an image building script for CI, so colors have no sense there.
from sdm.
Thanks. A switch to disable colorizing completely would be a good solution. Personally I use the sdm in an image building script for CI, so colors have no sense there.
Are you using the --batch
switch on your customize command? sdm won't colorize the terminal and operates non-interactively to completion.
from sdm.
Yes, i use --batch but sdm uses colors anyway.
from sdm.
Could you provide the (appropriately redacted) command string that you are using? It shouldn't be coloring with --batch.
What I see at the end of your screen output is:
* Enter shell command prompt
'exit' to back to host system
which will not appear if you use --batch
:
* Customization complete
* Batch Mode exit
umount: /mnt/sdm/boot/firmware unmounted
Thx
from sdm.
Yes, I added --batch later. I rechecked with unmodified sdm (I disabled color changing in the code before) — you are right, with --batch background color is changed to blue during of phase 1 but restored successfully.
from sdm.
--ecolors 0
and --mcolors 0
added in V12.3. Please test/verify. Thx
from sdm.
No activity so closing issue.
from sdm.
Related Issues (20)
- Multiline plugin notes HOT 2
- Dump kernel image and DBT HOT 2
- More complex settings (pi ups) HOT 2
- Boot from nvme? HOT 2
- Hyphens and underscores in hostname HOT 4
- Error with --1piboot option HOT 1
- `invalid user` when using chown with custom user HOT 8
- Multiple sdm customize runs HOT 8
- Are plugin arguments robust to whitespace? HOT 15
- Can't set wifi ssid and password in the burn phase HOT 4
- Specify wlan1 instead of wlan0? HOT 3
- Get Luks key from OTP? HOT 1
- Installing on Fedora / Arch? HOT 3
- Network plugin fails to add wifi if nmconnections manually added previously HOT 5
- Example of installing SyncThing through SDM? HOT 21
- System don't boot after encryption - /dev/mapper/cryptroot does not exist HOT 14
- How to best update sdm? HOT 3
- apt returned an error; review /etc/sdm/apt.log --> /etc/sdm/apt.log does not exist HOT 10
- Steps to install zerotier using sdm HOT 9
- Additional configuration of (user-specific) ssh HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sdm.