Re: Autostart locations in KDE4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tim Edwards wrote, On 06/02/2011 03:53 AM:
> Recently I found that knetworkmanager wasn't starting up when I logged
> into KDE. I tried looking for any mention of it in the 'startup and
> shutdown' control centre module, but no luck. Eventually I found a tip
> on a forum that I had to set 'Autostart=true' in
> ~/.kde4/share/config/networkmanagementrc
> 
> So my question is, what's the status of the autostart stuff: 
> Shouldn't it all be configurable through the standard control centre
> module which stores its settings in the standard (~/.config/autostart)
> directory? 
> Does KDE go scanning through ~/.kde4/share/config/ looking for
> 'Autostart=' in rc-files?

Tim,

In case it's any help, i enclose a script that dumps out the KDE4 configuration
operational environment in a nice concise format.

There would be a difference between the autostart path and the config path.

The config path would be scanned until it finds a "networkmanagementrc" file.

I believe
    kde4-config --locate networkmanagementrc --path config
would show which file ultimately is going to be used.  (i think it's a scan
and stop on first found algorithm, rather than a merge all files found
that match in the path operation).  it'll show nothing if no config file
is found in the path.


I was surprised when using the kcmshell4 autostart center that it was using
the XDG autostart path to write a new autostart desktop function.  I thought
it would prefer the KDE4 autostart path.  I'm not sure if that indicates
a future deprecation of the KDE4 specific autostart directory in favor
of XDG integration?

If so, you may need to use the 'OnlyShowIn=KDE' directives in such XDG pathed
autostart files if the given application can't or shouldn't run in other
desktop environments.


--stephen
#!/bin/sh

# Get some Configuration info on KDE

echo "[VersionInfo]"
#kdeconf() { kde3-config "$@" ;}   # KDE3
kdeconf() { kde4-config "$@" ;}   # KDE4

kdeconf --version

# http://techbase.kde.org/KDE_System_Administration/Environment_Variables
echo ""
echo "[Environment]"
while read var default; do
    printf "%24s = %s\n"  "${var}" "$(eval echo \${$var-${default}\(\*\)})"
done<<"EOF"
KDE_FULL_SESSION 
KDE_SESSION_UID 
KDE_SESSION_VERSION 
KDEWM                       kwin
KDE_DISPLAY 
KDE_MULTIHEAD 
KDEDIRS
KDEHOME                     ${HOME}/.kde
KDE_HOME_READONLY 
KDEROOTHOME                 ~root/.kde
KDESYCOCA
KDETMP                      /tmp
KDEVARTMP                   /var/tmp
KDE_LANG
KDE_UTF8_FILENAMES
KDE_NO_IPV6
KDE_USE_IDN                 at:ch:cn:de:dk:kr:jp:li:no:se:tw
KDE_IS_PRELINKED
KDE_MALLOC
KDE_NOUNLOAD
KDE_DOUNLOAD
KDE_DEBUG
KDE_DEBUG_NOPROCESSINFO
KDE_DEBUG_NOAREANAME
KDE_DEBUG_NOMETHODNAME
KDE_DEBUG_FILELINE
KDE_DEBUG_TIMESTAMP
KDE_COLOR_DEBUG
KDE_FORK_SLAVES
EOF
echo "(*) indicates variable unset and a default value substituted"

echo ""
echo "[Configuration]"
while read option; do
    printf "%18s = %s\n" "${option}" "$(kde4-config --${option})"
done<<"EOF"
prefix
exec-prefix
libsuffix
localprefix
qt-prefix
qt-binaries
qt-libraries
qt-plugins
EOF
#  --kde-version             Compiled in version string for KDE libraries
#  --locate filename         Find filename inside the resource type given to --path

echo ""
echo "[UserPaths]"
#KDE3#for upath in desktop trash autostart document; do
for upath in desktop autostart document; do
  printf "%18s = %s\n" "${upath}" "$(kdeconf --userpath ${upath})"
done

echo ""
echo "[Paths]"
while read ktype ksep kdescription; do
#  printf "PATH(${ktype}) [${kdescription}]\n  $(kdeconf --path ${ktype})\n"
  printf "%18s = %s [%s]\n" "${ktype}" "$(kdeconf --path ${ktype})" "$(kdeconf --install ${ktype})"
done <<EOF
$(kdeconf --types)
EOF
echo "values in []'s are application install paths"

exit 0
#!/bin/sh
# Get some Configuration info on XDG

echo "[Environment]"
while read var default; do
    printf "%24s = %s\n"  "${var}" "$(eval echo \${$var-${default}\(\*\)})"
done<<"EOF"
XDG_DATA_HOME       ${HOME}/.local/share
XDG_CONFIG_HOME     ${HOME}/.config
XDG_DATA_DIRS       /usr/local/share/:/usr/share/
XDG_CONFIG_DIRS     /etc/xdg
XDG_CACHE_HOME      ${HOME}/.cache
XDG_RUNTIME_DIR     
EOF
echo "(*) indicates variable unset and a default value substituted"

echo ""
echo "[Settings]"
while read var desc; do
    printf "%24s = %s\n" "${var}" "$(xdg-settings get "${var}")"
done<<EOF
$(xdg-settings --list | tail -n +2 )
EOF


exit 0
: <<"END_NOTES"
xdg-settings get default-web-browser
xdg-settings check default-web-browser firefox.desktop
                   xdg-settings set default-web-browser google-chrome.desktop

XDG_DATA_DIRS=/usr/share:/usr/share:/usr/local/share
XDG_SESSION_COOKIE=3d6a4039eaa90b76b81b1f6100000030-1305560072.916037-352205480

sdowdy@zia$ xdg-settings --list
Known properties:
  default-web-browser           Default web browser

sdowdy@zia$ xdg-settings get default-web-browser
kfmclient_html.desktop


$XDG_DATA_HOME defines the base directory relative to which user specific data files should be stored. If $XDG_DATA_HOME is either not set or empty, a default equal to $HOME/.local/share should be used.

$XDG_CONFIG_HOME defines the base directory relative to which user specific configuration files should be stored. If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used.

$XDG_DATA_DIRS defines the preference-ordered set of base directories to search for data files in addition to the $XDG_DATA_HOME base directory. The directories in $XDG_DATA_DIRS should be seperated with a colon ':'.

If $XDG_DATA_DIRS is either not set or empty, a value equal to /usr/local/share/:/usr/share/ should be used.

$XDG_CONFIG_DIRS defines the preference-ordered set of base directories to search for configuration files in addition to the $XDG_CONFIG_HOME base directory. The directories in $XDG_CONFIG_DIRS should be seperated with a colon ':'.

If $XDG_CONFIG_DIRS is either not set or empty, a value equal to /etc/xdg should be used.

The order of base directories denotes their importance; the first directory listed is the most important. When the same information is defined in multiple places the information defined relative to the more important base directory takes precedent. The base directory defined by $XDG_DATA_HOME is considered more important than any of the base directories defined by $XDG_DATA_DIRS. The base directory defined by $XDG_CONFIG_HOME is considered more important than any of the base directories defined by $XDG_CONFIG_DIRS.

$XDG_CACHE_HOME defines the base directory relative to which user specific non-essential data files should be stored. If $XDG_CACHE_HOME is either not set or empty, a default equal to $HOME/.cache should be used.

$XDG_RUNTIME_DIR defines the base directory relative to which user-specific non-essential runtime files and other file objects (such as sockets, named pipes, ...) should be stored. The directory MUST be owned by the user, and he MUST be the only one having read and write access to it. Its Unix access mode MUST be 0700.

The lifetime of the directory MUST be bound to the user being logged in. It MUST be created when the user first logs in and if the user fully logs out the directory MUST be removed. If the user logs in more than once he should get pointed to the same directory, and it is mandatory that the directory continues to exist from his first login to his last logout on the system, and not removed in between. Files in the directory MUST not survive reboot or a full logout/login cycle.

The directory MUST be on a local file system and not shared with any other system. The directory MUST by fully-featured by the standards of the operating system. More specifically, on Unix-like operating systems AF_UNIX sockets, symbolic links, hard links, proper permissions, file locking, sparse files, memory mapping, file change notifications, a reliable hard link count must be supported, and no restrictions on the file name character set should be imposed. Files in this directory MAY be subjected to periodic clean-up. To ensure that your files are not removed, they should have their access time timestamp modified at least once every 6 hours of monotonic time or the 'sticky' bit should be set on the file.

If $XDG_RUNTIME_DIR is not set applications should fall back to a replacement directory with similar capabilities and print a warning message. Applications should use this directory for communication and synchronization purposes and should not place larger files in it, since it might reside in runtime memory and cannot necessarily be swapped out to disk. 

END_NOTES
___________________________________________________
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.

[Index of Archives]     [Trinity (TDE) Desktop Users]     [Fedora KDE]     [Fedora Desktop]     [Linux Kernel]     [Gimp]     [GIMP for Windows]     [Gnome]     [Yosemite Hiking]
  Powered by Linux