Introduction About Site Map

XML
RSS 2 Feed RSS 2 Feed
Navigation

Main Page | Blog Index

Archive for the ‘Linux’ Category

KWin Wall on Dual-Head Displays

Summary: Weakness in 3-D desktop effects in KDE4

THERE seems to be a deficiency or a bug that may or may not be present upstream/in Compiz too (I seem to recall it not being present in Mandriva 2008 with KDE and Compiz). Basically, as the screenshots below show, the desktop wall separates the left and the right hand side monitors in a rather awkward way, such that they basically completely diverge and do not align horizontally, either (due to different screen sizes). For visual demonstration, here is what the wall looks like:

Scale in KDE

Here is what the sphere of my desktop looks like:

Sphere KDE

The connection between left and right is correct in this case. Scale and the other 3-D plug-ins work just fine, but the split in the wall is clearly a bug.

How to Play Audio (Sub)Segments Repeatedly

Yesterday I dumped visual media players — a decision that I stand up for at least for now — instead using more flexible scripts to play just particular parts of songs/tracks that I enjoy, even repeatedly. I use mplayer and bash to do the heavy lifting. This is handy when good segments, e.g. one part of a long concert, need to be isolated. Segments like these are usually to be found in very large files, which can be found either by name:

find -type f | grep PATTERN

To isolate large tracks (by file size), use something like:

find . -type f -size +{10000}k -exec ls -lh {} \; | awk '{ print $8 ": " $5 }'

$ find . -type f -size +50000k -exec ls -lh {} \; | awk '{ print $8 ": " $5 }'

The self-explanatory shell script to write would look something like

mplayer /media/disk-8/Music/volO/AugMix.mp3  -ss 0:20:0 &
sleep 600
killall mplayer
mplayer /media/disk-8/Music/volJ/concert.ogg -ss 0:35:0 &
sleep 200
killall mplayer

Enjoy.

Fedora, Importance of GNU/Linux Competition, and Technological Freedom

FEDORA 11 is a fine distribution of GNU/Linux, but my session got stuck (frozen) today. Generally, scheduling on the desktop in this out-of-date operating system is somewhat deficient. Windows sometimes do not respond for a period of several seconds. The bug where a text selection cursor is made permanently visible and allows no real interaction with any applications kicked in… againtoday. It happens quite rarely with other distributions and there’s an escape route out of it, e.g. if the terminate signal can be sent to the application causing it, assuming it can be identified. But not this time though. Bearing in mind that it’s not the very latest version of Fedora and having used the fourteenth release since it was made available (even installed it for others), it does seem fair to say that for a smooth experience on the desktop, one is still better off going with the Debian family. Mandriva (predominantly but not strictly RPM-based) has been very good too, probably a lot better than Fedora.

The problems with Fedora are not really caused by adherence to freedom. Some creases and bugs, however, might not be addressed early enough because Fedora’s adherence to freedom (not strict adherence, but better than Ubuntu’s for example) limits the extent of its userbase, which in turn reduces the incentive Red Hat has to concentrate on the desktop side of things.

I have been working with Fedora 11 since last Friday (just waiting for my home computers to get back online with the new line activated) and as much as I try to love Fedora, I cannot help feeling that Kubuntu and Ubuntu have been giving me less hassle. Deep inside I wanted to declare that Fedora was better, but the experiences simply suggest that any such claim would be wishful thinking, even deceptive. The problem is that Canonical was made quite arrogant (hello Hubris!), which harms Ubuntu on technical and communal grounds alike. Canonical could use more competition.

It may be true that Linux in the mainstream is all about Android, Google, Ubuntu, mainframes, and Red Hat Enterprise Linux these days. That’s fine. As long as Fedora uses and reuses the same pertinent packages, there is no risk of Fedora truly falling behind. The wonder of Free software is, as long as one is allowed to copy the competition or branch out of it, unfair advantage is harder to gain. Canonical and Google have both attempted to produce “added value” (or enhancement) which is hard to emulate, replicate, or even get involved in. They are using some very vendor-specific code, which changes the balance of control not just with copyright assignment. It’s not progress and it is usually counter-productive.

Next week I will resume GNU/Linux advocacy and do a lot less programming (below is a new screenshot of the application I have been developing, but it’s unfortunate and regrettable that the code depends on a proprietary framework) and there is a lot of thinking to be done regarding strategy. Generally speaking, the world’s population loses control over technology at a very rapid pace* and software freedom is no longer the only freedom worth pursuing by a developer with passion for humanism. The head of the Free Software Foundation (FSF) has just stepped down and it is hard to blame him; maybe he too reached similar dilemmas and came to realisations that software freedom is not enough. Collaboration too is crucial (GPL encourages it), not to mention education in general.

Expressions GUI
____
* I spent half an hour this morning chatting with a lady in her 70s. She too — not too surprisingly — feels as though mobile phones are a burden rather than a blessing. In general, she is also concerned about today’s society which lacks face-to-face interaction and intimidates her generation that’s not at all accustomed to a technological control grid. Free/libre software is being used a lot in this context (primarily for companies to bring their user-hostile proprietary layer to market immediately), not as much is being produced though. If technology is not built to provide the user some more control, then it usually tries to control the user. But people are not made sufficiently aware of it, unless the FSF speaks out, as it recently did against Android.

Developing With Fedora 11

GMDS/PCA

FEDORA 14 was a bit of a mixed bag, but it was definitely an improvement compared to previous versions. I’ve used it since it was released (and blogged quite a lot about it). At the moment I use an older version:

bash-4.0$ uname -a
Linux [XXXXX] 2.6.30.10-105.2.23.fc11.i686.PAE #1 SMP
Thu Feb 11 07:05:37 UTC 2010 i686 i686 i386 GNU/Linux

Not to worry, it’s up to date and it runs the latest KDE. The general impression has been positive, having worked on this operating system for the past week or so (still awaiting my Ethernet’s return, so working from a lab, not via SSH). A few remarks about the weak spots:

  • X (org/server) blows up under particular circumstances where a newer version of X might be expected. If an attempt is made to invoke it from a remote host (SSH with X forwarding), the whole of Fedora blows up and the session must be restarted. If run locally, the same type of X issue simply raises a hardware-based exception and produces a major warning, then gives the option to gracefully shut down the affected program. It’s not good, but it’s definitely better than the former scenario, which is reproducible by the way.
  • Dual-screen handling is fantastic. It is still a plug-and-play experience, even with Fedora 11 in place.
  • There are far too many visual artefacts and drawing bugs (direct rendering is lacking). Again, this may just be the fault of old X and nothing whatsoever to do with the drivers of this GPU (Fedora seems to favour free drivers).

Aside from X rants, this platform is fantastic for development. Everything has worked well so far, except Firefox with occasional crashes (occurring at least once a day).

Is Fedora ready to become the most widespread GNU/Linux desktop? Probably not yet. But for development? Sure, why not? Fedora 14 is more mature, but that too has some wrinkles which I covered here before.

By the way, the screenshot at the top (click to zoom) shows the application I’ve been developing recently. More details will be published shortly as blogging distracts from persistent coding, and vice versa.

GNOME From KDE vs KDE From GNOME

Today I set up my alternative machine in a way which enables me to get the best of GNOME and KDE. It was set up in a way that I never tried before. Back in 2001 or thereabouts I would have gnome-panel imported into my desktop session (from another computer) and I repeated this type of practice locally around 2005-2007 when I wanted my KDE desktop to also have gnome-panel and therefore allow easy access to GNOME-side administration tools or applications. Today I tried something different altogether by installing KDE alongside GNOME and then running plasma-desktop in GNOME, which obviously imported panels and the background utilities, including 2 folderview plasmoids that import directories over SSH (the remote server on which I run workloads).

The bottom line is, there need not be a strict choice between GNOME and KDE. Both are compatible with one another and can run alongside one another in the very same session. In this case, it’s a dual-head machine with free graphics drivers and I might post some screenshots soon. This helps debunk the myth of incompatible desktop environments.

Linux Mint 10, Ubuntu 10.10, and Kubuntu 10.10

Linux Mint 10 Julia

TODAY I moved on to my next research project, which I will mention very briefly in the next post. As part of this move I’ve also made some distro changes. The servers are running Ubuntu, so for the sake of consistency I wanted to explore the latest and greatest of Ubuntu and its flavours/derivatives. I gave a go to 3 and spent some time working from them (not long enough an experience as yet).

Will it be 10 out of 10 for the 10.10 releases? What about Mint 10 (codename “Julia”)? I decided to try today, hopefully seeing how it all compares to Fedora 14, which I have used since it was released around the end of October. The change is motivated by needs of consistency; I also like to try different distributions and see what they are all about over time, for the sake of comparison. I might stop using Fedora for a while. It is still installed on a PC, but I moved all my important work files out of there, which means they’ll go out of sync over time.

A report about use will be posted at a later date (this is not a review but a post with quick impressions). The important points are that today I tried Linux Mint (very latest version, which is GNOME based) and latest Ubuntu+Kubuntu shortly afterwards. Linux Mint has this nice new feature (to me at least) that has it start the installation while the user enters installation options such as user details, location, etc. The menus and graphics (including icons and window decorators) are stunning. Setting up dual-head in Ubuntu without proprietary drivers was easy, in Kubuntu it’s still not as easy (getting twinview). Overall, since both share the very same base (even same packages for the most part, except those which are preinstalled), comparison in this case ought to rely on what’s above the hood, mostly user experience.

Octave or MATLAB Without GUI

CLI

WORKING with bare metal for the purpose of maximal hardware utilisation and performance is not the same as working with typical computer programs. Developing software for research is also different from software development for end users, where the software is treated as a product. Different scenarios require different methodologies and different levels of polish, and thus have different specifications and priorities. In research, brute force becomes essential to the success of one group or another.

I often find myself working on servers or clusters (only GNU/Linux), in which case it is useful to manage up to 50 computers, for example, remotely, at the same time. With full GUI sessions it can be a disorienting task, but that too can be achieved and I wrote about it roughly 6 years ago in this blog (back when I was a Ph.D. student).

Working from the command line at a desktop is perfectly acceptable if brains and not candy count, so platforms like Mac OS X are irrelevant. To do coding on the server I currently use vi as the editor in one terminal and the MATLAB session in another. On the desktop I would use QtOctave, as covered before (also in some screencasts). Unfortunate issues that had me revisit MATLAB (which in any case would be inevitable as means of ensuring compatibility with colleagues) led me back to the old days of developing over SSH (using KIO slaves and the likes of that). Quick access to the file can be gained using abbreviated wrappers such as:

./Main/Programs/Scripts/SSH/42
/opt/matlab/bin/matlab -nodesktop -nosplash -r "addpath(genpath('/home/S00/schestr0/'))"

where 42 is a script numbered after the machine number and the latter command initialises the command line. /home/S00/schestr0/ is using NFS and it can be reached from any computer at the department at the same time (multiple machines can write to the filesystem at the same time, too). If the files are edited locally, they can be passed across to the server using a simple command that transfers them in encrypted form.

scp /home/roy/Main/IT/Programs/get_dicom_heart/* -r
schestr0@eng041.cs.man.ac.uk:/home/S00/schestr0/get_dicom_heart/

Occasional local backups (usually nightly because it is resources-intensive over USB2) are achieved as follows:

mkdir /media/disk/Home/`date +%Y-%m-%d`

tar -cf - /home/roy|split -b 1000m - /media/disk/Home/`date +%Y-%m-%d`/Home-`date +%Y-%m-%d`.tar.

To decipher this, try:

man tar
man split

For example in:

tar -cf - /media/SEA_DISK/Home/|split -b 1000m - Baine-`date +%Y-%m-%d`

the backup is split into chunks of 1 gigabyte and the files are named by the date

To reassemble the above (resorting from backups):

cat *|tar -xf - 

No command line interface should be intimidating. Many powerful computer tasks are managed from it because the command line makes streamlining simpler and scripting jobs is a lot easier. My programs are written in a way that enables assigning many parameters like paths and wildcards, which lets the programs run for many hours and automatically produce output like images, videos, and text for inspection later. Research in computer vision or computer graphics requires heavy computation and for compelling experiments, the larger the sample sets, the more convincing the results. Use of computer resources therefore becomes the difference between failure and success and those who fail to master it can easily perish against the competition. Another valuable skill is knowing how to reuse code (legally of course) and this is where free/libre software orientation helps a lot. Publication in Open Access (OA) and availability of one’s own work — including code — can help gain more citations, which is the currency by which many publications are being judged.

Retrieval statistics: 21 queries taking a total of 0.097 seconds • Please report low bandwidth using the feedback form
Original styles created by Ian Main (all acknowledgements) • PHP scripts and styles later modified by Roy Schestowitz • Help yourself to a GPL'd copy
|— Proudly powered by W o r d P r e s s — based on a heavily-hacked version 1.2.1 (Mingus) installation —|