Is it possible to start an xfreerdp session into Microsoft windows from a command-line only install of Linux?

The command I use from a full blown Linux install is this:

$ sudo xfreerdp /v:farm.company.com /d:company.com \
    /u:oshiro /p:oshiro_password /g:rds.company.com

This command works fine. However, when I run the same command from a command-line install of Linux, I get the following error message:

Please check that the $DISPLAY environment variable is properly set.
freerdp_set_last_error 0x20001
libfreerdp/core/freerdp.c:97: freerdp_pre_connect failed

Both the GUI based Linux installation and the command-line only installation of Linux I have are Ubuntu 12.04. Both installations have xfreerdp version 1.2.0-beta1

2 Answers 2


I assume xfreerdp is a gui programm (an "X client"). So on Linux, you need an "X server" to run it.
That's what you have on the GUI based Linux box.
You can not run it on the command-line-only Linux in itself.

Depending on what you are trying to do, it could make sense to run it on the command-line-only Linux and show the GUI somewhere else over the network. That's what DISPLAY is for.

You could do something like:

export DISPLAY=guilinuxbox:0.0
xfreerdp ...

(but you would need to set up the permissions to do so)

For illustrating what to expect when running a plain X server (as discussed in the comments for now):

This is what a plain X server looks like - you are seeing the root window with it's default pattern. There would also be a pointer whith an "X" shape:


  • I just want to initiate an RDS session from the command-line install of Linux. How do I go about installing an xserver, I tried sudo aptitude install xserver-xorg-core, but it made no difference. Mar 29, 2014 at 11:29
  • You should probably install a whole desktop environment, maybe KDE, or a smaller one like XFCE - use what you know best. Install the default desktop environment of Ubuntu, try to install "ubuntu-desktop" (make backups as needed) - that package will propably install lots of others and make that box "GUI-based" too. Mar 29, 2014 at 11:40
  • Coud you describe what you mean by "initiate an RDS session"? Maybe I'm missing something - is it about a connection between two other boxes, and, from the command line, you only want to initiate that, not use it from there? Mar 29, 2014 at 11:43
  • 1
    Ok, then, you need to make the command line computer a GUI computer. Is there a technical reason to not install a full desktop environment - eg limited RAM or disk space? If so, one could technically install only a plain X server, and run only xfreerdp on it - but that would be very unusual, and only makes sense it there is a good reason to have no GUI-like things installed. Mar 29, 2014 at 21:15
  • 1
    So how would I install a plain x server to allow me to via a gui rdp session? Mar 30, 2014 at 14:30
  1. su root
  2. xdpyinfo
  3. find the string behind "name of display" e.g., name of display: (which is "1.0")
  4. export DISPLAY=:1.0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .