! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Feature request
Status:
CLOSED: FIXED
Severity:
enhancement
Product:
Xfce4-terminal
Component:
General

Comments

Description Niels Bassler 2007-07-25 16:42:35 CEST
In thunar there is a nice feature where you can choose to "open a terminal here" in the current working directory by rightclicking with the mouse.

It could be very nice if it also would work the other way round: right-clicking in terminal would give the option to "open thunar here", which will open thunar at the present working directory in the terminal...

Cheers
Niels
Comment 1 Benedikt Meurer editbugs 2007-07-25 17:42:23 CEST
This is not possible. You seem to confuse the terminal emulator with the CLI application running within it. Think of the terminal emulator as something similar to the Xserver: It draws text send by the CLI application and sends key strokes to the application, but it has no knowledge whats going on within the application.

You are probably thinking about a shell running on the local machine (we could use a trick here under Linux to figure out the cwd of the shell). But what if the active CLI process is an editor on a remote host via ssh?
Comment 2 Niels Bassler 2007-07-26 09:31:27 CEST
True, I did not think of that.
Obviously this would require some sort of hack. 
Thought of this: You are able to set CLI enviroment parameters from the "terminal" preferences ($TERM), is it possible to read them too? Then you can read $PWD when thunar is to be called. I still believe it would be worth it. In my case, most of my terminal sessions are local. This would be a realy new feature which afaik no other terminal is capable of doing.

In the case of a remote session or similar, one could still invoke thunar pointing to the CWD on the local side from where the remote session was started from. (This  could be useful after doing filetransfers initiated on the remote side.)
Comment 3 Benedikt Meurer editbugs 2007-07-26 11:59:39 CEST
You cannot read the environment variables of another process. What is possible under linux, is to read the /proc/$pid/cwd sylink. However this works only if the process launched by the terminal is the toplevel one. It doesn't work if for example, you su to root.
Comment 4 Niels Bassler 2007-07-30 16:30:27 CEST
Another way would be simply to send the command "thunar&" with the menu item. Or more generally, add user specified commands to terminal (specified in "preferences"), which may show up upon right clicking with the mouse..

Bug #3415

Reported by:
Niels Bassler
Reported on: 2007-07-25
Last modified on: 2009-12-17

People

Assignee:
Benedikt Meurer
CC List:
0 users

Version

Attachments

Additional information