On 10/1/10, IMP Technologies - Tajinder Singh wrote:
>
> I have created a small basic interface for Fedora to change Plymouth theme.
> But as changing theme requires to run some commands as root, I would like to
> ask for root password before starting the application.
> Similarly whenever we r
OK.
1. su doesn't work with Ubuntu because root account is disabled by default!
2. "sudo -k" doesn't seem to be able kill timestamp correctly.
So, when I open new terminal and try to get root without password, it
doesn't work.
3 This program actually works IF it is run under gdb or valgrind!!?
J
I recompiled Gambas2 and it still doesn't work.
So, I run this project with gdb and I find something very worrying.
I edited that project so that line;
*hProcess = SHELL "su -c 'ls /root'" FOR INPUT OUTPUT*
is now:
*hProcess = SHELL "sudo whoami" FOR INPUT OUTPUT*
~/Desktop/su$ gbc2 -agpmt
~/Desk
1. Open your project
2. Add a new module, let's say "Sudo"
3. Paste these lines in:
' Gambas class file
PUBLIC wins AS Form
PUBLIC black AS Button
PUBLIC szoveg1 AS TextBox
PUBLIC hProcess AS Process
PUBLIC SUB ReadPassword()
DIM black AS Button
DIM labi, labi2 AS Label
wins = NEW Form
wins.Width
> OK, here it is.
>
> Jussi
>
>
Well, your little example works as expected there (Mandriva 2010.1 / x86-64).
On Gambas 3, it works if you add 'As "Process"' after the SHELL instruction
and replace LINE INPUT by the READ instruction.
Note that you should use EXEC instead of SHELL. Not import
Works as excepted, no surprises here.
Problem is how to make shell wait for input.
Jussi
Please, try the following code and tell us if it works for you:
>
>
> PRIVATE $hprocess AS Process
>
> PUBLIC SUB Form_Open()
> DIM pwd AS String
>
> pwd = InputBox("Type your root password", "Root privilege
OK, here it is.
Jussi
2010/10/3 Benoît Minisini
> > It is attached to first mail from Stefano.
> >
> > Jussi
> >
>
> I didn't receive the first mail from Stefano, strange...
>
> --
> Benoît Minisini
>
>
> --
> Virtuali
> It is attached to first mail from Stefano.
>
> Jussi
>
I didn't receive the first mail from Stefano, strange...
--
Benoît Minisini
--
Virtualization is moving to the mainstream and overtaking non-virtualized
environ
El 03/10/10 19:21, Jussi Lahtinen escribió:
> It is attached to first mail from Stefano.
>
> Jussi
>
>
> 2010/10/3 Benoît Minisini
>
>>> Il domenica 3 ottobre 2010 18:46:38 Jussi Lahtinen ha scritto:
No, with Ubuntu 10.04 it does not work.
Textbox.Text is "", because shell is execute
It is attached to first mail from Stefano.
Jussi
2010/10/3 Benoît Minisini
> > Il domenica 3 ottobre 2010 18:46:38 Jussi Lahtinen ha scritto:
> > > No, with Ubuntu 10.04 it does not work.
> > > Textbox.Text is "", because shell is executed before textbox is even
> > > shown.
> > >
> > > Your o
> Il domenica 3 ottobre 2010 18:46:38 Jussi Lahtinen ha scritto:
> > No, with Ubuntu 10.04 it does not work.
> > Textbox.Text is "", because shell is executed before textbox is even
> > shown.
> >
> > Your original code gives result:
> > *Password:
> > Password:
> > su: Authentication failure*
> >
Il domenica 3 ottobre 2010 18:46:38 Jussi Lahtinen ha scritto:
> No, with Ubuntu 10.04 it does not work.
> Textbox.Text is "", because shell is executed before textbox is even shown.
>
> Your original code gives result:
> *Password:
> Password:
> su: Authentication failure*
> Then form appears, and
No, with Ubuntu 10.04 it does not work.
Textbox.Text is "", because shell is executed before textbox is even shown.
Your original code gives result:
*Password:
Password:
su: Authentication failure*
Then form appears, and after that when write password and click "confirm",
you will get error messag
> Il domenica 3 ottobre 2010 15:04:15 Jussi Lahtinen ha scritto:
> > I looked your example just for interest.
> > It doesn't seem to work with Ubuntu 10.04 64bit.
> >
> > There are two issues, maybe something with my system...
> > This is first time I used "*su*" (normally I use sudo) on this comp
Il domenica 3 ottobre 2010 15:04:15 Jussi Lahtinen ha scritto:
> I looked your example just for interest.
> It doesn't seem to work with Ubuntu 10.04 64bit.
>
> There are two issues, maybe something with my system...
> This is first time I used "*su*" (normally I use sudo) on this computer,
> and i
I looked your example just for interest.
It doesn't seem to work with Ubuntu 10.04 64bit.
There are two issues, maybe something with my system...
This is first time I used "*su*" (normally I use sudo) on this computer, and
it doesn't work...
*su -c 'whoami'*
gives;
*su: Authentication failure*
Ho
Il venerdì 1 ottobre 2010 21:27:39 IMP Technologies - Tajinder Singh ha
scritto:
> Hi all,
>
> I am new to Gambas but have done some projects in Visual Basic at college
> time.
>
> It is a good feeling to know about Gambas which I can use to create helpful
> applications on Linux platforms.
>
> I
On Friday 01 October 2010 15:27, IMP Technologies - Tajinder Singh wrote:
> I have created a small basic interface for Fedora to change Plymouth
> theme. But as changing theme requires to run some commands as root, I
> would like to ask for root password before starting the application.
> Similar
Hi all,
I am new to Gambas but have done some projects in Visual Basic at college
time.
It is a good feeling to know about Gambas which I can use to create helpful
applications on Linux platforms.
I have created a small basic interface for Fedora to change Plymouth theme.
But as changing theme r
19 matches
Mail list logo