Tag Info

Hot answers tagged

15

A linux kernel should store an on-screen log for your vts in the corresponding /dev/vcsa*[ttynum] device. It is why the following works: echo hey >/dev/tty2 dd bs=10 count=1 </dev/vcs2 ...which prints... hey The corresponding /dev/vcsa[ttynum] device will store an encoded version of the formatted text on-screen, whereas the ...


10

The ~/SDRIVE directory is mounted as a fuse filesystem which means that the filesystem operations are handled by some userspace program, not by the kernel. Those errors are coming from the filesystem implementation, which could be anything at all and is probably some kind of site-custom software. This is one of those times where you're probably going to ...


8

Pipe the output through cat: man who | cat This works because man (or actually pager, which is a symlink to less) will check to see what kind of terminal is connected to STDOUT. If there is no terminal, i.e if STDOUT is redirected to a file or pipe, then there will be no attempt to format the text so that it can be interactively scrolled.


6

$TERM is read and interpreted by the terminfo system. terminfo also refers to the database of terminal descriptions which you can find on most systems in /usr/share/terminfo. $TERM must match one of the entries in that database. There was also an older library called termcap which had fewer capabilities, but terminfo has replaced it. In modern systems, ...


5

Use cat as the pager; for example this will dump the entire manpage for command ls: man -P cat ls Note that this isn't portable (I only tried this on Debian and Mac OS systems); for example, on Ultrix or Tru64, -P sets the manpath.


4

The "controlling terminal" aka. CTTY, is distincted from "the terminal a process is interacting with". Standard compliant way of getting the path of ctty is ctermid(3). While in freebsd an actual path is looked up[1], the implementation in glibc as of version 2.21 unconditionally returns "/dev/tty"[2]. ps(1) from the linux procps 3.2.8 package, read the ...


4

You can do this with screen in detached mode. Put something like this in your startup script: screen -d -m /opt/matlab_2013b/bin/matlab It will create a detached screen session, which should allow the script to start. You can attach to the screen session as normal at any time. You can almost certainly achieve the same effect with tmux, but I haven't used ...


4

You have two basic options. If you've already started the program, hit CTRL-Z to suspend it, then run bg to put that job into the background and let it keep working. If you haven't started the job yet, start it by running ./theprogram & to put it in the background right away.


4

Add at the end of your script: read junk See Bash Manual for more info.


4

You are already re-logged in with the new ssh session that you set up. If you want to connect the old edit session to you newly logged in session you can try reptyr which "reparents a running program to a new terminal". If this disconnecting happens often there are multiple things you can do: set ServerAliveInterval and/or TCPKeepAlive in ...


3

One age-old stunt: man whatever | col -b > whatever.txt Using the very obscure col command filters out all the weird backspaces and duplicate characters that nroff uses to do formatting. Then, you can use your choice of text editor to look over the entire man page.


3

You can hold the Shift key to use the normal mouse selection while xterm mouse-tracking is enabled. That works in all terminal emulators that I know (xterm, vte (like xfce-terminal) or rxvt-based ones). In vim specifically, mouse is normally not enabled by default in terminals. So there's probably a set mouse=a somewhere in you ~/.vimrc or your OS-supplied ...


2

Before X Windows there were several attempts at 'inband' graphic protocols. 4014 mode in classic xterm is one. I've seen it do some real work about 25 years ago to do wire frame 3d drawings. A more powerful graphics protocol in early 1980's VT300+ terminals was the DEC REGIS graphics. This was a full raster graphics language with options for 'mouse like' ...


2

Unfortunately, you cannot open old tabs in the Gnome-Terminal. Because Firefox is a web browser when you open a previous tab like that it just goes to the history file and goes to the website as the last entry. It is reloaded from the ground up. The Gnome-Terminal does not activate/go to set pages, instead it is just an interface to the console so you ...


2

You can use screen command and start a job such as compiling kernel such as : screen -R -S YOUR_SESSION_NAME Then press entern to return to session for exit to session : CTRL+a+d For listing your sessions: mohsen@debian:~$ screen -ls There is a screen on: 30473.compilekernel (03/06/2015 05:59:05 AM) (Detached) 1 Socket in ...


2

gnu screen http://www.gnu.org/software/screen/ is an application that runs in a terminal, creating a sort of virtual session. When you disconnect, screen continues to run as a detached entity, to which you can then re-connect later. First, install screen if it is not already installed (it probably is). Then log in to your server. Start a screen session: ...


2

Replacing cat that was used from the terminal and with awk -F, -v MID="$machine_ID" -v MNR="$machine_number" '( $4 == MID ) && ( $5 == MNR ) && ( $7 == "status" ) {t=$10} END{print int(t/60)}' /home/ed/start_up_job/my_datum_file.csv worked. Understanding the code: awk -F defines the field seperator as , -v assigns a value to a program ...


2

The TERM variable is interpreted by each application, via system libraries. Its value is a name which is looked up in a database. Depending on the Unix flavor and its age, the database can be either termcap (traditional, not used much nowadays) or terminfo (modern, inasmuch as it was meant as an improvement on termcap, and used by most systems nowadays). ...


2

Go to (/log in on) another terminal and run sudo screendump N > screenoutput.txt, where N is the number of the terminal you want. No backlog, I fear. If those virtual consoles keep one, I've never seen it. But it gets you all you can see on that terminal.


2

If you create something via a GUI, normally the only command that runs is the GUI, it doesn't call other commands that you would invoke from the commandline. E.g. if the GUI is used to create a directory, it calls the C function mkdir(), not the command mkdir that you would use on the commandline (mkdir uses mkdir() as well and they both rely on a system ...


2

bash has both an interactive mode and a batch mode. It enters the corresponding mode depending if stdin is a terminal or not. bash # interactive cat|bash # non-interactive: stdin is a pipe not a terminal cat|bash -i # explicitly request interactive mode In interactive mode bash will print a prompt (configurable by the PS1 variable) and also set ...


1

You are having this problem because ls is colorizing its output, and directories are probably being displayed with the bold attribute on. However it seems that your chosen font doesn't have a bold variant, and another font is substituted in an attempt to simulate the bold effect. This what you are seeing. You can modify the LS_COLORS environment variable ...


1

If you use a terminal emulator that supports scrolling back, and have set the size of the scrollback buffer to something "sufficently large", you can use that scrollback for navigating the output. I would use MANPAGER=cat man who to write out all the man page text at once to the terminal (it's a variant of man -P cat ls). I use konsole as terminal, ...


1

You have to clear those escapes as you read them - do what the terminal does and overwrite them. This emulates the output you describe w/ seq: seq -s " $(printf '\033[A')" 10 If it writes out to a terminal which interprets that escape it will appear to print only 10. But as you note in the question, it's really printing all of those numbers over one ...


1

I assume you find the fact that the window starts so small annoying, and do not actually want to programatically change the window size. The shortcut to maximize any window is alt+F5. If that is too inconvenient you can change it via the system settings, or just drag the window up against the top edge of the screen, after making sure you have that activated ...


1

Try the command nmtui; when in doubt, look at documentation: installation and usage from Redhat.


1

sounds like you may be looking to change from the character based console to the gnome/GUI one. This is controlled by the system boot target. You need to have the host boot up with the graphical.target (the GUI). e.g. To get to that run level, log in as root and type systemctl isolate graphical.target on the command line. To make that persist over ...


1

"source works, but why?" - When you run a script that is setting environment variables, you start a subshell by default. The newly set variables don't necessarily come back to your top level shell. When you source a script, you're telling your shell to run the commands in your current shell and not start a subshell, thus the newly set variables will be in ...


1

A Terminal Tab once closed flushes out all the output that was available on the screen. Plus, there is nothing that keeps a tab on what output was shown to which tab under normal circumstances. That is why, there is no functionality to go back. Though Firefox allows to re-open the Closed tab, it first looks into Cache, otherwise it requests the Server ...


1

The POSIX spec really hedges its bets where the Controlling Terminal is concerned, and which it defines thus: Controlling Terminal The question of which of possibly several special files referring to the terminal is meant is not addressed in POSIX.1. The pathname /dev/tty is a synonym for the controlling terminal associated with a process. That's in ...



Only top voted, non community-wiki answers of a minimum length are eligible