Friday, August 28, 2015

Ubuntu: vncviewer through ssh

vncviewer -via remoteusername@vncserverip localhost:1

Wednesday, August 26, 2015

Ubuntu: Start chromium in new profile / instance

chromium-browser --enable-udd-profiles --user-data-dir=~/.newchromeprofile

Sunday, August 23, 2015

Compile latest bitmonero source on Ubuntu 14.04

The gist shows how to compile latest monero source code on Ubuntu 14.04.
# The gist shows how to compile latest monero source code on
# Ubuntu 14.04
# install git
sudo apt-get install git
# install dependencies
sudo apt-get install build-essential cmake libboost1.55-all-dev libssl-dev libgtextutils-dev pkg-config libunbound-dev libevent-dev libgtest-dev graphviz doxygen libdb5.3++-dev
# get the source code of bitmonero from github
git clone https://github.com/monero-project/bitmonero.git
# compile
cd bitmonero/
cmake .
make
# copy the binaryis into /opt/bitmonero
sudo mkdir /opt/bitmonero
sudo mv ./bin/* /opt/bitmonero/
# launch the monero node demon and let it synchronize with the monero network
#/opt/bitmonero/bitmonerod
# launch the monero wallet
#/opt/bitmonero/simplewallet

Sunday, August 16, 2015

Mining monero through Tor in Ubuntu 14.04

Mining Monero through Tor can be easly done using proxychains-ng (also called proxychains4). sudo proxychains4 /opt/cpuminer-multi/minerd -a cryptonight -o stratum+tcp://mine.moneropool.com:3333 -u YOUR_WALLET_ADDRESS -p x
Instructions how to install proxychains-ng on ubuntu are here and how to cpu miner for monero are here.

Testing if it works

To check if it works, I will assume we use the following moneropool. First lets check IP address for the pool address: mine.moneropool.com
nslookup mine.moneropool.com
Server: 127.0.1.1
Address: 127.0.1.1#53
Non-authoritative answer:
Name: mine.moneropool.com
Address: 54.75.230.12
Name: mine.moneropool.com
Address: 54.75.230.15
Name: mine.moneropool.com
Address: 54.78.196.115
Name: mine.moneropool.com
Address: 54.75.230.11
Name: mine.moneropool.com
Address: 54.78.210.153
Name: mine.moneropool.com
view raw nslookup hosted with ❤ by GitHub
Note that you may have different IP addresses, as the pool is on the Amazon cloud and the IP can be different. Having the IPs lets use iftop to monitor our outgoing connections. If you dont have iftop, install itsudo apt-get install iftop First, lets check the iftop (run using sudo iftop) window when we run the minred miner without proxychains and torsudo /opt/cpuminer-multi/minerd -a cryptonight -o stratum+tcp://mine.moneropool.com:3333 -u YOUR_WALLET_ADDRESS -p x When using the minerd without tor, we should see Amazon servers in the iftop window since the miner connects directly to the pool:
As can be seen, some of the servers were found in the nslookup for the mine.moneropool.com.


Now, lets see what happens when we use proxychains:udo proxychains4 /opt/cpuminer-multi/minerd -a cryptonight -o stratum+tcp://mine.moneropool.com:3333 -u YOUR_WALLET_ADDRESS -p x
The Amazon's servers are gone from the iftop, since the minerd connects to the Amazon servers using our tor. Instead of Amazon names, we see an input tor node.

Saturday, August 15, 2015

Install and test proxychains-ng (or proxychains4) in Ubuntu 14.04

To download, compile and set-up do the following:
# if you havent done it yet, please download the tor-browser and start it
# https://www.torproject.org/download/download-easy.html.en
wget https://www.torproject.org/dist/torbrowser/5.0/tor-browser-linux64-5.0_en-US.tar.xz
tar xf tor-browser-linux64-5.0_en-US.tar.xz
# download the source of proxychains-ng
git clone https://github.com/rofl0r/proxychains-ng.git
cd proxychains-ng
# configure and install
./configure --prefix=/usr --sysconfdir=/etc
make
sudo make install
sudo make install-config # installs /etc/proxychains.conf
# I've noticed that is better to change one default line
# in /etc/proxychains.conf to what tor browser (i.e. firefox)
# is using as can be seen here: http://i.imgur.com/pKuqHPU.jpg
sudo gedit /etc/proxychains.conf
Chanege last line in the file:
from “socks4 127.0.0.1 9050” to “socks5 127.0.0.1 9150”
# to test if proxychains4 goes through tor
# we can do two simple tests. For this we need elinks and iftop
sudo apt-get install elinks iftop


To test the proxychain
For example using iftop. Run iftop in a second terminal window: sudo iftop Now run elinks https://ipleak.net/ and check what you see in both the elinks and iftop. You should see your real IP in the ipleak test, and iftop should show that you are directly connecting to ipleak.net as shown below:


Now do the same through proxychain:proxychains4 elinks https://ipleak.net/
And we should see that iftop shows we are connection to an entry tor node, and elinks should show are tor ID, instead of real one.

Ubuntu 14.04: compile CPUMiner / minerd (forked by LucasJones & Wolf) for Monero mining

To CPU mine Monero in a moneropool it is suggested to use cpuminer called minerd. To compile it on Ubuntu 14:04 or later, the following dependencies are required:

sudo apt-get install build-essential autotools-dev autoconf libcurl3 libcurl4-gnutls-dev
# get git to install it
sudo apt-get install git
# dependencies
sudo apt-get install build-essential autotools-dev autoconf libcurl3 libcurl4-gnutls-dev
# download latest version
git clone https://github.com/wolf9466/cpuminer-multi
cd cpuminer-multi/
# compile
./autogen.sh
CFLAGS="-march=native" ./configure
make
#install
sudo make install
Example use: minerd -a cryptonight -o stratum+tcp://mine.moneropool.com:3333 -u YOUR_WALLET_ADDRESS -p x



Once you start mining using moneropool, you can check your status at anytime on their front page using your xmr address:
Just remember that their pending balance updates after a while. For me it took maybe 1-2h before I saw any pending balance after I had started mining. Hash rate updates very quickly though.


Just in case you get the errorconfigure.ac:133: error: possibly undefined macro: AC_MSG_ERROR
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.

it means that you haven't install libcurl4-gnutls-dev.

xfce4: Lunch desktop file from command line

Example: exo-open /usr/share/applications/firefox.desktop