Git Product home page Git Product logo

configng's Introduction

Armbian Configuration Utility

Updated: Wed 31 Jul 2024 23:44:46 NZST

Utility for configuring your board, adjusting services, and installing applications. It comes with Armbian by default.

To start the Armbian configuration utility, use the following command:

sudo armbian-config
  • System

    • S01 - Enable Armbian kernel upgrades
    • S02 - Disable Armbian kernel upgrades
    • S03 - Edit the boot environment (WIP)
    • S04 - Install Linux headers
    • S05 - Remove Linux headers
  • Network

    • N00 - Install Bluetooth support
    • N01 - Remove Bluetooth support
    • N02 - Bluetooth Discover
    • N03 - Install Infrared support
    • N04 - Uninstall Infrared support
    • N05 - Manage wifi network connections
    • N06 - Advanced Edit /etc/network/interface
    • N07 - Disconnect and forget all wifi connections (Advanced)
    • N08 - Toggle system IPv6/IPv4 internet protocol
    • N09 - (WIP) Setup Hotspot/Access point
  • Localisation

    • L00 - Change Global timezone (WIP)
    • L01 - Change Locales reconfigure the language and character set
    • L02 - Change Keyboard layout
    • L03 - Change APT mirrors
  • Software

    • I00 - Update Application Repository
    • I01 - CLI System Monitor
  • Help

    • H00 - About This system. (WIP)
    • H02 - List of Config function(WIP)

Install

Armbian installation

sudo apt install armbian-config

3rd party Debian based distributions

{
    sudo wget https://apt.armbian.com/armbian.key -O key
    sudo gpg --dearmor < key | sudo tee /usr/share/keyrings/armbian.gpg > /dev/null
    sudo chmod go+r /usr/share/keyrings/armbian.gpg
    sudo echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/armbian.gpg] http://apt.armbian.com $(lsb_release -cs) main  $(lsb_release -cs)-utils  $(lsb_release -cs)-desktop" | sudo tee /etc/apt/sources.list.d/armbian.list
    sudo apt update
    sudo apt install armbian-config
}

CLI options

Command line options.

Use:

armbian-config --help

Outputs:

Usage:  armbian-configng [option] [arguments]

    --help      -  Display this help message.
    main=Help   -  Display Legacy Options (Backward Compatible)

    --cli S01  -  Enable Armbian kernel upgrades
    --cli S02  -  Disable Armbian kernel upgrades
    --cli S03  -  Edit the boot environment (WIP)
    --cli S04  -  Install Linux headers
    --cli S05  -  Remove Linux headers
    --cli N00  -  Install Bluetooth support
    --cli N01  -  Remove Bluetooth support
    --cli N02  -  Bluetooth Discover
    --cli N03  -  Install Infrared support
    --cli N04  -  Uninstall Infrared support
    --cli N05  -  Manage wifi network connections
    --cli N06  -  Advanced Edit /etc/network/interface
    --cli N07  -  Disconnect and forget all wifi connections (Advanced)
    --cli N08  -  Toggle system IPv6/IPv4 internet protocol
    --cli N09  -  (WIP) Setup Hotspot/Access point
    --cli L00  -  Change Global timezone (WIP)
    --cli L01  -  Change Locales reconfigure the language and character set
    --cli L02  -  Change Keyboard layout
    --cli L03  -  Change APT mirrors
    --cli I00  -  Update Application Repository
    --cli I01  -  CLI System Monitor

Legacy options

Backward Compatible options.

Use:

armbian-config main=Help

Outputs:

Legacy Options (Backward Compatible)
Please use 'armbian-config --help' for more information.

Usage:  armbian-configng main=[arguments] selection=[options]

    armbian-configng main=System selection=Headers          -  Install headers:                                        
    armbian-configng main=System selection=Headers_remove   -  Remove headers:                                 

Development

Development is divided into three sections:

Click for more info:

Jobs / JSON Object

A list of the jobs defined in the Jobs file.

S01

Enable Armbian kernel upgrades

Jobs:

set_safe_boot unhold

S02

Disable Armbian kernel upgrades

Jobs:

set_safe_boot freeze

S03

Edit the boot environment (WIP)

Jobs:

get_user_continue "This will open /boot/armbianEnv.txt file to edit
CTRL+S to save
CTLR+X to exit
would you like to continue?" process_input
nano /boot/armbianEnv.txt

S04

Install Linux headers

Jobs:

Headers_install

S05

Remove Linux headers

Jobs:

Headers_remove

N00

Install Bluetooth support

Jobs:

see_current_apt 
debconf-apt-progress -- apt-get -y install bluetooth bluez bluez-tools
check_if_installed xserver-xorg && debconf-apt-progress -- apt-get -y --no-install-recommends install pulseaudio-module-bluetooth blueman

N01

Remove Bluetooth support

Jobs:

see_current_apt 
debconf-apt-progress -- apt-get -y remove bluetooth bluez bluez-tools
check_if_installed xserver-xorg && debconf-apt-progress -- apt-get -y remove pulseaudio-module-bluetooth blueman
debconf-apt-progress -- apt -y -qq autoremove

N02

Bluetooth Discover

Jobs:

get_user_continue "Verify that your Bluetooth device is discoverable!" process_input ; connect_bt_interface

N03

Install Infrared support

Jobs:

see_current_apt; debconf-apt-progress -- apt-get -y --no-install-recommends install lirc

N04

Uninstall Infrared support

Jobs:

see_current_apt; debconf-apt-progress -- apt-get -y --no-install-recommends install lirc

N05

Manage wifi network connections

Jobs:

nmtui connect

N06

Advanced Edit /etc/network/interface

Jobs:

get_user_continue "This will open interface file to edit
CTRL+S to save
CTLR+X to exit
would you like to continue?" process_input
nano /etc/network/interfaces

N07

Disconnect and forget all wifi connections (Advanced)

Jobs:

get_user_continue "Disconnect and forget all wifi connections
Would you like to continue?" process_input
LC_ALL=C nmcli --fields UUID,TIMESTAMP-REAL,TYPE con show | grep wifi |  awk '{print $1}' | while read line; \ 
do nmcli con delete uuid  $line; done > /dev/null

N08

Toggle system IPv6/IPv4 internet protocol

Jobs:

get_user_continue "This will toggle your internet protocol
Would you like to continue?" process_input
toggle_ipv6 | show_infobox

N09

(WIP) Setup Hotspot/Access point

Jobs:

get_user_continue "This operation will install necessary software and add configuration files.
Do you wish to continue?" process_input
hotspot_setup

L00

Change Global timezone (WIP)

Jobs:

dpkg-reconfigure tzdata

L01

Change Locales reconfigure the language and character set

Jobs:

dpkg-reconfigure locales
source /etc/default/locale ; sed -i "s/^LANGUAGE=.*/LANGUAGE=$LANG/" /etc/default/locale
export LANGUAGE=$LANG

L02

Change Keyboard layout

Jobs:

dpkg-reconfigure keyboard-configuration ; setupcon 

L03

Change APT mirrors

Jobs:

get_user_continue "This is only a frontend test" process_input

I00

Update Application Repository

Jobs:

get_user_continue "This will update apt" process_input
debconf-apt-progress -- apt update

I01

CLI System Monitor

Jobs:

armbianmonitor -m | show_infobox

H00

About This system. (WIP)

Jobs:

show_message <<< "This app is to help execute procedures to configure your system

Some options may not work on manually modified systems"

H02

List of Config function(WIP)

Jobs:

show_message <<< see_use
Jobs API / Helper Functions

These helper functions facilitate various operations related to job management, such as creation, updating, deletion, and listing of jobs, acting as a practical API for developers.

Description Example Credit
Generate a Help message legacy cli commands. see_cli_legacy Joey Turner
Run time variables Migrated procedures from Armbian config. set_runtime_variables Igor Pecovnik
Generate this markdown table of all module_options see_function_table_md Joey Turner
Display a menu from pipe show_menu <<< armbianmonitor -h ; Joey Turner
Build the main menu from a object generate_top_menu 'json_data' Joey Turner
Migrated procedures from Armbian config. is_package_manager_running Igor Pecovnik
Migrated procedures from Armbian config. check_desktop Igor Pecovnik
Generate Document files. generate_readme Joey Turner
Needed by generate_menu Joey Turner
Display a Yes/No dialog box and process continue/exit get_user_continue 'Do you wish to continue?' process_input Joey Turner
Display a message box show_message <<< 'hello world' Joey Turner
Migrated procedures from Armbian config. connect_bt_interface Igor Pecovnik
Freeze/unhold Migrated procedures from Armbian config. set_safe_boot unhold or set_safe_boot freeze Igor Pecovnik
Check when apt list was last updated see_current_apt Joey Turner
Migrated procedures from Armbian config. check_if_installed nano Igor Pecovnik
Generate 'Armbian CPU logo' SVG for document file. generate_svg Joey Turner
Remove Linux headers Headers_remove Joey Turner
Show or hide menu items based on conditions toggle_menu_item Joey Turner
Update submenu descriptions based on conditions update_submenu_data Joey Turner
sanitize input cli sanitize_input
Check if a domain is reachable via IPv4 and IPv6 check_ip_version google.com Joey Turner
Migrated procedures from Armbian config. set_header_remove Igor Pecovnik
Generate a submenu from a parent_id generate_menu 'parent_id' Joey Turner
Generate a markdown list json objects using jq. see_jq_menu_list Joey Turner
Generate jobs from JSON file. generate_jobs_from_json Joey Turner
Install kernel headers is_package_manager_running Joey Turner
Set up a WiFi hotspot on the device hotspot_setup Joey Turner
Toggle IPv6 on or off toggle_ipv6 Joey Turner
Generate a Help message for cli commands. see_cli_list Joey Turner
Generate JSON-like object file. generate_json Joey Turner
Change the background color of the terminal or dialog box set_colors 0-7 Joey Turner
Serve the edit and debug server. serve_doc Joey Turner
Update JSON data with system information update_json_data Joey Turner
pipeline strings to an infobox show_infobox <<< 'hello world' ; Joey Turner
Show the usage of the functions. see_use Joey Turner
Check the internet connection with fallback DNS see_ping Joey Turner
Secure version of get_user_continue get_user_continue_secure 'Do you wish to continue?' process_input Joey Turner
Runtime / Board Statuses

(WIP)

This section outlines the runtime environment to check configurations and statuses for dynamically managing jobs based on JSON data.

(WIP)

Testing and contributing

Get Development

Install the dependencies:

sudo apt install git jq whiptail

Get Development and contribute:

{
    git clone https://github.com/armbian/configng
    cd configng
    ./armbian-configng --help
}

Install and test Development deb:

{
    sudo apt install whiptail
    latest_release=$(curl -s https://api.github.com/repos/armbian/configng/releases/latest)
    deb_url=$(echo "$latest_release" | jq -r '.assets[] | select(.name | endswith(".deb")) | .browser_download_url')
    curl -LO "$deb_url"
    deb_file=$(echo "$deb_url" | awk -F"/" '{print $NF}')
    sudo dpkg -i "$deb_file"
    sudo dpkg --configure -a
    sudo apt --fix-broken install
}

configng's People

Contributors

tearran avatar igorpecovnik avatar schwar3kat avatar mordiaky avatar sgjava avatar

Watchers

 avatar

Forkers

kadie78

configng's Issues

Development Proposal

Armbian ConfigNG Development Proposal

This proposal outlines a plan to enhance the Armbian configuration tool, armbian-config, by dividing it into two distinct parts: a front end focused on user interface and a back end dedicated to system configuration logic.

1. Split Development

The first step is to divide armbian-config into two distinct parts:

  • Front End: This part will focus on the user interface and experience, with the goal of making armbian-config more intuitive and user-friendly.
  • Back End: This part will focus on system configuration logic, with the aim of maximizing the potential of bash for system configuration and tackling complex tasks and configurations.

2. Bash Compliance

Both parts should adhere to bash scripting limitations and best practices:

  • Front End (armbian-config): The front end should utilize common bash utilities for simplicity and maintainability.
  • Back End (configng): The back end should explore advanced bash usage, leveraging the principles of functional programming and the bash-utility library for complex tasks and configurations.

3. Restructuring

Based on the exploration of practical examples and the results obtained over the past 6 months, this proposal suggests a restructuring of the development process:

  • Rename the current config to configlg (indicating its legacy status).
  • Move the user experience (UX) part of configng (the next-gen configurator) to config.
  • Retain the back end parts in configng.

This separation would allow each component to be developed and refined independently, potentially increasing the likelihood of success.

The objective of this proposal is to develop a robust, user-friendly tool that fully utilizes the power of bash for system configuration.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.