X11 Graphical Desktop
Hint
In addition to using X11 Desktops in your Project, you can also run JupyterLab, VS Code, X11 Desktop on Compute Servers.
CoCalc is a modern web-application, but there are many already existing desktop applications. This aspect of CoCalc brings such applications to the web, by running them inside a minimal graphical environment and presenting them to you via the browser. It is even possible to collaboratively work on the same application – although be warned that this is quite confusing!
See this blog post for more screenshot and further explanations.
Getting started
In your project, create an X11 Desktop-file (which has the ending *.x11
),
or use the corresponding button when creating a new file.
You should see a split frame editor with
on one left side:
a Linux Terminal and
launcher buttons for starting applications
On the right hand side, there is the view area for X11 windows
Initially, that X11 area is empty and you have to start an application. To get started, we suggest to launch a simple text editor like Gedit or LibreOffice Writer.
Note
You need to click once on the X11 window in order to focus it. This tells it to process any input (mouse clicks, keyboard characters, …)
In the screenshot below, you can see that gedit
was typed into the Linux Terminal.
After hitting the return key, the application was launched and the window is shown.
The characters “asdf” were typed in and then the “Save”-Button at the top right inside the Gedit windows was pressed.
This opened up an overlay dialog window.
There, type in the filename and click “Save” at the bottom again.
Afterwards, this did create a file named file1.txt
in the current directory.
Go ahead and open it up inside of CoCalc!
Overlay Dialogs
Modal dialogs open up as almost-maximized windows on top of the current window of the application.
Note
An overlay dialog window without a Close
, Ok
, or Cancel
button can be closed
by clicking on the application visible in the background; i.e. the surrounding area of the dialog.
Window Tabs
When you open up multiple applications (or a single application opens multiple windows), they appear as tabs at the top of the X11 view area. In the screenshot below, you can see that the text file was also opened up in LibreOffice Writer:
Note
Sometimes, applications open up additional dialog windows, which show up as tabs at the top. In order to respond to the application’s dialog window, you have to click on the appropriate tab to open it up and take appropriate actions. (e.g. confirming a certain operation, etc.)
Keyboard Layout
CoCalc will try (badly) to guess your keyboard layout based on your browser’s default language settings. This does NOT work well. Instead, you should explicitly select your keyboard layout in Account preferences:
Open up your Account Settings
In the tab “Preferences”, look for the panel “Editor settings”
Inside “Editor Settings”, look for Keyboard layout (for X11 Desktop)
Note
Many languages like “German” will only work well with the variant “no dead keys”.
Zoom
CoCalc tries to match its virtual desktop size to the size of the frame inside your browser window. It will also calculate an appropriate zoom level based on the resolution of your screen. However, this might not always work.
At the top of the X11 area are zoom controls, which allow you to change the resolution. Sometimes, it might also be necessary to change some settings within the application itself (some zoom related ones in its preferences), or to change the size of the panel or browser window itself. CoCalc dynamically resizes the desktop and the application will redraw accordingly.
Terminal
Inside the small Linux Terminal on the side, you can run programs or your own scripts. For example, this could be a Python script, or even a full application: try this matplotlib: Embedding In Wx5 example.
Behind the scenes, after the X11 environment starts up,
the $DISPLAY
variable is set to tell the application where to show the graphical window.
Please wait until it is initialized,
which you can see after the connection indicator at the top right next to “X11” vanishes.
Otherwise, you’ll get this error message
Unable to access the X Display, is $DISPLAY set properly?
.
Example script (you can also run it interactively in an ipython3
shell):
import matplotlib
matplotlib.use('wxAgg')
import numpy as np
import matplotlib.pyplot as plt
plt.plot(np.random.randn(1000).cumsum())
plt.show()
Technical Status
Desktop (works well):
Chrome version 66+ is fully supported
Copy does not work on Firefox or Safari
Mobile (does NOT work):
Viewing the desktop should mostly work
Touch events barely work at all.
Even an external keyboard will NOT work on an iPad (keys will be stuck, etc.).
Installed Applications
Note
Unless otherwise noted, the application’s name is also the command to start the executable. For most applications you can find a launcher button:
Name |
Description |
Category |
Status |
---|---|---|---|
|
latex |
? |
|
Advanced molecule editor and visualizer |
chem |
OK |
|
3D graphics (to visualize wireframes) |
graphics |
OK |
|
A field-theory motivated approach to computer algebra |
physics |
OK |
|
Visual Studio code |
code |
OK |
|
photography workflow application and raw developer |
paint |
OK |
|
|
Chrome Web-browser |
web |
Randomly crashes due to Docker security requirements |
|
Drawing graphics |
graphics |
Mostly OK |
|
Powerful text editor, code, and everything else |
code, text |
OK |
|
Web-browser |
web |
Crashes |
Draw chemical formulas (no single-window mode, though) |
chem |
? |
|
text |
OK |
||
|
Explore a Git repository (in current directory) |
git |
OK |
|
Simplified interface for working with Git |
git |
OK |
Draw and edit images. (make sure to switch to “single window mode” in the “Window” menu) |
paint |
OK |
|
|
Classical calculator |
math |
OK |
Spreadsheet calculations and statistics |
stats |
OK |
|
|
schematic capture program/tool part of gEDA |
physics |
OK |
Graphical version of the famous VIM editor |
text |
OK |
|
Minimalistic Python IDE |
code |
OK |
|
Professional vector graphics editor |
graphics |
OK |
|
Java-based text editor |
text |
? |
|
Reference management software primarily for BibTeX |
latex |
OK |
|
Microsoft Access for Linux |
db |
OK |
|
LaTeX editor, but probably use |
latex |
OK |
|
Painting tool designed for concept artists |
paint |
OK |
|
Draw PSTricks, etc. |
latex, graphics |
flickers :-( |
|
Office suite consisting of: |
office |
OK |
|
LyX combines the power and flexibility of TeX/LaTeX with the ease of use of a graphical interface. |
latex |
OK |
|
a visual diff and merge tool targeted at developers |
code |
OK |
|
Jupyter Notebook compatible UI |
calc |
OK |
|
Octave |
calc |
OK |
|
PDF reader and annotator (Tools → Review) |
OK |
||
Modeling and simulation environment. Command: |
physics |
OK |
|
printed circuit board editor |
physics |
OK |
|
simple paint app for images |
paint |
OK |
|
|
PSPP is an open-source version of SPSS |
stats |
OK |
graphical UI for R: start by |
stats |
OK |
|
Open source R IDE. On high resolution displays set Tools → Global Options → Appearance → Zoom → 200% |
stats |
OK |
|
a page layout program |
office |
OK |
|
Run via |
math |
Arrow keys |
|
a powerful scientific environment for Python |
math |
OK |
|
LaTeX editor |
latex |
OK |
|
Powerful, easy to use and elegant LaTeX editor |
latex |
OK |
|
Make writing LaTeX as easy and comfortable as possible |
latex |
OK |
|
Email client |
office |
OK |
|
A super simple GUI editor for graphs and string diagrams |
latex, graphics |
? |
|
Children’s paint program |
paint |
OK |
|
Computer algebra system Maxima |
math |
OK |
|
Old graphical text editor in X |
edit |
OK |
|
Draw notes or annotate a PDF |
OK |
||
Old paint program |
paint |
OK |
Category |
Description |
---|---|
math |
mathematics |
chem |
chemistry applications |
stats |
statistics, data analysis, … |
physics |
tools for physics, engineering, modeling, etc. |
office |
productivity apps for authoring text, presentations, spreadsheets, etc. (doc, docx, odt, ppt, xml, xmlx, ods, … |
latex |
editor for working with LaTeX documents |
text |
general purpose text editors |
code |
tools for software development (IDE, etc.) |
git |
working with Git |
db |
graphical database interfaces |
paint |
raster graphics editor |
graphics |
vector graphics editor |
for reading, editing, annotating PDFs |
Tips & Tricks
High-resolution HDPI displays
If the visible buttons/controls are small, especially if you have a high-res display, and zooming alone doesn’t really help much, enable HDPI rendering. That’s available for some of the applications in their respective configuration dialogs.
In R IDE you can go to Tools → Global Options → Appearance → Zoom → 200%.
In Spyder Enable auto high DPI scaling option is available via the Tools > Preferences menu or the wrench-icon:
Is Scilab broken?
In theory, Scilab should work in this X11 Graphical Desktop editor, but there is a long standing issue in Ubuntu Linux about this.
As of May 2019, it works, but maybe it’s broken again ¯\_(ツ)_/¯
?