linux

Viewing medical data (CT pictures) on Linux

I recently had to visit a CT institute to produce a series of CT-pictures depicting the internals of my nose (and parts of the head as well). The result was a series of about 120 pictures, each picture showing a small slice of the interesting region. They can be used by a medical doctor to examine the structure of the region of interest for example to prepare for a surgery. In theory it is also possible to create a 3D-model of the recorded region. The institute provided me with the on-paper pictures as well with a CD, containing the examination-results in a dedicated format, called DICOM (Digital Imaging and Communications in Medicine). The CD also contains a windows-program to instantly show the results on screen of a windows-computer. But... I do not use windows. How to show them in Linux?

restoring KVM Vm Ware deleted images

don't restart or stop the VM not at all, by doing this, you will lose your image files and this will lead to a disaster.
Linux mark the files as deleted, but they are still exist, I will show you how to restore the files.

1- Look for the pid of the running virtual machine you just deleted (for example a virtual windows server)

lsof | grep -i qcow | grep deleted
kvm 31127 root 9u REG 9,2 32212254720 2985316 /home/root/kvm/windows_2003/win2k3.qcow2 (deleted)

2-With the pid (31127) you can find the filediscriptor in /proc.

ls -al /proc/31127/fd | grep deleted
lrwx------ 1 root root 64 Nov 6 14:51 9 -> /home/root/kvm/windows_2003/win2k3.qcow2 (deleted)

3-Now suspend your virtual machine in order to prevent data loss

virsh suspend winserver

4-Restore the files to its original path and name.

cat /proc/31127/fd/9 > /home/root/kvm/windows_2003/win2k3.qcow2

5-Now you have to hard-reset your virtual machine.

virsh destroy winserver && virsh start winserver

Taggings:

How to restore deleted KVM files under Linux

If you have accidently deleted the files of your virtual machines while they are still running, what can you do? that was my personal experience with about 15 virtual servers !

Data transfer: Android-Phone & OS

It can happen almost anywhere, you want to transfer something from a computer to your phone or vice versa. You have your phone and also an USB-cable but you’re not at your PC where all drivers are installed you are on the go (maybe university or at a friend?). Maybe you are not even able to install drivers as you don’t have the necessary rights on the system? How can you connect your phones memory to an unknown PC that supports USB-Sticks?

Linux and Yahoo Messenger

You used to use Yahoo Messenger and talk to you friends through it under Windows? Also used Webcam, Voice Chatting, sharing files and other features of it ? But for some (university came up Linux became more important) or other reasons you had to change from your beloved Windows (“bazinga”) and your missing all the features of your Yahoo messenger you had once in Windowzs. How can you enable a working Yahoo messenger in linux, that provides you most of the functionality?

Installing Linux to compile and run such programs

One solution was to download a linux distribution, install it besides Win7 and then use the commands as recommended in the shell of this linux distribution.
That solution worked like a charm, the only "drawback" of that solution were the 6gb additional storage needed for installing the linux distribution.

Taggings:

Using "make" in Win7

In the lecture called "Digital Forensics" we had to use a tool called truecrack to crack a Truecrypt container. The problem was that there is no executable file avaiable to install this program, you have to compile it by your own. But in Windows it is not possible to execute such Makefiles without installing additional programs.

Focusing linux frame on x server in shell script

The SignagePlayer executable in my installation was located in /opt/SignagePlayer/bin/SignagePlayer

I replaced the actual executable with a script of mine which gets autostarted instead of the player.
I moved the actual executable of the player into a different file.
The script once started, starts the actual player (which is now called SignagePlayerApp) and then uses a linux program which is called "xdotool" that allows you to perform all kinds of different options on open windows using the shell.

the following retrieves the window id of the player window by its title, which is "Signage Player"

xdotool search --onlyvisible --name "Signage Player"

the id is stored in a variable, if the player was not yet launched (so the window did not exist when the "search" was run) the script waits 1 second and then tries again and again until it finally finds the window

then the following line is executed on the id of the window to give it focus and bring it in front of the gnome panel


xdotool windowactivate $windowId

the entire script can be found here:

#!/bin/bash
#This script belongs into the signage player install directory
#ie /opt/SignagePlayer/bin

#start the player
sudo /opt/SignagePlayer/bin/SignagePlayerApp &
#wait for the window to spawn
while : ; do
windowId=`xdotool search --onlyvisible --name "Signage Player"`
if [ -n "$windowId" ]
then
#once spawned give it focus and exit the script
xdotool windowactivate $windowId
break
else
#if it is not yet spawned wait 1 sec until checking again
sleep 1
fi
done

Controlling application frames (windows) in linux

Signage Player is a program created by MediaSignage which is available for free and allows the user to set up linux or windows pcs that display advertisement or other sorts of content in slideshows etc. The player launches after the pc does and starts displaying its campaign in fullscreen. If you use an older version of linux it will automatically remove the gnome-panel (the taskbar) if you selected that option during installation. If you did not select that option or are using a new linux version with a more recent gnome ui, the player will not remove the panel. If the panel is not removed the player will still launch in full screen but the panel will be visible. The player can be brought to the front by clicking the mouse once, but naturally in a real environment you want it to launch into proper fullscreen because nobody will be there to click anything. What's needed is a script solution that will automatically give focus to the player window (which is what happens when you click inside that window manually) so the player will be brought to the front and the gnome panel will become invisible.

Executing an action or a set of actions on files.

Sometimes, you want to execute specific commands on a set of files, or manipulate some files with the same commands. Eg: - rename all files in a directory with a specific filename scheme. - extract id tags information from mp3s etc.

Pages

Subscribe to linux