-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Implementing Open in Remote Terminal context menu in nemo #2824
Comments
the g_ functions are part of glib - what's essentially happening is:
If I connect to another machine via sftp (ssh in the Connect to server dialog), opening a terminal should work as is - most of the time remote locations are 'mounted' to a local path. I suppose that's why we've never had any previous request for what you're asking. Both caja and nautilus provide this functionality using an add-on (extension). We'd probably want to do something similar here. You could actually take a look at caja-open-terminal (or even port it to nemo, the api is pretty much the same), or have a look at Nemo Actions - while it's not powerful enough alone to do what's required here (the uri would need to be broken apart to separate the server address from the path, etc...), it could be paired with a script (in any language) that could set up the terminal and ssh. Maybe this is more info than you wanted :) But feel free to ask any more questions. edit: Forgot to link to the NemoAction sample/doc: https://github.com/linuxmint/nemo/blob/master/files/usr/share/nemo/actions/sample.nemo_action |
Many thanks for the help. I already looked at the caja sources and using that as reference. May be I'll copy paste some of the codes while I try to implement this in Right now I copied and modified the python code below and implemented the feature as nemo action using
But there are issues with this. This action is always visible both in local and remote directory, while the action should only be visible in remote directories. So I thought if both Besides it is a very handy feature for new to intermediate users like me. Typing ssh and the whole hostname and then the full path(sometimes I need to dig into more than 10 levels of sub-directories) is very tedious, especially when you have to do it more then hundred times a day. So I use it to open remote terminals on centos remote workstations at the lab every time. |
Yes Nemo actions don't have the ability to look at uri schemes (file, sftp..) which I only now realize might be something useful to add. You also can't currently fetch the real uri of the current folder (right-clicking the background of the view), only the path. Does the normal Open in Terminal not work for accessing your servers? As far as I know it should be as secure as a dedicated shell session. I think I'd be ok adding this directly into nemo's source. Though the extension route does have an advantage that they can be written in python as well as C (have a look here for some python examples if you're interested. |
Yes it does. But then I cannot use the packages that is available only on the remote system. For example, suppose I have
I also looked up this method. The I think it'll be better if other users also provide their opinions. That's why I opened this thread to know Mint developers' as well as Mint users' opinion. |
Ah yes, sorry. I didn't consider that. |
BTW can you tell me how to compile and test nemo? Should running |
On mint, yes - you don't even need the --no-sign (it says it's an error but the packages are created anyhow). You probably need to enable source repos and Once you've built once like that, you can rebuild/reinstall using Installing ccache will also help speed builds up - it gets noticed automatically by meson/ninja. |
[Update] I tried to test
|
@mtwebster With commit 8580163 It works fine now. I modified the
I suggest this action should be bundled along with other in-built actions like Should I close this issue? |
"Open in remote terminal" option was missing in nemo context menu. Added the option by creating a new in-built action in /usr/share/nemo/actions which runs a python script to invoke ssh in terminal. More detailed benefits can be found in linuxmint#2824
"Open in remote terminal" option was missing in nemo context menu. Added the option by creating a new in-built action in /usr/share/nemo/actions which runs a python script to invoke ssh in terminal. More detailed benefits can be found in linuxmint#2824
I was unsure whether to raise the issue here or not. So if the issue seems off-topic please close it.
Rather than an issue, This is a feature request.
I have used both
caja
andnautilus
. In both the file-managers, within an sftp-connected remote directory, there is a context menu option Open in Remote Terminal. In a local directory, This option is hidden. However innemo
, even though theOpen in terminal
is present, theremote
option is missing.So I decided to take the matter into my own hands and started implementing the feature in
nemo
. I found that theOpen in Terminal
feature is implemented as an inbuiltaction
which is defined insrc/nemo-actions.h
.In GUI, it is called from
action_open_terminal_callback
function insrc/nemo-window-menus.c
. But I am having trouble understanding the call of other functions like:In file
src/nemo-window-menus.c
:in function:
action_open_terminal_callback
nemo_view_get_uri
at line 1282g_file_new_for_uri
at line 1283g_file_get_path at line 1284 in function:
open_in_terminal_other`g_settings_get_string
at line 1265g_spawn_async
at line 1267P.S. I am using VS Code. But even it cannot trace those functions using key
F12
The text was updated successfully, but these errors were encountered: