ryanb / letter_opener

Preview mail in the browser instead of sending.
MIT License
3.73k stars 237 forks source link

Error: 'xprop: unable to open display '' ' #124

Closed bryszard closed 8 years ago

bryszard commented 8 years ago

We have a letteropener set up in our app and it's working in some environments.

However, it doesn't work in C9 environment. When it should open a new tab, it does nothing, and I can see this in the log:

sending email

I found some solution which I thought might be related to the problem here - http://superuser.com/questions/310197/how-do-i-fix-a-cannot-open-display-error-when-opening-an-x-program-after-sshi.

I changed my ssh_config and it now looks like this:

Host *
#   ForwardXAgent yes
#   ForwardX11 yes
#   ForwardX11Trusted yes
#   RhostsRSAAuthentication no
#   RSAAuthentication yes
#   PasswordAuthentication yes
#   HostbasedAuthentication no
#   GSSAPIAuthentication no
#   GSSAPIDelegateCredentials no
#   GSSAPIKeyExchange no
#   GSSAPITrustDNS no
#   BatchMode no
#   CheckHostIP yes
#   AddressFamily any
#   ConnectTimeout 0
#   StrictHostKeyChecking ask
#   IdentityFile ~/.ssh/identity
#   IdentityFile ~/.ssh/id_rsa
#   IdentityFile ~/.ssh/id_dsa
#   Port 22
#   Protocol 2,1
#   Cipher 3des
#   Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
#   MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
#   EscapeChar ~
#   Tunnel no
#   TunnelDevice any:any
#   PermitLocalCommand no
#   VisualHostKey no
#   ProxyCommand ssh -q -W %h:%p gateway.example.com
#   RekeyLimit 1G 1h
    SendEnv LANG LC_*
    HashKnownHosts yes
    GSSAPIAuthentication yes
    GSSAPIDelegateCredentials no

Nonetheless, the problem persists - when the email should be sent, nothing happens in the browser and the log shows the error.

nashby commented 8 years ago

@bryszard sorry for the late response but letter_opener won't work on something like C9 I guess. There's README section about that https://github.com/ryanb/letter_opener#remote-alternatives. You should try something like mailcatcher I guess.