SlideShare a Scribd company logo
1 of 21
Download to read offline
federico.panini@fazland.com - CTO
https://www.x.org
federico.panini@fazland.com - CTO
federico.panini@fazland.com - CTO
What is the X system ?
The Idea of X-windows started in 1984 from Jim Gettys (of Project Athena) and
Bob Scheifler (of the MIT Laboratory for Computer Science).
The idea was to have a simple user interface to allow students access educational
resources easily. At the time Gettys and Scheifler started working on X there were
a lot of proprietary graphics management system but it was not possible to use it
for free, so they started a free project called X.
In fact Scheifler make a first port of W which had a synchronous protocol with an
asynchronous one, making X two times faster than W.
federico.panini@fazland.com - CTO
What is the X system ?
From: rws@mit-bold (Robert W. Scheifler)
To: window@athena
Subject: window system X
Date: 19 Jun 1984 0907-EDT (Tuesday)
I've spent the last couple weeks writing a window
system for the VS100. I stole a fair amount of code
from W, surrounded it with an asynchronous rather
than a synchronous interface, and called it X. Overall
performance appears to be about twice that of W. The
code seems fairly solid at this point, although there are
still some deficiencies to be fixed up.
We at LCS have stopped using W, and are now
actively building applications on X. Anyone else using
W should seriously consider switching. This is not the
ultimate window system, but I believe it is a good
starting point for experimentation. Right at the moment
there is a CLU (and an Argus) interface to X; a C
interface is in the works. The three existing
applications are a text editor (TED), an Argus I/O
interface, and a primitive window manager. There is
no documentation yet; anyone crazy enough to
volunteer? I may get around to it eventually.
Anyone interested in seeing a demo can drop by
NE43-531, although you may want to call 3-1945
first. Anyone who wants the code can come by with a
tape. Anyone interested in hacking deficiencies, feel
free to get in touch.
federico.panini@fazland.com - CTO
XVFB
https://www.x.org/archive/X11R7.7/doc/man/man1/Xvfb.1.xhtml
federico.panini@fazland.com - CTO
XVFB
https://www.x.org/archive/X11R7.7/doc/man/man1/Xvfb.1.xhtml
Xvfb stands for “X virtual framebuffer”, it is used to execute X environment
On hardware without proper graphics devices or video cards, as for example
unix/linux server which have only SSH access.
Xvfb uses virtual memory to recreate a dumb framebuffer, this allow to use
Any graphical operations without showing it on screen.
The idea behind Xvfb is to use the X11 protocol.
federico.panini@fazland.com - CTO
Export display
The x Window protocol allow to export display to remote client implementing
Authentication and a network protocol. This could be really useful if we need to
Test an application that could not run from CLI and should run on a remote server.
The only possibility we have is to use X-window network protocol and export
the display to a remote client.
federico.panini@fazland.com - CTO
Export display
Remember that you should have a graphical linux/unix client with an X-protocol
to properly export the display.
You have many options on Windows :
- Cygwin/X (https://x.cygwin.com/)

- Xming (https://sourceforge.net/projects/xming/)

- Startnet (http://www.starnet.com/xwin32/)
federico.panini@fazland.com - CTO
Export display
https://www.xquartz.org/
Remember that you should have a graphical linux/unix client with an X-protocol
to properly export the display.
The Mac OSX solution is XQuartz :
federico.panini@fazland.com - CTO
Export display from a vagrant Box pt.1
https://www.xquartz.org/
Download and install XQuartz then update the Security preferences to allow the
vagrant box connect properly to the client :
federico.panini@fazland.com - CTO
Export display from a vagrant Box pt.2
Check if the Vagrantfile has the property ForwardX11 set properly.
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
…
config.ssh.forward_x11 = true
end
federico.panini@fazland.com - CTO
Export display from a vagrant Box pt.2
Check if the Vagrantfile has the property ForwardX11 set properly.
sudo apt-get install xterm
xterm
federico.panini@fazland.com - CTO
Export display from a vagrant Box pt.2
Check if the Vagrantfile has the property ForwardX11 set properly.
google-chrome
federico.panini@fazland.com - CTO
Export display from a vagrant Box pt.2
Check if the Vagrantfile has the property ForwardX11 set properly.
ssh -Y -p 2222 vagrant@localhost xterm
federico.panini@fazland.com - CTO
Export display from a vagrant Box pt.2
Check if the Vagrantfile has the property ForwardX11 set properly.
federico.panini@fazland.com - CTO
Export display what is it ?
A Display consist of a :
• keyboard
• mouse
• Screen
Exporting the DISPLAY variable the X Window System knows where to route the X
network traffic. The Display variable is :
hostname.D.S
Hostname : is the host used to sent the graphical output. If omitted is localhost

D : is the screen number. Most workstations tend to only have one keyboard, and therefore, only one display. Larger,
multi-user systems, however, frequently have several displays so that more than one person can be doing graphics
work at once. To avoid confusion, each display on a machine is assigned a display number (beginning at 0) when the
X server for that display is started. The display number must always be given in a display name. 

S : Some displays share a single keyboard and pointer among two or more monitors. Since each monitor has its own
set of windows, each screen is assigned a screen number (beginning at 0) when the X server for that display is
started. If the screen number is not given, screen 0 will be used.
federico.panini@fazland.com - CTO
Export display what is it ?
federico.panini@fazland.com - CTO
Chrome 59 headless need X ???
NO!
https://developers.google.com/web/updates/2017/04/headless-chrome
federico.panini@fazland.com - CTO
Install Chrome 59 on Ubuntu Trusty
https://developers.google.com/web/updates/2017/04/headless-chrome
wget https://dl.google.com/linux/direct/google-chrome-
stable_current_amd64.deb
sudo apt-get update && sudo apt-get -f install gconf-service-
backend libgtk2.0-common libgtk2.0-bin libdbusmenu-glib4
libdbusmenu-gtk4 libgtk2.0-0 libindicator7 gconf2-common gconf-
service libnss3-nssdb libgconf-2-4 libnspr4 libxss1 fonts-
liberation libappindicator1 libnss3 xdg-utils
sudo dpkg -i google-chrome-stable_current_amd64.deb
federico.panini@fazland.com - CTO
Install Chrome 59 on Ubuntu Trusty
https://developers.google.com/web/updates/2017/04/headless-chrome
gconf-service-
backend
GNOME configuration database system (D-Bus service) - [https://packages.ubuntu.com/trusty/
gconf-service-backend]
gconf2-common GNOME configuration database system - [https://packages.ubuntu.com/trusty/gconf2-common]
gconf-service GNOME configuration database system (D-Bus service)
libgtk2.0-common common files for the GTK+ graphical user interface library
libgtk2.0-bin programs for the GTK+ graphical user interface library
libindicator7 panel indicator applet - shared library
libnss3-nssdb
Network Security Security libraries - shared databases - [https://packages.ubuntu.com/
trusty/libnss3-nssdb]
libgconf-2-4 GNOME configuration database system (shared libraries)
libnspr4 NetScape Portable Runtime Library
libxss1 X11 Screen Saver extension library
fonts-liberation
Fonts with the same metrics as Times, Arial and Courier - [https://packages.ubuntu.com/
trusty/fonts-liberation]
libappindicator1 Application Indicators - [https://packages.ubuntu.com/trusty/libappindicator1]
libnss3 [https://packages.ubuntu.com/trusty/libnss3]
xdg-utils
desktop integration utilities from freedesktop.org - [https://packages.ubuntu.com/trusty/
xdg-utils]
federico.panini@fazland.com - CTO
References
• https://www.x.org/archive/X11R7.7/doc/man/man1/Xvfb.1.xhtml
• https://www.x.org/wiki/
• https://stackoverflow.com/questions/20094118/ssh-into-vagrant-with-x-server-set-
up
• https://dyhr.com/2009/09/05/how-to-enable-x11-forwarding-with-ssh-on-mac-os-x-
leopard/
• http://www.hungry.com/~jamie/xexport.html
• https://askubuntu.com/questions/432255/what-is-display-environment-variable
• https://developers.google.com/web/updates/2017/04/headless-chrome
• https://coderwall.com/p/ozhfva/run-graphical-programs-within-vagrantboxes

More Related Content

Similar to Vagrant boxes with x, export display, chrome headless

Windows 10 IoT Core, a real sample
Windows 10 IoT Core, a real sampleWindows 10 IoT Core, a real sample
Windows 10 IoT Core, a real sampleMirco Vanini
 
INFA 620Lab 4 Firewall.docx
INFA 620Lab 4 Firewall.docxINFA 620Lab 4 Firewall.docx
INFA 620Lab 4 Firewall.docxjaggernaoma
 
Building End-user Applications on Embedded Devices with WPE
Building End-user Applications on Embedded Devices with WPEBuilding End-user Applications on Embedded Devices with WPE
Building End-user Applications on Embedded Devices with WPEIgalia
 
“Khronos Standard APIs for Accelerating Vision and Inferencing,” a Presentati...
“Khronos Standard APIs for Accelerating Vision and Inferencing,” a Presentati...“Khronos Standard APIs for Accelerating Vision and Inferencing,” a Presentati...
“Khronos Standard APIs for Accelerating Vision and Inferencing,” a Presentati...Edge AI and Vision Alliance
 
Long life to vagrant… Vagrant is dead
Long life to vagrant… Vagrant is deadLong life to vagrant… Vagrant is dead
Long life to vagrant… Vagrant is deadFederico Panini
 
Building your own RC Car with Raspberry Pi
Building your own RC Car with Raspberry PiBuilding your own RC Car with Raspberry Pi
Building your own RC Car with Raspberry PiJeff Prestes
 
IoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3BIoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3BJingfeng Liu
 
BlueHat v17 || Out of the Truman Show: VM Escape in VMware Gracefully
BlueHat v17 || Out of the Truman Show: VM Escape in VMware Gracefully BlueHat v17 || Out of the Truman Show: VM Escape in VMware Gracefully
BlueHat v17 || Out of the Truman Show: VM Escape in VMware Gracefully BlueHat Security Conference
 
Hacking the Kinect with GAFFTA Day 1
Hacking the Kinect with GAFFTA Day 1Hacking the Kinect with GAFFTA Day 1
Hacking the Kinect with GAFFTA Day 1benDesigning
 
Raspberry Pi introduction
Raspberry Pi introductionRaspberry Pi introduction
Raspberry Pi introductionLotfi Messaoudi
 
DESKTOP GUI APP DEVELOPMENT USING PYTHON!
DESKTOP GUI APP DEVELOPMENT USING PYTHON!DESKTOP GUI APP DEVELOPMENT USING PYTHON!
DESKTOP GUI APP DEVELOPMENT USING PYTHON!Umar Yusuf
 
DESKTOP GUI APP DEVELOPMENT USING PYTHON!
DESKTOP GUI APP DEVELOPMENT USING PYTHON!DESKTOP GUI APP DEVELOPMENT USING PYTHON!
DESKTOP GUI APP DEVELOPMENT USING PYTHON!Umar Yusuf
 
Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Codemotion
 
WinFE: The (Almost) Perfect Triage Tool
WinFE: The (Almost) Perfect Triage ToolWinFE: The (Almost) Perfect Triage Tool
WinFE: The (Almost) Perfect Triage ToolBrent Muir
 
Linux Installation And Shamba Server
Linux Installation And Shamba ServerLinux Installation And Shamba Server
Linux Installation And Shamba ServerMayur Verma
 
BSides Iowa 2018: Windows COM: Red vs Blue
BSides Iowa 2018: Windows COM: Red vs BlueBSides Iowa 2018: Windows COM: Red vs Blue
BSides Iowa 2018: Windows COM: Red vs BlueAndrew Freeborn
 

Similar to Vagrant boxes with x, export display, chrome headless (20)

Windows 10 IoT Core, a real sample
Windows 10 IoT Core, a real sampleWindows 10 IoT Core, a real sample
Windows 10 IoT Core, a real sample
 
INFA 620Lab 4 Firewall.docx
INFA 620Lab 4 Firewall.docxINFA 620Lab 4 Firewall.docx
INFA 620Lab 4 Firewall.docx
 
Building End-user Applications on Embedded Devices with WPE
Building End-user Applications on Embedded Devices with WPEBuilding End-user Applications on Embedded Devices with WPE
Building End-user Applications on Embedded Devices with WPE
 
“Khronos Standard APIs for Accelerating Vision and Inferencing,” a Presentati...
“Khronos Standard APIs for Accelerating Vision and Inferencing,” a Presentati...“Khronos Standard APIs for Accelerating Vision and Inferencing,” a Presentati...
“Khronos Standard APIs for Accelerating Vision and Inferencing,” a Presentati...
 
Long life to vagrant… Vagrant is dead
Long life to vagrant… Vagrant is deadLong life to vagrant… Vagrant is dead
Long life to vagrant… Vagrant is dead
 
Building your own RC Car with Raspberry Pi
Building your own RC Car with Raspberry PiBuilding your own RC Car with Raspberry Pi
Building your own RC Car with Raspberry Pi
 
Ddev workshop t3dd18
Ddev workshop t3dd18Ddev workshop t3dd18
Ddev workshop t3dd18
 
IoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3BIoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3B
 
Introduction
IntroductionIntroduction
Introduction
 
BlueHat v17 || Out of the Truman Show: VM Escape in VMware Gracefully
BlueHat v17 || Out of the Truman Show: VM Escape in VMware Gracefully BlueHat v17 || Out of the Truman Show: VM Escape in VMware Gracefully
BlueHat v17 || Out of the Truman Show: VM Escape in VMware Gracefully
 
Alvaro Denis Resume
Alvaro Denis ResumeAlvaro Denis Resume
Alvaro Denis Resume
 
Hacking the Kinect with GAFFTA Day 1
Hacking the Kinect with GAFFTA Day 1Hacking the Kinect with GAFFTA Day 1
Hacking the Kinect with GAFFTA Day 1
 
Linux
LinuxLinux
Linux
 
Raspberry Pi introduction
Raspberry Pi introductionRaspberry Pi introduction
Raspberry Pi introduction
 
DESKTOP GUI APP DEVELOPMENT USING PYTHON!
DESKTOP GUI APP DEVELOPMENT USING PYTHON!DESKTOP GUI APP DEVELOPMENT USING PYTHON!
DESKTOP GUI APP DEVELOPMENT USING PYTHON!
 
DESKTOP GUI APP DEVELOPMENT USING PYTHON!
DESKTOP GUI APP DEVELOPMENT USING PYTHON!DESKTOP GUI APP DEVELOPMENT USING PYTHON!
DESKTOP GUI APP DEVELOPMENT USING PYTHON!
 
Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!
 
WinFE: The (Almost) Perfect Triage Tool
WinFE: The (Almost) Perfect Triage ToolWinFE: The (Almost) Perfect Triage Tool
WinFE: The (Almost) Perfect Triage Tool
 
Linux Installation And Shamba Server
Linux Installation And Shamba ServerLinux Installation And Shamba Server
Linux Installation And Shamba Server
 
BSides Iowa 2018: Windows COM: Red vs Blue
BSides Iowa 2018: Windows COM: Red vs BlueBSides Iowa 2018: Windows COM: Red vs Blue
BSides Iowa 2018: Windows COM: Red vs Blue
 

More from Federico Panini

Machine Learning: strategie di collaborative filtering nelle piattaforme onli...
Machine Learning: strategie di collaborative filtering nelle piattaforme onli...Machine Learning: strategie di collaborative filtering nelle piattaforme onli...
Machine Learning: strategie di collaborative filtering nelle piattaforme onli...Federico Panini
 
Aws vpc : addressing cidr
Aws vpc : addressing cidrAws vpc : addressing cidr
Aws vpc : addressing cidrFederico Panini
 
Git in pills : git stash
Git in pills : git stashGit in pills : git stash
Git in pills : git stashFederico Panini
 
Elasticsearch quick Intro (English)
Elasticsearch quick Intro (English)Elasticsearch quick Intro (English)
Elasticsearch quick Intro (English)Federico Panini
 
Elasticsearch a quick introduction
Elasticsearch a quick introductionElasticsearch a quick introduction
Elasticsearch a quick introductionFederico Panini
 
Elk - Elasticsearch Logstash Kibana stack explained
Elk - Elasticsearch Logstash Kibana stack explainedElk - Elasticsearch Logstash Kibana stack explained
Elk - Elasticsearch Logstash Kibana stack explainedFederico Panini
 

More from Federico Panini (7)

Machine Learning: strategie di collaborative filtering nelle piattaforme onli...
Machine Learning: strategie di collaborative filtering nelle piattaforme onli...Machine Learning: strategie di collaborative filtering nelle piattaforme onli...
Machine Learning: strategie di collaborative filtering nelle piattaforme onli...
 
Aws vpc : addressing cidr
Aws vpc : addressing cidrAws vpc : addressing cidr
Aws vpc : addressing cidr
 
Git in pills : git stash
Git in pills : git stashGit in pills : git stash
Git in pills : git stash
 
Symfony & Mailcatcher
Symfony & MailcatcherSymfony & Mailcatcher
Symfony & Mailcatcher
 
Elasticsearch quick Intro (English)
Elasticsearch quick Intro (English)Elasticsearch quick Intro (English)
Elasticsearch quick Intro (English)
 
Elasticsearch a quick introduction
Elasticsearch a quick introductionElasticsearch a quick introduction
Elasticsearch a quick introduction
 
Elk - Elasticsearch Logstash Kibana stack explained
Elk - Elasticsearch Logstash Kibana stack explainedElk - Elasticsearch Logstash Kibana stack explained
Elk - Elasticsearch Logstash Kibana stack explained
 

Recently uploaded

RM&IPR M5 notes.pdfResearch Methodolgy & Intellectual Property Rights Series 5
RM&IPR M5 notes.pdfResearch Methodolgy & Intellectual Property Rights Series 5RM&IPR M5 notes.pdfResearch Methodolgy & Intellectual Property Rights Series 5
RM&IPR M5 notes.pdfResearch Methodolgy & Intellectual Property Rights Series 5T.D. Shashikala
 
Quiz application system project report..pdf
Quiz application system project report..pdfQuiz application system project report..pdf
Quiz application system project report..pdfKamal Acharya
 
Intelligent Agents, A discovery on How A Rational Agent Acts
Intelligent Agents, A discovery on How A Rational Agent ActsIntelligent Agents, A discovery on How A Rational Agent Acts
Intelligent Agents, A discovery on How A Rational Agent ActsSheetal Jain
 
Insurance management system project report.pdf
Insurance management system project report.pdfInsurance management system project report.pdf
Insurance management system project report.pdfKamal Acharya
 
Geometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdfGeometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdfJNTUA
 
Electrostatic field in a coaxial transmission line
Electrostatic field in a coaxial transmission lineElectrostatic field in a coaxial transmission line
Electrostatic field in a coaxial transmission lineJulioCesarSalazarHer1
 
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdfInstruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdfEr.Sonali Nasikkar
 
Linux Systems Programming: Semaphores, Shared Memory, and Message Queues
Linux Systems Programming: Semaphores, Shared Memory, and Message QueuesLinux Systems Programming: Semaphores, Shared Memory, and Message Queues
Linux Systems Programming: Semaphores, Shared Memory, and Message QueuesRashidFaridChishti
 
Multivibrator and its types defination and usges.pptx
Multivibrator and its types defination and usges.pptxMultivibrator and its types defination and usges.pptx
Multivibrator and its types defination and usges.pptxalijaker017
 
How to Design and spec harmonic filter.pdf
How to Design and spec harmonic filter.pdfHow to Design and spec harmonic filter.pdf
How to Design and spec harmonic filter.pdftawat puangthong
 
BURGER ORDERING SYSYTEM PROJECT REPORT..pdf
BURGER ORDERING SYSYTEM PROJECT REPORT..pdfBURGER ORDERING SYSYTEM PROJECT REPORT..pdf
BURGER ORDERING SYSYTEM PROJECT REPORT..pdfKamal Acharya
 
Research Methodolgy & Intellectual Property Rights Series 2
Research Methodolgy & Intellectual Property Rights Series 2Research Methodolgy & Intellectual Property Rights Series 2
Research Methodolgy & Intellectual Property Rights Series 2T.D. Shashikala
 
EMPLOYEE MANAGEMENT SYSTEM FINAL presentation
EMPLOYEE MANAGEMENT SYSTEM FINAL presentationEMPLOYEE MANAGEMENT SYSTEM FINAL presentation
EMPLOYEE MANAGEMENT SYSTEM FINAL presentationAmayJaiswal4
 
"United Nations Park" Site Visit Report.
"United Nations Park" Site  Visit Report."United Nations Park" Site  Visit Report.
"United Nations Park" Site Visit Report.MdManikurRahman
 
Final DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manualFinal DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manualBalamuruganV28
 
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024EMMANUELLEFRANCEHELI
 
Introduction to Artificial Intelligence and History of AI
Introduction to Artificial Intelligence and History of AIIntroduction to Artificial Intelligence and History of AI
Introduction to Artificial Intelligence and History of AISheetal Jain
 
E-Commerce Shopping using MERN Stack where different modules are present
E-Commerce Shopping using MERN Stack where different modules are presentE-Commerce Shopping using MERN Stack where different modules are present
E-Commerce Shopping using MERN Stack where different modules are presentjatinraor66
 
Piping and instrumentation diagram p.pdf
Piping and instrumentation diagram p.pdfPiping and instrumentation diagram p.pdf
Piping and instrumentation diagram p.pdfAshrafRagab14
 
Filters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility ApplicationsFilters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility ApplicationsMathias Magdowski
 

Recently uploaded (20)

RM&IPR M5 notes.pdfResearch Methodolgy & Intellectual Property Rights Series 5
RM&IPR M5 notes.pdfResearch Methodolgy & Intellectual Property Rights Series 5RM&IPR M5 notes.pdfResearch Methodolgy & Intellectual Property Rights Series 5
RM&IPR M5 notes.pdfResearch Methodolgy & Intellectual Property Rights Series 5
 
Quiz application system project report..pdf
Quiz application system project report..pdfQuiz application system project report..pdf
Quiz application system project report..pdf
 
Intelligent Agents, A discovery on How A Rational Agent Acts
Intelligent Agents, A discovery on How A Rational Agent ActsIntelligent Agents, A discovery on How A Rational Agent Acts
Intelligent Agents, A discovery on How A Rational Agent Acts
 
Insurance management system project report.pdf
Insurance management system project report.pdfInsurance management system project report.pdf
Insurance management system project report.pdf
 
Geometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdfGeometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdf
 
Electrostatic field in a coaxial transmission line
Electrostatic field in a coaxial transmission lineElectrostatic field in a coaxial transmission line
Electrostatic field in a coaxial transmission line
 
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdfInstruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
 
Linux Systems Programming: Semaphores, Shared Memory, and Message Queues
Linux Systems Programming: Semaphores, Shared Memory, and Message QueuesLinux Systems Programming: Semaphores, Shared Memory, and Message Queues
Linux Systems Programming: Semaphores, Shared Memory, and Message Queues
 
Multivibrator and its types defination and usges.pptx
Multivibrator and its types defination and usges.pptxMultivibrator and its types defination and usges.pptx
Multivibrator and its types defination and usges.pptx
 
How to Design and spec harmonic filter.pdf
How to Design and spec harmonic filter.pdfHow to Design and spec harmonic filter.pdf
How to Design and spec harmonic filter.pdf
 
BURGER ORDERING SYSYTEM PROJECT REPORT..pdf
BURGER ORDERING SYSYTEM PROJECT REPORT..pdfBURGER ORDERING SYSYTEM PROJECT REPORT..pdf
BURGER ORDERING SYSYTEM PROJECT REPORT..pdf
 
Research Methodolgy & Intellectual Property Rights Series 2
Research Methodolgy & Intellectual Property Rights Series 2Research Methodolgy & Intellectual Property Rights Series 2
Research Methodolgy & Intellectual Property Rights Series 2
 
EMPLOYEE MANAGEMENT SYSTEM FINAL presentation
EMPLOYEE MANAGEMENT SYSTEM FINAL presentationEMPLOYEE MANAGEMENT SYSTEM FINAL presentation
EMPLOYEE MANAGEMENT SYSTEM FINAL presentation
 
"United Nations Park" Site Visit Report.
"United Nations Park" Site  Visit Report."United Nations Park" Site  Visit Report.
"United Nations Park" Site Visit Report.
 
Final DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manualFinal DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manual
 
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
 
Introduction to Artificial Intelligence and History of AI
Introduction to Artificial Intelligence and History of AIIntroduction to Artificial Intelligence and History of AI
Introduction to Artificial Intelligence and History of AI
 
E-Commerce Shopping using MERN Stack where different modules are present
E-Commerce Shopping using MERN Stack where different modules are presentE-Commerce Shopping using MERN Stack where different modules are present
E-Commerce Shopping using MERN Stack where different modules are present
 
Piping and instrumentation diagram p.pdf
Piping and instrumentation diagram p.pdfPiping and instrumentation diagram p.pdf
Piping and instrumentation diagram p.pdf
 
Filters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility ApplicationsFilters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility Applications
 

Vagrant boxes with x, export display, chrome headless

  • 3. federico.panini@fazland.com - CTO What is the X system ? The Idea of X-windows started in 1984 from Jim Gettys (of Project Athena) and Bob Scheifler (of the MIT Laboratory for Computer Science). The idea was to have a simple user interface to allow students access educational resources easily. At the time Gettys and Scheifler started working on X there were a lot of proprietary graphics management system but it was not possible to use it for free, so they started a free project called X. In fact Scheifler make a first port of W which had a synchronous protocol with an asynchronous one, making X two times faster than W.
  • 4. federico.panini@fazland.com - CTO What is the X system ? From: rws@mit-bold (Robert W. Scheifler) To: window@athena Subject: window system X Date: 19 Jun 1984 0907-EDT (Tuesday) I've spent the last couple weeks writing a window system for the VS100. I stole a fair amount of code from W, surrounded it with an asynchronous rather than a synchronous interface, and called it X. Overall performance appears to be about twice that of W. The code seems fairly solid at this point, although there are still some deficiencies to be fixed up. We at LCS have stopped using W, and are now actively building applications on X. Anyone else using W should seriously consider switching. This is not the ultimate window system, but I believe it is a good starting point for experimentation. Right at the moment there is a CLU (and an Argus) interface to X; a C interface is in the works. The three existing applications are a text editor (TED), an Argus I/O interface, and a primitive window manager. There is no documentation yet; anyone crazy enough to volunteer? I may get around to it eventually. Anyone interested in seeing a demo can drop by NE43-531, although you may want to call 3-1945 first. Anyone who wants the code can come by with a tape. Anyone interested in hacking deficiencies, feel free to get in touch.
  • 6. federico.panini@fazland.com - CTO XVFB https://www.x.org/archive/X11R7.7/doc/man/man1/Xvfb.1.xhtml Xvfb stands for “X virtual framebuffer”, it is used to execute X environment On hardware without proper graphics devices or video cards, as for example unix/linux server which have only SSH access. Xvfb uses virtual memory to recreate a dumb framebuffer, this allow to use Any graphical operations without showing it on screen. The idea behind Xvfb is to use the X11 protocol.
  • 7. federico.panini@fazland.com - CTO Export display The x Window protocol allow to export display to remote client implementing Authentication and a network protocol. This could be really useful if we need to Test an application that could not run from CLI and should run on a remote server. The only possibility we have is to use X-window network protocol and export the display to a remote client.
  • 8. federico.panini@fazland.com - CTO Export display Remember that you should have a graphical linux/unix client with an X-protocol to properly export the display. You have many options on Windows : - Cygwin/X (https://x.cygwin.com/)
 - Xming (https://sourceforge.net/projects/xming/)
 - Startnet (http://www.starnet.com/xwin32/)
  • 9. federico.panini@fazland.com - CTO Export display https://www.xquartz.org/ Remember that you should have a graphical linux/unix client with an X-protocol to properly export the display. The Mac OSX solution is XQuartz :
  • 10. federico.panini@fazland.com - CTO Export display from a vagrant Box pt.1 https://www.xquartz.org/ Download and install XQuartz then update the Security preferences to allow the vagrant box connect properly to the client :
  • 11. federico.panini@fazland.com - CTO Export display from a vagrant Box pt.2 Check if the Vagrantfile has the property ForwardX11 set properly. VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| … config.ssh.forward_x11 = true end
  • 12. federico.panini@fazland.com - CTO Export display from a vagrant Box pt.2 Check if the Vagrantfile has the property ForwardX11 set properly. sudo apt-get install xterm xterm
  • 13. federico.panini@fazland.com - CTO Export display from a vagrant Box pt.2 Check if the Vagrantfile has the property ForwardX11 set properly. google-chrome
  • 14. federico.panini@fazland.com - CTO Export display from a vagrant Box pt.2 Check if the Vagrantfile has the property ForwardX11 set properly. ssh -Y -p 2222 vagrant@localhost xterm
  • 15. federico.panini@fazland.com - CTO Export display from a vagrant Box pt.2 Check if the Vagrantfile has the property ForwardX11 set properly.
  • 16. federico.panini@fazland.com - CTO Export display what is it ? A Display consist of a : • keyboard • mouse • Screen Exporting the DISPLAY variable the X Window System knows where to route the X network traffic. The Display variable is : hostname.D.S Hostname : is the host used to sent the graphical output. If omitted is localhost D : is the screen number. Most workstations tend to only have one keyboard, and therefore, only one display. Larger, multi-user systems, however, frequently have several displays so that more than one person can be doing graphics work at once. To avoid confusion, each display on a machine is assigned a display number (beginning at 0) when the X server for that display is started. The display number must always be given in a display name.  S : Some displays share a single keyboard and pointer among two or more monitors. Since each monitor has its own set of windows, each screen is assigned a screen number (beginning at 0) when the X server for that display is started. If the screen number is not given, screen 0 will be used.
  • 18. federico.panini@fazland.com - CTO Chrome 59 headless need X ??? NO! https://developers.google.com/web/updates/2017/04/headless-chrome
  • 19. federico.panini@fazland.com - CTO Install Chrome 59 on Ubuntu Trusty https://developers.google.com/web/updates/2017/04/headless-chrome wget https://dl.google.com/linux/direct/google-chrome- stable_current_amd64.deb sudo apt-get update && sudo apt-get -f install gconf-service- backend libgtk2.0-common libgtk2.0-bin libdbusmenu-glib4 libdbusmenu-gtk4 libgtk2.0-0 libindicator7 gconf2-common gconf- service libnss3-nssdb libgconf-2-4 libnspr4 libxss1 fonts- liberation libappindicator1 libnss3 xdg-utils sudo dpkg -i google-chrome-stable_current_amd64.deb
  • 20. federico.panini@fazland.com - CTO Install Chrome 59 on Ubuntu Trusty https://developers.google.com/web/updates/2017/04/headless-chrome gconf-service- backend GNOME configuration database system (D-Bus service) - [https://packages.ubuntu.com/trusty/ gconf-service-backend] gconf2-common GNOME configuration database system - [https://packages.ubuntu.com/trusty/gconf2-common] gconf-service GNOME configuration database system (D-Bus service) libgtk2.0-common common files for the GTK+ graphical user interface library libgtk2.0-bin programs for the GTK+ graphical user interface library libindicator7 panel indicator applet - shared library libnss3-nssdb Network Security Security libraries - shared databases - [https://packages.ubuntu.com/ trusty/libnss3-nssdb] libgconf-2-4 GNOME configuration database system (shared libraries) libnspr4 NetScape Portable Runtime Library libxss1 X11 Screen Saver extension library fonts-liberation Fonts with the same metrics as Times, Arial and Courier - [https://packages.ubuntu.com/ trusty/fonts-liberation] libappindicator1 Application Indicators - [https://packages.ubuntu.com/trusty/libappindicator1] libnss3 [https://packages.ubuntu.com/trusty/libnss3] xdg-utils desktop integration utilities from freedesktop.org - [https://packages.ubuntu.com/trusty/ xdg-utils]
  • 21. federico.panini@fazland.com - CTO References • https://www.x.org/archive/X11R7.7/doc/man/man1/Xvfb.1.xhtml • https://www.x.org/wiki/ • https://stackoverflow.com/questions/20094118/ssh-into-vagrant-with-x-server-set- up • https://dyhr.com/2009/09/05/how-to-enable-x11-forwarding-with-ssh-on-mac-os-x- leopard/ • http://www.hungry.com/~jamie/xexport.html • https://askubuntu.com/questions/432255/what-is-display-environment-variable • https://developers.google.com/web/updates/2017/04/headless-chrome • https://coderwall.com/p/ozhfva/run-graphical-programs-within-vagrantboxes