Friday, March 29, 2013
Today, as I was quietly at home, and wife and kid were already in bed, I decided to take some macro shots. But before, I wondered if there was any free or open-source software so I could connect the camera to the computer and shot it from there.
I already knew Nikon's Camera Control Pro 2 (which costs something like 180$), and its only available for MAC and WIN (as usual), I even started downloading the free trial to test on virtualbox, but never got there....
For Canon lovers, there is also some proprietary software...
So I start investigating (as usual), and I found gphoto2, which is a command line utility that uses libgphoto and can control your camera using PTP (picture transfer protocol) which I found out its an International standard.
As I wanted to see the photos as soon as they were shot on computer, and I wasn't in the mood for a Script session, I investigated and found out this GUI that work with gphoto:
- gtkam - old user interface, lack of function (for me) - not very good
- digikam - for KDE, I'm a Gnome and Unity user... - not for me
- and DARKTABLE, which is the software I use for RAW processing....
all software its on repositories...
In Darktable I just need to presss Remote Control, and all configs from camera are there. Aperture, shooting mode, speed, EV control, timers, Bracketing (for HDR), etc, etc.
My camera is a Nikon D3000 that does not have live view on camera, and it doesn't work neither on Darktable, but I believe others will do, but after each shoot the photo appears on computer screen which is very handy and much better then camera screen.
I know, that you will say that this is not very useful, as you wont carry your laptop around while taking photos.... But you can take your phone, or you tablet.....
So the best and cheapest and free and open-source alike software for Android was DSLRDashboard, its on Google Play, however as my tablet was not compatible (dont know why), I went to https://code.google.com/p/dslrdashboard/ and made the download and installation.
For Android beside the USB cable that comes with your camera, you will also need a OTG cable.
As you can see, Linux is easy, and Android too....
And yes, I took the Macro Shoot with the PC and Ubuntu...
PS: The Nikon software said that it don't have support for my camera...
Sunday, March 24, 2013
After updating the kernel on my new laptop Ubuntu 12.04.2, I realized that I lost the drivers (not in kernel) for:
- Card Reader
After some investigation:
- lsusb returned me the wireless hardware 0bda:8723 Realtek Semiconductor Corp., and I figured out the this new card don't have drivers on realtek site yet, but I found this page around...
Just follow the How-to on how to download and compile the driver and instalation, it will work fine...
If you want to upgrade your computer maybe you should download this stuff first, or you will end up just like me with a cable close to the router....
- lspci returned me the card reader hardware Realtek Semiconductor Co., Ltd. Device 5289 (rev 01).
As before this drivers are not on kernel, however, this is an Ubuntu reported bug which as a solution.
Just surf to :
https://bugs.launchpad.net/ubuntu/+source/udisks/+bug/971876, and follow this instructions to execute in command line.
sudo apt-get install dkms
sudo dpkg -i rts-bpp-
Thursday, March 21, 2013
This one is a Ubuntu 12.04 LTS, and it is made in Portugal, at Inforlândia (Insys).
Its a 15.6" low end desktop, With Intel B830 at 1,8Ghz a 320Gb SATA HD, wireless, a chiclet keyboard, and a integrated graphic.
Its nice for the price and it comes well configured, just updating, and copying my home folder from my old main laptop.
This machine was bought in a retail shop, and beside this one the other laptop with ubuntu was just an Asus netbook. Coincidence, there was a couple looking at it, and the first question to the seller was "how do I connect this to internet". Off course they could not answer.
My conclusion is that people want to try new stuff, but the brands must give at least some little formation to the sellers, so they could sell a new product that they don't know.
This netbook that couple was looking at had a price better then windows had, and they just wanted to use some web apps. I was tempted to interfere and give some advice, but meanwhile the box with my laptop arrived and I was really in a hurry, maybe next time I visit the shop...
In a world of MAC's and Windows, there is place for Ubuntu (for the non-technical) that is sure.....
Thursday, October 4, 2012
The success made a study case and granted them an award of ESOP (Portuguese Association of Opensource Software Companies).
This award was given at Evento Linux 2012 - X Encontro Nacional sobre Tecnologia Aberta (Linux 2012 Event - 10th National Encounter of Open Technology).
According to source, it allowed Tranquilidade savings around 80% on software costs.
The solution is Ubuntu Linux based with Gnome 2, before 12.04LTS, they dont specify. They have intention of upgrading to 12.04 and use MATE desktop.
On the the desktop they use Firefox+Nautilus+Libreoffice, for email they use webmail previously used before.
They run 450 VDI computers (terminals) and 300 Laptops.
The transition was not done in one time, as they started using Libreoffice/Openoffice and webmail in 2009, making the users transition much softer, as this usually is the main problem for common users.
Tuesday, May 22, 2012
Here it goes....
Our office only has one central printer!! (well it has other, but our boss don't wanna buy tonners, I warned him on the buy, that the 2000€ was better buy, but 600€ looked better in that moment.... no comments). This printer we use is a Windows Printer, which means the developer only has drivers for windows. So no Postscript drivers available, what means a great PITA for our PC's with Linux. So since our 600€ printer went out of service me and 3 other colleagues had to bother one of the other windows users every time we needed to print something.
As this don't look a problem, imagine the hours that are lost.... And we are all engineers.... There are better ways to spend the money with our time.... So I decided to do it.... I had tried before with REDMON (http://pages.cs.wisc.edu/~ghost/redmon/index.htm), but with no success, but this time I made a decision to loose a few hours and make it...
So what I had in mind, was a simple solution.... To have a service running in our Windows SBS2003 that would monitor some folder change, where we would put PDF files and then print them.
Linux handles PDF nice, and the users would print to PDF and then place the files on that folder.
It looked really nice and as I thought a lot of free software was available, but......
To begin I needed a command, from command line that would execute the print command, and after trying it with Acrobat Reader, I realized that it will always leave one window open with the program, and I didn't wanted that. So I had to find another solution.....
Then I needed the software to watch the folder changes.... From a dozen windows software the best one, that was able to execute anything on changes was Watch 4 Folder 2.3 (http://leelusoft.blogspot.pt/), but it didn't worked as expected, and I realized that it would only work on file changes from MS computers. After a few emails with the developer, and as I suspected, it uses the Microsoft Windows Shell API Notifications, and it is not relieable on network shares! Thank you for the support Mr. Zvika Israeli!!!!
So I had to find another solution....
The Deeper Research:
I had bumped into this website HOWTO - Print to a windows printer from linux WITHOUT needing any linux printer drivers/PPDs (http://justin.yackoski.name/winp/ ) but the python looked a more complicated solution and I had gone to the software in Tryouts chapter :). This webpage has a python script that does what I wanted, but one link in this site was more what I wanted, http://tgolden.sc.sabren.com/python/win32_how_do_i/watch_directory_for_changes.html.
So I grabbed all this info, a lot, and i mean, a lot of python reading..... Especially on string and list manipulation, and came with this solution....
The Solution: (for those in a hurry, please start reading here!!!)
What you need:
1 - A computer running windows
2 - The printer you want to print to must be the preferred printer
Software you need to install on windows machine:
1 - Python - http://www.python.org/ftp/python/2.7.3/python-2.7.3.msi
2 - Pywin32 - http://sourceforge.net/projects/pywin32/files/pywin32/Build%20217/pywin32-217.win32-py2.7.exe/download - This is needed for handling command line file execution, there are other ways to do it, and they make it a lot faster, but as I'm a beginner in Python, it worked this ways, so let it be, maybe in the future I could make my script better
3 - Pdf X-Change Viewer - http://www.tracker-software.com/product/pdf-xchange-viewer - It is freeware even for commercial use (we use it around the office) and it closes after printing from command line
Changes you need to make to the windows machine:
1 - Add c:\Python27 (or the folder you installed Python) and C:\Python27\lib\site-packages\win32 to the system path - How to it http://www.windowsitpro.com/article/configuration/how-can-i-add-a-new-folder-to-my-system-path-
2 - Create the print batch file - Open a notepad and call it print.bat and save it on c:\, fill it with the following code:
"C:\Programas\Tracker Software\PDF Viewer\PDFXCview.exe" /print %1
Note: The path to the executable depends on your system, this is the path to a Portuguese Windows SBS2003!!!!!!!!!
3 - Create the python script file - Open a notepad and call it dirwatch.py (or other name you want) and save it on c:\ and fill it with the following code:
import os, time
path_to_watch = "z:\\zz_Scanner\\Imprimir" ##This is the folder where you want to put the files for printing double slash are needed because the slash is a special caracter in python!!!!
before = dict ((f, None) for f in os.listdir (path_to_watch))
after = dict ((f, None) for f in os.listdir (path_to_watch))
added = [f for f in after if not f in before]
removed = [f for f in before if not f in after]
cmd = str("print.bat "+ "\"" + path_to_watch + "\\" + " ".join (added)+"\"")
before = after
4 - Now run the dirwatch.py and one command line will open without any info. If you place a PDF in the path_to_watch dir, you will see the script finding the file, executing the command and exiting the batch file, and waiting for another file.
The script uses about 5Mb of Ram, and if you want to get less cpu usage you can replace time.sleep(1) for a higher value. The value is seconds so now you choose how much time you want to wait for the printing and balance it with your server load.
5 - I wanted this script to run as a service (seamless) so I place a link to it on startup.
If you don't want to have a command line floating around your server, rename the dirwatch.py to dirwatch.pyw
If you get more then one print, just close python instances on Task Manager.
1 - Get rid of win32api to run commands, I'malmost sure that this could be done with os, help please!!! It would execute faster with less Ram usage. And without the need to have pywin32 installed.
2 - Compare also with existing filenames, because a user could replace a file with the same name and the script only recognize files added!!!
3 - Delete the file after printing (if I do this I don't need the point above)
4 - Configure cups-pdf on Linux computer to place files directly on desired directory - I have to deal with file permissions on both linux machines and our NAS server where the folder is.....
So this is it, it worked for me, and a lot can be done so this work better, but the solution is simple and easy, and it will help us to gain time more then important on other tasks....
Friday, September 30, 2011
So since my last post, I've acquired a new 13" laptop to replace the good old asus eee 701, I needed a small, fast and good pc for some of my engineering work.
Just in short lines the PC is an Acer Travelmate 8371, and Linux Mint Debian Edition runs very smooth.... only one thing does not work at all, and that is the fingerprint reader, which I don't care at all.. One of the most important things for me in laptops is battery (6 hours) and suspend (all ACPI events works out of the box. Even the intel wireless card work without problems...So I'm very pleased with this little and robust machine...
So, back on the post title.... As I acquired this machine mainly for work, I started filling it up with software that I use on my day to day work (I work for a Portuguese big HVAC contractor, and own my own consulting company), and as you may think, I spend a lot of my time working...
So, starting from the basis...
1 - My desktop, the wood one, is full of interesting stuff, drawings, notes, specifications, catalogs, databooks, material samples, a real mess... so sometimes finding the calculator is hard... so I use the most powerful calculator on Linux... And that is Qcalculate (check the repositories)... Imagine this common situation for me, as manufacturers that I work with around the world all work in different units....
Pressure drop calculation:
- Heat Exchanger - 40kPa
- 3 way valve - 1 bar
- Pipes - 2 mca
So, normally to do this calculation and getting the result in bar, for instance, or you have a good datasheet, or you use qcalculate... just by typing....
"(40kPa+1bar+2mca) to bar" you get the fine answer "1,5960828 bars", note that the mca (column of water meters, very used here) is not one of supplied conversions, but you can program any conversion you want, Qalculate has a big database of units, currency conversion (automatic update of exchange rates), math functions, variables, phisycal constants, etc, etc.... It has capability of solving equations, plot functions, a lot of interesting stuff for you engineers to explore...
2 - So, in the CAD area, I've written a lot about this, but a list of the better ones available native:
- Bricscad (Comercial, Autocad Clone),
- Varicad (3D based, for me its the best CAD software available for Linux)
- Draftsight (free, Autocad Clone, but no Autolisp),
- Ares Commander (the father of Draftsight, comercial, full featured),
- Freecad (very good, sound promissing),
- QCAD (released a new version, looks a lot better and is cheap)
- Medusa4 (free personal version, very good commercial software)
And you have a lot of others, but for some reason to me are not worthy to be in this list, but here is a link to an updated regularly list of CAD software on Linux http://www.tech-edv.co.at/sl.php?058010. I recommend this list, I go there to take a look at the news very often... (thank you)
Remember that I'm writing about software that I really used or use for production purposes, so my opinions are not from a inexperienced person on this type of software.... I've been working with cad software since 1996 :)....
3 - On number 3 we have a non native Linux software, but as they support Linux through wine (and I've bought a license, cough, cough).... I'm talking about SF Pressure Drop 7.0 (7.15 version don't work) a full package software to calculate pressure drop in pipes. It has a full database of pipes, accessories, valves, etc, etc, it also has a full database of fluids (liquids and gases) with all the temperature and pressure properties, states, etc, etc. I also allows you to calculate pumps, reservoirs empty times, economical pipe diameter, etc etc.. It is very complete and deserves a look.
I finish this small review with a screenshot...
4 - I work with a lot of PDF files from OEM's, clients, tables from books, etc, etc, etc... and a lot of times I've to markup those to present to consultants, or simply to note something useful... So I'm talking about PDF annotation and manipulation.
I work with 2 software:
For Annotation I use Xournal (it's on every repository), and it allows me to do something like...
It has a shape recognizer that allow you to do straight lines, and squares, rectangles, circles, etc, etc... Files are saved with .xoj extension, and you can export them to PDF with the annotations, very useful, as it saves a lot of unnecessary printing...
For manipulation I use PDFChain (in repositories also). In the past I used PDFSam, but it is slower to work with due to the interface... So PDFChain allow me to crop, rotate, split and merge PDF's.
5 - On number 5 is Elmer+Gmsh (both on Debian Testing repositories), the software I use to make CFD calculations. I've started using them recently, and as I'm not very familiar, I'll take the option to just talk about the tricks to make them work with DXF files for complex layouts, and the rest of physical and equation stuff you will have to take a look at the software tutorials.... (beside that I'm a lot of rusty in finite element calculation)
So in the first time you draw something on draftsight for instance.... Save it as dxf.... Import it with Gmsh.... Create the mesh... and save mesh as "Mesh - Gmsh MSH (*.msh)" choose version 2 ASCII and "Save All".
Now the trick (that took me a all night to figure this out), open the generated file with a text editor and simply replace the "." (dots) with "," (commas), somehow Elmer mess things up...
Import mesh into Elmer, model the problem, and in the final you can have a result like this...
The above image represents the air speed inside a HVAC plenum, it was just a test, as the problem was not very well formulated, but you can get a idea of what this is capable...
6 - Other software that worth a look (in the repositories)
So this is it for now.... and as I'm short on time, feel free to follow me on this social networks:
Twitter - @ECA_Engenharia
Identi.ca - @pirolocito
We can have a nice talk on a short spare time... And remember, linux is easy....
Thursday, June 23, 2011
A few moons ago, I posted how to create a button for #! for suspend the computer on exit, but in those days, Crunchbang was based on Ubuntu, and the software worked diferent.
In the present time, Crunchbang is debian based, so things change a little
The "Exit" command on the openbox main menu opens several buttons so one can choose, those command are:
Cancel, Logout, Reboot and Shutdown
So suspend is out of the list.... those commands are all commands for gdm-control, but gdm-control for suspend is only possible after doing logout, but I wanted to suspend inside the session, so we have to do the trick in other way...
After taking a look at xfce-power-manager, it has suspend function, and after a litle dbus introspection, I found the correct message (http://ubuntuforums.org/archive/index.php/t-410570.html) for dbus that does the trick once xfce-power-manager api supports freedesktop directives (I'm not an expert on any of these things, I just catched some lines here and there)
So, for our How-to....
1 - on a command line sudo gedit /usr/bin/openbox-logout
2 - Change the file where bold text is the new text to add
def delete_event(self, widget, event, data=None):
def logout(self, widget):
def reboot(self, widget):
os.system("gdm-control --reboot && openbox --exit")
def shutdown(self, widget):
os.system("gdm-control --shutdown && openbox --exit")
def suspend(self, widget):
os.system("dbus-send --session --dest=org.freedesktop.PowerManagement --type=method_call --print-reply --reply-timeout=2000 /org/freedesktop/PowerManagement org.freedesktop.PowerManagement.Suspend")
# Create a new window
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
self.window.set_title("Exit? Choose an option:")
# Create a box to pack widgets into
self.box1 = gtk.HBox(False, 0)
# Create cancel button
self.button1 = gtk.Button("_Cancel")
self.button1.connect("clicked", self.delete_event, "Changed me mind :)")
self.box1.pack_start(self.button1, True, True, 0)
# Create logout button
self.button2 = gtk.Button("_Log out")
self.box1.pack_start(self.button2, True, True, 0)
# Create reboot button
self.button3 = gtk.Button("_Reboot")
self.box1.pack_start(self.button3, True, True, 0)
# Create shutdown button
self.button4 = gtk.Button("_Shutdown")
self.box1.pack_start(self.button4, True, True, 0)
# Create suspend button
self.button5 = gtk.Button("Sus_pend")
self.box1.pack_start(self.button5, True, True, 0)
if __name__ == "__main__":
gogogo = DoTheLogOut()
3 - Save the file, and there you go
Hope this is any good for anyone, as it is for me... You can always configure xfce-power-manager to suspend when you do some action, as "close lid" "press power button" etc, etc....
Friday, June 3, 2011
So today I'll be writing about a wonderful project from an Italian programmer, named Giuseppe (aka Giuspen).
As you may notice from the title, Cherrytree is a Treepad alternative, a hierarchical note taking application, and a very good one. It has a lot of advantages comparing to treepad:
1 - It's Open Source and Linux is supported natively
2 - It supports Images, tables and other rich text features
3 - Export to html
4 - Import from treepad and other alike
5 - Syntax highlighting
6 - Save all stuff in a single file
The project is supported by various translators (including me in Portuguese, not completed yet), and others are welcome.
The application runs real fast, can be docked to notification area, and it opens the last saved file. Recently it also allows multiple instances.
Giuspen, has a lot of ideas for making Cherrytree even better. If I could code as good as he, sure I'll give him a boost in Cherrytree, the program I use everyday for taking personal notes, and for work.
Finally one last taught about cherrytree.... What if Debian or Ubuntu packed it in repositories? I believe it would be great for most users that are not aware of this wonderful piece of software.
Saturday, November 27, 2010
I manage our computer systems at work and never tried to convert user Pc's to Linux, instead sometimes I showed them some of the nice stuff and played with them when their windows system crashed, or simply because network printers stopped working.
Since then all item number 7 is ok since we have Bricscad / Ares Commander, and I have moved from OWA to IMAP on my machine, and all my troubles were over.
So about a month ago a Engineer colleague that had Win Vista, said to me... "Can't stand with this Sh#$ anymore, please install Linux here". I've made him a bunch of questions about software he used, and explained that one printer in our office would not work, and all stuff that is different, in the end it was ok for him so we went for it.
Before Linux (Ubuntu 10.04) he could not:
- Print to our 42" HP plotter without problems
- Work one day without rebooting 2 or 3 times
- Start working 1 minute after power-up
- Transfer files to/from his Nokia and Blackberry via bluetooth
After installation when I showed him Nautilus working with tabs (Ctrl+T) and extra panel (F3) it became amazed with a so simple thing that come very handy...
I've had less complaints than ever from him, only thing that went wrong was a day that our Exchange Server went "mad" and he thought it was because of Evolution.
This week I've had two more colleague that want Linux also. Both with XP. I guess it was because they saw a not experienced user doing so well with Linux. Soon both computer will soon boot Ubuntu instead of XP.
This week also I got amazed when I saw him getting drawings out of our plotter. I didn't configured the plotter because I hadn't time. So he did it all by himself. It never happened when he had windows... Even Bluetooth configuration was made by him.
So who could say... More than ever I believe Linux is easier than windows and ready for common users...
Thursday, October 7, 2010
I love Computing and Linux in particular, I even know some C++, Basic, Fortran Pascal, VBasic and Gambas, but beside "Hello World!", I'm rusty, very rusty.....
Yesterday after upgrading my Ubuntu desktop to 10.10 on 5/10/2010 (Establish of Portuguese Republic, National Holiday), I took a look at Ubuntu new software center and went to - Science - Engineering, and as usual, a couple Math programs, a dozen electrical simulators/ designers, etc, etc... So I thought, what the hell.... There are only programs useful for Electrical Engineers.....
Why is that??? Easy, Electrical Engineering courses have a great component of computer science and programming, that why this engineering side has such nice software.....
So, since I'm not one of them (my area is more like machines, pipes, rivets, nuts, bolts, ducts), :) please help us..... I'm not talking for myself, I know there are a lot of Engineers, mechanical, civil, and even Architects that would love to have a DWF file viewer.
As you know Linux now has DWG capable software natively, but as PDF is to DOC files, DWF is to DWG files, and we are missing DWF.....
"Design Web Format (DWF) is a secure file format developed by Autodesk for the efficient distribution and communication of rich design data to anyone who needs to view, review, or print design files." in: Wikipedia
Nowadays it is used by Portuguese Government entities to distribute designs to contractors, note that, at Portugal this is LAW, Decreto-Lei 60/2007 says that PDF should be used for written elements and DWF for drawings (really nice lobby for Autodesk).
But, DWF is an open format based on ISO/IEC 29500-2:2008, and Autodesk provides a Open-Source Toolkit for developers http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=823771. That's Halfway there .....
Do you think you can do it? I believe that are others that can do it too. The first will get the gold...
So, who would be the first to get there??? I'm expecting to see one of this names:
- Evince (I have great confidence in you guys!!!)
- Bricsys (Closed-Source, with a dwg software and project management interactive with Lotus)
- Graebert (Closed-source, also with dwg software, in there ARES beta there was a reference to dwf)
- QCAD (maybe yes, maybe not, I think they are too busy dealing with DWG support first)
- Adobe (Why not??)
- CUPS (They can make print to DWF "cups-dwf" :), the way back sure it will be really simple)
- Inkscape (The experts in vectorial files...)
And don't forget Antitrust (2001) Gary's words "We work hard to stay ahead because we know any kid working in his garage can put us out of business".
I think if you are in one of these teams you would be happy to get there first than the others.... I also believe that it will get your piece of software ahead of the others in a big niche (Engineering and Architecture)...
It is easy, so let's get to work....
Note that I will always be here to do beta testing in a daily basis (it's my job working with those files), and also provide you files to test.....