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

Benoît Minisini gambas at ...1...
Fri Oct 2 19:13:22 CEST 2015


Le 02/10/2015 17:42, Tobias Boege a écrit :
> 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 is non-standard standard: setting the XDG_CURRENT_DESKTOP env. 
variable. All other things are not standard at all. So for Gambas, just 
set XDG_CURRENT_DESKTOP. But it won't do anything else, as the Stock 
class does not handle Trinity.

Regards,

-- 
Benoît Minisini




More information about the User mailing list