Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Thursday, February 9, 2012

mount partitions of full-disk images on Linux

If you have an image of a whole disk instead of just one partition and want to mount seperate partitions contained within that image, you can use "kpartx" to do so:

http://tinyapps.org/docs/mount_partitions_from_disk_images.html

Thursday, December 23, 2010

Subsonic on Linux: Fix issue with special characters

Subsonic is quite amazing, but I encountered problems with songs that contain special characters like umlauts or japanese kanjis. For one, the web-interface doesn't display them correctly and second - even more serious - clients like ones available for the iPhone show errors or even crash when accessing such songs.

The problem is that subsonic requires the correct language/encoding set when run. It seems that it needs UTF-8 set as encoding.

To do this, modify the start-script of the subsonic-server (usually /usr/share/subsonic/subsonic.sh) and add the following line to the beginning:

export LANG=en_US.UTF-8


then restart the daemon. The web-interface should now display everything correctly and Clients like iSub on the iPhone should be able to play all songs aswell.

Sunday, March 7, 2010

XBMC Live on ION - automatic mode-change with EDID

Before I begin, I wanted to thank JumJum for the following post on the XBMC forums. I've been able to get my settings to work well on my ION-based Acer Aspire Revo:

http://forum.xbmc.org/showthread.php?p=516904

I didn't need many of the steps mentioned there, since I already had XBMC 9.11 Live running on Linux. So far, I was using my own ModeLines I set up manually. But it turned out the EDID-modes actually do work fine out of the box with the following settings:

/etc/X11/xorg.conf
Section "Device"
Identifier "nvidia"
Driver  "nvidia"
Option  "NoLogo"              "true"
Option  "DynamicTwinView"     "false"
Option  "NoFlip"              "false"
Option  "FlatPanelProperties" "Scaling = Native"
Option  "ModeValidation"      "NoVesaModes, NoXServerModes"
Option  "UseDisplayDevice"    "DFP-1"
Option  "ModeDebug"           "true"
Option  "HWCursor"            "false"
EndSection

Section "Screen"
Identifier      "screen"
Device          "nvidia"
SubSection      "Display"
Modes "1920x1080_24" "1920x1080_50" "1920x1080_60"
EndSubSection
EndSection

Section "Extensions"
Option  "Composite"           "false"
EndSection

That was all that was neccessary. Well, in order to find out what "Modes" the driver has available, you have to have the "ModeDebug" setting enabled and then check the listing of modes within your /var/log/Xorg.0.log:
sed -n '/- Modes/,/- End/p' /var/log/Xorg.0.log | sed 's/.*(0)://g' > ~/modes.txt

Then simply pick the wanted resolutions. Afterwards, restart the X-Server for the changes to take effect. In case of the XBMC Live, that means:
service xbmc-live stop
service xbmc-live start

Thursday, December 18, 2008

Quickcam STX with Skype on Ubuntu 8.10

And another thing that needed some fiddling around until it actually worked: My Logitech Quickcam STX refused to work proberly with Skype on my new Ubuntu 8.10 installation.

The solution ended up being rather trivial. Turned out the problem was that the new Ubuntu supports V4L2. Though the old V4L should still work, I guess there were compatibility-problems, especially with programs written purely for V4L. Thankfully, there's a compatibility-library that you just need to preload before starting Skype:

export LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so

That was enough to get the webcam working. The driver "gspca_zc3xx" used by the system was correct after all. I could get a working, moving test-video within the skype-preferences. I will try it out with a real chat soon and see how it works.

Tuesday, December 16, 2008

Skype and Pulseaudio under Ubuntu 8.10

It's the thing with upgrades: Things are newer, often better, but sometimes not always compatible and working the way you were used to in the previous release. I stumbled over the same thing when I upgraded my Ubuntu 8.04 to 8.10. I installed the latest Skype-package too and chatting seemed to work like a charm...

Until I tried to actually voicechat. Skype showed problems with the sounddevices and even trying to set them manually wasn't really successful, especially when you had other applications (or even skype itself) access the sounddevice at the same time.

It turned out the problem is a new package included with Ubuntu 8.10 called Pulseaudio. I haven't heard of it so far - but to be honest I'm not keeping myself too up-to-date with all the latest additions and changes done in current Linux-systems. But it's not surprising that another new subsystem/daemon/framework emerged by now. Strangely, when setting the audio-device in Skype to "pulse", it actually did work - but used up all my CPU-power, leading to strange delays.

Looking at infos like here http://www.pulseaudio.org/wiki/PerfectSetup#Skype, I see there are alot of things to fiddle with, but I ended up simply doing this:

killall -KILL pulseaudio


/etc/init.d/pulseaudio stop

Though the init-skript didn't seem to be doing anything. I haven't investigated any further to be honest, but killing the pulse-daemon made the option "pulse" not appear in skype anymore. And just leaving Skype's settings at "default" after that ended up working perfectly. I haven't experienced any drawbacks of disabling pulseaudio so far, but I'll inform myself alittle more about the whole thing and update this thread then. For now I'm simply glad I have a solution to this strange behavior.

[update]

Ok, after checking some more I decided to get rid of Pulseaudio. I found a very nice, comprehensive guide for 8.10 here:

http://idyllictux.wordpress.com/2008/10/29/alsa-instead-of-pulseaudio-for-ubuntu-810-intrepid-a-non-destructive-way/

Wednesday, July 9, 2008

Getting my server to boot from a Live-CD again

It's become one of my most said things when it comes to computers: "Why can't things simply work?"

Indeed, I always seem to stumble over things when working with comps that don't seem to function the way they should - or I as a user simply would expect them to. Yes, I'm a geek and I can work it out usually or find a workaround, but I often think "why the heck do I have to do this in the first place?"

Same today. I wanted to clone one of my old harddisks. Since it contained a Linux-installation, I figured I'd simply use the good old dd to copy the whole disk content. I wanted to use the new harddisk as a replacement for the old one, so it would come in handy to copy the MBR and the partition table aswell that way. I was even lucky: I found a disk with exactly the same amount of space and the same drive geometry as my old one. That's definitely not a given fact, but I was happy and it felt like a cheap and easy thing to do. Of course I can't do it while the Linux system itself uses the disk, so I planned to boot up whatever Live-system I have laying around while having the 2 harddisks connected and I'll be all set. I planned to use my good old external USB DVD-burner as a the boot-drive.

But for some strange reason, my system didn't want to boot the CD. Everyone that I tried stopped and the ISOLINUX loader showed me an "image checksum error". I've used the exact same CDs/DVDs before, so I knew it was no problem of the discs themselves. I figured it must be something with the way the BIOS tries to interpret and access the discs. But again, it was strange since I used the exact same optical drive to actually install the current system...

Well, after some trying around with different BIOS-settings - without success - I started to narrow it down. How to do that best? well, as usual: disconnect and turn off everything you don't really need, see if it works then, and then start reconnecting things one by one until it doesn't work again. And to my surprise, it turned out that the new harddrive was causing problems! I have no idea why, but as long as it was connected while the system was booting up, it messed up with the ISOLINUX loader of the Live-CDs somehow. So since it's a USB harddrive, I simply left it unplugged while booting and added it later when the system was up.

So again, I had to fumble around and try stuff and figure out what the problem was and look up message-boards and knowledge-bases online... people wonder why I know so much about these things. It's easy: because all that stuff has happened to me before!

Now after the copying is done and my system up again, I'll have to investigate a far more time-consuming problem: rare, occasional disconnects of one other USB-harddrive. Seems like a Linux-kernel thing or maybe a problem or incompatibility with the hardware - either of the drive or of the board-chipset.... the usual stuff, I'm off to consult more knowledge-bases online...