Author [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: Running BitSharesX in remote xterm (Xming)  (Read 923 times)

0 Members and 1 Guest are viewing this topic.

busygin

  • Guest
Running BitSharesX in remote xterm (Xming)
« on: August 29, 2014, 04:13:43 PM »

Hi,
First of all, I'd like to thank all the developers for their immensely hard work and to assure that despite "rough edges" I enjoy the product a lot and believe in its long-term success  :)
I tried both Windows 7 and Ubuntu (built from latest source) versions and I didn't encounter any serious bugs that people report here. I have full access to my funds, can trade BTSX vs bitUSD, and syncing runs smoothly. However, the minor annoyances are that GUI in remote xtrem (Xming) is slow and it prints the following errors when starting:
Code: [Select]
:~$ BitSharesX
QXcbConnection: Failed to get the primary output of the screen
Listening for new instances on /tmp/BitShares X
QXcbConnection: XCB error: 170 (Unknown), sequence: 158, resource id: 90, major code: 146 (Unknown), minor code: 20
QXcbConnection: Failed to get the primary output of the screen
QXcbConnection: XCB error: 170 (Unknown), sequence: 377, resource id: 8388614, major code: 146 (Unknown), minor code: 20
3144622ms th_a       ClientWrapper.cpp:114         initialize           ] config:
Any idea what's the problem?
I understand there are many high-priority bugs, so it's ok to respond when you have more time...

Offline arubi

  • Sr. Member
  • ****
  • Posts: 209
    • View Profile
Re: Running BitSharesX in remote xterm (Xming)
« Reply #1 on: August 29, 2014, 06:23:30 PM »
Run the command line binary with the --server and --httpport flags, then create an ssh tunnel between the remote host and your localhost. That way you'll have the web wallet in the browser. Lightning fast.


For reference, this is how I run it.
On the remote machine :
Code: [Select]
[email protected]:~$ ~/bitsharesx/programs/client/bitshares_client --server --httpport 9999

On the local machine :
Code: [Select]
[email protected]:~$ ssh <remote machine> -L 9999:127.0.0.1:9999 -NThen use your web browser to access localhost:9999
Don't forget to set an RPC username and RPC password in BitsharesX's config.json file on the remote machine.


You'll also need to run :
Code: [Select]
wallet_open <wallet name>while on the remote machine, since there is no way to do this (that I know of) using the GUI, without first logging in.


Good luck.
« Last Edit: August 30, 2014, 12:11:22 AM by arubi »

busygin

  • Guest
Re: Running BitSharesX in remote xterm (Xming)
« Reply #2 on: August 29, 2014, 08:32:33 PM »
Thanks, sounds great! I didn't succeed in using ssh tunnel from my Win7 local machine (where I use putty for ssh client) but I'll look later into it. Now Chrome returns "This webpage is not available" for localhost:9999
If you know any specific flags I need to check in putty, please let me know.

busygin

  • Guest
Re: Running BitSharesX in remote xterm (Xming)
« Reply #3 on: August 29, 2014, 09:10:57 PM »
Got it with a different ssh client for Win. But now localhost:9999 returns a blank page with "Invalid RPC Request" only. Any further suggestions?

Offline puppies

Re: Running BitSharesX in remote xterm (Xming)
« Reply #4 on: August 30, 2014, 12:02:39 AM »
Got it with a different ssh client for Win. But now localhost:9999 returns a blank page with "Invalid RPC Request" only. Any further suggestions?

You need to have your htdocs folder in the same folder as bitshares_client
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline arubi

  • Sr. Member
  • ****
  • Posts: 209
    • View Profile
Re: Running BitSharesX in remote xterm (Xming)
« Reply #5 on: August 30, 2014, 12:04:29 AM »
Hard to tell...


1. When compiling BitsharesX, did you follow the instructions to make buildweb  ?


2. On linux, when using bitshares_client instead of the BitSharesX binary, it uses a different config.json file, mainly :
bitshares_client uses ~/.BitsharesX/config.json and
BitsharesX uses ~/Bitshares X/config.json
did you edit the correct one with the RPC user and password?


I don't really use windows so much except at work, and even then I load a Linux VM, so it's hard to tell what the problem is. From the error message you're getting it seems like the tunnel is working correctly. Let me know what's up after you check points 1 and 2.

Offline arubi

  • Sr. Member
  • ****
  • Posts: 209
    • View Profile
Re: Running BitSharesX in remote xterm (Xming)
« Reply #6 on: August 30, 2014, 12:06:50 AM »
Got it with a different ssh client for Win. But now localhost:9999 returns a blank page with "Invalid RPC Request" only. Any further suggestions?

You need to have your htdocs folder in the same folder as bitshares_client


Oh yea, you have to edit config.json with the correct path to the htdocs folder.
By default it's set to something like ./htdocs, but you should enter a full path there. By default it's built within the /bitsharesx/programs/qt_wallet/htdocs folder.


edit:


This is what I currently have in my ~/.BitsharesX/config.json :
Code: [Select]

{
  "rpc": {
    "enable": false,
    "rpc_user": "rpc-username",
    "rpc_password": "rpc-password",
    "rpc_endpoint": "127.0.0.1:0",
    "httpd_endpoint": "127.0.0.1:0",
    "htdocs": "/home/<linux username>/bitsharesx/programs/web_wallet/generated"
  },
....
This works well.
« Last Edit: August 30, 2014, 12:21:48 AM by arubi »

busygin

  • Guest
Re: Running BitSharesX in remote xterm (Xming)
« Reply #7 on: August 30, 2014, 01:37:34 AM »
Yeah, that was htdocs param in config. Works great now  :)

Offline arubi

  • Sr. Member
  • ****
  • Posts: 209
    • View Profile
Re: Running BitSharesX in remote xterm (Xming)
« Reply #8 on: August 30, 2014, 07:48:01 AM »
Yeah, that was htdocs param in config. Works great now  :)


Nice. As a side note, don't forget to secure your ssh server on the remote machine. That means no root access, setting a non-standard port, using public key authentication and if you're not going to access the server from a machine outside your network, bind the ssh server only to an internal address.

 

Google+