[rfc][icedtea-web] fixinf of desktop icon behaviour

Xerxes Rånby xerxes at zafena.se
Fri Dec 21 09:04:18 PST 2012


2012-12-21 17:05, Jiri Vanek skrev:
> Hi! This is fix for http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=725 - JNLP applications will prompt for creating desktop shortcuts every time they are run
> 
> When I have seen Omairs original patch it was too much complicated, So I want at least to try this one.
> It is pretty simple. The disadvantage however is:
> +    public File getFinalLinuxDesktopIconFile() {
> +        return new File(System.getProperty("user.home")+"/Desktop/"+getDesktopIconFinalName()+".desktop");
> +    }
> 
> to be dependent on System.getProperty("user.home")+"/Desktop/" and .desktop suffix.
> 
> However .. can it be enough?
> 
> The second patch is for testing purposes of this case which I would like to push forward as soon as possible.
> 
> J.

This will be broken on non-english systems.

The name of the Desktop folder gets localized on many distributions.
For example the Desktop folder is called Skrivbord on Swedish user systems.
The configuration of the user desktop folder location is set in the
~/.config/user-dirs.dirs

On my system this file contains:
xranby at xranby-ESPRIMO-P7935:~/.config$ cat user-dirs.dirs
# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
#
XDG_DESKTOP_DIR="$HOME/Skrivbord"
XDG_DOWNLOAD_DIR="$HOME/Hämtningar"
XDG_TEMPLATES_DIR="$HOME/Mallar"
XDG_PUBLICSHARE_DIR="$HOME/Publikt"
XDG_DOCUMENTS_DIR="$HOME/Dokument"
XDG_MUSIC_DIR="$HOME/Musik"
XDG_PICTURES_DIR="$HOME/Bilder"
XDG_VIDEOS_DIR="$HOME/Video"




More information about the distro-pkg-dev mailing list