[Gambas-user] How to input hide password into gambas command line project ?

Tobias Boege taboege at ...626...
Fri Oct 2 17:42:09 CEST 2015


On Fri, 02 Oct 2015, Beno??t Minisini wrote:
> Le 02/10/2015 17:19, Tobias Boege a ?crit :
> > On Fri, 02 Oct 2015, Charlie wrote:
> >> Have you tried something simple like and let the computer do the work: -
> >>
> >> /Public Sub Form_Open()
> >> Dim sDesktop, sDir As String
> >>
> >> sDesktop = Desktop.Type
> >>
> >> Select Case sDesktop
> >>    Case "GNOME"
> >>      Shell "gksu ls -a" To sDir          'Ubuntu, Mint, Debian etc
> >>    Case "KDE"
> >>      Shell "kdesudo ls -a" To sDir    'Kubuntu, Mint KDE etc
> >> End Select
> >>
> >> Print sDir
> >>
> >> End/
> >
> > That would work only in a graphical environment. Also gb.desktop reports my
> > DE as "?". What do you do in that case?
> >
> > And also these programs don't return the password but start a process under
> > a different user. What if the password was meant to connect to a MySQL data-
> > base or to read a password-protected RAR archive?
> >
> > Regards,
> > Tobi
> >
> 
> What's your desktop?
> 

It's Trinity[0] in version 3.5.13. But it seems there is some more work to
do than just in Desktop.Type, e.g. if I select a directory in the IDE's
project TreeView and "Open in file manager..." (I guess this is Desktop's
Open() method), it starts Firefox. And there was some commonly used file
format (which I can't recall) which it insisted to open with "kdesvn". But
these may be configuration problems on my side.

I always wanted to fix it but found myself to have gotten used to it by now.
For Desktop.Type, I see several mentions of Trinity in my environment
variables, most notably it is

  DESKTOP_SESSION=trinity

Regards,
Tobi

[0] https://www.trinitydesktop.org/

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk




More information about the User mailing list