I am building a smart mirror with a raspberry pi b+, a 5 inch display and a mini WiFi dongle.

I was thinking about using the MagicMirror software but this means that the user has to exit the software to connect to the internet.

I was thinking about making my own software, initially I was thinking about developing an app that runs from startup written in pascal as I’m quite familiar with the language, although I’m not sure this will end easy as I don’t think that the compiled EXE file will run natively on a raspberry pi like python and I’m not sure if the I can interface networking stuff, like allowing the user to change the WiFi ssid and password to make the pi connect.

So right now I’m left with few doubts...

  • will I be able to use pascal to make a gui and compile it to an exe and run it on a raspberry pi?
  • If raspberry pi’s can run exe files, how will I make the program change the /etc/network/interfaces file to connect without restarting.
  • If I cannot run an exe, how can I use python to do this, I am not very familiar with python...

Any help and suggestions will be very helpful,


  • exe is MicroSoft Windows executable format, so, no. You can install Pascal in the pi though ... I think it's called "fp-compiler" Commented Dec 3, 2017 at 23:28

1 Answer 1


Once upon a time, I wrote a few programs in Pascal. It used to be the Computer Science AP language as well... Fortunately, Pascal is supported on GNU/Linux distos through the Free Pascal Compiler. You can install it on the Raspberry Pi via:

apt-get install fpc

Here is the detailed description:

#apt-cache show fpc

Package: fpc
Version: 3.0.0+dfsg-11+rpi1+deb9u1
Architecture: all
Maintainer: Pascal Packaging Team <[email protected]>
Installed-Size: 113
Depends: fpc-3.0.0 (= 3.0.0+dfsg-11+rpi1+deb9u1), fp-docs-3.0.0, fp-utils-3.0.0
Homepage: http://www.freepascal.org/
Priority: optional
Section: devel
Filename: pool/main/f/fpc/fpc_3.0.0+dfsg-11+rpi1+deb9u1_all.deb
Size: 41678
SHA256: bfe0d98003fac5547de813a1275c7b9b1c5143208e1c7a79fed96c7d657a7a8f
SHA1: 88a5605b913e42b59680df2547975d44e8e4af6e
MD5sum: f4bdc5c82519e3cb3cc5bcca8446821b
Description: Free Pascal - SDK suite dependency package
 The Free Pascal Compiler is an Object Pascal compiler supporting both Delphi
 and Turbo Pascal 7.0 dialects, as well as Mac Pascal dialects. It provides a
 completely portable RunTime Library (RTL) available on many platforms and
 compatible with Turbo Pascal, along with a platform-independent class-based
 Free Component Library (FCL) adding many Delphi extensions and interfacing
 with many popular open source libraries.
 Extensions have been added to the language, such as function overloading,
 creation and linking of shared libraries, and Delphi language extensions
 including classes, exceptions, ANSI strings, and open arrays.
 This dependency package always depends on the latest available version of
 the metapackage pulling in all the FPC packages provided for this
 architecture. Experienced users may instead prefer to install the particular
 packages they require by hand.
Description-md5: a512a55eb79abd843319a1d1b6eb771d

On exe's

The executable format in GNU/Linux is the .elf file format. However, most compiled executable programs have no extension. Any file can be executed if its execute bit is set in the file permissions. Usually a compiled program will have its execute bit set automatically by the compiler/linker. However, if you compile a Pascal program and it doesn't execute even after compiling without errors, you may need to set the execute bit as follows:

chmod +x program_name

You will then be able to run the compiled Pascal program by typing its full path... something like this:


There are some shortcuts for path names. However, using the full path should be more error free for a beginner on UNIX like operating systems.

I recommend reading through the Free Pascal Documentation, since there be some changes from what you are used to in other compilers.

Not the answer you're looking for? Browse other questions tagged or ask your own question.