Skip to content

Commit 721ea38

Browse files
committed
instruction to open the QT GUI on the localhost
1 parent dbb4b94 commit 721ea38

3 files changed

Lines changed: 71 additions & 11 deletions

File tree

FAQ.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,3 +646,11 @@ Alternatively to a pruned node there could be a larger >400 GB storage connected
646646
socks5 = true
647647
```
648648

649+
## Run the JoinMarket-QT GUI from a different user on the same Linux desktop where JoininBox is installed
650+
651+
* To disable the display access control of the xserver open a new terminal on the desktop and type:
652+
`xhost +`
653+
* use the shortcut in the JoininBox terminal to open the JoinMarket-QT GUI:
654+
`qtgui`
655+
* re-enable the access control with:
656+
`xhost -`

scripts/_commands.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,14 @@ function stats() {
7070
# command: qtgui
7171
# starts the JoinMarket-QT GUI
7272
function qtgui() {
73-
echo "# opening the JoinMarket-QT GUI with the command: '(jmvenv) python joinmarket-qt.py'"
74-
/home/joinmarket/joinmarket-clientserver/jmvenv/bin/python /home/joinmarket/joinmarket-clientserver/scripts/joinmarket-qt.py
73+
if grep -Eq "RPCoverTor=on" /home/joinmarket/joinin.conf; then
74+
tor="torsocks"
75+
else
76+
tor=""
77+
fi
78+
79+
echo "# Opening the JoinMarket-QT GUI with the command: '(jmvenv) $tor python joinmarket-qt.py'"
80+
$tor /home/joinmarket/joinmarket-clientserver/jmvenv/bin/python /home/joinmarket/joinmarket-clientserver/scripts/joinmarket-qt.py
7581
}
7682

7783
# command: qr [string]

scripts/info.qtgui.sh

Lines changed: 55 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,20 @@
33
source /home/joinmarket/joinin.conf
44

55
# Basic Options
6-
OPTIONS=(LINUX "Running Linux" \
7-
MAC "Running MacOS" \
8-
WINDOWS "Running Windows" \
6+
OPTIONS=(LINUX "Running Linux"
7+
MAC "Running MacOS"
8+
WINDOWS "Running Windows"
9+
localhost "Linux on the same desktop"
910
)
1011

11-
CHOICE=$(dialog --clear --title "Choose a desktop OS" --menu "" 9 45 3 "${OPTIONS[@]}" 2>&1 >/dev/tty)
12+
CHOICE=$(dialog --clear --title "Choose a desktop OS" --menu "" 10 45 4 "${OPTIONS[@]}" 2>&1 >/dev/tty)
1213

1314
clear
1415
case $CHOICE in
1516
LINUX) echo "Showing intructions for Linux";;
1617
MAC) echo "Showing intructions for MacOS";;
1718
WINDOWS) echo "Showing intructions for Windows";;
19+
localhost) echo "Showing intructions for Linux on the same desktop";;
1820
*) exit 1;;
1921
esac
2022

@@ -27,6 +29,12 @@ if grep -Eq "^joinmarketSSH=off" /home/joinmarket/joinin.conf; then
2729
joinmarketSSHchanged=1
2830
fi
2931

32+
if [ "$RPCoverTor" = "on" ];then
33+
tor=" torsocks "
34+
else
35+
tor=" "
36+
fi
37+
3038
echo "
3139
************************************************************************************
3240
Instructions to open the JoinMarket-QT GUI on the desktop
@@ -37,19 +45,23 @@ if [ "${CHOICE}" = "LINUX" ]; then
3745
echo "
3846
Use the following line in a new desktop terminal to connect:
3947
40-
ssh -X joinmarket@$localip joinmarket-clientserver/jmvenv/bin/python joinmarket-clientserver/scripts/joinmarket-qt.py
48+
ssh -X joinmarket@${localip}${tor}joinmarket-clientserver/jmvenv/bin/python joinmarket-clientserver/scripts/joinmarket-qt.py
49+
50+
Use the PASSWORD_B (rpcpassword in the bitcoin.conf) to open the JoinMarket-QT GUI
51+
"
4152

42-
Use the PASSWORD_B (rpcpassword in the bitcoin.conf) to open the JoinMarket-QT GUI"
4353

4454
elif [ "${CHOICE}" = "MAC" ]; then
4555
echo "
4656
Install the XQuartz application from https://www.xquartz.org/
4757
4858
Use the following line in a new desktop terminal to connect:
4959
50-
ssh -X joinmarket@$localip joinmarket-clientserver/jmvenv/bin/python joinmarket-clientserver/scripts/joinmarket-qt.py
60+
ssh -X joinmarket@${localip}${tor}joinmarket-clientserver/jmvenv/bin/python joinmarket-clientserver/scripts/joinmarket-qt.py
61+
62+
Use the PASSWORD_B (rpcpassword in the bitcoin.conf) to open the JoinMarket-QT GUI
63+
"
5164

52-
Use the PASSWORD_B (rpcpassword in the bitcoin.conf) to open the JoinMarket-QT GUI"
5365

5466
elif [ "${CHOICE}" = "WINDOWS" ]; then
5567
echo "
@@ -73,9 +85,36 @@ In the terminal Exit to the Command Line and type:
7385
qtgui
7486
7587
The QT GUI will appear on the Windows desktop running from your RaspiBlitz.
88+
"
89+
90+
elif [ "${CHOICE}" = "localhost" ]; then
91+
92+
if ! grep -Eq "^X11Forwarding no" /etc/ssh/sshd_config; then
93+
echo "X11Forwarding no" | sudo tee -a /etc/ssh/sshd_config
94+
fi
95+
if sudo sed -i "s/^X11Forwarding no/X11Forwarding yes/g" /etc/ssh/sshd_config;then
96+
echo "# Set 'X11Forwarding yes' and restarting sshd"
97+
sudo service sshd restart
98+
fi
7699

100+
echo "
101+
Use the following line in a new desktop terminal to connect:
102+
103+
ssh -X joinmarket@localhost${tor}joinmarket-clientserver/jmvenv/bin/python joinmarket-clientserver/scripts/joinmarket-qt.py
104+
105+
Use your ssh password to open the JoinMarket-QT GUI
106+
107+
108+
Alternatively disable the display access control of the xserver:
109+
* Open a new terminal on the desktop
110+
* type:
111+
xhost +
112+
* use the shortcut in the JoininBox terminal to open the JoinMarket-QT GUI:
113+
qtgui
114+
* re-enable the access control with:
115+
xhost -
77116
"
78-
fi
117+
fi
79118

80119
echo "
81120
@@ -96,6 +135,13 @@ https://twitter.com/zndtoshi/status/1191799199119134720
96135
Press ENTER when done with the instructions to exit to the menu
97136
"
98137

138+
if grep -Eq "^X11Forwarding yes" /etc/ssh/sshd_config; then
139+
echo "# Setting 'X11Forwarding no' in the /etc/ssh/sshd_config"
140+
sudo sed -i "s/^X11Forwarding yes/X11Forwarding no/g" /etc/ssh/sshd_config
141+
echo "# Restarting sshd"
142+
sudo service sshd restart
143+
fi
144+
99145
sleep 2
100146
read key
101147

0 commit comments

Comments
 (0)