Specific Linux Problems and Solutions


I am not an expert on Linux. The only contribution I can make is to relate my experiences in the hope they will be useful to others. I will try below to document carefully specific solutions to the problems I encountered.

Problem: How to play DVDs and other media under Linux

Fedora 15

I don't remember for Fedora 15 a simple way to be able to play DVDs. I tried so many things I am not sure which one or combination of ones worked. I am sure, however, that the crucial thing was adding a number of rpmfusion repositories to the list of repositories checked. See immediately below what to download and I think things will work.

Fedora 16

For Fedora-16, first add the proper rpmfusion repositories to the list of repositories checked and then do "yum install libdvdread libdvdnav gstreamer-plugins-ugly gstreamer-plugins-bad".

DVDs still are not going to play unless you can decode the DVD-encoding scheme. The only library I know that does this is libdvdcss. I wasn't able to find a repository for libdvdcss, but I was able to download the source code for version 1.2.10 from Videolan. After unpacking the source code and "cd"-ing to the software's top directory, I executed the commands "./configure --prefix=/usr", "make", and finally "make install", and the software installed into /usr/lib.

The installation of libdvdcss proceeded very smoothly, but Totem, the movie player for Fedora-16, did not know to look for the library in /usr/lib. This problem was solved by adding the line "export LD_LIBRARY_PATH=/usr/bin" to my .bashrc file (.bashrc is executed when you login to a bash shell, as is the default with many linux distributions.


Problem: How to install plugins for 64-bit Firefox versions greater than 3

Fedora-16

By the time Fedora-16 was released with firefox 7, all that was needed to achievce plugin functionality was to do "yum install gnash gnash-plugin icedtea-web" and both flash and flv content played correctly. OpenJDK's java version 1.6.0 was installed along with icedtea-web. It seems to run Java version 1.6.0_22


Problem: How to install timeseal for use with xboard

Fedora-15

xboard works fine with Fedora 15. To install, become a superuser and type "yum install xboard". xboard for Linux doesn't come with timeseal, a program designed to overcome the problem of losing time on your clock due to connection lag. Pre-compiled versions of timeseal I found on the Internet all seemed to be working but when I used them with xboard and connected to the Free Internet Chess Server (FICS), I got the message "Connection closed by ICS" and was disconnected.

The solution was to download openseal.c from here. I then changed directory to the directory containing openseal.c and issued the command "gcc openseal.c -o openseal". Everything worked perfectly when I ran xboard with the command "xboard -ics -icshost freechess.org -icshelper path-to-openseal", where path-to-openseal is the location of the compiled openseal.


Problem: How to prevent Gnome 3 window tiling

Fedora-15

For some reason, in Gnome 3, it was judged desireable to have windows maximize when dragged to the upper edge of the screen. It took me a while to figure out how to inhibit this behavior. The solution is for the user (not superuser) to run gconf-editor and then look at the desktop->gnome->shell->windows variables and make sure edge_tiling is not checked. Exit gconf-editor, logout, and the next time you log in you won't see edge_tiling.

Fedora-16

Gconf-editor was not included by default in my installation so I first did "yum install gconf-editor".

Ubuntu-12.04

Do one of two equivalent things. From a command line (not as root) issue the command "gsettings set org.gnome.shell.overrides edge-tiling false" or launch dconf-editor and in the gui click down the tree until you make sure that the edge-tiling option is not checked.

Problem: How to prevent window perseverance when programming using gtk+

A brief article about window perserverance with GTK+ programming is here.


Problem: How to get rid of the error message "error while loading shared library: libname.so.0: cannot open shared object file"

Fedora-16

Prior to Fedora-16 and gcc-4.6, I simply put my shared libraries in a someplace sensible, like /usr/lib, and the system found them there. With Fedora-16, and Red Hat derived software in general, I am told, this no longer works. The reason is that Red Hat doesn't tell the linker to look in /usr/lib. So you have to tell it. There are two simple ways for the user to tell the system where to look. One is the file /etc/ld.so.conf and the other is the environmental variable LD_LIBRARY_PATH. You could edit the file /etc/ld.so.conf or issue the command "export LD_LIBRARY_PATH=/usr/lib" at login. Both these approaches will work. But if you, the user, change the shared-library search-path globally, every program on your system will be affected by that. While the mechanism exists for the user to effect these changes (only a super-user can edit /etc/ld.so.conf), that has been pointed out as a weakness (?vulnerability) in that inexperienced users can potentially affect how all programs run. If you realize as in my case that it was only the programs that I wrote and compiled which didn't know how to find my shared libraries, you realize there must be a way for the programmer to tell the program how to find the shared libraries. Actually, you want to give this information to the linker, ld, at compile time.

For a system that uses ELF for executable files, as Fedora and many others do, and if you are using GNU gcc, you can tell the linker where to find the run-time libraries by using the linker's -R option. gcc can pass the arguments to the linker using it's -Wl option. The format is "gcc -Wl,-R directory1 -Wl,-R directory2 etc..." which tells the dynamic linker to first look in directory1 and then directory2 for the executable shared libraries. Clearly either directory1 or directory2, if included, should be /usr/lib, since that is where most of the system's shared libraries are.

Having given you the reason why not to use "export LD_LIBRARY_PATH=/usr/lib" at login, I found that totem would not know to look for libdvdcss in /usr/lib unless LD_LIBRARY_PATH was thus defined. This meant that Totem would not play DVDs, unless I set LD_LIBRARY_PATH appropriately.


Problem: How to get emacs to make a sound on error

Fedora-16 and Ubuntu-12.04

You can find dozens of Internet references on how to silence the sound-on-error feature of emacs. My problem was that the last few times I installed emacs there was absolutely no auditory response when errors were encountered. I finally found a reference in the EmacsWiki which suggested that could be fixed by adding the following line to my ".emacs" init file.

(setq ring-bell-function (lambda() (call-process "play" nil 0 nil "/usr/share/sounds/freedesktop/stereo/bell.oga" )))

This is clearly quite complicated and I won't explain it all. I won't explain usage of the emacs lisp functions call-process and lambda(). The word "play" is the command on my system that plays audio files. If you don't have this, install the "sox" package with the command "sudo yum install sox" or "sudo apt-get install sox". After that the "play" command was found in /usr/bin. I then searched through my system for a suitable sound until I found
"/usr/share/sounds/freedesktop/stereo/bell.oga". Sounds of course, can have many other extensions as well.


Problem: How to prevent shifting of input location for keyboard strokes

Fedora-16

The problem is that while using gedit or some other text/screen editor, you will be typing text to a certain point within a document and suddenly that point will shift. The problem is caused, on my laptop, by inadvertently touching the touchpad while typing. What you want to do is inhibit the touchpad during keyboard entry. This is exactly what is done by the program syndaemon which can, as the name implies, run as a daemon. The solution is to run (not as superuser) the very useful program gnome-session-properties, which determines which programs run during a GNOME session, and click on the "Add" button to add another program to be initiated at session startup. You want to arrange for the command "syndaemon -R -k -d" to be executed at startup.

This was not sufficient for my Dell Inspiron, which has a Alps rather than a Synaptics touchpad. The problem is that the kernel does not recognize the Alps touchpad and instead considers it a generic PS/2 mouse. This problem has persisted through at least versions 2.6 to 3.3.4 of the kernel, at least for my Dell Inspiron 15n. I tried modifying the kernel, but didn't not know enough about drivers to succeed in solving the problem.


Problem: How to create a custom kernel?

Fedora-16

The information here largely follows that described at HowOpenSource. The first step is to download the kernel source from www.kernel.org. Uncompress it to a location other than /usr/src/kernels/, which should be left for the system kernels. The next step is to read the README file in the top directory to learn how to create a ".config" file. Once you have generated a .config file for your kernel, simply type "make" to compile it and "make modules_install install" to install.


Problem: How To Run Gnome3 Shell in Ubuntu-12.04?

Ubuntu-12.04

As you probably know, Ubuntu, in recent years, has focused away from GNOME as a desktop GUI and has developed an newer alternative called Unity. The version of Gnome that many older distibutions including Ubuntu used, Gnome2, is no longer supported. Gnome3, billed as a replacement for Gnome2, has been soundly criticized, as has Unity. For those of you who actually prefer Gnome3, as I do, and also like Ubuntu's ease of use and reliability, the following directions for using the GNOME3 gnome-shell interface under Ubuntu, should be quite useful. Since the use of Gnome3 with Ubuntu is not currently supported, it is important to follow the directions carefully, so you can confidently ignore the warnings that may arise as you proceed. The first step is to install, Ubuntu-12.04, although I think these directions also work with 11.10. The next and final step is to follow exactly the procedure given by Fili Wiese.

After following the Wiese directions for installing gnome-shell and then rebooting, she tells you to click on a "little Ubuntu icon next to your name". I would emphasize that the icon is indeed little, easy to overlook, and is just to the right of your name in the login screen. After you login to one of the Gnome options the little icon changes to a Gnome icon. Ubuntu login seems to remember your last choice and doesn't change it if you avoid clicking the icon at the next login. Clicking the icon, as she describes, gives you five options for a GUI, including the current default Unity GUI. I have usually chosen the Gnome3 option, and so far have not had any problems. I have not tried using Gnome3-Extensions, which allegedly also are available. One final point; adding the gnome3-team repository as described in the article, allows you also to install Gtk+-3.0.

CONCLUSION: GNOME3-SHELL SEEMS TO RUN PERFECTLY WELL UNDER UBUNTY-12.04.


Problem: How To Use Ibus in Ubuntu-12.04?

Ubuntu-12.04

There are two answers to this question depending upon when you last upgraded your system.

Answer A. Currently upgraded 12.04:

Currently, using ibus is very easy. Open "Keyboard Layout" under "System Settings" and go to the "Layouts" tab, and click "+". This pops up a choice of languages, which you may select and then click "Add". After doing this, I had a two-letter code ("en" for English or "he" for Hebrew) appearing in the upper toolbar, and I could change the input method by clicking on the two-letter code with the mouse. If you want to change the input method with the keyboard rather than the mouse, the "Keyboard Layout" page has an options button, which you can click and then select an option for "Key(s) to change layout".

Answer B. Original 12.04 installation:

This was a mess: I would recommend you upgrade and then follow the directions above. If for some reason you cannot, or don't want to, perhaps my experience detailed below can help you.

As Ubuntu-12.04 installed on my two laptops, a Dell Inspiron 15n and a HP Compaq Presario, ibus did not seem to work at all and it was not possible to use the Language Support icon to install any languages other than Chinese. As suggested here, the solution is to install ibus-m17n by issuing, at a terminal console, the command "sudo apt-get install ibus-m17n".

After installing ibus-m17n, I clicked on "Language Support" under "System Settings" and was able to add a number of input methods from those supported by ibus-m17n.

Despite the seeming inability to control the input method with the mouse, there were two mouse actions to which Ubuntu ibus always responded. 1) left-clicking on the ibus icon and choosing "About" revealed I was using Ibus-1.4.1. Left-clicking the ibus icon and choosing "Preferences" also worked.

I then proceeded to try to use ibus in a gnome-terminal, a gedit window and an emacs-23 window. I wouldn't swear to it, but I believe the results were the same regardless of whether I did the testing in a Unity or Gnome shell (see above).

On May 15, 2012, the following worked more often than not: Start by left-clicking the mouse in the window you want to control. Then, enter at the keypad, cntl-space (the control button and space bar simultaneosly) followed by alt-shift-L. This should change the ibus icon to the icon of the selected input method, which you should be able to change once with a mouse. To go back to your main choice, enter cntl-space to end the ibus session.

By May 17, 2012, this had changed slightly. Hitting cntl-space set the input method to my main language, English, and hitting alt-shift, in that order, switched it to my second language, Hebrew.





Emmes Technologies
Updated May 18, 2012

valid html 4.01!