Sunday, January 6. 2008
Linker Problems with Matlab on Linux? Posted by Martin
in Scripts & Code at
22:18
Comments (0) Trackbacks (0) Linker Problems with Matlab on Linux?
If you're writing a C/C++ program using Matlab libraries on a linux system you get errors like this if the system isn't configured properly:
/usr/bin/ld: warning: libut.so, needed by /path/removed/libmx.so, not found (try using -rpath or -rpath-link) The reason can be found in the ld manpage: libmx.so has more dependencies, but ld can't find them. The -rpath-link linker switch might be a solution, but Linux systems have a central place for this kind of config: /etc/ld.so.conf. If you have a directory called /etc/ld.so.conf.d/, create a file there with no other contents than the path to your matlab libs ($MATLAB/bin/glnx86 for i386) and call it matlab.conf or something like that (it needs a .conf suffix!). If this directory does not exists, append a line with this path to /etc/ld.so.conf. Then, re-run ldconfig and your problem should be solved. Friday, January 4. 2008
X Terminal Emulation, screen and Xfce Posted by Martin
in Linux & Unix at
19:25
Comments (0) Trackbacks (0) X Terminal Emulation, screen and Xfce
So the thing is I always have terminal windows open in X. A lot of people do this , if course - but I wanted to neaten things out a bit.
At the mo, I'm running xubuntu gutsy. I have 4 desktops, and one of them I want to be a permanent terminal windows with as little else as possible. I tried several apps for this: - xterm wasn't spiffy enough - I love transparency! - aterm and Eterm don't support utf8. I just couldn't get them to show my special characters like äöüß. Besides, Eterm was up to 3x slower than aterm when starting. aterm doesn't support borderless windows with Xfce, either In the end, I used xfce4-terminal. It doesn't start as fast as xterm, but as it only gets started once per session that didn't concern me - it's still fast enough. Plus: I can deactivate borders, make it transparent, hide the scrollbar and make it fullscreen - so on desktop 4 there's absolutely nothing except for my terminal with my shaded desktop background. The other desktops look like normal X desktops so I don't scare anyone with my laptop. When I was running kubuntu, I had konsole doing the same job with a similar configuration. I used tabs for different shells. xfce4-terminal supports this too, but finally I've gotten round to using screen which does a much nicer job. Pity it doesn't save sessions through reboots. Wednesday, October 17. 2007VPNC strikes back
I've been chatting around a bit and discovered that the fact that "vpnc doesn't work" is a myth - at least in my case.
Using vpnc doesn't only work, it's also a lot more convenient, because you don't have to keep upgrading manually. If you're using Ubuntu, all you have to do is install the package vpnc. After that, Ubuntu will take care of the upgrades. All you need is a conf file for vpnc which tells you how to connect. Luckily, vpnc provides a translate script which converts a PCF file into a vpnc conf file, it's called pcf2vpnc. In my case, it's in /usr/share/vpnc, so I ran $ /usr/share/vpnc/pcf2vpnc vpn-v1.pcf and the output is the ready conf file. Save that as /etc/vpnc/YourVPN.conf (you need to do that with root-privileges, i.e. use sudo) and you can start the whole thing with $ sudo vpnc YourVPN To terminate vpn connection, run $ sudo vpnc-disconnect to restore routing. PCF files usually use crypted group passwords. You can decrypt them at this website: http://www.unix-ag.uni-kl.de/~massar/bin/cisco-decode http://www.penlug.org/twiki/bin/view/Main/CiscoVpn is a pretty outdated site on vpnc, but can give some insight. This is already a lot better than the cisco client, but there's more good news: vpnc integrates into network-manager, and there's a KDE gui called kvpnc. As soon as I'm up to date on those, I'll finish the trilogy and hopefully we're back to the world where ordinary people can use VPN from their laptops. Tuesday, October 16. 2007Using VPN with Ubuntu Feisty Fawn
Getting VPN to work with Ubuntu was a real headache. Most instructions on the web were a disaster and I had to pick loads of stuff together from all over the place.
I wanted to get my laptop to use the wireless network of the University of Karlsruhe, Germany (Dukath). Apparently, the open source versions don't work and you need the Cisco one. These instructions will thus be using the university network as an example, but might work for others, too. 1) Download the client. I got it from here: http://www.rz.uni-karlsruhe.de/rd/vpn.php . If you're on another network, I recommend searching for cisco VPN client linux and downloading the latest version. 2) The file you downloaded is a tar.gz file. Extract this file: $ tar zxf vpnclient-linux-4.8.00.0490-k9.tar.gz You will get a new directory, vpnclient. Go to this directory. 3) Patch the client. This seems to be a Ubuntu problem. Get http://tuxx-home.at/projects/cisco-vpnclient/vpnclient-linux-2.6.22.diff and copy it into the same vpnclient directory. Apply the patch by going into the directory and run $ patch < vpnclient-linux-2.6.22.diff I got this advice from http://www.longren.org/2007/05/17/how-to-cisco-vpn-client-on-ubuntu-704-feisty-fawn/ , thanks for the hint. 4) Install. Now the patch is installed, this is simple: $ sudo ./vpn_install 5) Install the PCF files. The page where I downloaded the VPN client also offered two PCF files for download (vpn-split-v1.pcf and vpn-v1.pcf). Download them and do $ sudo cp vpn-split-v1.pcf vpn-v1.pcf /etc/opt/cisco-vpnclient/Profiles/ This directory is a new one which was created during the vpn_install script. 6) Install the root certificate. Get the certificate from the same place you got the PCF files. In the Karlsruhe case, this file is called dfnpca-02.der. Run $ cisco_cert_mgr -R -op install And enter the certificate filename when asked for it. Note this certificate thing might not be necessary, or there might be a user certificate (which means you have to do -U instead of -R). 7) Start the vpn client by running $ sudo /etc/init.d/vpnclient_init start This is not necessary if you restart the computer before doing the next step. But it doesn't do any harm, either. $ sudo vpnclient connect vpn-v1 And the VPN client should connect. The VPN profile (i.e., what you have to write after 'connect') is the same as the PCF file name without the .pcf. In the Karlsruhe case, the one that's called vpn-split-v1 is for external connections, where you want to use university-internal stuff from a normal internet connection. Inside the university, you want the other one. If you do this inside a shell (like xterm, konsole or whatever), the vpn client stays active until you signal it's end (with Ctrl-C) or run sudo vpnclient disconnect from another console. 9) Keep the client up to date. Sorry, but this nightmare is not yet over. Everytime you update your kernel, you have to re-install the client. I can't confirm this, but I think the other steps do not need repeating. Is this the famous ubuntu usability? Seriously, this needs easing up. I'm not exactly a newbie to this stuff, but it took me ages to figure out. Saturday, June 16. 2007
Importing birthdays from KAdressBook ... Posted by Martin
in Linux & Unix at
18:31
Comments (0) Trackbacks (0) Importing birthdays from KAdressBook to KOrganizer (Kontact)
I recently started using Kontact, and it's nice. One thing someone could have mentioned, though, is the fact that the birthdays saved in KAdressBook are not automatically used from the KOriganizer reminder daemon - of course not, KOrganizer is a different application. The Kontact integration got me fooled there - and I promptly forgot a lot of birthdays.
However, importing the birthdays to KOrganizer is really simple. Here you go: 1. Open KOrganizer (I did it through Kontact -> Calendar) 2. In the sidebar, at the bottom left, there's a box with resources (Usually the Default KOrganizer resource, ticked). If it's not there, go Settings -> Sidebar -> Show Resource View. 3. At the resources, click 'Add'. The KAdressBook birthdays are in the list. Select them and click OK. C'est tout! Saturday, December 23. 2006Reducing PDF file size
Sometimes, especially when I create PDF files with lots of images, I end up with huge PDF files, sometimes in the gigabyte range, even though the actual images themself were just a couple of megabytes.
These files aren't just impractical, but most printers can't handle them so basically they are useless. While it's probably better to tackle the problem where it begins (in my case, the PDF file printer driver) I decided to go for a more 'hacky' approach: I wrote a script which cleans and recompresses the PDF files. This is useful because I noticed that quite a lot of PDF files (especially ones I didn't create myself) are unnecessarily huge and contain PDF errors. This script passes the PDFs through all available ghostscript filters until it ends up with a nice new and shiny PDF. Warning: the process is ressource-consuming, can take a while and will definitely take up some disk space. By now way do I guarantee for any file loss or damage. USE AT YOUR OWN RISK.
Wednesday, December 13. 2006
Upgrading Ubuntu Dapper Drake -> ... Posted by Martin
in Linux & Unix at
12:34
Comments (0) Trackbacks (0) Upgrading Ubuntu Dapper Drake -> Edgy Eft
I am using Kubuntu on a Toshiba Satellite Pro 4600 and recently upgraded to Edgy Eft.
The basic upgrading process is straightforward. I use the command line and apt-get, so I opened /etc/apt/sources.list and changed all 'dapper' to 'edgy'. My new sources.list (with less comments for readability): Don't forget to change your area code (fr->de, for example). After that, I did a standard upgrade process: Because I usually work off-line and have to go somewhere else to connect my computer to the net, I had to interrupt the upgrade process during the upgrade. However, using sudo dpkg-reconfigure -a and sudo apt-get install -f I was able to fix everything.However, not everything went smoothly. Here's a list of bugs I had to fix: Eye candy: usplash too quietI prefer to see what's going on when my computer boots. Edgy automatically boots as quiet as possible. To change the splash screen to show the boot messages, change /boot/grub/menu.lst and delete occurrences of 'quiet' where necessary. Problem: KDM does not bootAfter switching to runlevel 2, I just got a black screen. Sometimes, if I fiddled around with the keys, I got to my tty1 and could switch to X with Alt-F7, which would sometimes spawn KDM. Sometimes I even had to log in and start KDM manually. I found that KDM starts a bit too early during the boot process, which probably causes the crash. I set KDM to boot as the last process. This doesn't exactly speed the boot process up, but at least it works. The easiest way is to just rename the link in /etc/rc2.d: I don't know if there's an Ubuntu tool to do this graphically. Problem: optimised kernel no longer available / modules missingThe linux-image scheme using linux-image-686 has been obsoleted. Instead, install linux-image-generic, that should do the rest. Check if any module-packages need to be upgraded manually. This definitely includes the vmware modules which I had to upgrade by hand, although the vmware-player-kernel-modules package should really take care of that, and I've heard there's problems with the restricted modules (nvidia and whatever). Install linux-restricted-modules-generic. However, there doesn't seem to be an automatic package configuration that lets me choose which kernel I want as standard. You have to change /boot/grub/menu.lst for that. Eye candy: konsole font doesn't work properlyMy favourite font for konsole (The KDE xterm) is Courier 10 Pitch. For some reason, some characters weren't displayed properly any more after the upgrade, including ~ (tilde) and € (euro), the former being used quite often in a shell. The only way I could change that (so far) is to switch to a different font, now it's Courier New set to bold. Tuesday, November 28. 2006GTK1 fonts
On my Ubuntu installation, I noticed applications using GTK1 (for me, the most important being XMMS) had really ugly fonts.
To change this, I had to change the /etc/gtk/gtkrc.utf-8. Here's my new one:
The commented lines are the original ones. Note that if you use other character codings than UTF-8, you have to change another file. The font descriptions strings are unix standard font description. These are adapted for my screen, so you might want to use other resolutions. To find the right string, xfontsel is the tool you want to use. If you're fiddling around with font descriptions the first time, I suggest starting with the following settings:weight = bold slant = r sWdth = normal ptSz = 120 or 100 (but not '*') Then, try changing fmly. I often use xlsfonts to check for specific fonts. xlsfonts | grep PATTERN is excellent for finding fonts.
Tuesday, October 24. 2006
Installing Windows 2000 in VMWare ... Posted by Martin
in Linux & Unix at
14:59
Comments (0) Trackbacks (0) Installing Windows 2000 in VMWare (Ubuntu)
Using Ubuntu Dapper Drake, that is.
1) Install vmplayer. If you are using a precompiled kernel package, all you have to do is this: Make sure the kernel modules correspond to the exact version of the kernel you are using! 2) Get files ready Create a directory for your VM and place the windows ISO inside (if you want to install from a CD, you do something else later on). For the actual vmware-files, you can either download the files here [win2kprovmwarefiles.tar.gz, 1.7kB] or create them by hand. To create the image file, run the following command: You might have to install qemu if you don't have it yet: Next, you need a vmx file. Create a file called win2kpro.vmx with the following content: This assumes that the windows ISO is called w2k.iso. If you want to install a different OS, make sure you modify the guestOS parameter accordingly. You probably also want to change the filenames to avoid confusion. If you're installing windows from a CD, ide1:0.deviceType needs to be set to cdrom-raw, fileName is 'auto detect'. 3) Install Windows Now all you have to do is boot your VM. As the image is empty, it will boot from the CD device - which is, in this case, the windows ISO. You will get a regular Windows installation routine, as you do when installing Windows onto a computer (but with faster reboots). 4) Install VMtools Trust me, you need this. I think the 100% legal way to do this is this: Get an evaluation version of the Workstation from vmware.com. Unpack it and get the file called windows.iso. According to something I read on vmware.com (sorry, can't find it right now) it is legal to keep the file after the 30 days trial period is over, and it might be legal to just copy the file from someone who's already got it, but don't ask me about that. Adjust the VMX file to point to the windows.iso instead of the installer ISO (just change the ide1:0.filename parameter)., start your VM and reboot it. When Windows has rebooted, autorun the CD; it should spawn a setup program to quickly install all the VM-tools. This includes a SVGA graphics driver, tools for network connections and a mouse driver that can automatically grab the input when the mouse is above the vmplayer windows (you don't have to click or press Ctrl+G anymore to grab input or Ctrl+Alt to release input). That's it, happy virtual machining. Thanks to http://johnbokma.com/mexit/2005/10/26/vmware-player-windows-xp.html and http://www.hackaday.com/2005/10/24/how-to-vmware-player-modification/ for most of the instructions and to ff for getting me started. Known Issues: VMWare for Linux seems to use OSS and can't access the sound device on my system if anything else is using the playback device. Just stopping playback and connecting the sound device works, though. Performance: I'm currently running a Pentium III 1GHz toshiba laptop, the performance isn't enough to do anything useful like playing windows games (even old ones). Tuesday, October 24. 2006Welcome
This is my new blog: technotes. I will use this to document technical stuff I'd like to document myself.
I will not try to write very eloquently or anything, so if you're not interested in the technical stuff here you won't want to read it. However, I chose this public plattform to help others having similar problems and hopefully receive comments.
« previous page
(Page 1 of 1, totaling 10 entries)
next page »
|
Calendar
QuicksearchCategoriesSyndicate This BlogBlog Administration |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||

