1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

X server & jails

Discussion in 'Installation and Maintenance of Ports or Packages' started by dbi, Jul 17, 2010.

  1. dbi

    dbi New Member

    Messages:
    129
    Thanks Received:
    6
    I was thinking about a dependency conflict [1] that prevents me from installing KDE4 and Gnome2 at same time and I came up with a fancy idea.

    Is it possible to install KDE4 in a jail, Gnome2 in another one and use them to draw on the X server running on the host system?

    Has anyone tried something like that?

    [1] http://forums.freebsd.org/showthread.php?t=14981
     
  2. Nukama

    Nukama Member

    Messages:
    129
    Thanks Received:
    41
    I'm searching for a method to test programs in a jailed environment.

    There is another option, to use a Xserver inside a jail. But that needs some patching, and I'm not sure, if that particular method described in [1] works on your FreeBSD.

    Maybe with a [pman]Xnest[/pman] server that connects to your outside Xorg(7) server. But not sure if Xnest can be run inside a jail (seems to be good shot, look at [2]).

    [1] http://docs.freebsd.org/cgi/getmsg.cgi?fetch=3431 0 archive/2008/freebsd-jail/20080316.freebsd-jail -> http://lists.freebsd.org/pipermail/freebsd-jail/2008-March/000217.html

    [2] http://www.the-labs.com/FreeBSD/JailTools/cookbook.html#x11_for_each_jail
     
  3. dbi

    dbi New Member

    Messages:
    129
    Thanks Received:
    6
    Thanks, Nukama.

    The links you gave are quite interesting, but on a slightly different subject. Running an entire X server and desktop environment in a jail and connecting/seeing that X server via vnc should be very appealing for the hosting companies.

    However I want it the other way round - to run X on the host system as usual and start KDE or Gnome from a jail. I'm quite sleepy now, but tomorrow I guess I'll try to implement that setup on my desktop.
     
  4. dbi

    dbi New Member

    Messages:
    129
    Thanks Received:
    6
    I had the time to test the idea. It works. :)

    Code:
    ezjail-admin create gnome.machine.example.com 192.168.0.111
    Xnest :1 -ac
    ezjail-admin console gnome
    pkg_add -r xorg
    pkg_add -r gnome2
    sh
    export DISPLAY=host.machine.example.com:1
    gnome-session
    
    


    Voilà! Jailed Gnome shines on the host's Xnest server!
    FreeBSD wins again! :)
     
  5. rockworldmi

    rockworldmi New Member

    Messages:
    18
    Thanks Received:
    0
    dbi can you produce same results in PC-BSD warden jail? Or can you suggest what to do? I want the same thing with warden jail system.
     
  6. dbi

    dbi New Member

    Messages:
    129
    Thanks Received:
    6

    Sorry. My PC-BSD usage is limited to several hours in total just to take a look at it. I'm not familiar with the "warden jail" concept.
     
  7. rockworldmi

    rockworldmi New Member

    Messages:
    18
    Thanks Received:
    0
  8. Martillo1

    Martillo1 Member

    Messages:
    213
    Thanks Received:
    22
    Just tried with Xnest and Xorg in Portjail (to not mess with the PC-BSD system), and Xorg and pekwm in a Warden jail and it worked.

    Yes, I jumped onto the bandwagon of lazy PC-BSD users :e