Skip to content
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

impossible to open a file in a ssh session #22

Open
JujuLand opened this issue Sep 20, 2017 · 7 comments
Open

impossible to open a file in a ssh session #22

JujuLand opened this issue Sep 20, 2017 · 7 comments
Assignees
Labels

Comments

@JujuLand
Copy link

Hi,
I frequently use ssh -X sessions to work on distant computers (on LAN or WAN).

For example, I can open a pdf file with xdg-open.
With ncursesFM, no error, but it doesn't open.

As I hoped to use ncursesFM as a file browser which uses smaller resources than a graphic file browser, I'm a little desappointed ... Too bad

A+

@FedeDP
Copy link
Owner

FedeDP commented Sep 22, 2017

Mmh ncursesFM checks for "getenv("XDG_SESSION_TYPE")".
Can you paste me the output of "echo $XDG_SESSION_TYPE" in your ssh -X session?

@JujuLand
Copy link
Author

alain@aupeix-GX723:~$ echo $XDG_SESSION_TYPE

alain@aupeix-GX723:~$

annie@xubuntu-IMEDIA:~$ echo $XDG_SESSION_TYPE

annie@xubuntu-IMEDIA:~$

Here are the ssh versions:

annie@xubuntu-IMEDIA:/opt/TuxPrograms/trunks/ncurseFM$ paquet ssh
ii libssh-gcrypt-4:amd64 0.6.3-4.3 amd64 tiny C SSH library (gcrypt flavor)
ii libssh2-1:amd64 1.5.0-2ubuntu0.1 amd64 SSH2 client-side library
ii openssh-client 1:7.2p2-4ubuntu2.2 amd64 secure shell (SSH) client, for secure access to remote machines
ii openssh-server 1:7.2p2-4ubuntu2.2 amd64 secure shell (SSH) server, for secure access from remote machines
ii openssh-sftp-server 1:7.2p2-4ubuntu2.2 amd64 secure shell (SSH) sftp server module, for SFTP access from remote machines
ii ssh 1:7.2p2-4ubuntu2.2 all secure shell client and server (metapackage)
ii ssh-import-id 5.5-0ubuntu1 all securely retrieve an SSH public key and install it locally
ii sshfs 2.5-1ubuntu1 amd64 filesystem client based on SSH File Transfer Protocol

alain@aupeix-GX723:/opt/TuxPrograms/trunks/ncurseFM$ paquet ssh
ii libssh-4:amd64 0.6.3-4.3 amd64 tiny C SSH library (OpenSSL flavor)
ii libssh-dev 0.6.3-4.3 amd64 tiny C SSH library. Development files (OpenSSL flavor)
ii libssh-gcrypt-4:amd64 0.6.3-4.3 amd64 tiny C SSH library (gcrypt flavor)
rc libssh2-1:amd64 1.4.3-2 amd64 SSH2 client-side library
ii openssh-client 1:7.2p2-4ubuntu2.2 amd64 secure shell (SSH) client, for secure access to remote machines
ii openssh-server 1:7.2p2-4ubuntu2.2 amd64 secure shell (SSH) server, for secure access from remote machines
ii openssh-sftp-server 1:7.2p2-4ubuntu2.2 amd64 secure shell (SSH) sftp server module, for SFTP access from remote machines
ii ssh 1:7.2p2-4ubuntu2.2 all secure shell client and server (metapackage)
ii ssh-import-id 5.5-0ubuntu1 all securely retrieve an SSH public key and install it locally
ii sshfs 2.5-1ubuntu1 amd64 filesystem client based on SSH File Transfer Protocol

Thanks
A+

@JujuLand
Copy link
Author

I have these variables when connected:
SSH_CLIENT=192.168.1.15 42052 22462
SSH_TTY=/dev/pts/7
SSH_CONNECTION=192.168.1.15 42052 192.168.1.14 22462

If it can help ...

@FedeDP
Copy link
Owner

FedeDP commented Sep 22, 2017

Can you please try to export XDG_SESSION_TYPE=x11 in you ssh -X session and retry?
The logic behind is that if no XDG_SESSION_TYPE is found in environment, it means we're running on a tty, thus ncursesFM tries to use "nano" or whatever editor is setted.
I will try to fix this logic though.

@JujuLand
Copy link
Author

I add this variable in .profile, and it works.

Which thing, usually set this variable ?

A+

@FedeDP
Copy link
Owner

FedeDP commented Sep 23, 2017

Nice!
i think desktop manager or desktop environment usually set this variable.
For now you can use a script that export the variable before starting ncursesfm. I'll try to solve the issue though.

@JujuLand
Copy link
Author

JujuLand commented Sep 23, 2017

Adding it in profile is enough and doesn't make problem using directly xdg-open.

So do what you can.

Thanks
A+

@FedeDP FedeDP self-assigned this Sep 23, 2017
@FedeDP FedeDP added the bug label Sep 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants