Category Archives: windows

How to use xRDP for remote access to Ubuntu

Since the current desktop manager of Ubuntu does not work with xRDP, an alternative desktop manager needs to be installed. In this post, we will use XFCE.

Install xRDP and XFCE

sudo apt-get install xrdp xfce4 xfce4-terminal gnome-icon-theme-full tango-icon-theme

Configure xRDP

First, create an .xsession file in the home directory.

echo xfce4-session >~/.xsession

Then edit the startup file for xRDP /etc/xrdp/startwm.sh.

read more

How to install pip and create virtualenv on Windows without administrative permission

Since Python 2.7.9, pip is released together with the Python. But I still cannot find it when our administrator installed the latest python on my PC. How to install pip, then create virtualenv on Windows without the administrative permission?

  1. Download get-pip.py.
  2. Run python get-pip.py --user. It will install pip locally.
  3. Install virtualenv by running python -m pip install --user virtualenv. This will install the package of virtualenv
  4. Run python -m virtualenv ENV to create a new virtual environment. ENV is a directory to place the new virtual environment.
  5. Activate the script by running ENV/Scripts/activate.bat.

read more

Proxy Firefox through a SSH tunnel

Have you ever wanted to visit sites during the day from a location that denied access to those sites? What you need is the ability to create a secure and encrypted ssh connection to tunnel your browser traffic through. If you have access to a remote machine by way of ssh, you can set up Firefox to visit these sites.

The following method is only tested on Windows XP, with cygwin installed.

LOCAL_PORT: localhost port for ssh tunnel
SERVER_NAME: remote machine

  1. set up firefox proxy
    • preferences –> advanced –> network –> settings
    • choose SOCKS v5
    • manual proxy configurations: SOCKS
      • Host: 127.0.0.1:LOCAL_PORT
      • No Proxy for: localhost, 127.0.0.1
      • leave the rest of entries BLANK
  2. set up firefox DNS
    • open “about:config” page in Firefox
    • search “network.proxy.socks_remote_dns”, set the value to “true”
  3. establish ssh tunnel

ssh -C2qTnN -D LOCAL_PORT username@SERVER_NAME

read more

Best Markdown Editors for Windows, Linux, and the web

Markdown is a lightweight markup language, allowing people “to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML)”. An excellent Markdown Syntax Guide is by Daring Fireball. Sites such as GitHub, reddit, Diaspora, Stack Overflow, OpenStreetMap, and SourceForge use Markdown to facilitate discussion between users. GitHub uses “GitHub Flavored Markdown” (GFM) for messages, issues, and comments. It differs from standard Markdown (SM) in a few significant ways and adds some additional functionality.

read more