Welcome to the Linux Foundation Forum!
difference in GUI & CLI in command execution
gr8linux
Posts: 26
some commands give different output in graphical terminal and command line, why they do so?
e.g. $ echo -e "\033[5m"
will set blinking text in CLI mode but it wont work in Xterm........ why???
there are many commands with this problem.
0
Comments
-
Actually it is not a "problem". the CLI was and for many remains the primary interface to the system. Almost all commands were writen to work with the CLI. there are lots of special cases like that that enhance the CLI. These special cases are not input to the command but are processes by the shell or CLI. Xterm does not process these shell commands. that is why the same string will produce different effects in a CLI and Xtem command windows.
-jeff0 -
and what abt when a command gives output on xterm but not on CLI
e.g. echo -e "\033[1m"
will bold the text on xterm but wont affect the CLI.................
shell are the same on both xterm & CLI......... then why it happens?
is it a case of some capabilities of shell or something else...........0 -
The effect of escape sequences (special strings of characters that control terminal operation) varies from terminal to terminal. The basic xterm is I believe a VT-120 terminal emulator, so the VT-100/120 terminal sequences apply. The console command line may be different, as might be the KDE or Gnome console windows CLI.
Back in the days before GUI's were common, there were dozens of different terminal manufacturers, and most had their own sets of commands, which is what terminal emulators sprang from, so that a generic program could emulate any of these terminals, such as HP, IBM, DEC, Qume, Tektronix, etc. In my deep, dark past I wrote a terminal emulator program that could use the termcap file for any terminal to drive its internal state machine and convert that into the actual terminal you were running on. It was a pretty slick bit of work, if I have to say so for myself. I used it as a component in an implementation of the Telnet client I wrote so that it could run full-screen applications on any system, even those that had no termcap database, simply by emulating the standard terminal for that system. HP systems were popular.0
Categories
- All Categories
- 175 LFX Mentorship
- 175 LFX Mentorship: Linux Kernel
- 745 Linux Foundation IT Professional Programs
- 372 Cloud Engineer IT Professional Program
- 168 Advanced Cloud Engineer IT Professional Program
- 73 DevOps IT Professional Program - Discontinued
- 3 DevOps & GitOps IT Professional Program
- 98 Cloud Native Developer IT Professional Program
- 7.6K Training Courses & Learning Paths
- AI & ML Training
- Blockchain & Decentralized Identity Training
- 1 Cloud & Containers Training
- Cybersecurity Training
- DevOps & Site-Reliability Training
- Linux Kernel Development Training
- Networking Training
- Open Source Best Practice Training
- System Administration Training
- System Engineering Training
- Web & Application Development Training
- 2 LFD103-JP クラス フォーラム
- 4 LFD210-CN Class Forum
- 764 LFD259 Class Forum
- 681 LFS101 Class Forum
- 2 LFS158-JP クラス フォーラム
- 162 LFS207 Class Forum
- 3 LFS207-DE-Klassenforum
- 4 LFS207-JP クラス フォーラム
- 61 LFS241 Class Forum
- 52 LFS242 Class Forum
- 42 LFS243 Class Forum
- 19 LFS244 Class Forum
- 4 LFS250-JP クラス フォーラム
- 166 LFS253 Class Forum
- 1.4K LFS258 Class Forum
- 792 Hardware
- 202 Drivers
- 68 I/O Devices
- 37 Monitors
- 95 Multimedia
- 173 Networking
- 91 Printers & Scanners
- 87 Storage
- 768 Linux Distributions
- 81 Debian
- 67 Fedora
- 22 Linux Mint
- 13 Mageia
- 24 openSUSE
- 150 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 356 Ubuntu
- 465 Linux System Administration
- 31 Cloud Computing
- 73 Command Line/Scripting
- Github systems admin projects
- 98 Linux Security
- 78 Network Management
- 101 System Management
- 46 Web Management
- 106 Mobile Computing
- 18 Android
- 73 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 392 Off Topic
- 121 Introductions
- 181 Small Talk
- 29 Study Material
- 946 Programming and Development
- 310 Kernel Development
- 618 Software Development
- 979 Software
- 371 Applications
- 182 Command Line
- 5 Compiling/Installing
- 68 Games
- 317 Installation
- Archived
- 2 LFD140 Class Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)