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
- 179 LFX Mentorship
- 179 LFX Mentorship: Linux Kernel
- 776 Linux Foundation IT Professional Programs
- 384 Cloud Engineer IT Professional Program
- 175 Advanced Cloud Engineer IT Professional Program
- 76 DevOps IT Professional Program - Discontinued
- 7 DevOps & GitOps IT Professional Program
- 103 Cloud Native Developer IT Professional Program
- 7.7K Training Courses & Learning Paths
- 16 AI & ML Training
- 1 Blockchain & Decentralized Identity Training
- 44 Cloud & Containers Training
- 6 Cybersecurity Training
- 4 DevOps & Site-Reliability Training
- 3 Linux Kernel Development Training
- 2 Networking Training
- 2 Open Source Best Practice Training
- 6 System Administration Training
- 1 System Engineering Training
- 6 Web & Application Development Training
- 798 Hardware
- 202 Drivers
- 68 I/O Devices
- 37 Monitors
- 96 Multimedia
- 173 Networking
- 91 Printers & Scanners
- 92 Storage
- 774 Linux Distributions
- 82 Debian
- 68 Fedora
- 24 Linux Mint
- 13 Mageia
- 24 openSUSE
- 151 Red Hat Enterprise
- 32 Slackware
- 13 SUSE Enterprise
- 356 Ubuntu
- 473 Linux System Administration
- 31 Cloud Computing
- 73 Command Line/Scripting
- Github systems admin projects
- 104 Linux Security
- 79 Network Management
- 102 System Management
- 46 Web Management
- 173 Mobile Computing
- 32 Android
- 126 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 407 Off Topic
- 128 Introductions
- 35 Study Material
- 1.1K Programming and Development
- 311 Kernel Development
- 728 Software Development
- 1K Software
- 421 Applications
- 183 Command Line
- 5 Compiling/Installing
- 71 Games
- 320 Installation
- Archived
- 183 Small Talk
- 2 LFD140 Class Forum
- 1.4K LFS258 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)