Sign inSign up

pkos/x-telegram

By pkos

•Updated over 7 years ago

Telegram on linux container from Windows/Mac host.

Image
0

929

pkos/x-telegram repository overview

⁠Telegram in a Linux container with Windows/Mac host

x-telegram it is a telegram desktop app running inside Linux container,docker should be host by Windows and once docker image started it will be displayed in Windows screen using and Screen Server.

⁠Manual installation and run for Windows

⁠Install Chocolatey

First need to install chocolatey.

    @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
⁠Install VcXsrv
    choco install vcxsrv
⁠Start VcXServ

VcXServ can get started by UI or with the following command

    cd %ProgramFiles%
    cd VcXsrv
    vcxsrv -multiwindow -ac
⁠Create a docker container

Create a docker container so you can start and stop and it will keep the configuration made.

    docker create --name=telegram -e TZ=<your_timezone> -e DISPLAY=<your-ip>:0.0 pkos/x-telegram
  • <your-ip> should be your docker host IP.
  • <timezone> your timezone, e.g. Europe/London. This is optional

It will pull the pkos/x-whatspp image and will create with telegram name

⁠Get docker IP

if you don't know it run ipconfig find the Ethernet adapter vEthernet (DockerNAT) and grab the IP

Or you can run:

    netsh interface ip show config name="vEthernet (DockerNAT)" | findstr "IP Address"

and you will receive the IP information as following:

        IP Address:                           10.0.75.1
⁠Start telegram
    docker start telegram
⁠Stop telegram
    docker stop telegram

⁠Automatic Installation

In the case you have the scripts for install and run.

⁠Installation
⁠Windows
    .\install.ps1 -timezone "America/La_Paz"

Where -timezone is optional, it should be your timezone e.g. Europe/London

⁠Mac

Add the permissions (only the first time)

    chmod a+x install.sh

Then run

    ./install.sh
⁠Start program
⁠Windows

Run in powershell the script start.ps1 with the following parameter

    .\start.ps1

You can create a shortcut and on the target field add the following:

    C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe "[Path\To\start.ps1]"
⁠Mac

Add the permissions (only the first time)

    chmod a+x start.sh

Then run

    ./start.sh

⁠Installation for Mac

⁠Install Xquartz

First you have to install xquartz, try installing from brew

    brew install xquartz

if you can't find the package try with

    cd ~/Downloads
    wget https://dl.bintray.com/xquartz/downloads/XQuartz-2.7.11.dmg
    hdiutil attach XQuartz-2.7.11.dmg
    cd /Volumes/XQuartz-2.7.11/
    sudo installer -pkg XQuartz.pkg -target /

⁠Run socat

    socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\" &

⁠Find you ip

Find your ip using ifconfig or you can run the command below to grab it and save into $ip variable

    ip="$(ifconfig | grep inet | grep -v inet6 | grep -v 127.0.0.1 | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" | grep -v 255)"

⁠Create your telegram image

    docker create --rm --name=telegram -e DISPLAY="$ip:0.0" pkos/x-telegram
  • Where $ip is your IP got from previous command.
  • TZ= it is your time zone (e.g. America/La_Paz) this is optional

⁠Run and configure xquartz

run xquartz

    open -a Xquartz

It will start a white console, if you are running for the first time please check Allow connections from network clients going to Preferences > Security

xquartz configuration

⁠Start telegram

    docker start telegram

⁠Stop telegram

    docker stop telegram

Tag summary

Content type

Image

Digest

Size

175.7 MB

Last updated

over 7 years ago

docker pull pkos/x-telegram