# How my favourite software runs on FreeBSD?



## xYw (Sep 19, 2019)

Hello, FreeBSD users.
I'm absolutely new to *BSD. The only thing i have is about 5 years of GNU/Linux experience as a desktop user and a few days experience of reading about FreeBSD.
I'd like to ask you for advice about how to switch to FreeBSD with less harm to my workflow. I used to use such programs as firefox, syncthing, texlive, emacs, libreoffice, zathura, sxiv, dwm (and other suckless tools), mpv, vlc, minidlna, moc, qemu (kvm). As far as i understand most of this software is in FreeBSD repos. Are there any specific things about using all this stuff in FreeBSD?

P.S. I'm definitely not fan of building everything from the source. I prefer binary packages and simple package management. Also i'm sorry if i misunderstand purpose of this section. Just didn't find a newbie topic or something of that kind.


----------



## D-FENS (Sep 19, 2019)

Before switching the OS, go to https://www.freshports.org/ and make sure your tools are included in the packages. If not, you could check on the Tool's website, maybe they provide an alternative way to install on FreeBSD.
When you're sure that the tools are available, make a new installation and use the following command to install the package you need:
`pkg install ....`


----------



## Pummelchen (Sep 19, 2019)

Some key apps like Dropbox and VMware Workstation sadly do not run on FreeBSD, which keeps us from switching over from Debian.


----------



## olli@ (Sep 19, 2019)

Pummelchen said:


> Some key apps like Dropbox and VMware Workstation sadly do not run on FreeBSD, which keeps us from switching over from Debian.


Never used VMWare, but using Dropbox on FreeBSD is easy. There are several commandline tools for accessing Dropbox, for example net/dropbox-api-command and net/rclone. There are various FUSE modules for importing Dropbox as a filesystem – they're not in FreeBSD's Ports Collection, but I guess at least one of them can be built manually without too many problems.


----------



## shkhln (Sep 19, 2019)

Definitely no kvm and no VMware.


----------



## D-FENS (Sep 19, 2019)

FreeBSD has its own virtualization - bhyve.
I believe it can be used with libvirt and virt-manager in case you want a fancy GUI. But I had some difficulties creating a VM this way.


----------



## olli@ (Sep 20, 2019)

As far as virtualization is concerned – VirtualBox also runs very well on FreeBSD. I'm using it because it supports passing raw optical devices into the guest, so I can use BluRay disks. Bhyve doesn't support this.


----------



## PacketMan (Sep 25, 2019)

olli@ said:


> As far as virtualization is concerned – VirtualBox also runs very well on FreeBSD. I'm using it because it supports passing raw optical devices into the guest, so I can use BluRay disks. Bhyve doesn't support this.



True, but my only beef was you need X windows running to use it.  How I really wish it came with a http(s) based gui for remote management, and/or headless machines.  I haven't been on here much lately; so any chance that has changed??


----------



## tingo (Sep 26, 2019)

Strictly speaking, you don't need Xorg for VirtualBox. You can use *VBoxManage* at the command line instead. It's not as easy as a gui.


----------



## PacketMan (Sep 27, 2019)

True. But I do want a gui, just not a local gui, tied to x windows and a video card. I want remote gui to fully manage VirtualBox remotely.  HTTP(s) seems to be the logical choice.


----------



## willbprog127 (Sep 27, 2019)

I have not used it, but this sounds like it might work?

Github repo: https://github.com/phpvirtualbox/phpvirtualbox


----------



## willbprog127 (Sep 27, 2019)

Also VirtualBox has a built-in RDP server (see image)


----------



## PacketMan (Sep 27, 2019)

willbprog127 said:


> I have not used it, but this sounds like it might work?
> 
> Github repo: https://github.com/phpvirtualbox/phpvirtualbox



That uses / depends on Docker?



willbprog127 said:


> Also VirtualBox has a built-in RDP server (see image)



True, but how would I configure it without a gui in the first place.  I really do require http ready-for-use out of the box, so to say, since my machine is headless.


----------



## kpedersen (Sep 27, 2019)

PacketMan said:


> True. But I do want a gui, just not a local gui, tied to x windows and a video card. I want remote gui to fully manage VirtualBox remotely.  HTTP(s) seems to be the logical choice.



Unlike Linux and Wayland, FreeBSD has a highly innovative display system called X11 which allows for remote GUI display over SSH. You should give this a shot or you can look into VNC which also supports separate sessions.


----------



## PacketMan (Sep 27, 2019)

kpedersen said:


> Unlike Linux and Wayland, FreeBSD has a highly innovative display system called X11 which allows for remote GUI display over SSH. You should give this a shot or you can look into VNC which also supports separate sessions.



I was sure I tried this before; it will not work, because X11 will not run, because the machine has no video card.  Same for VNC don't I need a working X11 display so I can configure it? I'm going on memory here from about two years ago I think it was. I gave up for all the same reason; initally need a working X11 and video card.


----------



## willbprog127 (Sep 28, 2019)

I'm sorry if I missed it, but have you tried creating, configuring and installing the OS on a VM on a workstation with a monitor, then moving the VM to the headless computer?  I've done this before with VirtualBox since it's way easier to install some OS's with a GUI than just text mode.


----------



## kpedersen (Sep 28, 2019)

PacketMan said:


> I was sure I tried this before; it will not work, because X11 will not run, because the machine has no video card.  Same for VNC don't I need a working X11 display so I can configure it? I'm going on memory here from about two years ago I think it was. I gave up for all the same reason; initally need a working X11 and video card.


For x11 forwarding, the server does not need a GPU. Neither with VNC.

With VNC you run a special kind of x server Xvnc (via vncserver) and that X server does not connect to the GPU, instead it uses a frame buffer in memory and compresses and sends that as an image to connected clients. It is semi slow for stupid things like Gnome and web browsers but pretty good for most VirtualBox uses.

X11 is similar but you run the XServer on your client (with a GPU) and the server X11 programs effectively connect back to that to send images and drawing instructions. Again for stupid things like Gnome and web browsers performance is not perfect.


----------



## D-FENS (Sep 30, 2019)

PacketMan said:


> I was sure I tried this before; it will not work, because X11 will not run, because the machine has no video card.  Same for VNC don't I need a working X11 display so I can configure it? I'm going on memory here from about two years ago I think it was. I gave up for all the same reason; initally need a working X11 and video card.


You don't need a video card to do X11 forwarding via SSH. Just install an X11 graphical app on the remote side and do your SSH session with -X. Also, X11 forwarding should be allowed in the SSH server configuration.
The reason you don't need a video card to do X11 forwarding is, you do not render on the remote side. You don't even have an X11 server running on your remote machine - you don't need it. You use your local X11 server to render whatever happens on the remote side. But you definitely need a video card on your local machine.


----------



## Quip (Sep 30, 2019)

PacketMan said:


> True. But I do want a gui, just not a local gui, tied to x windows and a video card. I want remote GUI to fully manage VirtualBox remotely.  HTTP(s) seems to be the logical choice.



You don't need X11. *VirtualBox* can be used as *headless* on machines *without X11*. There is support for in in rc script. You just need to configure it in rc.conf. Then you can user *phpVirtualBox* to manage VM guest (create them, clone them etc.). *phpVirtualBox* is not dependent on Docker, it can be installed form ports or packages https://www.freshports.org/www/phpvirtualbox/
We are using VirtualBox + phpVirtualBox for years on headless machines in datacenter.
You just need to setup webserver with PHP (e.g. *Nginx* + *php-fpm*) and if you like Let's Encrypt certificate for HTTPS.


----------



## D-FENS (Sep 30, 2019)

Quip said:


> You don't need X11. *VirtualBox* can be used as *headless* on machines *without X11*. There is support for in in rc script. You just need to configure it in rc.conf. Then you can user *phpVirtualBox* to manage VM guest (create them, clone them etc.). *phpVirtualBox* is not dependent on Docker, it can be installed form ports or packages https://www.freshports.org/www/phpvirtualbox/
> We are using VirtualBox + phpVirtualBox for years on headless machines in datacenter.
> You just need to setup webserver with PHP (e.g. *Nginx* + *php-fpm*) and if you like Let's Encrypt certificate for HTTPS.


what is the performance of VirtualBox compared to a bhyve VM? I used VirtualBox like a decade ago but I dropped it for QEMU with KVM.


----------



## Quip (Sep 30, 2019)

roccobaroccoSC said:


> what is the performance of VirtualBox compared to a bhyve VM?



I never run benchmarks to compare the two. I never had problems with CPU performance on VirtualBox VMs. I am running only one `bhyve` VM on fairly new project / machine.
If you need something highly compatible with different guest OSes easy to maintain and with web UI then go with VirtualBox + phpVirtualBox.
If you just want to run bunch of FreeBSD or Linux headless guests you can go with Bhyve.
Both VirtualBox and Bhyve can be managed from commandline but VirtualBox has so many features that managing them all from command line is not so easy.

Or if you want to play then try *ClonOS* https://clonos.tekroutine.com/
It has web interface, based on FreeBSD, supports Jail, Bhyve, Xen guests and many more interesting features.


----------



## D-FENS (Sep 30, 2019)

libvirt has similar objectives.


----------



## unitrunker (Oct 1, 2019)

kpedersen said:


> Unlike Linux and Wayland, FreeBSD has a highly innovative display system called X11 which allows for remote GUI display over SSH.


Sarcasm detected. 



PacketMan said:


> I was sure I tried this before; it will not work, because X11 will not run, because the machine has no video card.  Same for VNC don't I need a working X11 display so I can configure it? I'm going on memory here from about two years ago I think it was. I gave up for all the same reason; initally need a working X11 and video card.



kpederson is correct. Think of an X-server as analogous to a web browser. The X-server is where you find the video, mouse and keyboard. The X-client is any app that speaks X11 protocol back to the server. That may be over TCP on a remote host or a Unix pipe on the local host. In X11, the client/server paradigm is flipped from what most people think of as client (eg. browser) and (web) server. 

In terms of what packages to install on your remote server - the X client libraries are the bare minimum. The X-server libraries need only be installed on the machine used to log in to the remote server.

I use X forwarding from a Windows and FreeBSD laptops into multiple in-house FreeBSD machines on the LAN. Performance is, I think, better than RDP.


----------



## tingo (Oct 3, 2019)

and if you have trouble with `ssh -X ...`, try `ssh -Y ...` instead.


----------

