Terminal desktop integration/FAQs
Da Hacklaviva
Índice |
Instalation
Is it possible to install this without changing system's files?
Yes. See Terminal desktop integration/Install How-to
And how to compile from the sources?
See Terminal desktop integration/Compile How-to
Using it
Which are the files affected by an operation in the context-menu?
If the mouse is inside the selected text, all files intersecting with the selection will be used. If not, the file where the mouse is will be used.
Why i can't open a file doing double-click in it, like it does with another programs?
That would interfere in the way the terminal does the text selection. That's why I thought more secure to just allow to open a file through the context menu.
...and what about drag&drop?
You can also do drag from one or more files, but the operation has to be initiated from the context menu. The same happens when you do drop files into the terminal.
How do i copy a file from Nautilus into the terminal?
Drop it in the name of the folder where you want to copy, and after it'll show a context menu for confirming the operation.
And for moving?
This is defined by the graphic system used. In Gnome press the shift key to for move rather than copy.
In the original terminal application, if I drop a file to the terminal, that would paste the file path (like it was written with the keyboard). How do i do this now?
Do drag&drop into the file in front of the cursor.
What happens when one of the listed files no longer exists?
The event is detected by a inotify object, and the file is cancelled , it will be shown in strikethrough in the terminal and you cannot do more actions with it.
But if instead of deleting I move a file to other location it doesn't change to strikethrough...
This is because the pyinotify don't know how to give me this event's type:
"IN_MOVE_SELF: watched item itself was moved, currently its full pathname destination can only be traced if its source directory and destination directory are both watched. Otherwise, the file is still being watched but you cannot rely anymore on the given path (.path)" - http://pyinotify.sourceforge.net/
How to configure the prompt to show the current working directory?
Try something like this:
if [ -n "$TERM_FIELDS_SUPPORT" ]; then PS1='\[\033]?q1;$PWD\007\]\w\[\033]?q2;\007\]\[\033[00m\]\$ ' else PS1='\w\$ ' fi
Ls and other commands
Which visible alterations where made in the ls?
There is a new option --fields=always/never/auto
If i something like "ls | grep something" the terminal doesn't detect then!This is because ls detects it is not writting output into a tty. That's why it deactivates the fields' definitions. The same happens with the colours. You can avoid this with:
"ls --fields=always"
What other commands, apart from ls should be adapted for producing information that could be interpreted by the terminal?
All of those that are normally writing files names, like the find, tree, du etc.
Can the commands become heavy with the extra processing? For example, when i do a find commnad that shows thousands of lines.
For avoiding this, find can deactivate the fields when it writes more than a certain number of lines.
Protocol
Which is the escape's sequence format used?
"\033]?q1;" metainfo "\007" texto "\033]?q2;\007"
Where metainfo is the complete path of the file.
How does a program know that terminal is supporting the functionality?
If the environment variable TERM_FIELD_SUPPORT is defined.
Vte
Why libvte was choosen?
Because the Gnome official's emulation widget used in the gnome-terminal is the terminator.
Is it possible to have names that occupy more than one line?
No!. If some appear, it's divided in multiple fields.
Is there not danger about this information getting corrupted if an aplication unawarently move the terminal's cursor to another position for writing over existant text? And if the user is trying to delete a file thinking that's another one??
For preventing this, libvte deactivates the fields to the right and below the cursor's position everytime it moves.
Terminator
Why was Terminator choosen for making this implementation?
Because is my favourite and also because it is written in python!