RE: [lazarus] root's password...
It has to work on all DEs, not just Gnome or KDE. So it looks like the easiest way is to make 2 programs. The first checks the id and if it's not 0 then prompt for root password, write and run a small shell script that su and runs the second program, run the script and terminate. The 2nd program checks the id if not 0 it terminates. Otherwise it goes on working as gui pkg mgr. I think that's what I'll implement unless some one can come up with a better (easier) solution. Rod. Sam Liddicott [EMAIL PROTECTED] wrote: It should try to use gksudu or similar to re-invoke itself as root. Failing that, sudo or su, check the see also section of the man pages of those tools. Possibly the package containing your program should depend on gksudo or similar and the menu item created should invke gksudo directly on the application. It will then always run as root and use a familiar and tested method and UI to do this. Sam -Original Message- From: R. B. To: lazarus@miraclec.com Sent: 07/01/07 16:00 Subject: [lazarus] root's password... Hello, I almost finished my first application that I build using fpc/lazarus. It is an IDE for an AI language and I have to greatly admire all those who made fpc (big thumb up despite I haven't got enough time to check out the source specially the three-pass part) and lazarus possible. I couldn't believe how easy it was to make a binary for linux and the other for win using the same source). Now it's easier for me to say that it's quite possible that I will not go back to C/C++ again. Many many thanks to you all and hopefully I will give a hand when I get enough experience. My second project that I plan to build with fpc/lazarus is a Package Manager. I have'nt started yet but already have a question in mind: how to make the program itself sure that the user is root? OK, if the uid is not zero then it prompts for the root's password, then what? How to see that the passwd is the root's? Any ideas? Thanks, Rod. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
[lazarus] Lazarus to WinCE: using windows dlls to get the trick done
Hi... reading the guide on fpc wince compilation on the wiki: http://wiki.lazarus.freepascal.org/Windows_CE_Development_Notes Don't know WERE (something changed in the last days) i found that link: http://ccrdu.de/docs/pkCEStuff.htm That is a Patrick Michael Kolla's page, he's the creator of Spybot search and Destroy. On the table there's: A miniature framework for Win32 and WinCE applications Downloading files by HTTP using functions from wininet.dll (http://ccrdu.de/docs/pkCEStuff.htm) That seems a delphi class that use networking using a windows dll, so it seems to work with wince too (i found the same dll file on wince). I write this mail in refer of the [fpc-devel] Incompatibilities between win32 windows unit and wincewindows unit we read before... Is it possible to override Lazarus compilation using some of this calls as networking stuff? I know that Lazarus filosofy is different (platform indipendent so using dll is not a great idea) but in this case, that would be a good thing to make things working and faster... However: Almidor finally got it, he made some modifications and now we got a small chat connecting to another using tcp/ip sockets on PocketPC. The problem is that there is no TTimer component and no event hooks for the under-laying widgetset with wince yet, so we must do the CallAction with a button, manually. Calling it manually works with tcp/ip socket, but would be impossible to use it with http... Did someone know anything on why ttimer is not implemented on wince? can some help me to implement it? I read in: http://www.rainer-keuchel.de/wince/wince-api-diffs.txt That there are differences between win32 and wince like: GetSystemTime() The milli member might be zero. This is strange as GetTickCount() returns millis (but since start of system). Is that the problem? How can i resolve making ttimer work and being able to do a CallAction for lnet libs working networking? Thanks p.s. my final goal is to get mysql data, cause i'm not finding any mysql client dll for wince i'm trying to get the data as xml. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] root's password...
R. B. ha scritto: It has to work on all DEs, not just Gnome or KDE. So it looks like the easiest way is to make 2 programs. The first checks the id and if it's not 0 then prompt for root password, write and run a small shell script that su and runs the second program, run the script and terminate. The 2nd program checks the id if not 0 it terminates. Otherwise it goes on working as gui pkg mgr. I think that's what I'll implement unless some one can come up with a better (easier) solution. Rod. Did you give a look to consolehelper? http://www.linuxcommand.org/man_pages/consolehelper8.html It may be what you need. Works both from command line and from Gui, and it doesn't appear to depend on any particular desktop features. In a nutshell, you create in a place in the user execution path (such as /usr/bin) a symlink named as the executable and pointing to consolehelper. Then you place you executable (or a symlink to it) in /sbin or /usr/sbin. The trick is made. If you're root, /sbin is in your path, so the real application is called. If you're not, consolehelper is launched, which prompts you for the root password, validates it and then launches the application. Give it a try. Giuliano _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Lazarus compilation speed
I had already seen that, and no, it doesn't answer my real question. It indicates that it is possible to do what I want, but I either the component I was trying isn't the right one, or I don't know how to set up the schema. Or both. On 1/8/07, Darius Blaszijk [EMAIL PROTECTED] wrote: Again this URL seems to answer your question :) http://wiki.lazarus.freepascal.org/Databases - Original Message - From: Howard Lee Harkness [EMAIL PROTECTED] To: lazarus@miraclec.com Sent: Monday, January 08, 2007 8:50 PM Subject: Re: [lazarus] Lazarus compilation speed Yes, indeed. It's almost like going back 15 years, development-wise. Oh, well. It's still usable; I just hope it doesn't take me long to come up to speed on FPC/Lazarus. I'd like to use it to produce a simple DB app. BTW, anybody here ever use an ODBC driver for CSV files? On 1/8/07, Darius Blaszijk [EMAIL PROTECTED] wrote: It seems that this URL answers your question: http://wiki.lazarus.freepascal.org/Lazarus_Faq#Why_is_the_linking_so_slow_on_Windows.3F Darius - Original Message - From: Howard Lee Harkness [EMAIL PROTECTED] To: lazarus@miraclec.com Sent: Monday, January 08, 2007 4:02 AM Subject: [lazarus] Lazarus compilation speed I just started out trying some stuff with Lazarus on my old laptop, and I noticed that it was very slow. I figured it was just my old slow laptop, so I installed Lazarus on my system at work to compare it with D6. On a small project D6 is more than an order of magnitude faster. Is this inherent with Lazarus, or are there some settings I can tweak to speed up the build process? -- [EMAIL PROTECTED] _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives -- [EMAIL PROTECTED] _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives -- [EMAIL PROTECTED] _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] root's password...
Giuliano Colla [EMAIL PROTECTED] wrote:Did you give a look to consolehelper? http://www.linuxcommand.org/man_pages/consolehelper8.html It may be what you need. Works both from command line and from Gui, and it doesn't appear to depend on any particular desktop features. In a nutshell, you create in a place in the user execution path (such as /usr/bin) a symlink named as the executable and pointing to consolehelper. Then you place you executable (or a symlink to it) in /sbin or /usr/sbin. The trick is made. If you're root, /sbin is in your path, so the real application is called. If you're not, consolehelper is launched, which prompts you for the root password, validates it and then launches the application. Give it a try. Giuliano I see. Then probably it's better to leave it to the distro developers to choose the way to deal with it. I'll just make the program checks the id and if it's not 0, it will terminate. Thanks to you Giuliano and to all the repliers for their thoughts. Rod. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
[lazarus] SVN update - reversed class completion
See http://wiki.lazarus.freepascal.org/Lazarus_IDE_Tools#Reversed_Class_Completion Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Lazarus compilation speed
On 1/8/07, Howard Lee Harkness [EMAIL PROTECTED] wrote: Yes, indeed. It's almost like going back 15 years, development-wise. Oh, well. It's still usable; I just hope it doesn't take me long to come up to speed on FPC/Lazarus. You obviously never used g++ or any other c++ compiler. Then you would understand why, even on windows, lazarus/fpc is very fast. -- Lepidosteus http://lepidosteus.com _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Lazarus compilation speed
Howard Lee Harkness wrote: I had already seen that, and no, it doesn't answer my real question. It indicates that it is possible to do what I want, but I either the component I was trying isn't the right one, or I don't know how to set up the schema. Or both. Were you trying one of the text based database components? If so, I'm am curious about this as well. I posted a query about it a few days ago. No answers :( -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives