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
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.