Terminal, "select all" only selecting visible area

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Timbit
Level 1
Level 1
Posts: 3
Joined: Tue Aug 09, 2022 5:52 pm

Terminal, "select all" only selecting visible area

Post by Timbit »

Hello, I'm using Linux Mint 21 Cinnamon (and I notice this in Mate as well - I have not tried XFCE).

In the terminal, I have a lot of text. When I choose: "Edit" -> "Select all", I am discovering that only the visible portion of the terminal is highlighted and selected, not the entire contents (including scroll-back buffer) as I am expecting.

A workaround would be to hold down the mouse button and highlight all of the text manually, but for large amounts of text in the terminal, this can take a long time. I'm doing software dev work so output from that can be quite lengthy.

Is there anything else I can do (or is there some setting I am missing) to actually "Select all" in the terminal?

I did not see this behavior in prior versions of Mint.

Also when I "paste" text in the terminal, it is highlighted. I also never saw that before in prior versions.

Any ideas or hints on what to do or workarounds?
Last edited by LockBot on Thu Feb 09, 2023 11:00 pm, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
all41
Level 19
Level 19
Posts: 9520
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Terminal, "select all" only selecting visible area

Post by all41 »

Yes Xfce has this issue as well
Everything in life was difficult before it became easy.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Terminal, "select all" only selecting visible area

Post by Cosmo. »

Looks like the number of regressions have reached half a dozen.
Timbit
Level 1
Level 1
Posts: 3
Joined: Tue Aug 09, 2022 5:52 pm

Re: Terminal, "select all" only selecting visible area

Post by Timbit »

The issues seem to come from upstream (VTE component and bash/readline).

See this post here:
https://ubuntu-mate.community/t/howto-f ... sues/25345

(Select all only selecting visible portion)
https://bugs.launchpad.net/ubuntu/+sour ... ug/1922276

(Pasting text in terminal is highlighted)
https://bugs.launchpad.net/ubuntu/+sour ... ug/1926256

Quite silly really...
Nikolai5
Level 4
Level 4
Posts: 309
Joined: Thu Dec 23, 2021 5:25 pm
Location: Northern England

Re: Terminal, "select all" only selecting visible area

Post by Nikolai5 »

Timbit wrote: Tue Aug 09, 2022 6:36 pm A workaround would be to hold down the mouse button and highlight all of the text manually, but for large amounts of text in the terminal, this can take a long time. I'm doing software dev work so output from that can be quite lengthy.

Any ideas or hints on what to do or workarounds?
A workaround would be to rather than hold down your mouse and scroll, scroll, scroll. You can use the shift key.

Highlight the start or end point of your desired highlight, use the scrollbar or mouse wheel to go to the other end, hold down the shift key and click. This will highlight everything between the first click and the second because you had the shift key pressed.

Similar to what you were doing, but a LOT less laborious.
Timbit
Level 1
Level 1
Posts: 3
Joined: Tue Aug 09, 2022 5:52 pm

Re: Terminal, "select all" only selecting visible area

Post by Timbit »

Ah yes, good one, thanks!

You know what else is a lot less laborious? Menu item "select all" (CTRL+SHIRT+A) actually selecting all!
nuke101
Level 1
Level 1
Posts: 1
Joined: Fri Sep 23, 2022 5:08 pm

Re: Terminal, "select all" only selecting visible area

Post by nuke101 »

Any suggestions to get this feature back? It looks like this isn't going to happen from https://gitlab.gnome.org/GNOME/vte/-/issues/2504 ?

Is there any additional updates?

Suggestions for a terminal with working "select all"?
weedeater64
Level 1
Level 1
Posts: 44
Joined: Mon Jun 08, 2015 6:23 pm

Re: Terminal, "select all" only selecting visible area

Post by weedeater64 »

You might also be interested in recording your session with the script command.

Just type

Code: Select all

$ script filename[/code at the prompt and start doing stuff. When you want to stop recording type [code]$ exit
. It makes a typescript, sort of like a txt file of everything you did and the output. You can

Code: Select all

$ cat
or

Code: Select all

$ grep
the file but if you open it in a text editor it will be a mess with special characters.

There is a companion program called scriptreplay that you can use to play your session back like a video.

Both should be installed already on any linux system.
motoryzen
Level 10
Level 10
Posts: 3469
Joined: Sun Dec 08, 2019 12:25 am

Re: Terminal, "select all" only selecting visible area

Post by motoryzen »

Timbit wrote: Thu Aug 11, 2022 6:51 pm Ah yes, good one, thanks!

You know what else is a lot less laborious? Menu item "select all" (CTRL+SHIRT+A) actually selecting all!
You know what else would actually be nice? That exact action...ACTUALLY working. -_-

( I was at LM 21 now on 21.1 ) cinnamon here, nemo 5.6 and yes I confirmed be it the stock " Select all " keyboard hotkey or my preference of changing it to simply Ctrl+a...doesn select ... ALL the content. just around 86 ish lines tops. ( an inxi -Fxxmprz report for a perfect example)
Mint 21.2 Cinnamon 5.8.4
asrock x570 taichi ...bios p5.00
ryzen 5900x
128GB Kingston Fury @ 3600mhz
Corsair mp600 pro xt NVME ssd 4TB
three 4TB ssds
dual 1TB ssds
Two 16TB Toshiba hdd's
24GB amd 7900xtx vid card
Viewsonic Elite UHD 32" 144hz monitor
User avatar
shedyed
Level 4
Level 4
Posts: 309
Joined: Wed Feb 03, 2021 5:12 pm

Re: Terminal, "select all" only selecting visible area

Post by shedyed »

Would an output redirect work in your case?

Here is an example

cd Music
ls -a *.mp3

Instead
cd Music
ls -a *.mp3 > mysonglist.txt

Would it work in your specific case?
motoryzen
Level 10
Level 10
Posts: 3469
Joined: Sun Dec 08, 2019 12:25 am

Re: Terminal, "select all" only selecting visible area

Post by motoryzen »

Took journeying to the center of the world, but I figured it out xD ( does Quagmire victory dance )

Here are the contents of the main bash script file that I call inxi.sh ... attached to the keyboard shortcut " super+i"

Code: Select all

#!/bin/bash
gnome-terminal -e "bash -c 'nemo --version ; inxi -Fxxmprz ; echo Press enter to close ; read ; '" --geometry=111x90+1300+000
wmctrl -a Terminal
xdotool sleep 2 key "shift+Home" sleep 0.2 keydown "shift" sleep 0.2 mousemove 1310 50 click 1 click 1 sleep 0.1 keyup "shift" sleep 0.3 key "shift+End" sleep 0.2 mousemove 1330 2090 sleep 0.2 keydown "shift" click 1 keyup "shift" sleep 0.2 key "ctrl+c"
Now if you don't have a 3840x2160p resolution screen...you'll need to adjust the " mousemove" number values differently and must experiment to see which makes sense for you.

+ ( as you can see from the -- geometry values at the end of the gnome-terminal main command part...) .....

...I have it to where this specific command launches the gnome-terminal to a specific part of the screen...basically dead center horizontally and it occupies 95 ish % of the vertical amount - saving a slither of room versus the bottom edge of that terminal window..versus the top edge of the Cinnamon Panel...again...you'll need to adjust this number to make more sense with your resolution if your resolution is different.

So it launches gnome-terminal, pastes and executes .... nemo --version ; inxi -Fxxmprz > shift home > moves mouse to the very first word/upper left part of that window > holds shift while pressing left mouse button twice fast enough for a normal double left click > shift end-s to the bottom end of the terminal window/command results > moves mouse precisely to the bottom left of that just barely inside the terminal window > left clicks one more time ( which highlights....ALL content ( not just 86 to 90 ish lines) > and finally executes a ctrl +c to Copy the highlighted content.

So now with two keyboard presses/combo, I can have ready to pay nemo --version and inxi info and in the long run save a ton of key or mouse moves and clicks.
Mint 21.2 Cinnamon 5.8.4
asrock x570 taichi ...bios p5.00
ryzen 5900x
128GB Kingston Fury @ 3600mhz
Corsair mp600 pro xt NVME ssd 4TB
three 4TB ssds
dual 1TB ssds
Two 16TB Toshiba hdd's
24GB amd 7900xtx vid card
Viewsonic Elite UHD 32" 144hz monitor
rickNS
Level 9
Level 9
Posts: 2968
Joined: Tue Jan 25, 2011 11:59 pm

Re: Terminal, "select all" only selecting visible area

Post by rickNS »

Timbit wrote: Tue Aug 09, 2022 6:36 pm
Also when I "paste" text in the terminal, it is highlighted. I also never saw that before in prior versions.
I noticed that right away, and did not know it was an official bug, but it did bug me a bit, my workaround until this thread, was just to back space once, and retype the last character.
Mint 20.0, and 21.0 MATE on Thinkpads, 3 X T420, T450, T470, and X200
mikeflan
Level 17
Level 17
Posts: 7096
Joined: Sun Apr 26, 2020 9:28 am
Location: Houston, TX

Re: Terminal, "select all" only selecting visible area

Post by mikeflan »

I can report that on my LM 20.3 the "Select All" works great. I had to create this shortcut in Nemo:
.
pref.png
.
Then it selects all 1,700 lines by hitting Ctrl - A. :)
User avatar
karlchen
Level 23
Level 23
Posts: 18209
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Terminal, "select all" only selecting visible area

Post by karlchen »

Hello, mikeflan.

I think that you rejoice too soon. LM 20.3 is based on Ubuntu 20.04. And gnome-terminal, which comes with Ubuntu 20.04, had not been bugfixed. Bugfixed according to this Gitlab issue 288.
To the best of my knowledge, the gnome-terminal bugfix for issue 288 only made into Ubuntu 22.04 and therefore into Mint 21.
If this is right, then LM 20.3 cannot be affected by the problem reported in this thread.
By the way, issue 288 reads as if the changed behaviour of "Select All" in gnome-terminal is merely a (temporary) workaround for an underlying still unresolved problem.

Regards,
Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 771 days now.
Lifeline
Locked

Return to “Software & Applications”