2

I want to set Firefox as a favourite application in the KDE5 menu for all new users. How can I do that? Currently my favourite section is blank. I am using (K)Ubuntu 16.04.3 LTS.

Example is this image http://www.omgubuntu.co.uk/wp-content/uploads/2014/07/kde-plasma5-desktop.jpg You should be able to see the favourite section. I want Firefox to be permanently set there for all users.

Ubuntuser
  • 9,816
  • Does term "favourite" mean "default" ? Like setting Firefox as "default browser", am I right ?? – Liso Oct 19 '17 at 04:47
  • @Liso, no, in kubuntu menu, there is a favourites section, which is displayed first when you click on the menu.. have added a picture for clarification to the question. – Ubuntuser Oct 19 '17 at 05:20

1 Answers1

3

Solution

  1. Open KRunner (default shortcut is Alt + F2)
  2. Type: kdesudo kate /etc/xdg/kickoffrc. Then type your password.
    • Before editing you can ensure that kickoffrc is really placed there by running find $(echo $XDG_CONFIG_DIRS | sed 's/:/ /g') -name kickoffrc 2>/dev/null in Konsole. Echoing $XDG_CONFIG_DIRS will show you directories where this file can be placed.
  3. It seems that on fresh install of Kubuntu 16.04.3 kickoffrc file does not exist which results in empty favorites list when you create a new user. In such case just paste following lines into it and save:

    [Favorites]
    FavoriteURLs=firefox.desktop
    

    Otherwise, add firefox.desktop after the existing *.desktop files listed next to FavoriteURLs=. Separate it by comma. After new user creation they will appear in the same order as you placed them in /etc/xdg/kickoffrc. If you want to add some others default favorite applications you can find them in /usr/share/applications/.

Research

On Kubuntu 17.10 the configuration file of Kickoff (that is the name of the Application Launcher widget) do exists and contains some .desktop entries. Fortunately, they differs from default favorites for kickoff manually added to your desktop. One could find the right configuration file by searching an entry that is present at kickoff added by launching plasma for the first time at a new user account, but not present by default in manually added kickoff widget — for example libreoffice-startcenter.desktop (using grep -r "libreoffice-startcenter.desktop" in root directory)

It seems that there is a specification named XDG Base Directory Specification which KDE uses to store its configuration files. As can be read here system-wide configuration is stored by default in /etc/xdg/ directory. Before editing these files one can ensure real system-wide directories by checking the value of XDG_CONFIG_DIRS environmental variable.

Format of kickoffrc favorites list is the same as described here.

aemstuz
  • 331