Created
June 22, 2019 09:51
-
-
Save CyJimmy264/71185dc14eef24542b60bbcf63684f19 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir -p .vnc && echo '<VNCPas>' | vncpasswd -f > .vnc/passwd && chmod 0600 .vnc/passwd && vncserver && sleep 15 && vncserver -kill :1 && { cat <<EOF > .vnc/xstartup | |
#!/bin/bash | |
xrdb $HOME/.Xresources | |
exec startfluxbox | |
EOF | |
} && chmod +x .vnc/xstartup && _ loginctl enable-linger <username> && { _ bash -c "cat > /etc/systemd/system/vncserver@:1.service" << EOF | |
[Unit] | |
Description=Start TigerVNC server at startup | |
After=syslog.target network.target | |
[Service] | |
Type=simple | |
User=<username> | |
Group=<username> | |
PAMName=login | |
WorkingDirectory=/home/<username> | |
PIDFile=/home/<username>/.vnc/%H:%i.pid | |
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :' | |
ExecStart=/usr/bin/vncserver %i -depth 24 -geometry 1280x800 -alwaysshared -fg | |
ExecStop=/usr/bin/vncserver -kill %i | |
[Install] | |
WantedBy=multi-user.target | |
EOF | |
} && _ systemctl enable vncserver@:1.service && { cat <<EOF > .fluxbox/startup | |
#!/bin/sh | |
xmodmap "/home/<username>/.Xmodmap" | |
which fbautostart > /dev/null | |
if [ $? -eq 0 ]; then | |
fbautostart | |
fi | |
fluxbox & | |
fbpid=$! | |
sleep 1 | |
{ | |
/home/<username>/MetaGate/run.sh & | |
} & | |
wait $fbpid | |
EOF | |
} && tar xvzf MetaGate-linux-*.tar.gz && mkdir -p .metahash_wallets/_unregistered/mhc/ && cp *.priv .metahash_wallets/_unregistered/mhc/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment