Ubuntu Oneiric Tips
Tips & Tricks
You can run any application in your path using the Run Command. Use Alt+F2.
Turn off Hot Keys
This is the most evil option on any operating system, in my opinion. A mis-stroke enables any number of random events. Unfortunately, this problem is pervasive in operating systems and is difficult to turn off.
- Menu -> System -> Administration-> Advanced -> Input Actions -> General Settings -> check "Disable KHotKeys daemon"
- Menu -> System -> Administration-> Advanced -> Input Actions -> Gestures Settings -> check "Disable mouse gestures globally"
If you wish to be selective about it (this doesn't often work, however), start by disabling unnecessary desktop hotkeys.
- Menu -> System -> Administration-> Advanced -> Keyboard & Mouse -> Keyboard Shortcuts
Also, you may want to deactivate linking gestures to sticky and slow keys:
- Menu -> System -> Administration -> Accessibility -> Activation Gestures -> uncheck "Use gestures for activating sticky keys and slow keys"
Note: You probably will have to disable hotkeys in many applications, as well.
- Hotkeys from the Synaptics Touchpad can be selectively turned off using this information from the Ubuntu documentation.
Associate default applications
- To assign the default DVD player (make sure you have enabled DVD playback capability first:
- Menu -> System -> Administration-> Advanced -> File Associations -> x-content -> video-dvd -> Applications Preference order -> Add...
- then choose your favourite media player. There are similar options for Blu-Ray (video-bluray) and HD DVD (video-hddvd). Set each individually.
- To assign the default player for playing mpegs (or other video formats):
- Menu -> System -> Administration-> Advanced -> File Associations -> video -> mpeg -> Applications Preference order -> Add...
- then choose your favourite media player. You can do this for a host of video file formats, including .wmv (x-ms-wmv, or Microsoft WMV format), .flv (x-flv, or Flash video), quicktime, and so on.
- To assign .pls audio streams to play through Audacious:
- Menu -> System -> Administration-> Advanced -> File Associations -> audio -> x-scpls -> Applications Preference order -> Move Audacious to the top (or Add... it).
- Make sure *.pls appears in the Filename Patterns section.
Automatic user login
- To accomplish this (yet still require a user password):
- Menu -> System -> System Settings -> Login Manager -> Convenience -> Enable Auto-Login (ticked) -> Lock session (ticked)
- -> Pre-select user: Specified: Choose primary user
- This ought to be combined with a password-protected screensaver.
Autostart a program at bootup
Any program (or script) can be made to Autostart at bootup by creating a symbolic link to that program (or script) in the ~/.config/autostart folder.
For example, to start Firefox at bootup, create a symbolic link:
sudo ln -s /usr/bin/firefox ~/.config/autostart
Choose Bootup/Startup services
Preventing unneeded or unwanted services from loading at startup can improve system performance.
- Install the GTK-based Bootup-Manager:
sudo apt-get install bum
- Run Bootup-Manager:
- Menu -> System -> Bootup-Manager
Run a script from a menu item
It is possible to place a short script in a menu item / shortcut to answer an interactive query (such as a password query). Here is an example that is used to enter a password during an SSH negotiation. First, install the utility expect:
sudo apt-get install expect
The use a command in the Menu Item / Shortcut similar to:
expect -c 'spawn ssh -l sshuser -L 5900:127.0.0.1:5900 remoteserver.remotedomain.org -p 22 ; expect assword ; send "sshpassword\n" ; interact'
In this example the password sshpassword is returned when the ssh program requires a password. Expect waits for some text to be displayed in the command-line terminal then returns text in return. The Menu Item must be "Run in terminal", therefore.
SHC (Encrypt scripts)
sudo add-apt-repository 'http://archive.debian.org/debian etch main'
then install the shc package:
sudo apt-get install shc
Capture a screenshot
See this tutorial.
Customize desktop to look like KDE
In recent versions of Ubuntu, the Gnome desktop can be made to resemble the cleaner KDE desktop with some customization. (Customizations are highly personal, and this section represents preference only.)
Run a KDE 4 desktop from Ubuntu
It is possible to install the KDE4-based desktop (the default in Kubuntu) in Ubuntu.
apt-get install kubuntu-desktop
There is a risk of software bloat and some incompatibilities between modules when doing this. At login, you can choose (as an option) whether to start the KDE (Kubuntu) desktop or the Gnome (Ubuntu) desktop. Nevertheless, when there are two modules trying to perform the same function (one from each desktop), it is possible to have conflicts.
Run a KDE 3 desktop from Ubuntu
You can also install the older KDE 3 desktop on Lucid, or almost any KDE3 application.
- Add the following KDE 3 repositories:
sudo add-apt-repository ppa:kde3-maintainers
- Install KDE 3.5 desktop:
sudo apt-get update sudo apt-get install kubuntu-desktop-kde3
- To install any KDE3 app, append "-kde3" suffix to package name. See Pearson Computing for additional details.
Kill (end) a process
- There are many tricks to try to fix a frozen PC. Press Alt+F2, and use killall to end the frozen application. Example:
sudo killall amarok sudo killall firefox
- In order to terminate a stuck graphical application use the xkill utility. Press Alt+F2, type xkill, and press Run. Point the cursor to the application you want to kill and press the left mouse button. This should kill the selected application.
- Another trick to try is pressing AltGr+SysRq+K (RightAlt+PrintScreen+K). This will log you out. But, what happens if this does not work? Try pressing Ctrl+Alt+F1,login, enter your password and run:
sudo killall gdm sudo startx
View hidden files
In the Nautilus file manager, press:
Mute notifications (alerts)
- Notifications (alerts) can be disabled:
- Menu -> System -> Preferences -> Sound -> Sound Effects -> Sound theme: -> No sounds -> Close
- GNOME notifications (alerts) are associated with sounds by default. This can also be disabled separately:
- Alt-F2 -> gconf-editor -> /apps/indicator-sound -> volume_mute (ticked)
- Turn off login notification sound:
- Menu -> System -> Preferences -> Startup Applications -> Startup Programs -> GNOME Login Sound (unticked) -> Close
- -> Menu -> System -> Administration -> Login Screen -> Unlock -> Play login sound (unticked) -> Close
Random password generator
- Pwgen is a command line utility to generate a block of random passwords. Run it from Konsole (in Kubuntu) or Terminal (in Ubuntu). Install:
sudo apt-get install pwgen
- Run pwgen:
- UUIDgen is a default utility to generate a random UUID. Run:
The random UUID can also be used as a password, if desired.
Password checker and enforcement
John the Ripper is a free open source password cracker that uses a dictionary of over 4 million commonly used passwords in many languages. Because this tool this widely available, it is useful for scanning and securing your own LAN and computers for password strength. Install:
sudo apt-get install john
- Passwdqc is a module to enforce password strength. Install:
sudo apt-get install passwdqc
To check the MD5 sum of a file, use this command in the command line:
Filenames with spaces
- Filenames or folder names with spaces in them should be enclosed with parentheses (" "). For example, to change to a directory named "This Dir" or "/home/This Dir", use the command:
cd "This Dir"
cd /home/"This Dir"
- Alternatively, a space in a filename or folder name can be preceded with a backslash. For example, to change to a directory named "This Dir" or "/home/This Dir":
cd This\ Dir
cd /home/This\ Dir
Alien is a method for converting (Red Hat) .rpm packages into (Debian) .deb packages. It is not reliable and converted packages must be tested extensively for functionality, with line changes often required. It is often more reliable to create (Debian) .deb packages from source, and even the Alien software maintainers do not recommend using Alien for important packages. To keep alien from changing the version number, use the following command
alien -k rpm_file_name.rpm
Convert the package.rpm into a package.deb
alien -d package-name.rpm
Convert the package.rpm into a package.deb, and install the generated package
alien -i package-name.rpm
To convert .rpm to debian
sudo alien -k *.rpm
Permissions error on program startup
If you get a permissions error, try the following:
sudo chown -R user /home/user
- Note: Replace user with the actual username. This command changes the owner of the folder /home/user to user. -R means "recursively", i.e. including all subfolders.
If you receive the "cdrecord has no permission to open the device" error while burning using a CD burner, open a terminal and type:
sudo chmod 777 /dev/scd0
- Note: replace "/dev/scd0" with your own device.
- Note: chmod 777 is the universal option for granting full permission to a folder. The 777 mask indicates that read, write, and execute permission is given to all users.
Linux is largely a community of volunteers and as such represents one of the largest altruistic efforts on earth. This includes companies who decide to contribute their own software into the public domain for free use. The continued success of sharing depends on licenses that keep software free and usable for anyone who wants to use it. However, there must be a method for Linux users and developers to make money, as well. Licensing helps protect each of these efforts. See the Wikipedia Free Software Licensing article and the GNU operating system licensing page for more complete information.
- Kubuntu Derivatives do not need a license, according to its developer. See this blog article.
The GPLv3 license (and the Affero GPLv3 license for network-based software) intends that the software module or package is free to use in any environment, and furthermore, any software that relies on that GPLv3-licensed module must in turn also be completely free. Commercial and proprietary software packages can't use or incorporate GPLv3-licensed modules.
The Lesser GPL license intends that the software module or package is free to use in any environment, including in commercial and proprietary software packages. This allows companies to develop proprietary packages which includes LGPL-licensed modules, from which they can make a profit. The disadvantage is that their products (which benefit from the LGPL-licensed modules) are not required to be in the public domain in turn. (Many companies often later donate their entire package into the public domain, however, after they no longer make a profit from them.)
The ODbL (Open Database License) is a "share alike" open license intended for databases.
The Apache license has been around a long time. It is compatible with the GPLv3 license, but, unlike the GPLv3 license, it does not require modified software to retain the Apache license. In other words, Apache-licensed software can be modified and the modified software then made proprietary (and therefore not returned to the open source community).
The BSD license is similar to a public domain license. There are currently many confusing iterations of the BSD license, however, mostly regarding attribution notices and advertising that is required to be provided along with any software derivatives. The BSD license allows the option of propagation of either (otherwise-licensed) free open source restrictions or proprietary restrictions. It therefore allows a mix of (otherwise-licensed) proprietary modules and open sourced-licensed modules to co-exist in the same package. This flexibility has made the BSD license popular with complex distributions (such as the (BSD Unix-based) Mac OS X operating system, for example).
Creative Commons licenses
Espoused by many large public-domain projects, there are a variety of Creative Commons copyright licenses for different scenarios. Many variations impose "non-free" limitations and versions prior to version 3 were denounced by several large open-source projects; particular variations of this license must be examined closely.
There is a vast array of proprietary licenses, all different. You never know what your limitations for software are unless you read every word. Most are attempts by lawyers to have an opportunity to create a lawsuit in the future. Some may be called "free" licenses but have many limitations which you will not be aware of until you are in the middle of a lawsuit. No license outside of the GPLv3 license is recommended. Be careful when committing your organization to a mission-critical software package with a proprietary license. Also see this outstanding article on the Open Source Enterprise Trap.