How do I start xterm with a headless system?

155

In your Xorg.conf try using the dummy driver instead of vesa. After running startx you should then execute export DISPLAY=:0 (:0 for the first X display), then you can run xterm, which you will not see of course.

I assume you want to connect via vnc, or something similar afterwards.

Share:
155

Related videos on Youtube

Marco S.
Author by

Marco S.

Updated on September 18, 2022

Comments

  • Marco S.
    Marco S. over 1 year

    I'm on Microsoft MVC4, I'm starting to have a lot of models and i want to reorganize them.

    I'm heavily using jQuery Ajax calls to populate data, thus I have:

    • few actions that returns simple views (i.e. empty html tables)

    • many actions that return a JsonResult, used to populate tables/listitems and so on

    In some action the same element ( 'item' ) is shown with some information( i.e. columns ), in other actions it is shown with other informations.

    My two questions:

    • should I have a Model for each action that returns a Json Result, for clarity? or i should not bother, and I should use continue using anonymous projection?

    • should I have base Models (i.e. the 'simple' ones) and extended models that inherit from base Models? or should i keep the Models sperated, resulting in a cleaner (but less maintenable?) structure?

    Thank you!

    • ish
      ish almost 12 years
      Do you just want to boot into the console? Why is xterm necessary? what program are you trying to run?
  • NeViXa
    NeViXa almost 12 years
    Thank you for your reply, but I think that is not what I want(not sure). I need to start X on the server to be able to start webcam capture and image processing. I got everything already working on Ubuntu 10.10 with the xorg.conf from my post. But in Ubuntu 12.04 it does not work. Any other ideas would be welcome!
  • Krista K
    Krista K almost 12 years
    You do not need X to capture webcam; X is solely to render graphical output to a monitor. Further, if there is not an attached monitor, I doubt that X would run in ubuntu 10.10 (but anything is possible!)
  • NeViXa
    NeViXa almost 12 years
    We need X to run our own image processing program. I got 20 headless Ubuntu 10.10 servers running here that boot in the console. With exact same xorg.org as in my post. Then on my command they startx with a .xinitrc that starts metacity, vino-server and xterm and an xterm containing my program. On occasion we do want to see what is actually happening on the server and with our program. Thats why we do need graphical output.
  • Krista K
    Krista K almost 12 years
    Wow, that's certainly interesting. I used headless servers with apache/php to manipulate images. Coming from the outside, it sounds like instead of patching 12.04 to work like 10.10 did, maybe redesign the software to not require X? Then your "patch" is to continue running 10.10 until a more proper solution? Does 12.04 with Unity even run metacity? (seriously, trying to help, not be a pest WRT X running)
  • NeViXa
    NeViXa almost 12 years
    The systems works exactly like it supposed to if there is a monitor connected. So, yes, metacity runs on Ubuntu 12.04. But without monitor connected, it does not work (on 12.04).
  • Krista K
    Krista K almost 12 years
  • Marco S.
    Marco S. about 11 years
    Thank you for your answer. A 'maybe-silly' question: what is the common practice about models naming? Should a Model be named like the entity that represent ( 'Player' ) or should it be named like the action that generates this model ( 'ListPlayer' ) ? I'm asking this because sometimes the models are a little different, for example for CRUD actions ( Creation model sometimes is different from Update and so on ).
  • Darin Dimitrov
    Darin Dimitrov about 11 years
    They could contain the ViewModel suffix and be named according to the action.
  • Marco S.
    Marco S. about 11 years
    Should i use the ViewModel suffix even if a model is not directly binded to a View, but instead it is returned by a Json Result? This is why i choosed to call them Models in my questions and not ViewModels ... i was thinking that ViewModel is more correct when speaking about a model binded to a View, and simply Model when the model it is used as a JsonResult for example (or as a Base model)... for example: ListPlayersModel if returned by a JsonResult action, UserInfoViewModel if returned by a ViewResult action ...
  • Darin Dimitrov
    Darin Dimitrov about 11 years
    Yes, it should be suffixed by ViewModel. In the case of a JsonResult, the view representation of your domain model is JSON.