Answers 91

From LXF Wiki

Answers 91

<title>Devil of a job</title>

<question>Please help me! I have a problem. My motherboard is an ASUS P4S800D with an SIS655FX chipset. I have two hard disks: the first, an IDE disk, with OpenSUSE 10.2, the second, a SATA disk with Windows. The installer of SUSE 10.2 detects only the IDE disk. How can I set up and mount the SATA disk in OpenSUSE 10.2? On the official site of SIS I find a driver, but I get a make error because it can't find scsi_request.h. Is this being caused by a problem in the kernel? </question>

<answer>SATA does still continue to be a problem for many people. In our experience, the easiest way to fix the problem is to switch the drives into compatibility mode using your BIOS, then complete the installation and try switching it back. Many distros struggle to get installed on normal SATA drives, but then work just fine once they're installed ­ particularly after you've installed all the latest patches. You should also check to make sure you're not using software RAID, because that can also cause problems. As a last resort, try adding insmod=ide-generic to the installation boot options box. Good luck! </answer>

<title>Video slide shows</title>

<question>I would like to make video CDs of some of my photos. At the moment I just want to get the photos on to video CD so that they can be played on a simple DVD player and TV. Later, I will want to add a soundtrack. It appears that there are various tools out there, but I haven't found a clear description of how to perform this simple task. Using FFmpeg, for example, I can create a movie from my JPEG files that takes about 0.4 of a second to run. I'd like to be able to show each frame for three seconds (for example) but can't find a way to add a delay between frames. Convert looks promising, but I just get errors about mpeg2encode with it. I'm using Ubuntu Dapper. Thanks in advance for any pointers. </question>

<answer>DVD would be better than video CD. Not only can you fit a lot more photos on one disc, but the quality is much higher. The main part of the process is much the same whether you're making DVDs or video CDs, although most of the tools are set up for DVD creation, so will need some tweaking to create video CDs. The most straightforward way to put a slide show on to a disc is to use the slide show plugin in DigiKam or KPhotoAlbum (both programs use the same plugin) to create a DVD slide show from an album or selected photos. These are quite limited, as you can only adjust the length of time that an image appears for and the length of its fade ­ and these have to be the same for all images. If you want more control, DVD-Slideshow (its homepage is at is a better choice. This is a set of scripts to generate DVDs from images and sound. The main script, dvd-slideshow, uses a text file listing all images and effects to create a DVD VOB file. Use dir2slideshow to generate a DVD-Slideshow input file, which you can pass directly to dvd-slideshow or edit to change the timings or effects. Then use dvd-slideshow to create the slideshow and add music. You can use MPlayer to view the resulting VOB file to check it before putting it on to a disc. Finally, dvd-menu will create (no surprises here) a DVD menu for one or more slide shows, and you have the option of calling dvdauthor to write everything to an ISO image ready for writing to a DVD. Assuming you have a directory called pics that you want to make into a slide show, the commands are as follows:

 mkdir slideshow
 dir2slideshow -o slideshow -t 5 -c 1 -n
 myslideshow pics
 # edit myslideshow.txt if you want to change
 timings or efects
 dvd-slideshow -a somemusic.ogg myslideshow.txt
 dvd-menu -t "My slide show" -f myslideshow.xml

This creates a slide show with each image shown for five seconds with a one- second fade, and writes it to an ISO file ready for burning to a DVD. It is also possible to generate a DVD with a single slide show that plays immediately, without going through a menu. The programs default to NTSC output; for a PAL DVD you should add the -p option to each command or put


in ~/.dvd-slideshowrc. If you want to create a video CD-compatible MPEG, you can use FFmpeg to transcode the VOB file that you created with dvd-slideshow, like this:

ffmpeg -target pal-vcd -i dvdslide.vob vcdslide.mpg


<title>The missing link</title>

<question>I need to link one directory to another so that if a program asks for directory x, it is shown directory y instead. I've tried ln with various options, but it just keeps creating the link inside the target directory. The reason for doing this is that I've just updated from 2.0 to OOo 2.1, which has created a new directory called /opt/openoffice.org2.1. When I click on a text document or spreadsheet in KDE it tries to look inside /opt/openoffice.org2.0, which no longer exists. If I cd into /opt and do

ln -s openoffice.org2.0 openoffice.org2.1

it creates the 2.0 symlink to within the 2.1 directory. I've tried everything but just cannot get it to work! </question>

<answer>There are two problems with the way you are using ln. The first is that the syntax is `ln -s source destination' This one got me too: for some time I had to think twice, having first used links on an OS that used the opposite order. The arguments should go in the same order as they do when you're using cp and mv : I find that helps me remember. The other problem is that if the destination given is an existing directory, ln thinks that you want to create the link inside that directory. This is also consistent with cp and mv, which copy or move into a directory if it is given as the destination. Remove the destination directory and ln will create the link as you need.

ln -s openoffice.org2.1 /opt/openoffice.org2.0

Note that with symlinks, the source is given relative to the destination, so even though this command is not executed in the /opt directory ­and therefore no file or directory called OpenOffice.org2.1 exists ­ the ln command will still work. Alternatively, you could go into the file associations section of the KDE Control Centre and fix it to call the ooffice2 programs with the correct path. </answer>

<title>How many is too many?</title>

<question>I'm running Ubuntu 6.10 64-bit on AMD64 and I do a ton of audio encoding. I set up a small test to see what was more effective: encoding four directories worth of FLAC files (four files to each directory, all the same size) to OGG in serial or in parallel. I wrote two Bash scripts to attempt to measure the performance. The first script takes around nine minutes to execute (just over two minutes per directory) while the second script also takes roughly nine minutes, even though each folder contains nine minutes' worth of encoding. I'm sure that there's a point at which running all of the tasks in parallel runs slower than running them one at a time. Watching the output from top shows four instances of flac running, each taking approximately 20% of the CPU's capacity when running in parallel. While running in serial, a single flac process uses much more CPU power.

   Are there any benchmarks or guidelines to follow? Without further testing I'm left wondering whether I could be saving a lot of my time one way or the other when I need to encode tons of files.


<answer>There is some overhead in running tasks in parallel, because of the extra task switching and memory management involved, but this is insignificant for small numbers of tasks. Had you tried to run 20 or 30 encoding processes in parallel you would have noticed a reduction in speed, especially if you started to use swap space. Encoding files from hard disk to hard disk places a heavy load on the CPU and memory while demanding little of your disks ­ this is what the techies call a `compute-bound' or `CPU-bound' task. On the other hand, ripping data from a CD or DVD is largely dependent on the speed of the transfer while asking little of the CPU ­ this is called `IO bound' So running two CPU-bound, or two IO-bound, processes in parallel is likely to have little benefit over running them in serial, but running one of each in parallel will give a large speed benefit. If the audio that you're encoding is coming from optical discs, or any other source that gives relatively slow transfer speeds, you will see a great improvement in parallelling the processes, as in the following:

 Rip track 1
 Encode track 1 in the background
 Rip track 2

There are a number of CD ripper/encoders that do just this, including my favourites: Grip ( for GUI operation; and Abcde ( for console use. If your audio files are already on your hard disk, you may as well keep the number of encoding processes low, but be sure to use at least two ­ a single process will always be subject to interruption. The only really useful benchmark is one that closely mirrors your own usage, which normally means running your own tasks and timing them, as you have already done. Bear in mind that your encoding will take place in the background, so unless you do a huge amount, or each job is urgent, you could easily spend more time on benchmarking than you would save by improving your machine's performance. You have already established that there is little discernible difference for a small number of processes. Higher numbers will not improve things ­ unless you're running multiple multi-core processors. </answer>

<title>Missing GUI</title>

<question>I have a stable Linux system that runs my desktop and small home/office LAN. I keep a few spare partitions on my hard disk to try out new distros, and from curiosity I installed Fedora Core 6 [coverdisc, LXF88]. The main challenge I always have to overcome in such experiments is getting my PCI wireless card to work. It uses the rather infamous Broadcom BCM4318 chipset and is not all Linux-friendly. Following tips and advice I used the following three steps to activate the card. First, I installed the drivers using NdisWrapper. Second, I disabled the BCM43xx Fedora driver. Third, following instructions on SourceForge, I tweaked two network files [Modprobe.conf and icfg-eth0]. All of that enabled my eth0 interface to work like wlan0 in other distros. The card starts from the command line like so:

/etc/init.d/network restart

To finish the job I activated network manager from the system menu on the KDE desktop. I brought up the network configuration box to do a few last tweaks, but it was empty. It shows no NIC interface of any kind and yet the whole system is running perfectly. I can surf in technicolour and multimedia splendour on broadband. How do I get the GUI controls to reflect what has already been done in the murky depths of the system using the command line? </question>

<answer>Although you have taken a somewhat unorthodox route to enable your wireless networking, it works ­ well done! Did you set up the NdisWrapper alias by using these commands as root?

ndiswrapper -ma
echo "alias wlan0 ndiswrapper" >> /etc/modprobe.conf

Most importantly, after doing all that, did you use the Fedora system-config -network tool to create a new network interface for the device? If you've done all that and Network Manager still isn't working, you could try starting it at boot time like this (again, as root user):

chkconfig NetworkManager on
chkconfig NetworkManagerDispatcher on

Network Manager is actually quite a new tool, and is under constant development. You may find your problems just disappear in Fedora 7, which should be out in April. </answer>

<title>Make it bigger!</title>

<question>I've just installed Fedora Core 6. How do I make the font size larger on the desktop/system. </question>

<answer>Ah! An easy question. I like easy questions. The font size in Fedora is set in the System > Administration menu, under the Fonts menu item. When the Fonts Preferences box appears, click on Details in the bottom-right corner, then look for the resolution in the top-left corner of the new window. Increasing that number makes fonts bigger, and will also make buttons, windows, menus and other things larger so that the fonts fit properly. Be sure to write down the original resolution, though, just in case you want to get back to it in the future. </answer>

<title>How full is your MAC?</title>

<question>I have recently installed Fedora Core 6 in dual-boot mode on my HP Pavilion t3065 (Intel Pentium 4 3.4GHz with 1GB of RAM) from the Fedora Linux Format Special. All went well until I tried to connect to my Belkin wireless G modem (802.11g ­ model F5D7632uk ver 1000), and it was only after much head scratching and searching on the internet that I discovered I needed a wireless driver. Having interrogated my network controller, I found that my chipset is as follows :

 Intersil Corporation ISL3890 [Prism GT/Prism Duette] / ISL3886 [Prism Javelin/Prism Xbow] (rev 01).
 Subsystem: Accton Technology Corporation WN4201B.
 Flags: bus master, medium devsel, latency 64, IRQ169.
 Memory at cfffc000 (32 bit, non-prefetchable) Size 8k.
 Capabilities: (dc) Power management version 1.

Having had a look at various sources on the web on the subject of connectivity with this chipset (including, I am now confused. Do I need a FullMAC driver or an Islsm driver? The listed drivers cover one or the other ISL variant but not both together! This begs the question: does it matter which one I choose? Assuming that I can get Linux to talk to my wireless modem, does Fedora or any other distro support WPA-PSK security, or is 128-bit encryption the best that is on offer for now? How would I go about implementing WPA-PSK on my PC? </question>

<answer>A few years ago, Prism released a new version of its chipset that offloaded some of the work to the host computer (in other words, it was a cheaper, half-complete design rather like a Winmodem). This became known as the SoftMAC design, and it broke compatibility with the Prism54 drivers until the Islsm drivers were developed. The Islsm driver works with both SoftMAC and the original FullMAC chips. The FullMAC driver works better with FullMAC devices, but not at all with SoftMAC ones. Unfortunately, it is difficult to tell which you have ­ the ISL3890 works with the FullMAC driver but the ISL3886 needs Islsm. The FullMAC driver is built into the standard kernel for Fedora Core 6; you only need to install the firmware file, which can be downloaded from You can test it by opening a terminal and typing


(give root password when asked)

modprobe prism54
lsmod | grep prism54

If the final command gives an output, the driver is present and loaded ­ so try to connect to your modem. You should disable all encryption (WEP and WPA) while testing at first ­ get the connection working then sort out the encryption (until it works you have nothing to encrypt anyway). If the Prism54 driver fails to connect, try the Islsm driver. This also needs a firmware file, but a different one, which you can get from Comprehensive installation instructions are included in the package. WPA-PSK encryption is available for Linux, in the form of wpa_supplicant ( Fedora Core includes packages for this ­ you need to install wpa_supplicant and wpa_supplicant-gui. Only the first is essential, but the second provides a GUI for configuration, which saves reading and editing configuration files. </answer>

<title>Nvidia strain</title>

<question>I have an AMD64 3000+ CPU, with 1GB of RAM, an Nvidia GeForce PCI-express graphics card and a 320GB SATA HDD. When I install Fedora Core 6, everything seems to go well until it gets to `starting udev [OK]', then the screen goes black. After that, the hard drive seems to continue working, but I can't see anything on the screen, which then delivers this message: `Mode not supported'. I thought at first it might be the graphics card, but I then installed Elive 0.5, and everything there works. I tried removing the card and using the VIA in-built card, nothing; used a different screen (on the off-chance), nothing. I tried to boot in all of the options given at the Fedora screen by pressing `e' but nothing worked. I tried to force the screen resolution (linux resolution=1024x768) and I tried using linux noprobe. The only other error messages that might have some bearing that I can see are: `PCI: BIOS Bug: MCFG area at e0000000 is not E820-reserved' and `PCI:Not using MMCONFIG' I don't know if that has anything to do with it, as they don't hinder Elive from working. Can you help me get Fedora to work? </question>

<answer>It sounds to me as though Fedora is trying to use its internal Nvidia driver, and it's struggling to cope with your screen resolution. The quick fix for this problem is to switch over to the VESA driver, which ought to work on pretty much any graphics configuration. If you open up the file /etc/X11/xorg.conf as root, look for this line:

Driver "nv"

Change that to read vesa rather than nv, then reboot. That should at least give you a working Fedora system. Now, if you find that VESA isn't good enough for your day-to-day work, or if you want to try AIGLX or any 3D games, your best bet is to install the official Nvidia driver from This is a great deal more stable than the driver that comes with Fedora, and should solve your problem. </answer>

<title>Missing tools</title>

<question>I need help with post-installation configuration of Evolution mail on my Ubuntu system. My home computer runs a dual-boot system with Windows XP on one partition and Ubuntu Linux on the other. I have an Ethernet connection to a broadband hub. Mozilla works beautifully under the Ubuntu OS indeed, I have successfully used it for upgrades, Google searches etc. So Ubuntu has excellent internet access. Evolution mail, however, needs to be configured properly. An old issue of Linux Format describes a configuration wizard but I have been unable to invoke it. A Google search about Evolution gave a hit that revealed a document about setting up Evolution. At first that seemed to be very helpful but it required the use of the Tools menu on the menu bar of Evolution ­ which my version of Evolution does not have. How can I configure my Evolution without a Tools menu? </question>

<answer>As you have not stated which versions of Evolution and Ubuntu you are using, I am going to assume you are using the latest Evolution, version 2.6. Now, Evolution 2.0 has the Tools link in the menu bar, but Evolution 2.4 and 2.6 don't have it. The first time you start Evolution, you should see the First-Run Assistant. In your case, it seems that didn't work and Evolution has hidden the option from you now. To invoke First-Run Assistant, you should delete the folder .evolution (note the dot) in your home directory then type evolution from the command line. This will make Evolution think it is running for the first time and it will show the First-Run Assistant, which you can then use to configure the software. If you don't want to take the command line option, just click on Edit > Preferences, then Mail Accounts > Add to create a new mail account. </answer>

<title>DeLi Linux install problem</title>

<question>It was good to see DeLi Linux included on the coverdisc [LXF86], as I have a 486 PC that I thought would be good to learn on. Burning the CD and the boot floppy went well, as did the install until a pane appeared asking `Where is delibase.tgz?' Part of the pane states `I can scan for CD-Rom drives. Should I try to do so?'. Clicking on Yes gives another pane asking me to `Enter the device which contains the DeLi Linux Base Package delibase.tgz'No matter what I put in there I get the message `ERROR! Failed to mount the source device. Exiting ...' and that's it. I had copied that file to C:\, because that was one of the locations stated in the original pane `Where is... etc' ­ however, when I try to enter C:\ I can only get C:#. </question>

<answer>It appears that your installer was unable to detect your CD drive. This is possible if it is not a standard ATAPI IDE device. The fact that you needed to create a boot disk indicates that this may be the case. Your inability to type `C:\' is almost certainly caused by an incorrect keymap, which maps symbols differently to your keyboard. The \ character is there, but you'd have to keep pressing keys until you found the right one. This is similar to the problems I have finding # and @ when I boot a Live CD that insists on using a US keymap with my UK keyboard. You can usually avoid playing hunt the key by choosing the correct keyboard earlier in the installation, or you'll experience the same problem when you try to use DeLi Linux. Good luck with DeLi Linux: running anything on a 486 is going to seem like hard work. You may also like to try out Damn Small Linux ­ this is another distro designed to be lightweight, and you'll find it on the coverdisc of LXF89. </answer>

<title>Controlling users</title>

<question>Is there a way to restrict the number of processes that any one user is allowed to run while using their shell? I am using Ubuntu Dapper. </question>

<answer>There are two slightly different ways of doing this depending on whether your system uses PAM (Pluggable Authentication Modules). Ubuntu uses PAM by default, so you set limits in /etc/security/limits.conf. To limit user Fred to ten processes, add a line like this:

 fred hard nproc 10

For systems not using PAM, the limits are set in /etc/limits, and the same restriction needs:

 fred U10

In either case, you can use * as a username, to limit everyone but the root user. The limits set in these files are per login (rather than an overall limit for each user), but remember that a login for a graphical desktop may require several processes. A terminal window opened from this desktop is not, by default, a separate login, so set the limit to something reasonable to avoid crippling the desktop. To get an idea of the number of processes that a user runs with a standard startup, run

 sudo ps -u fred | wc -l

The PAM example includes the hard option, because PAM sets two types of limit, hard and soft. Hard limits are immutable ­ only the superuser can change them ­ but a user can increase a setting above the soft limit up to the hard limit with the ulimit command (consider the soft limit a default and the hard limit an absolute maximum). You can set them both to the same value by using `-' as the second item in the /etc/security/limits.conf line. You are not limited to restricting the number of processes; you can also limit RAM or CPU usage. See the man pages for limits.conf and ulimit for (much) more information. </answer>

<title>Scanning and cheating</title>

<question>Although SUSE 10.2 recognises my HP 3210 all-in-one Photosmart printer and prints OK, it does not recognise the copier bit. The only distro that does so is Ubuntu, but I prefer SUSE because it is more stable on my machine. On an unrelated note, Tomboy is great, but the SUSE 10.2 version fails because of an Alt/F12 error as usual. I closed it down but now when I try to restart it I am told it is running. I deleted it via Yast but it is still there. I loaded the latest version from the Tomboy site but it needs so many other bits that I gave up. I am keen to use it but despair of getting it to work. </question>

<answer>The scanning/copying side of things will be handled by SANE. One way to get it working in SUSE is to boot into Ubuntu and check which driver it is using with

 scanimage --list-devices

This will show the driver before the device name. For example, my scanner uses the Genesys driver and shows:

    `device `genesys:libusb:005:003' is a Canon LiDE 60 flatbed scanner'   .

Once you have established which driver you're going to use you're halfway there, but you could cheat on the other half by copying the configuration files (which are usually found in /etc/sane.d) from Ubuntu to SUSE. I don't know what you mean by the Alt/F12 error. I use Tomboy a lot and have never had Alt+F12 do anything but pop up the menu as it is supposed to. It is possible that something else is also trying to act on this key combination, but it is simple to change the Menu hotkey to anything you like in the Tomboy preferences. When a program fails to start or otherwise gives problems, the first step is to run it from a terminal instead of the menu. This won't immediately solve the problem, but it usually gives more information about what went wrong. It sounds as though Tomboy is still running in the background. You can test this by typing

 ps -ax | grep -i tomboy

in a terminal. This will show up any processes with `tomboy' in the name. The leftmost item in the output is the process ID (PID), which you can use to kill the process with

 kill nnnn

where nnnn is the PID. Now you can be sure that the program has been terminated, and it should now start up as expected. </answer>

<title>Let go of my port!</title>

<question>I have only one serial port on my motherboard; I also have a Psion 5 and a Garmin Geko 201, both with serial connections. It seems that the programs associated with the Psion run in the background even if the Psion is not connected, and prevent the Garmin (and software, including GPSman) from accessing the serial port. Under Linux (Kubuntu Edgy) the top command doesn't bring up any Psion-related apps that I recognise, and neither does ps -aux. Could you tell me which processes might be hogging the port while KPsion is installed, and how to shut them down without removing the KPsion packages? If all else fails I suppose I could just buy a PCI serial card! </question>

<answer>Remember the Unix mantra `everything is a file'? Well it works here, because your serial port can be treated as a file and the lsof command lists open files. With no arguments, it lists all open files on your system, and you'll probably be surprised how many there are on a running Linux system (over 7,000 as I type this). You can narrow things down by specifying the name of the file; in your case, this is probably /dev/ttyS0, the first serial port. Take a look at the following code:

sudo lsof /dev/ttyS0
belkin 9758 nut 4u CHR 4,64                 5134 /dev/ttyS0

This example shows that my serial port is used by the monitoring software for my UPS. In your case it will show the program that has a lock on the port, preventing anything else from using it, which is probably something to do with KPsion. It is possible that the program is using a symlink to /dev/ttyS0, such as /dev/modem or /dev/psion. You can see what links to /dev/ttyS0 with

 ls -l /dev/ | grep ttyS0

Try running the links through lsof too. It is also worth checking to see just what is being run automatically when you boot. The Ubuntu variants, like most Debian derivatives, use runlevel 2 by default, so

 ls -1 /etc/rc2.d

will show which programs are being started. If you want to add a serial port, the cheapest (and often easiest) way is to buy a USB-to-serial adaptor. These are available on eBay for a few pounds and generally `just work' when you plug them in. Some even advertise Linux compatibility on eBay no less! </answer>