[Gambas-user] run project as root
Ru Vuott
vuott at ...325...
Sun Sep 23 18:17:25 CEST 2012
> --- Dom 23/9/12, Jussi Lahtinen <jussi.lahtinen at ...626...> ha scritto:
>
> This is good idea, but instead of "/tmp/a", I would use
> Temp$():
>
> Private fl As File
> Private sFile As String
>
> Public Sub Form_Open()
>
> sFile = Temp$()
> Desktop.RunAsRoot("cat /dev/ttyUSB1 > " & sFile)
>
> fl = Open sFile For Read Watch
>
> End
>
>
> Public Sub File_Read()
>
> Dim s As String
>
> s = File.Load(sFile)
>
> TextEdit1.Text = s
>
> End
>
>
> Jussi
> ---------------------------------------------------------------------------
Well Jussi,
the solution is simple, if we use CAT command, because we can re-direct data to a supporting file by: >
but... if we can read data from a different command ? ...e.g: "whoami"
I cannot "read from" Terminal window by Gambas function.
I am able to write in it, but I can not read yet from a Terminal. :-(
Do you have a solution ?
Bye
vuotttt
More information about the User
mailing list