Template:K Trusty/Troubleshooting

From

(Difference between revisions)
Jump to: navigation, search

Current revision as of 04:29, 13 May 2014

Contents

Tips & Tricks

Search my computer

Strigi / Nepomuk / Akonadi

Nepomuk is a background indexing service that examines files and stores information about them in a database. It takes CPU cycles to run. Akonadi stores PIM (personal information, e.g. address books, etc.) and is also available to a search query. Strigi is the client application that accesses the index database to perform a search. It is accessed as the "Search" bar of the Dolphin file manager or of the Konqueror browser. To turn the services on or off or to adjust the cache/database size:

K menu -> Settings -> System Settings -> Advanced -> Desktop Search
Disable AkonadiTray

The KDE Plasma / System Tray widget AkonadiTray does not display correctly on my system. (I do not use Akonadi and have it turned off, but AkonadiTray appears anyway.) The solution is to merely rename the akonaditray module:

sudo mv /usr/bin/akonaditray /usr/bin/akonaditray.bak

Other search apps

These apps do not rely on an index database (so that the CPU-intensive indexing apps can be turned off). However, they therefore take longer to examine the computer during a search.

  • KFind, for KDE4 ( sudo apt-get install kfind )
  • Searchmonkey, which is Gtk-based ( sudo apt-get install searchmonkey )

Change to black Panel bar

To change from the default blue "Air" Panel bar (Taskbar) to the black "Oxygen" Panel bar (Taskbar):

K menu -> System -> System Settings -> Appearance -> Workspace -> Oxygen -> Apply

Change the KDM Theme

The KDE Display Manager Theme can be set.

  • Make sure your desired theme is in the /usr/share/kde4/apps/kdm/themes folder. For example, I use the Ariya theme. Edit the KDM settings to use the Ariya theme:
sudo kate /etc/kde4/kdm/kdmrc
and change the line
Theme=/usr/share/kde4/apps/kdm/themes/elarun
to
Theme=/usr/share/kde4/apps/kdm/themes/ariya
  • Logout and re-login for the changes to take effect.

Mute or change notifications (alerts)

  • Notifications (alerts) can be disabled:
K Menu -> System -> System Settings -> General -> Notifications -> Player Settings -> No audio output (ticked) -> Apply
  • Notifications for events can be set (or muted) individually:
K Menu -> System -> System Settings -> General -> Notifications -> Applications -> Event source ->

Change notification widget style

The new style of the Notifcation Widget for the System Tray (which looks like an arrow) can be reverted to the old style (a circle).

KDE Cashew (upper right corner) -> Unlock Widgets
-> <right-click> on System Tray (Panel Bar) -> System Tray Settings
-> Entries -> Notifications: Always Visible -> OK
-> Display: Notifications (unticked) -> Apply -> Display: Notifications (ticked) -> OK
KDE Cashew (upper right corner) -> Lock Widgets

Unfortunately, this has to be done every time the system is restarted.

Automatic user login

  • To accomplish this (yet still require a user password):
K 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 ~/.kde/Autostart folder.

For example, to start Firefox at bootup, create a symbolic link:

sudo ln -s /usr/bin/firefox ~/.kde/Autostart

Programs and scripts can also be added to the Autostart menu using System Settings:

K menu -> Settings -> System Settings -> Advanced -> Autostart -> Add Script... or Add Program

Choose Bootup/Startup services

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.

KDialog (User interface for scripts)

KDialog allows user input to scripts. This allows the automation of tasks with the option of user input during those scripts.

SHC (Encrypt scripts)

SHC is a simple script compiler that will convert a script into a binary, obscuring the code (and passwords, etc.). Usage instructions are here. Install by adding the Debian Etch repository:

sudo add-apt-repository 'http://archive.debian.org/debian etch main' 

then install the shc package:

sudo apt-get install shc

Run Command

You can run any application in your path using the Run Command. Right-click on the Plasma Icon in the upper right of your desktop to find the command. You can also use Alt+F2.

Add Menu items to Desktop or Panel

To copy a program icon to the desktop or panel bar, you must first unlock widgets:

Widget icon (upper right corner of desktop) -> Unlock Widgets

then right-click on any menu item in the K menu and select "Add to Desktop" or "Add to Panel". You can move the icon anywhere you desire and then re-lock the widgets.

For example, I like to have the icon for Konsole (the command-line interface terminal) in my Panel bar (since I like to work in the command-line interface frequently). I therefore right-click on K menu -> System -> Konsole then choose "Add to Panel".

Restore the Task Manager bar

It is easy to remove the Task Manager bar accidentally and find yourself with an empty desktop. Here's how to restore it to its default state at installation:

  • If you have accidentally erased your Task Manager bar completely, add it again from the Plasma icon in the upper right corner of your desktop. You can drag your Task Manager bar anywhere you want using the "handle" on the edge of the bar (which pops up unless you have the widgets locked).
  • Right-click on the Task Manager bar -> Panel Settings to configure it. You will notice a configuration bar that will pop up. While this is displayed you can drag things around the Task Manger bar how you like them. You can also change the dimensions of the Task manager bar using the arrows, and can choose the centering options for the Task Manager bar.
  • You can also (re-)add widgets to the Task Manager bar using the Add Widget option on this configuration bar as well. (Note: This is different from the Add widgets option found in the Plasma icon in the upper right corner of your desktop, which adds widgets to your desktop, not to the task manager bar).
  • The original default task manager bar at installation included the "Applications Launcher (traditional menu based)" widget, the "Digital Clock" widget, the "Pager" widget, the "Task Manager" widget, the "System Tray" widget, and the "Trashcan" widget. Add whichever ones you have accidentally removed, then drag them around the Task Manager bar into desired positions.
  • Close the configuration bar when you are done by clicking on the red X.

Move Notifications widget from System Tray to Panel bar

The Notifications widget developed a bug after Precise 12.04 and now has become ill-behaved when enabled in the System Tray. The solution is to disable it in the System Tray and to instead add notifications as a standalone widget on the Panel bar:

  • Remove Notifications from the System Tray:

<Right-Click> on the System Tray to enter System Tray Settings -> Extra Items -> Notifications: <Unticked> -> Ok

  • Add the Notifications Widget to the Panel:

<Right-Click> on the Panel bar -> Add Widgets... -> Notifications -> <Double-Click to select and add to Panel>

  • Move the newly added Notifications Widget to the desired location on the Panel:

<Right-Click> on the Panel bar -> Panel Settings -> <Slide Notifications widget to desired location>

Restore Konqueror as Default File Manager

  • K-menu -> Run (or use the "Run command..." option from the Plasma Icon in the upper right corner of your desktop).
  • Open KDE components -> File Associations -> inode
  • Choose directory. In the right part of the window, change the application preference order so that Konqueror would be the first app in the list.
  • Do the same with system_directory.

Remove Konqueror temporary thumbnail files

When browsing files locally, Konqueror builds up thumbnails of the images viewed. To remove these thumbnails, from the command line terminal Konsole:

cd ~/.thumbnails/normal
rm -rf *.png
cd ~/.thumbnails/large
rm -rf *.png
Note: You can substitute /home/user for ~, if you choose, where user is your username.

Screen snapshot

Ksnapshot is normally used.

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.

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

K menu -> System -> System Settings -> Keyboard & Mouse -> Keyboard Shortcuts

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

K menu -> System -> System Settings -> 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.

Activate Suspend or Hibernate

Power Management settings can be accessed:

K Menu -> System -> System Settings -> Power Management

Turn off Device Notifier

The Device Notifier is the pop-up that appears when you attach a new removable device, such as a USB, CD/DVD, or removable hard-drive. The default behaviour is to automatically mount the device in the Dolphin file manager, but in addition the Device Manager presents a list of options for the device that are set in K Menu -> Settings -> System Settings -> Device Actions. Those options can be edited there, or the Device Notifier pop-up can be disabled altogether:

<right-click> on the System Tray icon in the Panel bar (looks like a triangle) -> System Tray Settings
-> Display -> Extra Items: Device Notifier -> unticked -> OK

Associate default applications

K menu -> System -> System Settings -> 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):
K menu -> System -> System Settings -> 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:
K Menu -> System -> System Settings -> 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.

Associate files using Dolphin file manager

  • You can also associate files using the Dolphin file manager:
Right-click on a file -> Open with ... -> Known Applications ->
choose the application to associate with the file
-> Click: "Remember application association for this type of file"
Example:
From Dolphin, right-click on musicfile.mp3 -> Open with... -> Known Applications ->
choose Audacious
-> Click: "Remember application association for this type of file"
Now all .mp3 files will be associated with Audacious.

How to use network options in Dolphin file manager

  • Open the "Network" icon in Dolphin.
  • A network folder can also be mounted in the left navigation pane for repeated quick access. For example, a Samba (Windows-type) network folder located at a LAN IP address of 192.168.0.177 can be added:
Dolphin -> <right-click> on the left panel -> Add entry...
-> Label: Network folder -> Location: smb://192.168.0.177

How to mount a camera in Dolphin file manager

Use Windows-appearing fonts

Users who switch to Kubuntu from Windows may notice subtle differences between the default fonts in Kubuntu and those in Windows. The Microsoft Core Fonts can be installed as part of the kubuntu-restricted-extras package, or separately:

sudo apt-get install ttf-mscorefonts-installer

Most default fonts in Windows are Times New Roman. You can select the Times New Roman fonts in applications like Firefox to make them appear like Windows. However, the DejaVu font (especially size 10) in (K)Ubuntu mimics the Times New Roman font closely, and has been found to be desirable for most users.

Run a Gnome desktop from Kubuntu

It is possible to install the GTK-based Gnome desktop (the default in Ubuntu) in Kubuntu.

apt-get install ubuntu-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.

Filenames with spaces

  • Filenames or folder names with spaces in them should be enclosed with quotation marks (" "). For example, to change to a directory named "This Dir" or "/home/This Dir", use the command:
cd "This Dir"
or
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
or
cd /home/This\ Dir

Root user tasks

  • Many tasks in (K)Ubuntu must be accomplished with root user (superuser) privileges. For many simple tasks, temporary root superuser are achieved using the "kdesudo" command (or the "sudo" command for command-line functions). A user must be in the "sudo" group to use kdesudo or sudo. See this section about adding/changing user groups.
  • A user may open a file manager (such as Dolphin) with root user (superuser) privileges. See this section.
  • A service menu may be installed in Dolphin that allows many tasks to be accomplished with root user (superuser) privileges. See this section regarding the "Root Actions Servicemenu."
  • A user in the "sudo" group may become the root user. To do so, a password for the root user must already have been set. See this section. This is not recommended for routine usage.
  • For some tasks (such as installing packages from the Muon package manager) the system will present a list of users in the "sudo" group. Any user in the list can be chosen and the password for that user entered in order to complete the task.

Software Troubleshooting

Manually edit menus

The Kmenuedit program has quirks and may create a menu that has extraneous entries. To manually edit the KDE menu:

kate ~/.config/menus/applications-kmenuedit.menu

where ~ refers to /home/user

Python2.5

(K)Ubuntu Lucid has Python2.6, yet many apps (including GoogleApps) require Python2.5. To install Python2.5 from a PPA repository, see the instructions at the PPA repository.

Amarok Troubleshooting

Amarok permissions error on Amarok startup

If you get a permissions error when launching Amarok, 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.
Personal tools
Sponsor
   CuBox