Cut and paste text from inside the Shell

geronimo1958

Contributor
Joined
Nov 19, 2011
Messages
112
What key stroke will copy highlighted text when I am using the builtin Shell?
 

Pitfrr

Wizard
Joined
Feb 10, 2014
Messages
1,531
I'm using FreeNAS 9.10.x but no reasons why it should be different in 11.x...
Anyway, when I select the text I can right click on it and select copy to paste it anywhere.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
no reasons why it should be different in 11.x.
...other than that the shell built into the GUI is completely different...

The real answer is that if you're doing anything that would call for copying or pasting anything, you really shouldn't be using the GUI's shell at all--just ssh into the server. But failing that (why?), it's your standard OS key commands--Command-C/V for a Mac; Ctrl+Insert/Shift+Insert for Windows and most flavors of Linux.
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
With the new GUI Shell:
Ctrl+Insert will copy text to the clipboard
Shift+Insert will insert text from the clipboard.
 
Last edited:

geronimo1958

Contributor
Joined
Nov 19, 2011
Messages
112
Thanks to all.
 

RKMStudios

Dabbler
Joined
Feb 28, 2019
Messages
14
Hmm, no insert button on a Mac, why can't command+c and command+v just work? Years of standards......
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504

RKMStudios

Dabbler
Joined
Feb 28, 2019
Messages
14
Well so far I've been unable to make that work. At first I was getting an unhelpful error telling me that context menus are disabled if I attempted a right click copy. Then if I do command C, it copies random parts of the text, not what is highlighted. Command V confirmed to work.

UPDATE: For a workaround I can command+a to select all and then command+c to copy and then edit out everything I don't want in a text edit app.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Then if I do command C, it copies random parts of the text,
That's a distinct problem (and new with 11.3 IIRC), and it affects everyone equally AFAIK--the part that's highlighted isn't what the system thinks it is. There's an open ticket for this (https://jira.ixsystems.com/browse/NAS-104469), but judging by the activity from the devs, they don't much care. IMO, though, it's as I said above--if you're doing anything that calls for copy/paste in the web GUI's shell, you're just using the wrong tool for the job. SSH in instead.
 

RKMStudios

Dabbler
Joined
Feb 28, 2019
Messages
14
That's a distinct problem (and new with 11.3 IIRC), and it affects everyone equally AFAIK--the part that's highlighted isn't what the system thinks it is. There's an open ticket for this (https://jira.ixsystems.com/browse/NAS-104469), but judging by the activity from the devs, they don't much care. IMO, though, it's as I said above--if you're doing anything that calls for copy/paste in the web GUI's shell, you're just using the wrong tool for the job. SSH in instead.

Thanks! I figured it was something like that. Ill look into SSH. I'm still learning a lot of this stuff and appreciate the pointer on SSH.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I guess everyone's workflow is different, but I always have at least one Terminal window open on my Mac. Given that, it's much faster to do ssh root@freenas than it is to open a window, log into the web GUI, and click the shell button. And I can copy/paste as normal.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Oh, and:

Setting up public key authentication is completely optional--I use it, and it speeds logins, but it's a complication you don't need to deal with right away.
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
Hmm, no insert button on a Mac, why can't command+c and command+v just work? Years of standards......
Copy-paste functionality has never been the same on Unix desktops as it is in Windows.

If you have a keyboard with a numeric keypad, I have read on some Mac sites that the "0" button on the numeric keypad is equivalent to insert button on Windows. What happens if you try Command + "0" (without the quotes) to copy text to the clipboard, and Shift + "0" to paste from the clipboard.

If you are running a Mac laptop, then I believe there is a way to enable numeric keypad functionality. As I don't use Mac, I have no experience with this,myself.

Does this work?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Copy-paste functionality has never been the same on Unix desktops as it is in Windows.
Perhaps not historically, but today any common *nix desktop (OK, specifically, Linux desktop) is going to behave just like Windows. But how is this relevant to the Mac? As I replied almost two weeks ago (and six months ago, and you responded to that message too), the standard Mac keyboard commands work just fine in the web shell, modulo the problem that the highlight in the web GUI's shell is misbehaving in 11.3 (including 11.3-U2).

Any form of copying from the web shell is going to be broken until iX fixes it so that the selected text actually coincides with what's highlighted. Based on what they've posted to the open bug, they don't seem to think this is worth very much attention other than bouncing it around from one person to another. But pasting works just fine with the standard keyboard commands for your OS, whatever they are.
 
Top