Create a custom login screen GUI for linux [closed] - c

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I would like to customize the login screen in a Linux OS. Not just the bacground image, but everything from buttons to textboxes, even the login method (so not a username + password, but something of my own).
The flavor of Linux doesn't really matter, it only needs to have a graphical interface. I have some experience with Ubuntu though.
However, this would be my first time developing something for Linux -- I have developed applications for Windows before, mostly in C# -- but I am up to the challange to learn something new. So please try to be a bit easier on me, me being something of a noob at the moment.
So, how can I do this?

The "login screen" shown on GNU/Linux systems to login to a graphical session is part of the desktop environment you are using. Various alternatives exist for the zoo of alternative environments out there. Examples are kdm as offered by the KDE desktop environment, gdm as offered by Gnome, xdm, wdm, many others exist. Start by reading the wikipedia article about kdm to get an impression.
You'd have to implement a replacement for that part which serves the same purpose, if the existing options to configure it are not enough. So best probably is to start reading about those. That should give you an impression about the requirements.
Roughly explained you have to create an executable that can be executed by the system and configure that as "desktop manager" in the systems configuration. The exact location of that configuration again depends on the distribution, but the general approach always is the same.
The logic of such a program has to somehow answer the question of whether a user is allowed to login to the system by whatever means chosen. Typically this is done by using PAM in background ("Pluggable authentication modules"). Maybe start by reading an introduction to PAM to gain insight into how things work, which may be a bit confusing at first glance due to its endless flexibility. That framework is used on modern unixoid systems to separate the requirements for that logic from the actual implementation. So you really want to learn about how PAM works too. It is an unbelievable flexible framework where already endless strategies exist, so countless adapters for all sorts of existing authorities like databases, LDAP servers, simple file based authorities, IMAP servers, you name it: everything you can imagine. So chances are that you do not have to implement anything, but just can pick something implemented by someone else and configure / tailor it to your needs.
The logic itself does not have to be complex, it just has to answer that simple question in an clear way: is the user who requests access granted or not. For that it will (or will not) have to consult some existing authority. How exactly that works obviously is completely up to you. The real difficult thing probably is to access and control the graphics hardware without having a running graphical desktop environment to build on (since that is only started afterwards). So you probably have to deal with some hardware abstraction layer. Which again means that you probably want to be using some language like C or C++ for that job, scripting languages are less well suited for such job, also because they introduce all sorts of additional requirements of what has to be installed on a system which becomes unusable if some element inside that chain of utilities break due to the lack of a login screen :-)

Related

Can I rely to ISE Eiffel as a programming language to offer web services through a DB connection [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
I'm actually working for a little company of 10 people on the area of solar panels solutions in Chile. Am working on linux since 20 years now. When I studied programing I studied a lot with Eiffel which I found really a great language. Since, I'm frustrated from a language to another missing a lot of great concepts it offers like
real object (no string != String; ...)
multi-inheritance
polymorphism
genericity
contract.
Working now with Java because
its mostly free
the community for tutorials and helps is huge
its multi-platform
I'm looking for the pros & cons to convince the instances of my hierarchy (basically talking about justifying the price of the licences which are 1500$=>1y and 2000$=>2y) and to be a bit secured that I don't pretend I'll go with a solution I'll regret at term because it will be hard to get the support I need to get my solutions working. Is ISE Eiffel reliable for production use? Will I have to get hours of pain making work a solution?
What are the pros & cons?
Pros
Concepts helping me to write real good quality code (multi-inheritance, polymorphism, genericity, contract)
Pleasure to develop with such good tools
Quality and reliability of produced code
...
Cons
Poor community, meaning few tutorials
I'm not good in C so digging into the implementation of C libraries is something which will cost me (and to the company)
Price is high and has to be justified
My Curriculum will not be as well as if I have years of experience in Java
Formation of other programmers won't be easy if as most of them dont know these concepts
...
I also work in a small company and we have decided 2 years ago to make the move to Eiffel. We had the exact same questions as you are stating. We now have official licenses and support. I studied the Eiffel Web Framework a long time (from 2014) and knew that the only good way to be able to state that it can be used in production is to just do it.
So that is what we did and now the software is in production and working robust, safe and performs well. In production are web API's based on HAL+JSON and created with the EiffelWeb Framework and a self written framework extended with reusable domain components created for the companies goals.
So ISE Eiffel is certainly reliable for production use and the support is outstanding.
You won't have any hours of pain as you call it, but when you write software with EiffelStudio you get many hours of joy, but all the other aspects of software engineering will be as hard as ever ;-).
About your other cons, my two cents are:
For a curriculum, more important is who you are as a person and if you fit in the current team. In my opinion when someone is educated in a model driven approach and acts and thinks like that, can use that knowledge quickly on any environment. That for me personally is more important then being good at one specific programming language. Although I understand that in some cases we also need specialists to get a job done quickly. It all is a matter of personal choice, both are needed in the industry.
If you need other programmers that get in the team doing this, you can only work with people that want that. I know from experience, that some people want it and other people just won't. My advice is not to put energy into the people that do not want it. Work with the technology, show that it works and maybe they get convinced, else seek for others that do see this.
If the management is not behind the decision to work not only with Eiffel, but also with the ideas of Bertrand Meyer, then don't do it. You will find yourself always fighting against it, while it is very hard for others (not software related) to understand. It is a matter of trust, when there is no trust (at both sides) -> don't do it.
We now also get questions about how the Eiffel environment is handling vulnerabilities, which are compared to the way e.g. Linux and Java communities are handling that. Eiffel is not used as much as those technologies, but the Eiffel software itself is build on the strong quality core of the Eiffel method and language. This can simply not be compared with other environments. But again others do not understand this, so how is this going to be addressed? This is an example where you run into when you will be using the Eiffel technology.
A lot of words, but the plain answer to your question is just : YES it can!
It's certainly reliable enough for production use.
You may well have to write wrappers for C-libraries, depending upon exacly what you want to do.
You mention web services. There is a good web framework. But there is no support (that I know of) for W3C XML schemas, for instance.
I would suggest you try writing a small prototype using the GPL edition (you won't be distributing the prototype, so you will not be restricted by the GPL). Then you should be able to assess for yourself the suitability for your usage.

Going from console to win32 applications [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
After some time coding in c in a simple console, I decided I wanted to try and code an actual Win32 application. However, upon selecting the option, the sheer amount of unknown code that surfaced on my IDE (Visual Studio 2013) just to open a blank window was overwhelming, as I don't understand half of it's meaning or even what to do, since, even simple printf commands yield no result... Can someone point me to a way to understand the differences between console and application? Or at least someway I can insert my current coding knowledge in an application environment?
Working with the Windows API can be quite the experience for a newcomer. The act of opening a window does, certainly, involve a lot of boilerplate code. The good news is a lot of that boilerplate rarely changes, and when it does it'll be for very special circumstances that you can go research. That's why Visual Studio spits the whole mess out for you by default.
There are plenty of resources to learn with, including Microsoft itself: https://msdn.microsoft.com/en-us/library/bb384843.aspx
To help situate you, understand that a lot of what you're looking at that's probably confusing are typedefs used on primitive types. This helps maintain backwards compatibility with programs created for older versions of Windows, and adds semantic meanings to types. A lot of the preprocessor stuff you see in header files is actually conditional compilation - it's checking what environment you're compiling in, what version of Windows, etc. and then providing the correct typedefs so that what actually compiles works on the desired Windows platform. Stuff that's greyed out in VS2013 is stuff that Intellisense sees isn't going to be compiled based on the current #defines and a lot of it may be relatively ancient. A big part of the Windows API for a long time was a strong desire to not break backwards compatibility. This was a huge advantage for Windows, because it means my program you wrote for Windows 3.1 isn't going to be hosed by Windows 95 rolling out. Or XP, 2000, Vista, 7, 8, 10, etc. It does mean a lot of stuff makes it into the API and stays there.
They try to hide a lot of that in the headers, but you'll also see deprecated input variables to functions and the like (this parameter should always be NULL...etc), and you just have to read the documentation. Thank the internet.
For example, an LPCSTR is just a const char*, but the LPCSTR signifies that it's a null-terminated constant string. In fact, you may see that's it's not a const char*, but a CONST CHAR* where CONST and CHAR are #defines themselves to make sure the correct keywords and types are used. In your case it'll probably end up being just normal const char*.
My suggestion, rather than diving into about as complicated a C-API as possible, is to look at something like SDL. SDL is a much simpler C API designed to provide an interface to the operating system's windowing, graphics, and input, while hiding the dirty details of the API, be it Windows, Mac, or Linux. https://www.libsdl.org/
It uses openGL for its graphics. If you're making any kind of game you'll be using some kind of graphics API to talk to the video card. The native Windows graphics API is DirectX, but openGL is the very commonly used cross-platform API. Both APIs allow you to make use of a computer's video hardware to render graphics.
Edit: I'll add, since I went off and voiced an opinion on libraries, which is why these types of questions are probably frowned upon, that I think it's fair to say that SDL is the de facto standard for C third-party multimedia libraries. Also commonly mentioned is SFML, which provides much the same functionality but is more object-oriented and written in C++.
In Visual Studio, when you create a win32 app project, click on next, and click on empty project. This will eliminate all the stuff that Visual Studio creates for a win32 app, but then you start with no files. You'll probably want to start with some simple example C program for windows from a book or web site.

Alternative to MS Access with Forms and Reporting Capabilities [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I have been looking on SO and can't seem to find something more recent than around 2008.
I am looking for an alternative to Microsoft Access with similar capabilities. I.e:
Forms
Macros
Reports
Etc
In another question VS Lightswitch was recommended (Still in Beta 2). I had a look at it, although it seems good it is still reasonably new and unsuported at this stage.
My main purpose is to have a DB that is simple, portable and can be accessed easily (mostly by 1 person at a time, but also sometimes by multiple people). I know Access can provide this and if it seems to be the best solution I might stick with it, but are there anything else out there that someone has found useful for custom data capture, filtering and creating reports?
I know that Visual Studio or alike can be used, but would prefer something more in line with Access.
The link to similar questions are (but seem to be somewhat old):
Front-End for MS Access migration?
Replacing MS Access forms
Alternatives to Access
Good Free Alternative To MS Access
People are usually looking for Alternative to MS Access either because:
They, for some reasons, consider
that Microsoft is Evil
They don't want to pay for the extra Access licensing
For people from Group 1,I do not have that much to say. I was part of it till I realised how fast and simple it was to use some of these great software (not all ...) sold for a very fair price. Up to now, I have spared years of headache using them. Thanks Microsoft, I owe you one.
For people from group 2, there is a runtime\free version of Access that you can deploy (for free, I insist) on your final user's computers. It means that you do not have to buy any basic office software for your users but you still can have your users running an Access App on their machines ...
Try OpenOffice.org. It has the Base program, which is similar to Access. It is also free and open source.
One of the reasons people are looking for this is because Access 2013 is quite different than previous versions and it looks like it will soon be the end of the road for this product. The problem with Kexi and Base as well as the other office clone versions is that they are very weak in their support for scripting. With MS VBA many things can be accomplished which are not available in these (as yet).
Access has a built in IDE for developing VBA and it is almost the full visual basic 6 IDE with nice a debugger etc. The only product I have found thus far which have something like this usually have a much higher price tag than access. (Alpha 5)
You can Consider Kaxi ( http://kexi-project.org/ ) , as it a database component of KDE-office.

Image Recognition to drive test automation [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
Are there any tools out there which uses Image Recognition(searching, comparing, validating images) as base for automating and testing GUI software.I know ranorex supports it. Are there any better tools?Are there any gotchas in using Image Recognition to drive test automation?
Ok, first of all, I DO understand the previous answers: testing apps using image recognition isn't the best way to test GUIs. But, at the same time, I don't understand why you aren't answering the question in first place. He's asking for tools that work that way, I'd think he's smart enough to understand where he's going into.
Ok, now the main subject, my choice would includes:
Sikuli, a MIT project under the GNU-like MIT license. It uses Python over Jython. Free.
TestPlant eggPlant, a tool that works through a VNC server, so you can test apps in any VNC compatible platform (including smartphones). It has some nice features like OCR, test schedule and so on. It uses SenseTalk. Not free, you could request a trial.
Routine Bot, I've never used it but it seems pretty useful.
I would also discourage using Image Recognition with SendKeys and Click at Coordinates or (Button Images) to do UI testing. I have been recently using UI Automation to automate the testing of a WPF application with success. By placing small breadcrumbs (Automation.AutomationID="OkButton") throughout our application's XAML I have been able to write some C# Unit Tests that exercise different aspects of the application. Even without the breadcrumbs UI Automation is still capable of exercising an application, but it is slightly more difficult when trying to identify the controls on the UI.
A decent article on Code Project is available as a starting point.
http://www.codeproject.com/KB/WPF/UIAutomation.aspx
You will also need UI Spy, a free tool from Microsoft, which helps you find controls and manually exercise the controls through UI Automation as guidance for writing the scripts. The tool is buried in the Windows Vista SDK, after installation search for UISpy.exe. The UI Spy tool can still run on a Windows XP machine by just copying the EXE to the target machine.
Consider AutoItScript for driving Windows-based GUIs in test scenarios - AND scraping off the UIs. Consider tesseract open source optical character recognition. Also OpenCV for machine vision.
Free AutoItScript works at the API level in that you can read states of various Widgets and Windows sections, send actions to these UI components too, wait for state changes etc. It's possible to produce highly robust automation code that will ensure focusing on Windows and resolution independence.
Let me suggestion another solution.
It's not a complete UI automation framework, but rather a specific tool just for the Image validation.
It will allow you to ignore the unstable part of your images as well (random data, etc.)
It will integrate with any other UI testing framework you choose:Selenium, Sikuli, etc.
http://visualci.com
thanks for your comment! please Take a look at RoutineBot – interface testing software based clicking on certain image patterns and see for yourself how this idea is implemented in an
automation tool!
Old question, but perhaps this answer may prove useful to someone. I currently am using two products,
Testing Anywhere, by Automation Anywhere (http://www.automationanywhere.com/Testing/)
and Quick Test Professional, by HP (http://www8.hp.com/us/en/software-solutions/software.html?compURI=1172957#.UhJBwpLW5-k)
Both of them do the job well enough, and both support the use of image recognition. I am not entirely convinced that image recognition is in itself a bad thing. As with all things, you have to tailor your approach to your particular needs and use the right tool for the job.
Just thought I'd add another entry to this thread. Things may have changed, not sure, but when I last saw the demo, this product offered Sikuli-like IDE/interface/capabilities while being a commercial product and supported actual devices beyond simulator. Don't know if the tool has improved to detect objects by identifiers beyond images now or not.
SeeTest from http://experitest.com

UI Testing Tool? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
Looking for a tool to UI testing of a Windows (.NET WinForms) application. The idea is that the analysts will record the tests via some UI and it will be able to be played back over and over again.
Commercial tools are fine but bonus points for free ones.
Some others:
NUnitForms
Quail
I believe they're both free, and Quail looks really nice!
(I was going to just comment on an answer above, but ran out of room.)
We bought Ranorex, and I wouldn't do it again. Their licensing for 1.5 (what we're using) was unclear. Their written license was per user, their marketing said per machine. Still, enforcement was key-based, and not a big deal when a machine got wiped or a replacement tester came in.
For the 2.0 product, their licensing is now tied to the machine. Reimage a machine and you get to relicense it. I'm just not going to support that kind of hassle with my company's thousands of dollars, and we didn't upgrade.
For what they want for the product, a lot of the functionality could be easily written using the UI Automation Framework. Ranorex is a decent product, but I question its value for the money. We're moving a lot of our new tests to just coding to the UI Automation Framework, as we often end up modifying Ranorex-generated code anyway.
TestComplete.
You can definitely use capture-replay to capture and run the test script. But I would suggest that you must at least manually edit your scripts to make them
more readable
easier to maintain.
The good thing about TestComplete is that it is able to look into your form's properties, capture those properties so that you can refer to those properties by their name, not by just screen coordinates.
Like Tom E stated, do take caution while considering going down the record/playback path for test automation.
See Uncle Bob's article on Ruining your Test Automation Strategy.
The main problem is that the record/playback tools couple the tests to the GUI which makes them very fragile.
Uncle Bob's article does point out that some testing needs to occur on the GUI...but that he recommends stubbing out the business rule code.
Sorry I can't provide you with a specific UI test automation tool...but hopefully this caveat will help you make the best decision on how to employ the tool that you eventually use.
So far I have found:
Ranorex which looks really good.
Test Automation FX, also looks good and seems very well priced.
Microsoft's UI Automation Framework, which does not have the recorder but if I had to I could code one using this.
white which looks similar to the UI Automation Framework, but has an alpha quality recorder.
Comments please if you have used any of these.
At my company, we decided to go with http://www.sikuli.org/. We felt it was the perfect mix of cost (free), ease-of-use, functionality and extend-ability.
Sikuli is Python based (Jython, really) which is great and its open-source. There's a tiny bit of coding required, but it can be as easy as just calling functions. Their IDE makes it really easy to get started. It is not a record and playback tool. It functions based on computer vision algorithms - you give it screenshots of what to look for and it finds it on the screen and then performs the requested action (click, type, etc) on what it found. This is true independent testing since Sikuli knows nothing about the software its testing. It does not know about underlying APIs - it just does what a real human would do.
We have integrated Sikuli with Robot Framework, http://robotframework.org/, and have created lots of custom python code to build a robust testing platform. This may not be as easy as licensing a tool from a vendor but the time and talent investment in these two open source tools has been well worth it.
There are a bunch of similar questions on SO:
automate-interaction-with-a-gui-interface (Edit: no longer available)
automated-testing-of-windows-forms (Edit: no longer available)
automated-testing-of-gui
In my experience, there are a lot of good open source tools for the web, but not so much selection for open source thick client test automation tools. If you want good support with robust functionality, especially recording, you will need to look at the commercial tools (QTP, RFT, TestPartner, etc...)
You should have a look at http://opensourcetesting.org/functional.php A lot of tools are listed here and you should find something that meet your needs.
Visual Studio Team Test 2010 is coming with a tool for recording and playing back UI tests. You'll find some pointers at:
Introduction to Record and Playback Engine in VSTT 2010
Checkout Ranorex, commercial, quite expensive but powerful (not affiliated).
We were using Mercury TestDirector a few years ago and quite happy with it. (All the caveats as mentioned by others apply.)
Mercury was aquired by HP and the tools have been rebranded as HP QuickTest. Not sure how much has changed, but certainly worth a look.
I tried to include a link to the HP website, but the URL doesn't look too "stable". Not exactly a confidence builder ....
My proposal is QA Agent(http://qaagent.com/). It is free web based IDE for development of web automated tests. Basically you are using jQuery to develop your tests. You can run tests in your browser. It looks like a new projects, but I really like the idea to develop tests in the browser. You know how long it takes to set up your testing environment. With QA Agent it takes 10 seconds.

Resources