Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/src/packages/next/pages/features/x11.tsx
Views: 687
/*1* This file is part of CoCalc: Copyright © 2021 Sagemath, Inc.2* License: MS-RSL – see LICENSE.md for details3*/45import { Col, Layout, Row } from "antd";67import { R_IDE } from "@cocalc/util/consts/ui";8import Code from "components/landing/code";9import Content from "components/landing/content";10import Footer from "components/landing/footer";11import Head from "components/landing/head";12import Header from "components/landing/header";13import Image from "components/landing/image";14import Info from "components/landing/info";15import Pitch, { STYLE_PITCH } from "components/landing/pitch";16import SignIn from "components/landing/sign-in";17import { Paragraph, Title } from "components/misc";18import A from "components/misc/A";19import { Customize } from "lib/customize";20import withCustomize from "lib/with-customize";21import swirlCourse from "/public/features/swirl-course.png";22import swirl from "/public/features/swirl_new_large_final.png";23import x11Screenshot from "/public/features/x11-01.png";24import applications from "/public/features/x11-applications.png";25import x11Firefox from "/public/features/x11-firefox.png";26import x11Logo from "/public/features/x11-logo.svg";2728const component = "X11 Desktop";29const title = `Run ${component} Graphical Linux Applications`;3031export default function X11({ customize }) {32return (33<Customize value={customize}>34<Head title={title} />35<Layout>36<Header page="features" subPage="x11" />37<Layout.Content>38<Content39landing40startup={component}41body={x11Logo}42title={title}43subtitleBelow={true}44subtitle={45<>46<div>47Run {component} scripts,{" "}48<A href="/features/jupyter-notebook">Jupyter notebooks</A>, or49even full graphical applications in a remote {component}{" "}50environment.51</div>52</>53}54image={x11Screenshot}55alt={"Screenshot of wxMaxima in X11"}56caption={"Using wxMaxima in X11"}57/>5859<Pitch60col1={61<>62<Title level={2}>Run graphical software in your browser</Title>63<Paragraph>64CoCalc is able to{" "}65<strong>66run{" "}67<A href="https://en.wikipedia.org/wiki/X_Window_System">68graphical software using X1169</A>{" "}70via your browser71</strong>72.73</Paragraph>74<Paragraph>75The application with a graphical user interface runs remotely76on CoCalc using a virtual display provided by{" "}77<A href="https://xpra.org/">XPRA</A>.{" "}78</Paragraph>79</>80}81col2={82<>83<Title level={2}>Features</Title>84<Paragraph>85<ul>86<li>87You no longer have to{" "}88<strong>install and maintain</strong> the applications. In89particular when you're teaching a class, students just90have to sign in to CoCalc to get started!91</li>92<li>93These virtual desktops are <strong>persistent</strong> as94long as your project is running; you can close your95browser and come back later.96</li>97<li>98More than one person can <strong>collaboratively</strong>{" "}99interact with the same X11 application at the same time.100</li>101<li>102You can <strong>copy and paste</strong> between your local103desktop environment and the virtual graphical X11 session.104</li>105</ul>106</Paragraph>107</>108}109/>110111<Pitch112col1={113<>114<Title level={2}>Popular Applications</Title>115<Paragraph>116<strong>Popular applications that are preinstalled</strong>{" "}117include <A href="http://maxima.sourceforge.net/">Maxima</A>,{" "}118<A href="https://www.libreoffice.org/">LibreOffice</A>,{" "}119<A href="https://www.openmodelica.org/">OpenModelica</A>,{" "}120<A href="https://www.rstudio.com/">{R_IDE}</A>,{" "}121<A href="https://swirlstats.com/">122{"{"}swirl{"}"}123</A>124, <A href="http://www.xm1math.net/texmaker/">TexMaker</A>, and125much more …126</Paragraph>127<Paragraph>128Please check out our comprehensive table of{" "}129<strong>130<A href="https://doc.cocalc.com/x11.html#installed-applications">131installed applications132</A>133</strong>{" "}134for additional details.{" "}135</Paragraph>136</>137}138col2={139<>140<Title level={2}>Documentation/Technical Background</Title>141<Paragraph>142The{" "}143<strong>144<A href="https://doc.cocalc.com/x11.html">145X11 Documentation146</A>147</strong>{" "}148explains how to use a virtual desktop on CoCalc.149</Paragraph>150<Paragraph>151Read our{" "}152<A href="http://blog.sagemath.com/cocalc/2018/11/05/x11.html">153blog post154</A>{" "}155to learn more about this features!{" "}156</Paragraph>157</>158}159/>160161<Row style={STYLE_PITCH}>162<Col163lg={24}164style={{165paddingBottom: "30px",166background: "white",167}}168>169<Image170style={{ width: "100%" }}171src={applications}172alt="Image showing buttons for many X11 Applications in CoCalc"173/>174</Col>175</Row>176177<Info.Heading178description={179"There are many ways to use X11 in CoCalc to complement Jupyter notebooks and other functionality."180}181>182Some ways to use X11 in CoCalc183</Info.Heading>184185<Info186title="Use R's {swirl} in your web browser"187icon="r"188image={swirlCourse}189anchor="a-swirl"190alt="Using Swirl via X11 to do the basic programming course"191wide192>193<Image194src={swirl}195style={{ width: "100%", marginBottom: "15px" }}196alt="Using Swirl and X11 in CoCalc"197/>198<Paragraph>199CoCalc provides a way to use the{" "}200<A href="https://swirlstats.com/">201interactive R tutorial package Swirl202</A>{" "}203in your web browser, even though Swirl doesn't work with Jupyter204notebooks due to its complicated IO model.205</Paragraph>206<Paragraph>207Create an X11 desktop, then in the terminal, type "R", then{" "}208<Code>209options(swirl_courses_dir="~/R/courses",swirl_data_dir="~/R/data")210</Code>{" "}211then212<Code>library("swirl"); swirl()</Code>213</Paragraph>214<Paragraph>215You can use swirl in{" "}216<A href="/features/teaching">teaching a course.</A>217</Paragraph>218</Info>219220<Info221title="Use Firefox to test a web server"222icon="firefox"223image={x11Firefox}224anchor="a-firefox"225alt="Using Firefox to connect to a local web server"226>227<Paragraph>228You can use Firefox running from within your CoCalc project to229connect to a server running there only listening on localhost.230This avoids any{" "}231<A href="https://doc.cocalc.com/howto/webserver.html">232proxying or url rewriting.233</A>234</Paragraph>235<Paragraph>236Firefox works very well in the X11 graphical desktop on CoCalc.237</Paragraph>238</Info>239240<SignIn startup={component} />241</Layout.Content>242<Footer />243</Layout>244</Customize>245);246}247248export async function getServerSideProps(context) {249return await withCustomize({ context });250}251252253