Hot answers tagged

17 votes
Accepted

How to copy/paste between a console and an X session?

The "best" way to achieve that sort of thing is almost probably opinion based. The way I prefer uses the backlog of the native terminal. Knowing that the backlog of tty[N] can be accessed ...
user avatar
  • 2,875
7 votes

How to copy/paste between a console and an X session?

You can use the xsel to set the clipboard in X, and you can set the DISPLAY variable to tell it which X to connect to. As long as you are using the same user account, programs started from a terminal ...
user avatar
  • 1,950
7 votes

How to copy/paste between a console and an X session?

Another thing you can do is use screen. It creates a virtual terminal that can be detached from any tty/pty and reattached to another terminal. So, for your use-case, it would be start the screen ...
user avatar
  • 220
6 votes

How to copy/paste between a console and an X session?

A good alternative is to install bsdutils and use script sudo apt install bsdutils and run $ script Script started, file is typescript $ type commands get output ... $ exit Afterwards you can read ...
user avatar
  • 4,805
3 votes
Accepted

Why do X applications show a question mark as TTY in ps's result?

ps will display a question mark for any thread not immediately attached to a tty. (a terminal from which the process can be controlled) That is of course the case for kernel threads and misc other ...
user avatar
  • 2,875
3 votes
Accepted

Echoing to $(tty) in a backgrounded process

Let's take your first command, and run it in a temporary directory: mkdir eg1 # Create temporary directory cd eg1 # ...and change to it ls # No output (obviously, no files) bash -c ...
user avatar
  • 90.4k
1 vote

Why do X applications show a question mark as TTY in ps's result?

There are two parts to this question. The first, why does ps show "?" is reasonably simple. The procps library looks at the 7th field on the process' stat file and tries to parse that into a ...
user avatar
1 vote

True color support in TTY

The Linux console supports ECMA-48 SGR codes, including 24-bit RGB colour specifiers: for (( i = 0; i < 256; i++ )); do printf '\e[38;2;0;0;%dma\e[0m' "$i" done printf '\n' However ...
user avatar
1 vote

How to prevent this service from starting at boot

0. about serial-getty@ttyS0.service $ sudo systemctl status serial-getty@ttyS0.service ● serial-getty@ttyS0.service - Serial Getty on ttyS0 Loaded: loaded (/lib/systemd/system/serial-getty@....
user avatar
  • 217

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