Remote desktop for raspberry pi using xrdp

install xrdp

apt-get install xrdp

After that, if you want to define a default port/session to reconnect everytime you access pi then its all about your xrdp.ini file, which is located here:

/etc/xrdp/xrdp.ini

by default the first xrdp session handling script looks like this:

[xrdp1]
name=sesman-vnc
lib=libvnc.so
username=ask
password=ask
ip=127.0.0.1
port=-1

The important line is port=-1, this makes xrdp always look for a free port to connect. If you set a fixed port here, the xrdp will always go back and connect to the same session. I changed mine so it looks like this:

[xrdp1]
name=customsessionname
lib=libvnc.so
username=myusername
password=ask
ip=127.0.0.1
port=5912
sudo service xrdp restart

Thats it, I think you could get away with just changing the port=-1 to port=5912. My xrdp always re-connects to existing session always using the same port.

thanks to http://askubuntu.com/questions/133343/how-do-i-set-up-xrdp-session-that-reuses-an-existing-session

twitter contest bot

twitter contest bot

Will poll for Retweet Contests and retweet them. Inspired by http://www.hscott.net/twitter-contest-winning-as-a-service/

A more acceptable use of this kind of app may involve using to search for philanthropic causes requesting retweets, and retweet less often so as not to seem spammy.

 

Disclaimer!

This bot is written purely for educational purposes. I hold no liability for what you do with this bot or what happens to you by using this bot. Abusing this bot can get you banned from Twitter, so make sure to read up on proper usage of the Twitter API.

License

You can fork this repository on GitHub as long as it links back to its original repository. Do not sell this script as the creater would like the code to remain free.

 

 

Prerequisites

TwitterAPI
Python 3.4
Configuration

Open up config.json and make the values correspond to your Twitter API credentials.

Installation

From the command line:

pip3 install TwitterAPI && pip3 install apscheduler
Then run:

python3 main.py

thanks to

https://github.com/ModusVivendi/twitter-contest

........................................................................................

troubleshoot ....
TwitterAPI issues.
pip install TwitterAPI --upgrade
for python3 its pip3 install TwitterAPI --upgrade
........................................................................................................

apscheduler issues
pip install apscheduler --upgrade

for python3 its pip3 install apscheduler --upgrade

...................................................  

...................................................

fixing some issues from python setuptools


ERROR MESSAGE "No module named setuptools"

Some google searches and a read of the python.org website told be I was missing the python setup tools component distribute.

So the first step is to install distribute:

mkdir python-setuptools
cd python-setuptools
wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo python

Then download whatever module you need and run the setup.py program using the command:

sudo python setup.py install

thanks to http://www.stuffaboutcode.com/2012/10/raspberry-pi-python-installing-modules.html