Tiny Core Linux Remote Desktop Kiosk

Overview

THIS TUTORIAL ONLY SUPPORTS TINYCORE 4
FOR TINYCORE 5 THERE IS A SOLUTION IN THE COMMENTS BELOW BY Alejo


Tiny Core Linux is one of the smallest Linux distributions out there.
We will show you how to customize Tiny Core Linux Remote Desktop Kiosk so it will automatically launch a Remote Desktop client and set a Static IP address.

Download Tiny Core

First you need to download Tiny Core Linux
Make sure you choose TinyCore.iso and not Core/CorePlus.

Add Tiny Core Packages

We used these packages (some are already located within the ISO file at /tce/optional/):

  • compiletc.tcz,compiletc.tcz.md5.txt
  • libao.tcz,libao.tcz.md5.txt
  • libusb.tcz,libusb.tcz.md5.txt
  • openssl-1.0.0.tcz,openssl-1.0.0.tcz.md5.txt
  • pcsc-lite.tcz,pcsc-lite.tcz.md5.txt
  • rdesktop.tcz,rdesktop.tcz.md5.txt
  • Xlibs.tcz,Xlibs.tcz.md5.txt
  • Xvesa.tcz,Xvesa.tcz.md5.txt

Download the needed packeges from the TCZ repository, and place them into the ISO file at /tce/optional/, we used PowerISO trial edition to complete this task.

The rest of the packages in /cde/optional/ are unneeded for the Remote Desktop Kisok and should be deleted.

Update the start-up files to include the packages, files are located at /cde/ and are called:

copy2fs.lst, onboot.lst, xbase.lst

Edit all three files to look like this:

Xlibs.tcz
Xvesa.tcz
compiletc.tcz
libao.tcz
libusb.tcz
openssl-1.0.0.tcz
pcsc-lite.tcz
rdesktop.tcz

Edit /boot/core.gz

Move and Extract the content of core.gz to a temporary directory:

zcat core.gz | cpio -i -H newc -d

Now you can continue to the next couple of steps.

Start rdesktop after boot

Create a start-up script called myremote.sh:

#!/bin/sh
# put other system startup commands here

while x=0
do
sleep 5
/usr/local/bin/rdesktop -u username -p password hostname-ipaddress -f -0
done

Place it at /home/tc/.X.d/ and make sure it is executable:

chmode +x /home/tc/.X.d/myremote.sh

Edit /opt/shutdown.sh and add the next line after the first line:

. /etc/init.d/tc-functions

Static IP configuration

Create a stat-up script called eth0.sh:

#!/bin/sh
pkill udhcpc
ifconfig eth0 192.168.0.1 netmask 255.255.255.0 broadcast 192.168.0.255 up
route add default gw 192.168.0.254
echo nameserver 192.168.0.10 > /etc/resolv.conf
echo nameserver 192.168.0.11 >> /etc/resolv.conf

edit /opt/bootlocal.sh and add the next line at the end:

/opt/eth0.sh

edit /opt/.filetool.lst and add the next line at the end:

/opt/eth0.sh

Repack core.gz into the ISO file

delete core.gz file and then update the needed files and repack core.gz to /:

find | cpio -o -H newc | gzip -2 > /core.gz

replace core.gz within the ISO file

Create a boot-able Memory Card / USB drive

You can use core2usb to create a flash drive from your ISO.

Tiny Core Linux Remote Desktop Kiosk core2usb

You can use any Hyper-visor to check the ISO of the Tiny Core Linux Remote Desktop.

Enjoy

23 thoughts on “Tiny Core Linux Remote Desktop Kiosk

  1. Aaron

    Followed these directions, however, doesn’t appear to work. /usr/local/bin/rdesktop doesn’t even exist when I boot off my modified CD :(. Only thing in /usr/local/bin is Xvesa, c_rehash, openssl 🙁

    Not sure what I am doing wrong. I verified the copy2fs.lst, onboot.lst, xbase.lst files… They have all my tcz files that I put in /tce/optional directory on the CD.

    Reply
    1. Aaron

      Ok. So I got it to at least see the rdesktop file now. I ended up putting all the files that I downloaded into the /tce/optional AND the /cde/optional folders. This makes it so rdesktop now shows up under /usr/local/bin when I boot off the CD. However, still can’t get it to work :(. I just see an X and a black screen. Flashes the X every few seconds… Used CTL+ALT+F1 to get to console screen and it’s just sitting there with a blinking cursor. So, I hit CTRL+C to get to a prompt… changed to /usr/local/bin and manually ran rdesktop command. ./rdesktop -u XXXX -p XXXX [computer IP] -f -0 (Zero). When I run this, I get: ERROR: Failed to open display.

      Any other suggestions would be greatly appreciated!!!!!

      Reply
      1. Aaron

        Ok, so after playing with it for a long time, I figured out what the problem was… On the Windows machine, where you select Remote Settings, I had to uncheck “Allow connections only from computers running Remote Desktop with Network Level Authentication (recommended)”. Once I did this, my CD worked great! Thanks for this article! Only one other question now. I noticed sound doesn’t work. Is this a limitation of Tiny Core? Anyway to add sound?

        Reply
        1. admin

          Sorry about the delayed answer but my guess is that you need to redirect the sound device to your local device.
          rdesktop -r sound=local

          Reply
  2. Klokurdiladem

    after following yours, i got a problem that system can’t boot and stuck due to access permission, here the log while booting and then freeze:

    fdisk: can’t open ‘/dev/sda’: Permission denied
    chown: /home/tc/.ash_history: Operation not permitted
    chown: /home/tc/.profile: Operation not permitted
    chown: /home/tc/.ashrc: Operation not permitted
    ———–
    Setting hostname to box hostname: sethostname: Operation not permitted
    Done
    /opt/bootlocal.sh: line3: /opt/eth0.sh: Permission denied

    any suggestion? thanks

    Reply
      1. Klokurdiladem

        I start over from beginning with fresh copy of TC and same problems still exist, any other options should i do? btw thanks a lot

        Reply
  3. Anonymous

    Can you upload and .iso file so we can simply just modify the myremote.sh and the eth0.sh files?

    Thanks

    Reply
  4. Alejandro Amado

    I Followed step by step instructions, also tried solutions posted by Aaron but for me ain’t working, it does nothing, if I boot into command line I review the folders and like Aaron rdesktop is missing,

    Thank you in advance.

    Reply
  5. CBaker

    Anyone get this working? Any chance you can send an ISO or a link to an ISO that i could modify? Just want a small footprint ISO with RDP.

    Reply
  6. sebwa

    hello,
    since 3 days i’m trying to get this working but as soon as i chance one of the 3 files TC only runs up to command line.
    Do i need linux to edit these files? Untill now i chanced the files using the windows editor program and the power iso trial for windows.

    greets.
    sebwa

    Reply
  7. Alejo

    Well you need more files to begin with, besides those mentioned here you ned from the rep the following ones, remember to get the md5 also.

    libX11, libxcb, liXrandr, libXreder, libXext

    I did not deleted any file from the original iso, i just replaced the ones on the \cde\optional with the ones downloaded from the repository.

    Next the files: copy2fs.lst, onboot.lst, xbase.lst I left them in this order, If I changed the order of the packages it stoped working dunno why im no linux expert im a google search expert lol.

    Xlibs.tcz
    Xvesa.tcz
    compiletc.tcz
    pcsc-lite.tcz
    libX11.tcz
    libxcb.tcz
    libXrandr.tcz
    libXrender.tcz
    libXext.tcz
    libao.tcz
    libusb.tcz
    openssl-1.0.0.tcz
    rdesktop.tcz

    The rest is the same, Good Luck to all

    Reply
  8. Alejo

    Well i just did this one today, to make a thin client to connect to Windows Server 2012 R2 (REMEMBER TO DISABLE ON THE SERVER NLA ONLY CLIENTS)

    Ok here we go.

    1.- Download TinyCore, use the 15MB Version TinyCore-current.iso

    2.- Using an ISO Tool open the iso, extract to a temp folter the files on the iso \cde\copy2fs.lst, \cde\onboot.lst, \cde\xbase.lst and also \boot\core.gz

    3.- Download rdesktop and needed libs
    http://distro.ibiblio.org/tinycorelinux/5.x/x86/tcz/libao.tcz
    http://distro.ibiblio.org/tinycorelinux/5.x/x86/tcz/libao.tcz.md5.txt
    http://distro.ibiblio.org/tinycorelinux/5.x/x86/tcz/libusb.tcz
    http://distro.ibiblio.org/tinycorelinux/5.x/x86/tcz/libusb.tcz.md5.txt
    http://distro.ibiblio.org/tinycorelinux/5.x/x86/tcz/openssl-1.0.0.tcz
    http://distro.ibiblio.org/tinycorelinux/5.x/x86/tcz/openssl-1.0.0.tcz.md5.txt
    http://distro.ibiblio.org/tinycorelinux/5.x/x86/tcz/pcsc-lite.tcz
    http://distro.ibiblio.org/tinycorelinux/5.x/x86/tcz/pcsc-lite.tcz.md5.txt
    http://distro.ibiblio.org/tinycorelinux/5.x/x86/tcz/rdesktop.tcz
    http://distro.ibiblio.org/tinycorelinux/5.x/x86/tcz/rdesktop.tcz.md5.txt
    http://distro.ibiblio.org/tinycorelinux/5.x/x86/tcz/udev-dev.tcz
    http://distro.ibiblio.org/tinycorelinux/5.x/x86/tcz/udev-dev.tcz.md5.txt

    4. Edit all .lst files and add the dowloaded libs, you need to add this on all 3 files
    libao.tcz
    libusb.tcz
    openssl-1.0.0.tcz
    pcsc-lite.tcz
    rdesktop.tcz
    udev-dev.tcz

    5. Now if you are not on a linux system, you should virtualize one or ssh to one because the next step can only be done on linux.

    Assuming you are on linux unpack core.gz
    zcat core.gz | cpio -i -H newc -d

    It will extract all the files used on TC, I recommend doing this on a tmp folder in ur linux system

    6. Create directorys for autoexec.sh cuz they dont exists, asuming you are on the tmp folder
    cd home
    mkdir tc
    chmod 777 tc
    cd tc
    mkdir .X.d
    chmod 777 .X.d
    cd .X.d

    8. Create autoexec script, i gave full access to those directores and files because wont worked other way, now you are in /home/tc/.X.d and do the following

    vi autordp.sh

    copy and paste this, replacing the options with your options on braces for example
    example: /usr/local/bin/rdekstp -u juan -p perez -d mydomain -f 192.168.1.1

    copy and paste this area:

    while x=0
    do
    sleep 8
    /usr/local/bin/rdesktop -u [user] -p [password] -d [domain] -f -a 16 [server]
    filetool.sh -b
    exitcheck.sh shutdown
    exit
    done

    now save, for those new to vi, hit escape then :qw! and enter

    9. give all rights to the file
    chmod 777 autordp.sh

    10. repack the core.gz
    find | cpio -o -H newc | gzip -2 > core.gz

    11. put everything back on the iso
    11.1 -> copy all the downloaded packates to /cde/optional/
    11.2 -> copy the moded .lst 3 files to /cde/
    11.3 -> copy the core.gz to /boot/
    click yes to replace all on the iso, and save it.

    You can test it now on virtualbox and vmware and see if its working, if it is working then you can create a usb using the known methods, if you still having problems with it, send me an email with your startup parameters username, password, servername, domainame, or only the servername and i will make an iso for u and upload it somewher, you can get me at aamado@sig.com.gt

    Reply
  9. allen

    rdesktop connection Windows can not use Windows key, how to modify?
    Example:
    Windows 8 will be used to [winkey + I]

    Reply
  10. james

    When I try to run rdesktop I get an error:

    libcrypto.so.1.0.0: cannot open shared object file: No such file or directory

    Any ideas?

    Reply
  11. fernando

    Hello, the problem I have is that the system does not start because it lacks the init file in / sbin. I see the descromprimir the core.gz file in that directory is that there is no file. I commented that not delete any files from the original compiled. Can you help me? thanks

    Reply
  12. Chris

    Hi,
    very usefull, but for some reason can’t I get it to work.
    I tried every version from the article and the comments, but i can’t run rdesktop 🙁

    Is there furthermore a chance to get rid of the selection box of the bootloader?
    Greetings Chris

    Reply
  13. James Boden

    Hello. I am having an issue in getting this to work. I have followed all the steps about and rdesktop is not coming up. It seems like it will not run. In fact I know the script is running, because it wants to power the system off when rdesktop does not run. I have copied the files into the folder and overwriting the current ones there. I have not deleted anything. On the text files that need to be edited, I just added to the bottom of it, meaning I added to it, still it fails to operated correctly.

    Reply
  14. Anominos

    Ok I understand the method but why just dont put the modified iso with all done for those users like me that dont have linux experience…. please?

    Reply
  15. Bruno K

    It’s work like a charm from LiveCD/USB.

    But, if you use this method in PXE accrossing TFTP, GUI don’t work.

    Up only in TEXT MODE. 🙁

    Anyone can help?

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.