Recent

Author Topic: Terminal Component Available  (Read 20266 times)

sysrpl

  • Sr. Member
  • ****
  • Posts: 315
    • Get Lazarus
Terminal Component Available
« on: April 11, 2018, 05:13:35 am »
I'm am starting a new thread because I've completed my task.

Here is a terminal component for Lazarus that is easy to reuse.

https://cache.getlazarus.org/archives/terminal.7z

To install, make sure you're on Linux with a Gtk2 copy of Lazarus. Open package terminaldsgn.lpk, install, and rebuild the IDE. You'll have a TTerminal component on your pallet. Drop it on a form, press run, and you have your own terminal program.

Here is a longish video walk through of how it works:

https://cache.getlazarus.org/videos/vte-finished.mp4

The source code is completely free, copy left, if anyone wants to reuse it.

Notes, you need to be using Linux and have libvte for gtk2 installed to use the component. You can be running other platforms, but you'll just see the design time surface it you're not on Linux.

edwinyzh

  • New Member
  • *
  • Posts: 46
Re: Terminal Component Available
« Reply #1 on: April 11, 2018, 05:24:13 am »
@sysrpl,

Thanks for your contribution!
Is it possible for the terminal component to run under Windows?

PS, what's your linux distro? The font and the other UI elements on your screen looks nice (except I don't like dark themes very much).

sysrpl

  • Sr. Member
  • ****
  • Posts: 315
    • Get Lazarus
Re: Terminal Component Available
« Reply #2 on: April 11, 2018, 05:36:04 am »
The terminal control is just a wrapper around the gnome vte, or virtual terminal emulator. It's the same terminal widget used by gnome-terminal, mate-terminal, and probably the Ubuntu terminal. As such, it's for Linux desktops only.

As for themes, it picks up on the system theme, which in my case is dark. You can also customize many aspects of the terminal, such as fonts, backgrounds, clipboard interaction, and more using the official gnome reference functions:

https://developer.gnome.org/vte/0.48/VteTerminal.html

sysrpl

  • Sr. Member
  • ****
  • Posts: 315
    • Get Lazarus
Re: Terminal Component Available
« Reply #3 on: April 11, 2018, 05:44:33 am »
Regarding the distro, I'm running ubuntu/debian with the cinnamon desktop environment. My regular PC is a 2007 dell vostro laptop witha  core 2 duo chip, and as you can see it runs great on cinnamon, even when I record video:

https://cache.getlazarus.org/videos/cinnamon.mp4

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Terminal Component Available
« Reply #4 on: April 11, 2018, 05:49:00 am »
I'm not 100% sure, but I think that turbopower asyncpro vt100 terminal control could be a good starting point, granted is more of a serial communication terminal than a console terminal, I assume it would be easier to extend it to run console command. sorry no experience with gtk I prefer QT my self.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

sysrpl

  • Sr. Member
  • ****
  • Posts: 315
    • Get Lazarus
Re: Terminal Component Available
« Reply #5 on: April 11, 2018, 08:42:24 am »
I updated my archive to include support for a dockable window inside the Lazarus IDE.

https://cache.getlazarus.org/videos/vte-embedded.mp4

guest58172

  • Guest
Re: Terminal Component Available
« Reply #6 on: April 11, 2018, 12:12:38 pm »
I'm am starting a new thread because I've completed my task.

Here is a terminal component for Lazarus that is easy to reuse.

https://cache.getlazarus.org/archives/terminal.7z

To install, make sure you're on Linux with a Gtk2 copy of Lazarus. Open package terminaldsgn.lpk, install, and rebuild the IDE. You'll have a TTerminal component on your pallet. Drop it on a form, press run, and you have your own terminal program.

Here is a longish video walk through of how it works:

https://cache.getlazarus.org/videos/vte-finished.mp4

The source code is completely free, copy left, if anyone wants to reuse it.

Notes, you need to be using Linux and have libvte for gtk2 installed to use the component. You can be running other platforms, but you'll just see the design time surface it you're not on Linux.

Thanks, looks like something i might use.  :D
I didn't know that there was this lib, almost ready to use for gtk2.
I just wish you distribute it in a proper way, e.g Github , gitlab, etc.

sysrpl

  • Sr. Member
  • ****
  • Posts: 315
    • Get Lazarus
Re: Terminal Component Available
« Reply #7 on: April 11, 2018, 12:34:06 pm »
Thanks, looks like something i might use.  :D
I didn't know that there was this lib, almost ready to use for gtk2.
I just wish you distribute it in a proper way, e.g Github , gitlab, etc.

I do have a github and I do distribute stuff on it. I just whipped this project up on it quickly.

https://github.com/sysrpl/Cross.Codebot
https://github.com/sysrpl/Bare.Game
https://github.com/sysrpl/Lazarus.Apps.Makedeb

To name a few...

guest58172

  • Guest
Re: Terminal Component Available
« Reply #8 on: April 12, 2018, 11:23:31 am »
I'll put it in Coedit (D IDE). An integrated terminal was a recurrent feature request and for some projects i find useful to use the console so now it will be directly under the code editor.

guest58172

  • Guest
Re: Terminal Component Available
« Reply #9 on: April 12, 2018, 11:35:05 am »
unit Gtk2Term; misses "use dynlibs"

Thaddy

  • Hero Member
  • *****
  • Posts: 19606
  • Glad to be alive.
Re: Terminal Component Available
« Reply #10 on: April 12, 2018, 11:49:48 am »
unit Gtk2Term; misses "use dynlibs"
It is quite possible to link it statically  :D But in this case: yes.
Any "programmer" that knows only one programming language is not a programmer

guest58172

  • Guest
Re: Terminal Component Available
« Reply #11 on: April 12, 2018, 12:51:08 pm »
There's no C interface for libvte ?

Thaddy

  • Hero Member
  • *****
  • Posts: 19606
  • Glad to be alive.
Re: Terminal Component Available
« Reply #12 on: April 12, 2018, 12:59:53 pm »
Any "programmer" that knows only one programming language is not a programmer

guest58172

  • Guest
Re: Terminal Component Available
« Reply #13 on: April 12, 2018, 01:10:56 pm »
The C interface is here actually https://developer.gnome.org/vte/0.48/VteTerminal.html but i cant find it on my system.

nouzi

  • Sr. Member
  • ****
  • Posts: 329
Re: Terminal Component Available
« Reply #14 on: April 12, 2018, 01:16:38 pm »
Thanks for your :) nic job
how to watch all video ?
My English is  bad
Lazarus last version free pascal last version
Lazarus trunk  free pascal trunk 
System : Linux mint  64bit  Windows 7 64bit

 

TinyPortal © 2005-2018