模板:U Lucid/Troubleshooting

来自Ubuntu中文
Oneleaf留言 | 贡献2010年6月25日 (五) 10:33的版本 (以内容'= Tips & Tricks = === Run Command === 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…'创建新页面)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳到导航跳到搜索

Tips & Tricks

Run Command

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.

System -> Administration-> Advanced -> Input Actions -> General Settings -> check "Disable KHotKeys daemon"
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.

System -> Administration-> Advanced -> Keyboard & Mouse -> Keyboard Shortcuts

Also, you may want to deactivate linking gestures to sticky and slow keys:

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

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

Capture a screenshot

See this tutorial.

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:
killall amarok
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.
xkill
  • 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:

Ctrl+ H

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:
pwgen
  • UUIDgen is a default utility to generate a random UUID. Run:
uuidgen

The random UUID can also be used as a password, if desired.

Alien

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

Software Troubleshooting

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.

CD-ROM Troubleshooting

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.