Tag: Linux

Fedora 23 on a Dell XPS13 (part 1)

Taking advantage of a trip to Canada and a very favourable CAN$:€ exchange rate, I bought a Dell XPS13 (9350 or “late 2015”), following excellent reviews from around the web. Dell sold a ‘developer edition‘ of this laptop (shipping with Ubuntu Linux) but unfortunately it was out of stock on Dell US and I couldn’t find the item on the Dell Canada website. So I bought the Windows version with a touchscreen (it was Black Friday :-)).

fedora_infinity_140x140Here is how to install Fedora 23 on it (and probably most other Linux distribution) … I will focus on three aspects (in brief: everything works out of the box, except the wireless card that needed some additional action):

  1. How to boot and install Fedora Workstation
  2. What works and what doesn’t work out of the box
  3. Some things to do after installation (additional software)

Continue reading “Fedora 23 on a Dell XPS13 (part 1)”

How to write data from Matlab to Excel (especially when you don’t have Excel)

If you are using Matlab on a MS-Windows PC with MS-Excel installed, there is no problem reading and writing data to Excel (in case your users/customers only understand this software but you still want to do the computations in Matlab). Here is the code to read (1st line) and write (2nd line):

inputs = xlsread('inputfile.xls', 'inData', 'A1:B3');
[writeStatus, writeMsg] = xlswrite('outputfile.xls', myMatrix, 'outData', 'A1');

Now, there are several reasons why you may not be able to read and write directly to an Excel file: you have Matlab but

  • you are on MS-Windows but MS-Excel is not installed (if you use OpenOffice.org, csv files in general or on a server where even Microsoft discourage the use of Excel in back-end, see “More information” here);
  • you are on MacOS;
  • you are on Linux;
  • etc.

matlab rubiks cubeMatlab provides a basic way to read and write in these cases: xlsread() will only read some xls files (saved as version 97-2003, which should not be an issue – at least this is an Excel file) ; xlswrite() will only write a .csv file. So you can’t deliver the Excel output.

Fortunately Open Source software is here to help you!

Indeed two recently published code on Matlab Central allow you to write “directly” to Excel.

The first solution is provided by Marin Deresco and apparently uses his own binder to Excel. The most simple code is:

display(['Add Java paths']);
javaaddpath('D:\JExcelAPI\jxl.jar');
javaaddpath('D:\JExcelAPI\MXL.jar');

display(['Writing matrix to file']);
writeStatus = xlwrite('output.xls', myMatrix, 'outData');
display(['writeStatus: "' num2str(writeStatus) '"']); % 1 = success, 0 = failure

I advise you to put the two .jar files in a central location (as done in the code above). That way all you functions will have access to the same version of these files (and updating them for all your projects will be much easier).

But there are three small issues. First the generated matrix will contain only text fields (and they are formatted as text fields, not numbers) ; it doesn’t really matter because Excel can then use this text as numbers directly. Then the second issue is that although it will actually write the requested data, there will be an error when opening the Excel file if you specified a sheet (‘outData’ here) that already exists. Finally you can only start writing at A1.

The second solution is provided by Alec de Zegher, partly in response to the limitation of the previous code. Alec is taking advantage of the Apache POI java library to handle the writing-side. His code also allows to start writing anywhere in the sheet. And it uses the same call structure:

display(['Add Java paths']);
javaaddpath('D:\poi_library\poi-3.8-20120326.jar');
javaaddpath('D:\poi_library\poi-ooxml-3.8-20120326.jar');
javaaddpath('D:\poi_library\poi-ooxml-schemas-3.8-20120326.jar');
javaaddpath('D:\poi_library\xmlbeans-2.3.0.jar');
javaaddpath('D:\poi_library\dom4j-1.6.1.jar');

display(['Writing matrix to file']);
writeStatus = xlwrite('output.xls', myMatrix, 'outData', 'B2');
display(['writeStatus: "' num2str(writeStatus) '"']); % 1 = success, 0 = failure

As you can see there are some more .jar to add. On the other hand, it uses a syntax that is very similar to the previous one and to the original Matlab command. Thanks, Marin and Alec, for this great help!

This was tested on Matlab R2012a on a Windows XP 64-bits and with the MCR (same version) on a Windows 2008 64-bits – according to the respective pages for the code, it should work on Mac and other platforms/configurations too.
Photo credits: matlab rubiks cube by gusset, on Flickr (licence by-nc-sa)

Reference Manager 10 with Wine

Reference Manager is a commercial reference management software package. It is extensively used in biomedical research, along with Endnote (sold by the same company), mainly because the main OS in these labs is Windows from Microsoft. I used it at the university and still have some reference databases in its format (with file extension .rmd).

This evening, I had to go back into one of those proprietary, closed databases I still had (most of my references were later re-entered in a BibTeX file). I could have borrowed my wife’s computer running Windows or tried some Open Source software that can open .rmd files. But it would have been too easy. So I tried it with Wine, a program that allows Microsoft Windows applications to run under Linux. In Wine AppDB, it is written people had tried version 9 and 11. In the old time, I bought a student license for version 10.

I’m running Fedora 14 and Wine 1.3.24. The installation didn’t cause any problem. Launching the application neither. I can easily open existing database and see the reference summary (bottom part of the screen, see screenshot below). But I can’t properly see the reference details (upper part of the screen). In fact, all the details are there but they are not properly rendered. If you click in one of these fields, you’ll see the text from these fields. But once you’ll click elsewhere, the previously clicked field will disappear. The search function in the database is working. The export of a bibliography list from a selection of references in the application works. I was not able to test the integration with MS-Word. Note that it cannot search in PubMed (but it’s probably due to the fact the update for PubMed was not installed).

Screenshot of Reference Manager under Linux via Wine
Reference Manager running under Linux via Wine

I also submitted an entry in the Wine AppDB ; it is currently reviewed.

Installing Fedora 13 on a Toshiba Satellite L670-10K

I quickly needed a new laptop to continue working and I found a Toshiba Satellite L670-10K. It’s a nice entry-level laptop with a dual core processor (I didn’t know Intel was still doing Pentium-branded processors) and a 17″ screen (read the specs for other details). I downloaded the latest Fedora Linux (version 13, 64 bits ; and version 14 is coming soon) and installed it from the LiveCD. Nearly everything was recognized out-of-the-box: screen resolution, graphical card (Intel, with 3D effects), wired network, webcam, card reader, sound card, etc.

The only thing that was not recognized was the wireless network card: a Realtek RTL8191SE. Here is how to install it. On the Toshiba website for (Windows) wireless drivers, it is always associated with the RTL8192SE model. So don’t be surprised if the driver downloaded from the Realtek website is a file with RTL8192 in its name although you clicked on the link for the RTL8191SE-VA2 model. Unpack this file. The LiveCD doesn’t come with some packges so you have to install them (via the System menu, Administration, Add/Remove software). These packages are: kernel-devel, gcc and make. Once it’s done, do a simple “make;make install” as root and reboot the laptop. Your wireless connection is now up and running!

Wireless UFO?

If you want to have Flash on your 64-bits Linux, Adobe released version 10.1 of their Flash player with native 64 bits support. Download Flash player “Square”, unpack the archive and copy the (only) file “libflashplayer.so” in directory /home/yourusername/.mozilla/plugin, restart Firefox. You have now a Flash-enabled browser!

Finally, I must have done something wrong, somewhere but I kept having the first configuration screen after installation, even after subsequent reboots. After a quick search, I didn’t find anyone with the same issue. YMMV. In order to skip this screen (after you went through them a first time), just add the line “RUN_FIRSTBOOT=NO” in the file /etc/sysconfig/firstboot and voilà!

In conclusion, I’m very pleased with this laptop and Fedora. My Linux desktop was ready in just a few minutes. Let’s work, now! 🙂

Happy Software Freedom Day 2010!

Today, September 18th 2010, it’s Freedom Software Day all over the world. It is an annual worldwide celebration of Free Software, a public education effort with the aim of increasing awareness of Free Software and its virtues, and encouraging its use.

On the SFD website, there isn’t a lot of events registered for Belgium. There is only one, in fact, in Oostende (LiLiT is doing an install party in Liege but I can’t see any reference to SFD; still, it’s a good initiative!). Well, a SFD on September 18th in Belgium might not have been a good idea if the goal is to increase awareness of Free Software: more than half of the population is celebrating the Walloon Region or preparing a Sunday without car in Brussels (while others are just looking for a government since April 2010!). So, at a personal level, I decided to give Ubuntu a try (10.04 LTS).

In terms of user experience, you can’t beat the installation process of Ubuntu (my comparison criteria are Fedora 13 and any version of Windows XP, Vista or 7 that are not on a PC-specific image disc). Seven configuration screen with rather simple questions and that’s it. There are choices you can’t make like the selection of software you want to be installed and available on the next reboot. But, most of the general software is there: a web browser, a word processor, some games, a rudimentary movie player and a music player. The “Software Center” is also readily visible so you can’t miss it and it seems to be an obvious choice if you want to install any other software.

New Ubuntu desktop for Freedom Software Day 2010

The real test will now be if one can actually work with it. If I don’t post any furious comment against some features or if I don’t post anything about the installation of some software in the coming days / weeks, you’ll know I’m still working with this Linux flavour.

Fedora 11 is out (since a week or so)

This week, I nearly emptied my internet quota by downloading and seeding the new Fedora Core 11. For those who don’t know yet, Fedora is a Linux-based operating system that showcases the latest in free and open source software. What I particularly like in this GNU/Linux distribution is that its developers prefer to make changes to the original software instead of applying fixes specifically for Fedora ; in this way, all the other distributions may also take advantages of the improved software. You’ll find many reviews and “tours” on the web about this new Fedora. In the next paragraphs, I’ll just highlight some of the most interesting points I saw until now. Coming from a Fedora 9 also helps to pinpoint the major improvements (mainly from a user point-of-view).

Fedora 11 screenshot

The first nice thing I noticed was the reduced time to boot my ageing laptop (ok, 2 years is not so old) and its simplicity (just a progress bar in the bottom of the screen). I won’t give you numbers. Anyway, numbers would have been specific to my computer. But I can tell you it’s quite faster than with the Fedora Core 9. And anyway faster than Vista. In general, I think it’s a big improvement for the user experience: after all, most users just boot their machine to use it as a tool, not to wait with amazement that everything is loaded.

Another nice thing is to finally get new versions of some software. OpenOffice is in version 3.1, Netbeans is in version 6.5, Python 2.6, … One thing I was waiting since a long time is Istanbul, a screen recorder. Otherwise, all the other main software I use are also present: Gimp, Inkscape, vim, gthumb, xmms, etc. The only thing a little bit tricky was to add the ability to read two proprietary formats: mp3 and flash. For mp3, you have to add the fusion nonfree repository and it’s clearly explained here. For Flash, I was surprised that Adobe offers an installation procedure just identical to any other software on Fedora, based on yum. I was also pleased to see projects like bioperl and biopython already available at the installation step (along with XDrawChem and JMol which will allow me to read old molecules I drew a few years ago with proprietary software like Chemdraw). One last thing a was eager to see in action is the ext4 filesystem (Fedora being the first distribution to include it by default). To be honest, I don’t see the difference.

XDrawChem and JMol in Fedora 11

Finally, if I have to summarize the experience with this Fedora Core 11 so far, it will be: smooth installation, up-to-date software, no surprise, ready to work after 1 day (I had to play with nearly all the new toys inside). I think GNU/Linux is really ready for the desktop 🙂