How to run a linuxator gui application

I installed ubuntu linuxator.
I'm asking how i can run a gui application , eg geany on linux.
Maybe i must mount something like /tmp/.X0-unix.
Which line do i put in fstab. nullfs ?
Same question for a gui application in a jail.
 
you would mount the /tmp directory from the host
to the jail or linuxulator

so it has access to the x11 socket

if you are using x11 you can use Xephyr to create a new display

Install Xephyr if you are running X11 on Freebsd

Code:
sudo pkg install Xephyr

Create a 1920x1080 fullscreen window

Code:
Xephyr -br -ac -noreset -screen 1920x1080 :1

Press ctrl + shift to release the mouse

then in the jail or the linuxulator install you export the DISPLAY and set to :1
in the shell config of the jail or linuxulator

Code:
  export DISPLAY=:1
  export QT_QPA_PLATFORM=xcb
  export GDK_BACKEND=x11

so when you when you run an application it will use DISPLAY :1
which is the Xephyr window

scripts to launch jailed gui applications using desktop entries on freebsd


you can do the same thing with Wayland or XWayland
 
using a jail and mounting /tmp

Code:
/etc/jail.conf.d/ubuntu.conf

Code:
ubuntu {
    # hostname/path
    host.hostname = "${name}";
    path = "/usr/local/jails/linux/${name}";

    # permissions
    allow.raw_sockets;
    exec.clean;
    persist;
    sysvmsg=inherit;
    sysvsem=inherit;
    sysvshm=inherit;
    enforce_statfs=1;

    # permissions
    devfs_ruleset=7;

    # network
    ip4.addr="lo1|10.10.0.5/24";

    # mount
    mount += "devfs           $path/dev      devfs           rw                      0       0";
    mount += "tmpfs           $path/dev/shm  tmpfs           rw,size=1g,mode=1777    0       0";
    mount += "fdescfs         $path/dev/fd   fdescfs         rw,linrdlnk             0       0";
    mount += "linprocfs       $path/proc     linprocfs       rw                      0       0";
    mount += "linsysfs        $path/sys      linsysfs        rw                      0       0";
    mount += "/tmp            $path/tmp      nullfs          rw                      0       0";
    mount += "/home           $path/home     nullfs          rw                      0       0";
    # uncomment the line below for the xdg runtime directory for wayland after creating it
    #mount += "/var/run/xdg/username $path/run/user/1001  nullfs rw            0       0";
}

rocky linux jail


ubuntu chroot


freebsd jail

 
You shouldn't have a separate /tmp for the Linuxulator. If you do not it will fall through to the system-wide /tmp and do the right thing. Instead of mounting over something that shouldn't be there you should remove /compat/ubuntu/tmp altogether.

You should have one for jails and VMs.
 
Back
Top