Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Terminal WIdget: (8 Items)
   
Terminal WIdget  
How we can create a Termina widget inside another widget & that terminal needs to take input from the keyboard?
Re: Terminal WIdget  
I am exactly sure what you are asking. Please elaborate...
You can simply create a PtContainer/PtPane in phab, and drop a PtTty or PtTerminal into it.
Re: Terminal WIdget  
Not exactly sure ;-)
> I am exactly sure what you are asking. Please elaborate...
> You can simply create a PtContainer/PtPane in phab, and drop a PtTty or 
> PtTerminal into it.


Re: Terminal WIdget  
Yes we  created that ( inside PtContainer), but we are unable to get shell 
prompt & we cannot give inputs from the keyboard


----- Original Message ----- 
From: "Misha Nefedov" <community-noreply@qnx.com>
To: "photon-graphics" <post61027@community.qnx.com>
Sent: Thursday, July 29, 2010 7:06 PM
Subject: Re: Terminal WIdget


>I am exactly sure what you are asking. Please elaborate...
> You can simply create a PtContainer/PtPane in phab, and drop a PtTty or 
> PtTerminal into it.
>
>
>
> _______________________________________________
>
> Photon microGUI
> http://community.qnx.com/sf/go/post61027
>
> 

Re: Terminal WIdget  
Take a look at these docs:
http://www.qnx.com/developers/docs/6.4.1/photon/widget_ref/pttty.html
look for "Setting PtTty resources" -- it explains what steps should be taken to get your app working. Also it tells why 
it may not work in PhAB.
Re: Terminal WIdget  
Thanks Misha,
  Using PtTerminal or PtTty we have to do terminal include inside the photon 
application.We have tried with the sample code given in the following link

      http://www.qnx.com/developers/docs/6.4.1/photon/widget_ref/pttty.html

We are able to print some strings on PtTty Widget using
PtTerminalPuts(), but no able to
get keyboard input and execute as command on PtTty Widget. ( as we normally 
do on shell)

Our requirement is

     1) We need keyboard input support to PtTerminal or PtTty.
     2) Need to execute command  and print the output on same PtTerminal
or PtTty Widget.
     3) We need to restrict certain command like shutdown from these widget.

Can we get some details or example code where we can able to do above
requirements.
Regards
Praveen

----- Original Message ----- 
From: "Misha Nefedov" <community-noreply@qnx.com>
To: "photon-graphics" <post61040@community.qnx.com>
Sent: Thursday, July 29, 2010 7:42 PM
Subject: Re: Terminal WIdget


> Take a look at these docs:
> http://www.qnx.com/developers/docs/6.4.1/photon/widget_ref/pttty.html
> look for "Setting PtTty resources" -- it explains what steps should be 
> taken to get your app working. Also it tells why it may not work in PhAB.
>
>
>
> _______________________________________________
>
> Photon microGUI
> http://community.qnx.com/sf/go/post61040
>
> 

Re: Terminal WIdget  
Sorry, Its working, we had made small mistake wrt argument passing.
Just need your inputs wrt restricting some commands on this shell, may be to 
use group related apis right?

----- Original Message ----- 
From: "Praveen VS" <praveen@spacomp.com>
To: <post61040@community.qnx.com>
Sent: Friday, July 30, 2010 11:38 AM
Subject: Re: Terminal WIdget


> Thanks Misha,
>  Using PtTerminal or PtTty we have to do terminal include inside the 
> photon application.We have tried with the sample code given in the 
> following link
>
>      http://www.qnx.com/developers/docs/6.4.1/photon/widget_ref/pttty.html
>
> We are able to print some strings on PtTty Widget using
> PtTerminalPuts(), but no able to
> get keyboard input and execute as command on PtTty Widget. ( as we 
> normally do on shell)
>
> Our requirement is
>
>     1) We need keyboard input support to PtTerminal or PtTty.
>     2) Need to execute command  and print the output on same PtTerminal
> or PtTty Widget.
>     3) We need to restrict certain command like shutdown from these 
> widget.
>
> Can we get some details or example code where we can able to do above
> requirements.
> Regards
> Praveen
>
> ----- Original Message ----- 
> From: "Misha Nefedov" <community-noreply@qnx.com>
> To: "photon-graphics" <post61040@community.qnx.com>
> Sent: Thursday, July 29, 2010 7:42 PM
> Subject: Re: Terminal WIdget
>
>
>> Take a look at these docs:
>> http://www.qnx.com/developers/docs/6.4.1/photon/widget_ref/pttty.html
>> look for "Setting PtTty resources" -- it explains what steps should be 
>> taken to get your app working. Also it tells why it may not work in PhAB.
>>
>>
>>
>> _______________________________________________
>>
>> Photon microGUI
>> http://community.qnx.com/sf/go/post61040
>>
>>
> 

RE: Terminal WIdget  
Make shutdown (or whatever) owned by root, set permissions to 0700, and
start the shell in your terminal as user nobody.
He will not be able to execute shutdown.

Can generalize for other user not just root and can restrict by group if
you need multiple users being able to execute. 

--
  Mate

-----Original Message-----
From: Praveen VS [mailto:community-noreply@qnx.com] 
Sent: July 30, 2010 3:37 PM
To: photon-graphics
Subject: Re: Terminal WIdget

Sorry, Its working, we had made small mistake wrt argument passing.
Just need your inputs wrt restricting some commands on this shell, may
be to use group related apis right?

----- Original Message -----
From: "Praveen VS" <praveen@spacomp.com>
To: <post61040@community.qnx.com>
Sent: Friday, July 30, 2010 11:38 AM
Subject: Re: Terminal WIdget


> Thanks Misha,
>  Using PtTerminal or PtTty we have to do terminal include inside the 
> photon application.We have tried with the sample code given in the 
> following link
>
>
http://www.qnx.com/developers/docs/6.4.1/photon/widget_ref/pttty.html
>
> We are able to print some strings on PtTty Widget using
> PtTerminalPuts(), but no able to
> get keyboard input and execute as command on PtTty Widget. ( as we 
> normally do on shell)
>
> Our requirement is
>
>     1) We need keyboard input support to PtTerminal or PtTty.
>     2) Need to execute command  and print the output on same
PtTerminal
> or PtTty Widget.
>     3) We need to restrict certain command like shutdown from these 
> widget.
>
> Can we get some details or example code where we can able to do above
> requirements.
> Regards
> Praveen
>
> ----- Original Message ----- 
> From: "Misha Nefedov" <community-noreply@qnx.com>
> To: "photon-graphics" <post61040@community.qnx.com>
> Sent: Thursday, July 29, 2010 7:42 PM
> Subject: Re: Terminal WIdget
>
>
>> Take a look at these docs:
>> http://www.qnx.com/developers/docs/6.4.1/photon/widget_ref/pttty.html
>> look for "Setting PtTty resources" -- it explains what steps should
be 
>> taken to get your app working. Also it tells why it may not work in
PhAB.
>>
>>
>>
>> _______________________________________________
>>
>> Photon microGUI
>> http://community.qnx.com/sf/go/post61040
>>
>>
> 





_______________________________________________

Photon microGUI
http://community.qnx.com/sf/go/post61154