Is there a way to change thecmd background color for the raspberry pi? if so do I have to change the writing color too?. Also, can I make the the writing bigger?
Thanks.
Re: CMD background color
hi, what window are you talking about?
-a- RASPBIAN lite HDMI
-b- Raspbian desktop HDMI lxterminal window

-c- PC putty shh terminal window
-a- RASPBIAN lite HDMI
-b- Raspbian desktop HDMI lxterminal window

-c- PC putty shh terminal window
Re: CMD background color
I am using VNC with my raspberry, then I open the command prompt window and call
then my data is printed on the command prompt.
Code: Select all
python sensor3.py
Re: CMD background color
The colour selection for lxterminal (show above) is found in the Edit Menu under Preferences and Style
PeterO
KLL beat me to it !
PeterO
KLL beat me to it !
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson
Re: CMD background color
as you see at my LOGIN, there are bash text terminal colors, more here
but that can be used from python also

and yes, it also works from PUTTY SSH ( i use bitvise ssh client )

____________________________________________________
or you go the next step and make a graphic python program ( what creates a application window )
that you can run only from desktop, not putty terminal...
PYTHON ways: Tkinter, pygame, matplotlib, pygtk, WX, QT4, QT5, QT5 QT quick qml
but if you think linux desktop applications are not your future, better try webserver HTML5 ( by python3 flask )
but that can be used from python also
Code: Select all
pi@RPI3:~/projects $ ls
BACKUP_from_DATA python3_sensor_terminalcolors.py
pi@RPI3:~/projects $ leafpad python3_sensor_terminalcolors.py
pi@RPI3:~/projects $ chmod +x python3_sensor_terminalcolors.py
pi@RPI3:~/projects $ ./python3_sensor_terminalcolors.py
python3_sensor_terminalcolors.py
sensor1:123.45
sensor2:67.8
pi@RPI3:~/projects $ cat python3_sensor_terminalcolors.py
#!/usr/bin/python3
# use terminal color defs as from BASH
# raspberry pi
WHT='\033[37;44m' # white on blue background
BLU='\033[47;34m' # blue on white background
MAG='\033[47;35m' # magenta on white background
GRN='\033[0;32m' # green on NO background
RED='\033[47;31m' # red on white background
BLK='\033[47;30m' # black on white background
BOLD='\033[1m' # and BOLD
END2='\033[0m' # end style
MTXT=''
MTXT='python3_sensor_terminalcolors.py'
print("{color}{text}{default}".format(color=RED,text=MTXT,default=END2))
VALUE=123.45
MTXT='sensor1'
print("{color}{text}{default}:{vcolor}{vtext}{default}".format(color=BLU,text=MTXT,vcolor=MAG,vtext=str(VALUE),default=END2))
VALUE=67.8
MTXT='sensor2'
print("{color}{text}{default}:{vcolor}{vtext}{default}".format(color=BLU,text=MTXT,vcolor=MAG,vtext=str(VALUE),default=END2))
pi@RPI3:~/projects $

and yes, it also works from PUTTY SSH ( i use bitvise ssh client )

____________________________________________________
or you go the next step and make a graphic python program ( what creates a application window )
that you can run only from desktop, not putty terminal...
PYTHON ways: Tkinter, pygame, matplotlib, pygtk, WX, QT4, QT5, QT5 QT quick qml
but if you think linux desktop applications are not your future, better try webserver HTML5 ( by python3 flask )