Headless Prolog?

I’ve been playing around with prolog and realised something. You can do everything without predicate names.

e.g. Just change all predicates

$ $ a(b,c,d,e,..)$ $


$ $ prop(a,b,c,d,e,..)$ $

Where $ prop$ is some character that you can use for all function names.

So $ isRed(X)$ becomes $ prop(isRed,X)$ .

Which makes me wonder if there is any point to prolog having function heads? Couldn’t everthing be done using lists? e.g. $ loves(romeo,juliet)$ could just as easily be written $ [loves,romeo,juliet]$ without loss of information.

Have I missed something or is there anything special about predicate function heads?

Can a system administrator check if their website is being scraped by a headless browser?

A recent article on scraping tiktok and Facebook states:

On the one hand running selenium headlessly is perfect to keep your machine “cool”, however it may help get you flagged as a scraper. System administrators can spot a headless request with ease.

The author uses a random User-Agent for each request, so I’m not sure where the logs would indicate that a headless version of a browser making the request. Are there any specific signatures to detect a headless browser?

Good faith effort on the question:

With foresight, it looks like one could check make a check for things like webdriver version (which can be spoofed too). However, by stating sys admins, the quote seems to imply that the logs themselves are sufficient to detect a headless browser.

Headless WordPress – Issue with plugin path

Working on my first decoupled site. Backend is handled by WordPress and lives on the subdomain admin.mydomain.com and the frontend lives at mydomain.com.

The first issue I saw with the headless approach, was that all permalinks referred to admin.mydomain.com. I wanted to change that so that the backend referenced to my frontend.

So I changed my config from:


which sorted my issue with the permalinks, but now I’m getting console errors because the plugins can’t find the resources they need, for example ACF:

index.php:63 GET http://mydomain.test/app/plugins/advanced-custom-fields-pro/assets/css/acf-global.css?ver=5.8.4 net::ERR_NAME_NOT_RESOLVED 

What would be the proper course of action to fix this?

How to turn off Nvidia GPU on a headless server?

I am running a headless server with an Nvidia GPU. Even when the GPU is not doing any work, it is consuming about 25 Watts of power:

+-----------------------------------------------------------------------------+ | NVIDIA-SMI 430.26       Driver Version: 430.26       CUDA Version: 10.2     | |-------------------------------+----------------------+----------------------+ | GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC | | Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. | |===============================+======================+======================| |   0  GeForce GTX 950     Off  | 00000000:01:00.0 Off |                  N/A | |  0%   61C    P0    26W / 110W |      0MiB /  2001MiB |      0%      Default | +-------------------------------+----------------------+----------------------+  +-----------------------------------------------------------------------------+ | Processes:                                                       GPU Memory | |  GPU       PID   Type   Process name                             Usage      | |=============================================================================| |  No running processes found                                                 | +-----------------------------------------------------------------------------+  

Is there a way to completely turn off power delivery to the GPU when it is not in use?

I tried sudo prime-select intel Which does cause nvidia-smi to stop working, but a power meter connect to the wall shows exactly the same power consumption with either intel or nvidia selected.

Completely removing the GPU reduces the power consumption by about 30 Watts as expected.

The main purpose is to save power and costs during idle operations, with an option to spin up the GPU when it is needed (remotely via ssh).

Fixing broken update-motd.d folder and files on headless ubuntu ssh server

Short story I was trying to fix the
motd .d files so that they would display when booting up ssh on my android device and I used an online tutorial to try to fix them.

Now I am unable to test them by typing in run-parts /etc/update-motd.d because I keep on getting the following errors. run-parts: failed to exec /etc/update-motd.d/00-header:Exec format error

run-parts: /etc/update-motd.d/00-header exited with return code 1

run-parts: failed to exec /etc/update-motd.d/10-sysinfo: Exec format error

run-parts: /etc/update-motd.d/10-sysinfo exited with return code 1

run-parts: failed to exec /etc/update-motd.d/90-footer: Exec format error

run-parts: /etc/update-motd.d/90-footer exited with return code 1 .

Typing in systemctl status motd I get this on my screen

motd.service   Loaded: masked (/dev/null; bad)   Active: inactive (dead)   

Installing Ubuntu server on WHS headless server

I have a Tranquil PC server Harmony T7 – Series 2 (9 Feb 2010, Ram – Type: 1GB, 1 HDD – Type: 1x 500G I have not used for 4 years and which has Windows Home Server installed on it. I want to install Ubuntu server on it. I found the 2010 post how-can-i-install-ubuntu-on-a-headless-machine but it’s links talk about CDs or are broke…

Please can someone guide me to some detailed tips on how to proceed? Many thanks!

Non-Latin characters not showing in headless Chrome on Ubuntu Server

When I run a site on Chrome, it shows non-Latin characters just fine. However, when I run the same site in headless Chrome on Ubuntu Server and view the site via the debugger on port 9222, then all characters show as empty rectangles [].

The site uses the Liberation font and the site’s header is set to the utf-8 charset. The Liberation font is both installed on Ubuntu Server and the font is loaded locally from the server’s webroot as well using CSS. In regular Chrome this works flawlessly, but not in headless mode.

This issue occurs for languages like Chinese, Indian, Arabic, etc.

Apparently it’s a known issue that headless Chrome can’t display non-Latin characters by default out of the box, however I haven’t been able to find any comprehensive solution for it so far.

How do I make non-Latin characters work in headless Chrome? Preferably with the Liberation font which I’m already using.

Ubuntu server 18.04 headless with Nvidia card

I am running long time computations (several hours) on a Nvidia RTX 2080 GPU installed in Ubuntu 18.04 server headless (no peripheral connected to the computer: no monitor, no keyboard, etc…).

Do I have to use Nvidia persistence ?

According to this post:


the Nvidia personn seems to suggest that Nvidia persistence should be activated.

So, as Nvidia documentation is not clear for me,

1) Is it necessary ?

2) If yes, how do I launch it ?

Zombie firefox and geckodriver processes after a scheduled scraper (headless selenium based) runs

I have 10 tasks which are selenium based scrapers which use celery to schedule and run with Redis as a broker.

Selenium uses geckodriver to connect and use Firefox (headless mode) to scrape data.

The problem I am facing is that once a celery worker executes a task that spawns FireFox processes to scrape. Even though I use driver.quit() at the end of every task, there are persisting Firefox and geckodriver processes that persist.

This above is the crux of my issue. It ends up eating most of my RAM and eventually leads to not enough memory being available for other scraper tasks to run.

Irrespective of the amount of RAM. The selenium task shouldn’t be leaving zombie processes even though driver.quit() is called.

Any suggestions to resolve this would be great.

When installing headless Ubuntu (aka server mode), what ISO is best when the features of cloud-init are not wanted?

Am I just a curmudgeon when I find cloud-init annoying? I don’t use “the cloud” for any of my projects yet the Ubuntu server ISO assumes that is my only path!

I wouldn’t mind so much if cloud-init would figure out that it isn’t “in the cloud” and disable itself. Instead, I have to figure out how to do some of the most simpliest of tasks (changing the hostname, as an example) via this convoluted process.

In short, how do I get a Ubuntu server installation that doesn’t assume I’m going to integrate it with the cloud?