Mi blog lah! Το ιστολόγιό μου

22Jun/095

The bashrc bash configuration files

The default shell in most Linux distributions is the bash shell. Contrary to all the usability work that has been done to the GUI, the shell is most neglected area.

Current bashrc shell (shows prompt only)

Depicting a shell is not an easy task; in the screenshot above we only show the default prompt. It has the following disadvantages,

  1. It does not differentiate visually between the username and hostname.
  2. It shows the relative path only, making it difficult to realize quickly the full path for the current working directory.
  3. Cannot copy the path using the mouse by double-clicking on it. The ~ is not included in the highlighted text, that one needs to paste and add the remaining part of the path (such as /home/user/)
  4. The point of input changes position on the command line, depending on the size of the path. As you cd into directories, the point of input moves further to the right.

The bashrc project shell

This is the prompt with the bashrc project configuration files. It solves the problems described with the default configuration files found in Linux distributions.

Obviously, there are more to the shell’s configuration files than a usable prompt. For example,

  • the ability to show the partial matches when you press Tab for the first time
  • enabling the shopt options to reasonable values
  • have reasonable aliases for . .. … / -
  • adding –verbose, –interactive to basic utilities such as cp, mv, rm
  • show the exit value of an application if it is other than 0 ($?)

There is a EnhancedBash project for the Ubuntu Linux distribution which might be able to break apart and provide better default configuration files.

If you want to help and add more to the proposed configuration, visit http://github.com/simos/bashrc/

To use the bashrc shell, you need to

  1. Download the latest package from http://github.com/simos/bashrc/ (note the Download button).
  2. Extract the package, open a terminal window and enter the newly created directory.
  3. Run make install
  4. Open a new shell window. The new settings should be activated.
23Feb/0713

Video playback problems (black) after installing Beryl (or Compiz)

Note: Here we describe a workaround. The proper solution is to fix the graphics drivers and the X.Org X server. Such work is taking place, and for several cases you do not need this workaround. Especially with newer versions of Linux.

You just installed your 3D Linux desktop and you are really enthusiastic about it. But when you try to play some videos, you get a strange black output. What’s going on?
The common software video players that come with the Linux desktop are able to display the video stream to several types of output devices. This includes several types of output for the graphical interface, and also obscure output devices such as text mode, using ASCII characters.
The default output device is XVideo (or Xv) for players such as those based on GStreamer (totem) and VLC.
As you guessed, there is a bug with XVideo when using Beryl/Compiz. Therefore, to fix, you need to switch to another output device that works.
For GStreamer players (such as totem, the default movie player in GNOME, Ubuntu and so on), you need to run from the command line the command
gstreamer-properties
(with older distributions such as Ubuntu 6.06 there is an option in System/Preferences for this).
and pick
Video, then for Default Video Plugin choose X Window System (No Xv). Click on test to verify that it actually works. Click Close and you are set.
VLC is not installed by default in Ubuntu 6.10. You need to install manually using the Synaptic Package Manager (under System/Administration), once you have activated the Universe repository in Repositories.
Start VLC and click on Settings, then Preferences. Expand Video and then expand Output modules. You will notice several options for output device. How do we actually choose which one should be the active output device? Well, it appears it’s a bit tricky. Select the item Output modules, and notice the checkbox at the bottom right that says Advanced options. Check the box, and now you have the option to select a different output device. Pick X11 video output, click on Save and you are set!

Update (17 Jun 2007): Added section at UbuntuGuide.org, How do I fix black windows during video playback.

   

Switch to our mobile site