# TCanvas c1; command not working

**URL:** <https://root-forum.cern.ch/t/tcanvas-c1-command-not-working/57693>\
**Category:** Newbie\
**Created:** [December 28, 2023, 6:27am UTC](https://root-forum.cern.ch/t/tcanvas-c1-command-not-working/57693 "2023-12-28T06:27:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kaleb\_Harrison](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/kaleb_harrison/32/35376_2.png) [@Kaleb\_Harrison](https://root-forum.cern.ch/u/Kaleb_Harrison)\
**Post date:** [December 28, 2023, 6:27am UTC](https://root-forum.cern.ch/t/tcanvas-c1-command-not-working/57693/1 "2023-12-28T06:27:03Z")

</div>

I followed the physics\_matters tutorial on youtube to download the ROOT program for windows through wsl, but I cannot get the TCanvas c1: command to produce a canvas. I have tried running sudo apt install libtiff-tools, but this doesn’t fix anything. I do not know anything about linux or the ROOT program, so I am unsure what the problem is or how to fix it.

---

<div class="post-metadata">

**Author:** ![dastudillo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dastudillo/32/17280_2.png) [@dastudillo](https://root-forum.cern.ch/u/dastudillo)\
**Post date:** [December 28, 2023, 11:34am UTC](https://root-forum.cern.ch/t/tcanvas-c1-command-not-working/57693/2 "2023-12-28T11:34:00Z")

</div>

Here is a more “official” guide (especially if you are using WSL):

> [@Complete ROOT Installation Instructions for WSL (Ubuntu 18.04 on Windows 10)](https://root-forum.cern.ch/t/complete-root-installation-instructions-for-wsl-ubuntu-18-04-on-windows-10/35148):
>
> From @olifre : Install WSL ( [https://aka.ms/install](https://aka.ms/install) ) and then Ubuntu 18.04 from the Windows Store. The first step is not needed anymore for most recent Windows 10 versions, I think. Start the freshly installed Ubuntu Bash shell and install the dependencies and some build tools: sudo apt update && sudo apt dist-upgrade sudo apt install build-essential libtbb-dev libtiff5 x11-apps git Now there’s no graphics, since WSL does not ship any X server. You can fix that e.g. by installing [Xming](https://sourceforge.net/projects/xming/) and…

For WSL2, this may work:

> [@ROOT on Windows 11 WSL2 / WSLg](https://root-forum.cern.ch/t/root-on-windows-11-wsl2-wslg/48348):
>
> Dear experts/developers, I installed the latest ROOT (6.24/06) on a Windows 11 with WSL2 (which has native GUI support) and found a weird problem with graphics. Some details: It is not a fresh Windows, but updated from W10, although it did not have WSL installed before, so it is a fresh WSL install. As per the recommended ROOT instructions with this post from @James-Carroll and MicroSoft’s instructions for WSL, I did this (with reboots where needed): Turned on these Windows features: “…

Note that, apart from ROOT, you need an X server running on Windows too, as explained in the pages above.

---

<div class="post-metadata">

**Author:** ![Kaleb\_Harrison](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/kaleb_harrison/32/35376_2.png) [@Kaleb\_Harrison](https://root-forum.cern.ch/u/Kaleb_Harrison)\
**Post date:** [December 30, 2023, 4:31am UTC](https://root-forum.cern.ch/t/tcanvas-c1-command-not-working/57693/3 "2023-12-30T04:31:52Z")

</div>

I’m trying to implement what you said here, but I’m not entirely sure what it means as I am completely knew to this area of technology. I am on windows 10 using ubuntu 22.04.3 LTS and root 6.30.02. I’m trying to understand what any of the commands mean from the youtube video I used, but I don’t know what they are or what they mean or why they are necessary. Using the information from the first half of your reply, I got up to step 3, but I am unsure of how to tell if Xming is running because when I double click the shortcut, nothing happens. There is a shortcut for xming and xlaunch, and I don’t know the difference. I believe root should already be installed and extracted according to step 4, but running the command source root/bin/thisroot.sh does not work and says “no such file or directory”.

---

<div class="post-metadata">

**Author:** ![dastudillo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dastudillo/32/17280_2.png) [@dastudillo](https://root-forum.cern.ch/u/dastudillo)\
**Post date:** [December 30, 2023, 12:40pm UTC](https://root-forum.cern.ch/t/tcanvas-c1-command-not-working/57693/4 "2023-12-30T12:40:57Z")

</div>

You need to run Xlaunch. I don’t use Xming, but Vcxsrv, as you can see in the second link (_read both to the end_ before you try stuff, to see everything you need to configure); I added some comments and a screenshot of the Xlaunch configuration, but for WSL1 (I suppose you are not using WSL2, but check!) you can probably just accept the default settings.
