Tag Info

New answers tagged

0

I just made a discovery: How can I launch applications from 2 ttys on launch? One of the comments mentions something called openvt. This command appears to do the exact thing I'm after! http://linux.about.com/library/cmd/blcmdl1_openvt.htm Unless anyone knows different, I think this is probably the "correct" way to do this. (I just tried it, and it ...


0

If you are on a console TTY on Linux or FreeBSD, you can use svgalib to show images in graphics mode, without X11. The library can switch the console to graphics mode - it's just not commonly used today, because X11 has it's advantages. There is an image viewer for the console, which may need some tweaks to build it because it's somewhat outdated, but it's ...


1

You can directly draw graphs as ASCII with gnuplot; Set the terminal type to dumb, that's all you need: $ gnuplot gnuplot> set terminal dumb Terminal type set to 'dumb' Options are 'feed size 79, 24' gnuplot> plot sin(x) 1 ++---------------***---------------+---**-----------+--------**-----++ + * * + * ** ...


9

setsid sh -c 'exec command <> /dev/tty2 >&0 2>&1' As long as nothing else is using the other TTY (/dev/tty2 in this example), this should work. This includes a getty process that may be waiting for someone to login; having more than one process reading its input from a TTY will lead to unexpected results. setsid takes care of starting ...


5

On the second tty there will be normally a program running, either some login program or some shell like bash. If you want interaction you either would have to replace the login program with yours, or tell a shell to run the program as if the program was started from the commandline. A more simple solution, IMO, would be to start a tmux session after ...


0

The Emacs server The best way to do this is to contact the Emacs server and run an Emacs Lisp command. emacsclient -e '(with-current-buffer "*scratch*" (write-file "~/scratch.txt"))' Or you could attach Emacs to the current terminal and do whatever you want there, such as switch to the `scratch buffer and save its contents. emacsclient -nw ...


0

As a general rule, you never want to do ps aux | grep -v grep, that's what pgrep is for: pgrep -u root The command above will list all processes started by root. You do need ps if you want to 1) exclude those whose name is enclosed with [] and 2) restrict to those not listed as running in ttys. You can avoid some of the problems mentioned in the other ...


3

"arguments that cannot be located" typically means that the process has no command line arguments because it's not a normal user process but one started directly by the kernel. When you're looking for a process that's doing something wrong, it's usually not one of these kernel processes, so your colleague suggested filtering those out. tty is not "just a ...


1

Frankly it sounds a bit silly. grep -Ev "[[]" excludes processes having the opening square bracket in their command. While these are often kernel processes, even a regular user space program can have that character present on the command line. grep -Ev "tty" is the same in pale blue. It excludes processes having the string "tty" somewhere on their line ...


1

how can I switch to tty1 where xorg session is running and back to the session? Because X is running on tty1, but not on tty2. A tty is a "virtual terminal", meaning it is supposed to represent an actual physical screen and keyboard, etc. The terminals are all on simultaneously, but since you only have enough hardware to interface with one at a time, ...


2

You can switch tty as you have described by pressing: Ctrl+Alt+F1 : (tty1) Ctrl+Alt+F2 : (tty2) Ctrl+Alt+F3 : (tty3) Ctrl+Alt+F4 : (tty4) Ctrl+Alt+F5 : (tty5) Ctrl+Alt+F6 : (tty6) Ctrl+Alt+F7 : (x is here when using ubuntu tty7) You can also use Alt+Left/Right Note that different distros assign these differently. RHEL 6, for example, assigns the X ...


1

The direct aequivalent of unzip -p -a for 7zip is 7z e -so -bd. But that complains it does not want to write to stdout (even if I clearly told itso): $ 7z e -so -bd file.zip 7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18 p7zip Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,8 CPUs) Error: I won't write data and program's messages ...


0

The corresponding 7zip command is 7zip x -so that will extract your archive to the standard output stream.



Top 50 recent answers are included