problems of using the fp IDE on Raspbian with putty lazarus / 66-Unix ---------------------------------------------------------------------- Niklo · 2020-01-26 02:18 Hello, I recently installed free pascal on my Raspberry PI. The installation succeeded and I can start the free pascal IDE fp. As I have a windows laptop I use putty to login with ssh. Unfortunately I have severe problems to use the IDE in putty. I cannot use the mouse to select a menu and using the key combinations like alt e does not work, too. The version I try is: * Free Pascal IDE Version 1.0.12 [2019/02/04] * Compiler Version 3.0.4+dfsg-22+rpi1 * GDB Version GNU gdb (Raspbian 8.2.1-2) 8.2.1 Free Pascal Compiler version 3.0.4+dfsg-22+rpi1 [2019/02/04] for arm cat /etc/issue.net Raspbian GNU/Linux 10 => buster uname -a Linux wega 4.19.93-v7+ #1290 SMP Fri Jan 10 16:39:50 GMT 2020 armv7l GNU/Linux In general the mouse works in putty. The midnight commander mc has not problems to be used with mouse in putty but I don't know how to get fp working in putty. What is needed to run fp in putty? Is there any experience with putty or any advice what I can try to get the key combinations working? Kind regards,   Roland ---------------------------------------------------------------------- bee · 2020-01-26 04:21 Why do you need to open the FP's console IDE on the Raspi? Why don't you just using a local editor that open a file then compile it on the raspi through ssh? I'm usually using VS Code as the local editor for such case. Using VS Code (or any local editors such as Sublime or Notepad++) is much comfortable and faster rather than using FP's console IDE remotely. VS Code has official Remote Development extension that specifically used for such purpose. But I don't know whether it will work with raspi as the remote machine (architecture issue). At least, you can open terminal, connect to your remote machine, and compile it from there. Don't forget when you save the file, set to automatically upload to the remote machine (there's a vs code extension for that as well). ---------------------------------------------------------------------- Niklo · 2020-01-26 07:11 Hello Bee, thank you for your answer. You're absolutely right. I can use a normal editor like vi and compile and debug it later. I often use vi for programming in C/C++. I want to use the fp ide because I used turbo pascal 30 years ago and the fp reminds me on it. So it's rather a nostalgic reason and I hoped that there is an easy posibility as other programms like the mc has no problems to use the ncurses user interface. So yes, I can already program with vi but if anybody has a clue how to get the fp running using the alt key combination and the mouse it would be great. Kind regards,   Roland ---------------------------------------------------------------------- MarkMLl · 2020-01-26 09:15 I've just checked and I'm certainly able to use fp (i.e. the FPC IDE) remotely if the SSH client is running on a Linux (Debian Buster x86_64) system, including mouse and e. I'm not able to test it from a Windows client. Historically on Windows I've used Teraterm but I really can't remember whether I've tried to run fp over it, and in any case I believe that Putty is more actively maintained. I don't know what is available in the context of fp or- in the more general case- an SSH server to monitor exactly what traffic (i.e. including mouse events) is being passed over the connection. MarkMLl ---------------------------------------------------------------------- devEric69 · 2020-01-26 10:12 Quote from: Niklo on January 26, 2020, 03:18:02 amIn general the mouse works in putty. The midnight commander mc has not problems to be used with mouse in putty [snip] You probably need, however, to install a program \ device \deamon, that drives the mouse for the Linux text terminal, on Raspbian. Eg with Ubuntu server, it should be like this: "out of the box", the mouse (a white rectangle that moves) doesn't work, even after having installed Midnight Commander (which indeed, is a like " semi-graphical desktop environment "). ---------------------------------------------------------------------- Niklo · 2020-01-26 10:35 Hello Mark, thank you for your answer. I will try out later to boot my laptop with linux. Currently I played with the putty settings and for strange reasons the alt key combinations works now. Currently only the left mouse click is not accepted. I guess there is a putty setting that prevents the use of the left mouse key in fp. Kind regards,   Roland ---------------------------------------------------------------------- Niklo · 2020-01-26 10:39 Hi Eric, thank you for your answer, too. You're right. Logging directly into the Raspberry PI console a mouse daemon is needed. For using ssh it works without a mouse daemon and so I can already select text in fp for copy text or using mc to select menu items. For a strange reason the left mouse key is not working on fp with putty. I will later boot my laptop with Linux and will try it out, there. Probably there everything works fine but what needs to be changed in putty to get things working? Kind regards,   Roland ---------------------------------------------------------------------- devEric69 · 2020-01-26 11:02 Hello, In putty, there is the X11 option. But it uses another graphical layer, afaik (anyway, if it works with that option, don't ask me why ). ---------------------------------------------------------------------- Niklo · 2020-01-26 20:35 Hi, now I booted my Laptop into Mint Linux and connected to my Raspberry PI with ssh. Now the mouse works fine. Unfortunately now I get the next problem. I can compile the code with fpc but in fp I get and error message: "Fatal: Can't find unit System used by Schwingkreis". See attachment. On the command line it works but shows a warning: roland@wega:~ $ fpc schwingkreis.pas Free Pascal Compiler version 3.0.4+dfsg-22+rpi1 [2019/02/04] for arm Copyright (c) 1993-2017 by Florian Klaempfl and others Target OS: Linux for ARMHF Compiling schwingkreis.pas Assembling schwingkreis Linking schwingkreis /usr/bin/ld.bfd: warning: link.res contains output sections; did you forget -T? 24 lines compiled, 0.7 sec What needs to be done to get rid of this warning during linking? What needs to be done to be able to compile in fp ide? Kind regards,   Roland ---------------------------------------------------------------------- marcov · 2020-01-26 20:57 Somehow your distro didn't configure the IDE properly. The IDE has a compiler internally so it has a complete own configuration. So configure the "units" path in the configuration (akin to the -Fu compiler parameter) and it will be fine. ---------------------------------------------------------------------- Niklo · 2020-01-26 22:00 Hello Marcov, thank you for your answer. Currently I don't know where exactly I should enter the path to the units. Should I enter it in the IDE in Options->Directories and there in Unit directories? /usr/lib/arm-linux-gnueabihf/fpc/3.0.4/units/arm-linux/ At least there is a directory /usr/lib/arm-linux- gnueabihf/fpc/3.0.4/units/arm-linux/ with a52, cdrom, fastcgi ... xforms. Nevertheless adding this directory path to fp => Options => Directories and there to the Unit directory didn't help. Kind regards,   Roland ---------------------------------------------------------------------- marcov · 2020-01-26 22:30 Quote from: Niklo on January 26, 2020, 11:00:24 pm Should I enter it in the IDE in Options->Directories and there in Unit directories? yes Quote from: Niklo on January 26, 2020, 11:00:24 pm/usr/lib/arm-linux- gnueabihf/fpc/3.0.4/units/arm-linux/ [/quite] The arm-linux prefixing is not standard FPC, so maybe something from your distribution. Append a * at the end, so that it ends in  "/*". This makes the compiler recurse. ---------------------------------------------------------------------- Niklo · 2020-01-27 06:33 Hello Marcov, thank you very much. Now it works to write and build my test pascal program in the fp ide on my raspberry PI. Here the lines I put into Options => Directories => Units: /usr/lib/arm-linux-gnueabihf/fpc/3.0.4/units/arm-linux/  /usr/lib/arm-linux-gnueabihf/fpc/3.0.4/units/arm-linux/*  /usr/lib/arm-linux-gnueabihf/fpc/3.0.4/units/arm-linux/rtl I add two screenshots: Best regards,   Roland ---------------------------------------------------------------------- PascalDragon · 2020-01-27 08:05 Quote from: Niklo on January 26, 2020, 09:35:44 pmnow I booted my Laptop into Mint Linux and connected to my Raspberry PI with ssh. Now the mouse works fine. Note: for Putty you might need to adjust the console emulation in the Terminal options (e.g. Terminal -> Keyboard -> The Funktion keys and keypad). You might need to play around with it a bit... ---------------------------------------------------------------------- Hartmut · 2020-01-27 11:36 Quote from: Niklo on January 26, 2020, 09:35:44 pmFree Pascal Compiler version 3.0.4+dfsg-22+rpi1 [2019/02/04] for arm ... /usr/bin/ld.bfd: warning: link.res contains output sections; did you forget -T? ... What needs to be done to get rid of this warning during linking? There is nothing you can do. It shall be fixed in FPC 3.1.1 and later. See https://www.freepascal.org/faq.var#unix-ld219