cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
xmacur06
Observer
Observer
644 Views
Registered: ‎05-31-2018

Petalinux Terminal/console change colors

Jump to solution

Hi all,

I am newbie in Petalinux ... and I would like now, where can I change colors for my terminal/console?

I would like to have colors  as demo Linux from Avent microzed (on the picture).

 

Regards,

Jachym

Screenshot from 2019-07-18 13-50-53.png
0 Kudos
1 Solution

Accepted Solutions
sandeepg
Moderator
Moderator
616 Views
Registered: ‎04-24-2017

Hi @xmacur06 ,

Below is the steps you need to follow.

1. Create a base-files directory

 

$ mkdir <plnx-proj-root>/project-spec/meta-user/recipes-core/base-files

 

2. Create base-files_%.bbappend and 

$ vim <plnx-proj-root>/project-spec/meta-user/recipes-core/base-files/base-files_%.bbappend

3. Add color to terminal profile depending on what you need refer https://wiki.archlinux.org/index.php/Color_output_in_console

https://www.tldp.org/HOWTO/html_single/Text-Terminal-HOWTO/#colors

 

do_install_append () {
	echo "alias ls='ls --color=auto'" >> ${D}${sysconfdir}/profile
}

4. Rebuild rootfs

$ petalinux-build -x cleansstate
$ petalinux-build
Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------

View solution in original post

Tags (1)
1 Reply
sandeepg
Moderator
Moderator
617 Views
Registered: ‎04-24-2017

Hi @xmacur06 ,

Below is the steps you need to follow.

1. Create a base-files directory

 

$ mkdir <plnx-proj-root>/project-spec/meta-user/recipes-core/base-files

 

2. Create base-files_%.bbappend and 

$ vim <plnx-proj-root>/project-spec/meta-user/recipes-core/base-files/base-files_%.bbappend

3. Add color to terminal profile depending on what you need refer https://wiki.archlinux.org/index.php/Color_output_in_console

https://www.tldp.org/HOWTO/html_single/Text-Terminal-HOWTO/#colors

 

do_install_append () {
	echo "alias ls='ls --color=auto'" >> ${D}${sysconfdir}/profile
}

4. Rebuild rootfs

$ petalinux-build -x cleansstate
$ petalinux-build
Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------

View solution in original post

Tags (1)