When you use lazarus to copy something into the clipboard, do you then exit Lazarus or just switch to another window ?I did not exit Lazarus, just switched to a console window and back. But it makes no difference, if I exit Lazarus and start it again after running my program from a console window, the result is the same.
So the problem seems not to be my KDE-Plasma Desktop, but my small console program.Could it be that the clipboard system is not correctly initialized for a console program on Linux? Unit clipbrd belongs to the LCL, and a console program normally does not require the LCL.
Could it be that the clipboard system is not correctly initialized for a console program on Linux?I can imagine that very well...
Unit clipbrd belongs to the LCL, and a console program normally does not require the LCL.Does this mean, a console program on Linux cannot access the clipboard? That would be a pity. On Windows it works perfectly...
Did you make sure you did release trhe clipboard in a finally section?
I just tried you trick of using xclip, after running my version of your app, xclip -o says clipboard is empty, pressing ,shift-ctrl-v gives me a "hello world". How about that ?
... There is no "Linux clipboard"; in Linux he clipboard is a function of the Window Manager and is available only to GUI (X) applications.
I just tried you trick of using xclip, after running my version of your app, xclip -o says clipboard is empty, pressing ,shift-ctrl-v gives me a "hello world". How about that ?Sounds strange. I always tested with having some pure text in the clipboard, before I started my program, to see if it is changed or not.
That says to me its something to do with how the data in the clipboard is being described. The clipboard can hold data in a range of formats, an app asks the clipboard for a list of those formats and picks one, if it cannot find a format it likes, it spits out nothing.To avoid that problems, I always had some pure text in the clipboard, before I started my program.
There is no "Linux clipboard"; in Linux he clipboard is a function of the Window Manager and is available only to GUI (X) applications.How does 'xclip' access the clipboard? For me xclip does not look like a GUI application, or am I wrong?
A googling for "console clipboard Linux" should turn back some answers.I tried and got lots of "matches", but the only one I found, how to do it in Free Pascal, was:
Should you consider making it a gui app that does not actually show its main window?Hmm, sounds interesting, but GUI programs normally are big, and I wanted to use the clipboard in some small console applications...
[gui app] Hmm, sounds interesting, but GUI programs normally are big, and I wanted to use the clipboard in some small console applications...
... There is no "Linux clipboard"; in Linux he clipboard is a function of the Window Manager and is available only to GUI (X) applications.
OK lucamar thats technically true.
So be ready for problems with "clipboard" if you will to use some remote access (SSH for example) ore even virtual terminals (Ctrl+Alt+Fn) on your local device.