[SOLVED]Systemd autostart conky

Hi guys, as a new Arch user I tried to play a bit with systemd to have it automatically start Conky after logon. When I try to start conky manually from the terminal it all works perfectly but when systemd needs to do it as a unit (service) it's not possible as Conky doesn't accept the rc file it's been given. It seems that the variable $HOME or %h is unknown to systemd. Below some details
Starting my 2 Conky files from the Gnome terminal is no problem:
conky -d -c $HOME/.Conky/ConkyToprc
conky -d -c $HOME/.Conky/ConkyLogrc
cat /etc/systemd/system/conky.service:
[Unit]
Description=Conky system monitor
Documentation=man:conky(1)
[Service]
Type=forking
ExecStart=/usr/bin/conky -d -c /home/viper/.Conky/ConkyToprc
[Install]
WantedBy=xinitrc.target
[root@Arch viper]# systemctl status conky.service
● conky.service - Conky system monitor
Loaded: loaded (/etc/systemd/system/conky.service; disabled)
Active: failed (Result: core-dump) since Fri 2014-05-16 18:39:51 CEST; 10min ago
Docs: man:conky(1)
Process: 4833 ExecStart=/usr/bin/conky -d -c /home/viper/.Conky/ConkyToprc (code=dumped, signal=ABRT)
May 16 18:39:51 Arch conky[4833]: Conky: $HOME environment variable doesn't exist
May 16 18:39:51 Arch conky[4833]: conky: malloc.c:2369: sysmalloc: Assertion `(old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == ...
May 16 18:39:51 Arch systemd-coredump[4834]: Process 4833 (conky) dumped core.
May 16 18:39:51 Arch systemd[1]: conky.service: control process exited, code=dumped status=6
May 16 18:39:51 Arch systemd[1]: Failed to start Conky system monitor.
May 16 18:39:51 Arch systemd[1]: Unit conky.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.
So even after changing the systemd unit file to use the full path /home/viper/.Conky/ConkyToprc it's still not working. I think after changing $HOME or %h Conky did accept the config file but doesn't recognize the $HOME variable in the config file anymore. Or maybe I'm missing something here... And I'm not even trying to load the second conky file Anyone an idea as where I need to look? Any help is highly appreciated. Thank you in advance.
It seems to be a bit related to this: http://lists.freedesktop.org/archives/s … 06217.html
Last edited by DarkLite1 (2014-05-17 16:48:04)

Thank you everyone for your feedback, I really appreciate it Some things I would still like to clarify although I fully agree with your reasoning of not using systemd for my 'conky' idea here.
@ANOKNUSA: Yes you are right, systemd starts everything simultaneously at boot time. The way I did my test was to start the unit manually from the Gnome terminal after already being logged on to Gnome. So in my point of view the $HOME variable did already exist at that point and there was no need to wait for the X server... So in theory, it should've been able to get the job done.
@twelveeighty: So yes, I do believe you are right. systemd doesn't know $HOME at all.
Than my final question to have this solved for me. What is the best way to have 2 instances of Conky running with each it's own config file? I tried the following already, but it was unsuccessful:
cat /etc/profile.d/autostart.sh
Exec=/usr/sbin/conky -d -c /home/viper/.Conky/ConkyToprc
Exec=/usr/sbin/conky -d -c /home/viper/.Conky/ConkyLogrc
cat /usr/share/gnome/autostart/conky.desktop
[Desktop Entry]
Type=Application
Name=Conky
Comment=Start conky script
Exec=/usr/sbin/conky -d -c /home/viper/.Conky/ConkyToprc
Exec=/usr/sbin/conky -d -c /home/viper/.Conky/ConkyLogrc
OnlyShowIn=GNOME;
X-GNOME-Autostart-Phase=Application
When trying to follow the proposed solution found here https://wiki.archlinux.org/index.php/xinitrc there is no example file availble for .xinitrc in /etc/skel as suggested 'Copy the sample /etc/skel/.xinitrc file to your home directory' And if there was, how would the syntax be for 2 instances of Conky? Because when I read the Note it's not possible to add 2 lines of EXEC:
Note: Make sure to uncomment only one exec line, since that will be the last command run from the script; all the following lines will just be ignored. Do NOT attempt to background your WM by appending a `&` to the line.
/again: thanks for still helping me out and reading my jibber/jabber. I sometimes really feel like a noob here between all you pro's. But the only way of getting there is by falling and learning how to get up? Right Bruce?
Last edited by DarkLite1 (2014-05-17 16:18:43)

Similar Messages

  • [SOLVED] systemd: autostart service last, at login screen

    hi
    I don't use X, so no .xinitrc, but I'd like to run a script after boot when it reaches the terminal login.
    In particular, the script is a simple beep command to play a sound.
    I tried this
    [Unit]
    Description=welcome
    After=multi-user.target
    [Service]
    Type=oneshot
    ExecStart=/usr/bin/beep -f 1000 -l 200 -n -f 1200 -l 200 -n -f 2000 -l 120
    [Install]
    but can't even enable it
    any suggestions? thanks
    Last edited by v43 (2014-01-19 13:50:56)

    because of the empty [Install] section
    EDIT:
    I tried adding the regular WantedBy=multi-user.target in the [Install], and it works!!
    but why? how can this service be required by the multi-user.target and also be called after it?
    [Unit]
    Description=welcome
    After=multi-user.target
    [Service]
    Type=oneshot
    ExecStart=/usr/bin/beep -f 1000 -l 200 -n -f 1200 -l 200 -n -f 2000 -l 120
    [Install]
    WantedBy=multi-user.target
    Last edited by v43 (2014-01-19 13:49:31)

  • [SOLVED] cannot run Conky on KDE4

    I cannot start Conky on KDE4.
    Arch Linux Conky Manual says FEH must be installed and ~/.kde/share/autostart/fehconky must be created as follows:
    #!/bin/bash
    feh --bg-scale `dcop kdesktop KBackgroundIface currentWallpaper 1`
    I have installed FEH. Then I have created the links into .kde4 directory, because KDE4 supports this one. However Arch Linux installation with KDE4 does not include dcop but dbus. And there is no web link / information I could find, which states that how dbus must be started accordingly.
    I have also created a symlink (as stated in the page above):
    ln -s /usr/bin/conky ~/.kde4/share/autostart/conkylink
    , however when I reboot or relogin, KDE does not seem to start these programs. As a root I have not found any log file in /var/log containing why these programs cannot be started.
    For experiment, I have copied both files into ~/.kde4/Autostart, but in this case KDE4 cannot find dcop and Desktop Environment aborts to login prompt again.
    How can I start feh? Do I need it in KDE4? DBUS daemons seem to be running
    [arutku@hostarchlinux ~]$ ps -ef | grep dbus
    dbus 2999 1 0 Sep05 ? 00:00:01 /usr/bin/dbus-daemon --system
    root 3715 1 0 Sep05 ? 00:00:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
    root 3716 1 0 Sep05 ? 00:00:00 dbus-launch --autolaunch 559d1c801aa546c24bf5f91048c00573 --binary-syntax --close-stderr
    arutku 3764 1 0 Sep05 ? 00:00:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
    arutku 3765 1 0 Sep05 ? 00:00:00 dbus-launch --sh-syntax --exit-with-session
    arutku 4104 3870 0 00:29 pts/1 00:00:00 grep dbus
    [arutku@hostarchlinux ~]$
    Do I really need to start FEH then?
    Any help appreciated because there is no information in web I could find.
    dbus is not in DAEMONS list in /etc/rc.conf. And, maybe it helps:
    [arutku@hostarchlinux ~]$ uname -a
    Linux hostarchlinux 2.6.26-ARCH #1 SMP PREEMPT Tue Aug 26 21:15:43 UTC 2008 i686 AMD Athlon(tm) XP 2800+ AuthenticAMD GNU/Linux
    EDIT: Fixed typos
    Last edited by pencuse (2008-09-06 00:07:07)

    I have solved the problem by running
    update-desktop-database
    both for the user and the root. I don't know for which user solved this utility the problem but it solved. I think it corrected MIME settings of the operating system. Before I had run this utility, icons for the files could not be shown, files could not be associated and KDE complained inode/* MIME types in /usr/share/packages/kde.xml.
    However this utility solved the problems. Without any FEH installation/scripting stated in Conky Wiki of Arch Linux, Conky runs automatically now.
    ~/.kde4/Autostart for KDE4 is the correct directory now to autostart Conky or any other application.
    HTH.

  • [Solved] Systemd automounts /boot (was mlocate not traversing /boot)

    For some reason, mlocate does not index my /boot:
    ┌─[Shiv ~ ]
    └─╼ locate vmlinuz-linux
    /home/jason/Build/chroot/root/boot/vmlinuz-linux
    ┌─[Shiv ~ ]
    └─╼ sudo updatedb -U /boot
    [sudo] password for jason:
    ┌─[Shiv ~ ]
    └─╼ locate vmlinuz-linux
    /boot/vmlinuz-linux
    /boot/vmlinuz-linux-jwr
    ┌─[Shiv ~ ]
    └─╼ sudo updatedb
    ┌─[Shiv ~ ]
    └─╼ locate vmlinuz-linux
    /home/jason/Build/chroot/root/boot/vmlinuz-linux
    My /etc/updatedb.conf is the stock Arch one, /boot is obviously mounted (as the -U switch works), but a plain updatedb does not return any results from /boot.
    I recently moved my ESP from /boot/efi to /boot, and as this is the only machine exhibiting this behaviour, it leads me to suspect something is amiss here.
    My fstab:
    # ESP: /dev/sda1
    UUID=696A-09B3 /boot vfat defaults,relatime,discard 0 2
    # /dev/mapper/vgroup-lvroot
    UUID=1d2dfd7d-adeb-4786-ag98-c8fg675f8e2f / ext4 rw,relatime,discard,data=ordered 0 1
    # /dev/mapper/vgroup-lvhome
    UUID=50798021-94b5-4011-a593-9087gfhcd59b8 /home ext4 rw,relatime,discard 0 2
    Am I missing something obvious?
    # edit: updated thread title with the cause, as opposed to the symptom...

    WonderWoofy wrote:There is a mechanism in systemd (or maybe gummiboot) that mounts the ESP on /boot as a systemd autostart unit.  So it shows up as autofs, which mlocate does not venture into.
    Bingo!
    ┌─[Shiv ~ ]
    └─╼ mount | grep boot
    systemd-1 on /boot type autofs (rw,relatime,fd=36,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
    /dev/sda1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro,discard)
    falconindy wrote:If there's one thing I've learned about remote debugging over the years, it's to not trust people.
    Especially Antipodeans
    lolilolicon wrote:I Googled for this and found this relevant talk in our (duh) wiki
    I spent some time yesterday searching, but missed this--to my shame
    65kid on the wiki wrote:* this feature isn't even documented in systemd yet
    Great. Any way to suppress this?

  • [SOLVED] Openbox autostart no longer working since upgrade

    After the upgrade on May 14 2013 my autostart file no longer works. I tried renaming my autostart.sh to just autostart no luck. There is nothing wrong with the autostart file as I can run it manually and it will load all my apps. Also, if I cd to  /usr/lib/openbox/ and run openbox-autostart directly it works. Here are the updated packages:
    [2013-05-14 21:34] [PACMAN] upgraded ethtool (1:3.8-1 -> 1:3.9-1)
    [2013-05-14 21:34] [PACMAN] upgraded firefox (20.0.1-5 -> 21.0-1)
    [2013-05-14 21:34] [PACMAN] upgraded gsettings-desktop-schemas (3.8.0-1 -> 3.8.2-1)
    [2013-05-14 21:34] [PACMAN] upgraded glib-networking (2.36.1-1 -> 2.36.2-1)
    [2013-05-14 21:34] [PACMAN] upgraded gnome-icon-theme-symbolic (3.8.0.1-2 -> 3.8.2.2-1)
    [2013-05-14 21:34] [PACMAN] upgraded gnome-icon-theme (3.8.0-1 -> 3.8.2-1)
    [2013-05-14 21:34] [PACMAN] upgraded gnupg (2.0.19-7 -> 2.0.20-1)
    [2013-05-14 21:34] [PACMAN] upgraded gtkmm (2.24.2-2 -> 2.24.3-1)
    [2013-05-14 21:34] [PACMAN] upgraded gvfs (1.16.1-2 -> 1.16.2-1)
    [2013-05-14 21:34] [PACMAN] upgraded libical (0.48-1 -> 1.0-2)
    [2013-05-14 21:34] [PACMAN] upgraded mplayer (35920-2 -> 35920-3)
    [2013-05-14 21:34] [PACMAN] upgraded orage (4.8.4-1 -> 4.8.4-2)
    [2013-05-14 21:34] [PACMAN] upgraded pango (1.34.0-1 -> 1.34.1-1)
    [2013-05-14 21:34] [PACMAN] upgraded pdnsd (1.2.9.a-1 -> 1.2.9.a-2)
    [2013-05-14 21:34] [PACMAN] upgraded python2-distribute (0.6.38-1 -> 0.6.39-1)
    [2013-05-14 21:34] [PACMAN] upgraded python2-zope-interface (4.0.3-1 -> 4.0.5-1)
    [2013-05-14 21:34] [PACMAN] upgraded sudo (1.8.6.p8-1 -> 1.8.6.p8-2)
    [2013-05-14 21:34] [PACMAN] upgraded thunderbird (17.0.5-2 -> 17.0.6-1)
    [2013-05-14 21:34] [PACMAN] upgraded virtualbox (4.2.12-2 -> 4.2.12-3)
    [2013-05-14 21:34] [PACMAN] upgraded vte-common (0.34.4-1 -> 0.34.5-1)
    [2013-05-14 21:35] [PACMAN] upgraded python3-threaded_servers (2013.5.12.3-1 -> 2013.5.14.1-1)
    Not sure what's going on or what could have caused it. My .xinitrc looks like this:
    #!/bin/sh
    if [ -d /etc/X11/xinit/xinitrc.d ]; then
    for f in /etc/X11/xinit/xinitrc.d/*; do
    [ -x "$f" ] && . "$f"
    done
    unset f
    fi
    export BROWSER="chromium"
    # Start GNOME Keyring
    eval $(/usr/bin/gnome-keyring-daemon --start --components=gpg,pkcs11,secrets,ssh)
    # You probably need to do this too:
    export SSH_AUTH_SOCK
    export GPG_AGENT_INFO
    export GNOME_KEYRING_CONTROL
    export GNOME_KEYRING_PID
    exec openbox-session
    My .zprofile
    [[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && startx &> ~/.xlog
    My systemd startup service:
    # This file is part of systemd.
    # systemd is free software; you can redistribute it and/or modify it
    # under the terms of the GNU Lesser General Public License as published by
    # the Free Software Foundation; either version 2.1 of the License, or
    # (at your option) any later version.
    [Unit]
    Description=Getty on %I
    Documentation=man:agetty(8) man:systemd-getty-generator(8)
    Documentation=http://0pointer.de/blog/projects/serial-console.html
    After=systemd-user-sessions.service plymouth-quit-wait.service
    After=rc-local.service
    # If additional gettys are spawned during boot then we should make
    # sure that this is synchronized before getty.target, even though
    # getty.target didn't actually pull it in.
    Before=getty.target
    IgnoreOnIsolate=yes
    # On systems without virtual consoles, don't start any getty. (Note
    # that serial gettys are covered by [email protected], not this
    # unit
    ConditionPathExists=/dev/tty0
    [Service]
    # the VT is cleared by TTYVTDisallocate
    ExecStart=-/sbin/agetty -a dodo3773 %I 38400
    Type=simple
    #Restart=always
    #RestartSec=0
    UtmpIdentifier=%I
    TTYPath=/dev/%I
    TTYReset=no
    TTYVHangup=no
    TTYVTDisallocate=no
    KillMode=process
    IgnoreSIGPIPE=no
    # Unset locale for the console getty since the console has problems
    # displaying some internationalized messages.
    Environment=LANG= LANGUAGE= LC_CTYPE= LC_NUMERIC= LC_TIME= LC_COLLATE= LC_MONETARY= LC_MESSAGES= LC_PAPER= LC_NAME= LC_ADDRESS= LC_TELEPHONE= LC_MEASUREMENT= LC_IDENTIFICATION=
    # Some login implementations ignore SIGTERM, so we send SIGHUP
    # instead, to ensure that login terminates cleanly.
    KillSignal=SIGHUP
    [Install]
    WantedBy=getty.target
    Edit: I tried switching to bash in a tty and then just startx but that doesn't help either.
    Edit2: To be clear openbox does load a desktop. The autostart scripts at ~/.config/openbox/ just don't run. Thanks.
    Edit3: I decided to run the command issued in openbox-session and added --debug to it. Here is the output of "xinit /usr/bin/openbox --debug --startup "/usr/lib/openbox/openbox-autostart OPENBOX" "$@" -- :1 -nolisten tcp" :
    X.Org X Server 1.14.1
    Release Date: 2013-04-17
    X Protocol Version 11, Revision 0
    Build Operating System: Linux 3.8.7-1-ARCH x86_64
    Current Operating System: Linux dodo713 3.9.2-2-ck #1 SMP PREEMPT Sun May 12 18:19:49 EDT 2013 x86_64
    Kernel command line: BOOT_IMAGE=/vmlinuz-linux-ck root=UUID=06874255-7a5d-4968-8f09-1e53cb761f44 ro quiet init=/usr/lib/systemd/systemd
    Build Date: 17 April 2013 02:37:06PM
    Current version of pixman: 0.30.0
    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
    Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
    (==) Log file: "/var/log/Xorg.1.log", Time: Fri May 17 08:14:11 2013
    (==) Using config file: "/etc/X11/xorg.conf"
    (==) Using config directory: "/etc/X11/xorg.conf.d"
    setversion 1.4 failed
    Initializing built-in extension Generic Event Extension
    Initializing built-in extension SHAPE
    Initializing built-in extension MIT-SHM
    Initializing built-in extension XInputExtension
    Initializing built-in extension XTEST
    Initializing built-in extension BIG-REQUESTS
    Initializing built-in extension SYNC
    Initializing built-in extension XKEYBOARD
    Initializing built-in extension XC-MISC
    Initializing built-in extension SECURITY
    Initializing built-in extension XINERAMA
    Initializing built-in extension XFIXES
    Initializing built-in extension RENDER
    Initializing built-in extension RANDR
    Initializing built-in extension COMPOSITE
    Initializing built-in extension DAMAGE
    Initializing built-in extension MIT-SCREEN-SAVER
    Initializing built-in extension DOUBLE-BUFFER
    Initializing built-in extension RECORD
    Initializing built-in extension DPMS
    Initializing built-in extension X-Resource
    Initializing built-in extension XVideo
    Initializing built-in extension XVideo-MotionCompensation
    Initializing built-in extension XFree86-VidModeExtension
    Initializing built-in extension XFree86-DGA
    Initializing built-in extension XFree86-DRI
    Initializing built-in extension DRI2
    Loading extension GLX
    Loading extension NV-GLX
    Loading extension NV-CONTROL
    Loading extension XINERAMA
    setversion 1.4 failed
    Openbox-Debug: --startup /usr/lib/openbox/openbox-autostart OPENBOX
    Openbox-Debug: Moving to desktop 1
    Openbox-Debug: not managing override redirect window 0x4000bb
    which: no hsetroot in (/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/android-sdk/platform-tools:/usr/bin/core_perl:/home/dodo3773/Documents/Scripts:/home/dodo3773/Documents/Scripts)
    which: no esetroot in (/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/android-sdk/platform-tools:/usr/bin/core_perl:/home/dodo3773/Documents/Scripts:/home/dodo3773/Documents/Scripts)
    which: no xsetroot in (/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/android-sdk/platform-tools:/usr/bin/core_perl:/home/dodo3773/Documents/Scripts:/home/dodo3773/Documents/Scripts)
    kupfer: Reading from stdin
    The XKEYBOARD keymap compiler (xkbcomp) reports:
    > Warning: Compat map for group 2 redefined
    > Using new definition
    > Warning: Compat map for group 3 redefined
    > Using new definition
    > Warning: Compat map for group 4 redefined
    > Using new definition
    Errors from xkbcomp are not fatal to the X server
    Openbox-Debug: Caught signal 22. Ignoring.
    Openbox-Debug: UPDATE DESKTOP NAMES
    Openbox-Debug: Keyboard map changed. Reloading keyboard bindings.
    Edit4: Removed everything from /etc/xdg/autostart and ~/.config/autostart/ directories. That didn't work.
    Edit5: Tried installing xorg-xsetroot to let openbox set the color of the wallpaper. That didn't work.
    Edit6: Checked the output of "loginctl show-session $XDG_SESSION_ID" to make sure that wasn't the issue. Looks okay to me:
    Id=1
    Timestamp=Fri 2013-05-17 10:25:53 PDT
    TimestampMonotonic=13650783
    DefaultControlGroup=systemd:/user/1000.user/1.session
    VTNr=1
    TTY=tty1
    Remote=no
    Service=login
    Leader=405
    Audit=1
    Type=tty
    Class=user
    Active=yes
    State=active
    KillProcesses=no
    IdleHint=no
    IdleSinceHint=1368811547544203
    IdleSinceHintMonotonic=7545641
    Name=dodo3773
    Edit7: Tried installing xorg-xrdb thinking maybe that would help and did todays updates. No luck yet.
    Edit8: Kupfer still loads even though nothing else does. So I uninstalled kupfer. Same thing though. No autostart.
    Edit9: Tried booting into repo kernel instead of ck kernel. Didn't work.
    Last edited by dodo3773 (2013-05-19 06:34:44)

    WonderWoofy wrote:Interestingly, of all those things you included in your post, you forgot to include the autostart script itself.  What does that look like?
    Well, since it worked fine even when called indirectly through openbox-autostart and since it's worked fine for months I figured it was fine. I am happy to post it though. Here you go:
    feh --bg-scale /home/dodo3773/Pictures/blacksolid.png &
    xfce4-panel &
    numlockx &
    keepassx -lock &
    kupfer --no-splash &
    ~/Documents/Scripts/startupopen.sh &
    sleep 30 && sudo /usr/bin/ntpd -qg &
    sudo /usr/sbin/ethtool -K eth0 rx off &
    ~/Documents/Scripts/conky.sh &
    sudo /home/dodo3773/Documents/Scripts/temp_throttlenew > /dev/null 2>&1 &
    Here are the external scripts that are called (startupopen.sh and temp_throttlenew):
    startupopen.sh
    #! /bin/bash
    sleep 13
    chromium &
    thunderbird &
    sleep 20
    devilspie -a &
    sleep 7
    pkill devilspie &
    exit
    temp_throttlenew
    #!/bin/bash
    # temp_throttle.sh max_temp
    # USE CELSIUS TEMPERATURES.
    if [[ $EUID -ne 0 ]]; then
    echo "This script must be run as root" 1>&2
    exit 1
    fi
    #if [ $# -ne 1 ]; then
    # If temperature wasn't given, then print a message and exit.
    # echo "Please supply a maximum desired temperature in Celsius." 1>&2
    # echo "For example: ${0} 60" 1>&2
    # exit 2
    #else
    #Set the first argument as the maximum desired temperature.
    MAX_TEMP=85
    #fi
    # The frequency will increase when low temperature is reached.
    let LOW_TEMP=$MAX_TEMP-5
    CORES=$(nproc) # Get number of CPU cores.
    echo -e "Number of CPU cores detected: $CORES\n"
    # Temperatures internally are calculated to the thousandth.
    MAX_TEMP=${MAX_TEMP}000
    LOW_TEMP=${LOW_TEMP}000
    # FREQ_LIST is a list (array) of all available cpu frequencies the system allows.
    declare -a FREQ_LIST=($(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies))
    # CURRENT_FREQ relates to the FREQ_LIST by keeping record of the currently set frequency.
    let CURRENT_FREQ=1
    function set_freq {
    echo ${FREQ_LIST[$1]}
    cpupower frequency-set -g "ondemand" -d "800MHz" -u ${FREQ_LIST[$1]}
    function throttle {
    if [ $CURRENT_FREQ -ne $((${#FREQ_LIST[@]}-1)) ]; then
    let CURRENT_FREQ+=1
    echo -n "throttle "
    set_freq $CURRENT_FREQ
    fi
    function unthrottle {
    if [ $CURRENT_FREQ -ne 0 ]; then
    let CURRENT_FREQ-=1
    echo -n "unthrottle "
    set_freq $CURRENT_FREQ
    fi
    function get_temp {
    # Get the system temperature.
    # If one of these doesn't work, the try uncommenting another.
    TEMP=$(cat /sys/class/thermal/thermal_zone0/temp)
    #TEMP=$(cat /sys/class/hwmon/hwmon0/temp1_input)
    #TEMP=$(cat /sys/class/hwmon/hwmon1/device/temp1_input)
    while true; do
    get_temp
    if [ $TEMP -gt $MAX_TEMP ]; then # Throttle if too hot.
    throttle
    elif [ $TEMP -le $LOW_TEMP ]; then # Unthrottle if cool.
    unthrottle
    fi
    sleep 3
    done
    Stuff that needs sudo is in my sudoers as "username hostname NOPASSWD: item1,item2,etc,etc". Nothing too exciting. Seems like if there was suddenly something wrong with my autostart file at least some of the stuff would run either way though cause of "&". Pretty puzzling this issue is.

  • [ SOLVED ] [ Openbox ] autostart.sh is being ignored ..

    ~/.config/openbox/autostart.sh
    # Turn On numlock
    numlockx &
    # Desktop background
    nitrogen --restore &
    # Panel
    tint2 &
    # Conky
    conky -c ~/.conkyrc
    .xinitrc
    exec ck-launch-session openbox
    start-pulseaudio-x11
    When Openbox starts, nothing happens ( none of the entries gets executed ).
    ** Works perfectly when I execute the given file from the command line ..
    How to fix it ?
    [ SOLVED ] Changed .xinitrc line from openbox to openbox-session and everything seems to be working now ..
    Last edited by Minimal Scope (2010-10-29 18:17:06)

    Sorry I'm new with linux. Thanks you for your time
    Last edited by Jeager (2010-05-16 20:40:26)

  • [solved] Issue with conky and Kde 4

    I have a small issue with conky and KDE 4.2. I start conky with a script which I stored under ~/.kde/Autostart. The script is simple and looks like this..
    conky -c ~/.conkyrc_kde4
    This works fine. But when I restart the first KDE and check with ps, I have 2 instances of conky running. The instances keep on growing with the number of restarts.
    I think kde tries to restart all the apps which were running when the session was terminated. Is there a way to change this behavior in general or all the programs or for only a specific program like conky ?
    Last edited by rangalo (2009-07-28 19:02:17)

    I did
    Systemsettings > Advanced > Session Manager > Start with an empty session
    and put everything you want in Autostart

  • [SOLVED]systemd and make a camera visible GUI-wise in your filemanager

    After reading a lot about systemd in the wiki and in this forum I understand there are different opionons about systemd. Anyway, I have a adapted all the changes to rc.conf leaving out only a few daemons to start there. So why not give systemd a try? If you dont want to read the full posting I finally got it to work, basically by reading carefully and checking the suggested tests in the systemd wiki. (loginctl)
    As suggested by the wiki, I tried the systemd yesterday. Enabled via systemctl some services to "replace" my rc.conf daemons. I got what I thought everything to work, including autologin directly to my Xfce4 desktop. Everything except the digital camera.
    When starting Arch traditionally via initscripts I immediately can see the camera in the filemanager (Nautilus) when the camera is attached via USB.
    Some minutes later, after adding "init=/usr/lib/systemd/systemd" to the APPEND line in Syslinux and rebooting, my machine reboots
    fine.But when connecting the camera again it is not visible graphically.
    The camera is there because when using gphoto2 (the commandline) as root I can transfer pictures etc.
    Even if I am no happy CLI user I can handle it when necessary. Handling pictures a graphical view of them is much easier...
    As the wiki about systemd says one can try it out. I have not removed anything from the system and when starting Arch again, the initscript way, I can see the camera again in my filemanager, gthumb works again and pictures can be transferred to my machine.
    In the wiki again, this time about digital cameras
    Permission issues
    Camera devices should be granted permission using ACLs. For this to work, users need to have consolekit or systemd running and the user session must be registered with them accordingly.
    Check this using /usr/bin/ck-list-sessions to verify a value of "TRUE" should be returned for both the "active" and "is-local" fields:
    $ ck-list-sessions | grep TRUE
    active = TRUE
    is-local = TRUE
    ACL=Atlantic Container Line is what first comes into my mind. I have had some connections to transport business...I admit I had to google it to find the correct interpretation of this mumbo-jumbo.
    The wiki also gives a "hint", if this is not working try to use the obsolete camera group and edit some udev rules.
    Should not be necessary when it has worked before systemd and earlier experiences
    But what is this about "Permission issues"?  Here is my listings relative the wiki hints. All seems OK.. or why the heck are there two sessions??
    [leif@krasaki ~]$ ck-list-sessions | grep TRUE
    is-local = TRUE
    active = TRUE
    is-local = TRUE
    [leif@krasaki ~]$ ck-list-sessions
    Session1:
    unix-user = '1000'
    realname = '(null)'
    seat = 'Seat1'
    session-type = ''
    active = FALSE
    x11-display = ''
    x11-display-device = ''
    display-device = '/dev/tty1'
    remote-host-name = ''
    is-local = TRUE
    on-since = '2012-10-24T07:12:56.499847Z'
    login-session-id = '1'
    idle-since-hint = '2012-10-24T07:13:26.994037Z'
    Session2:
    unix-user = '1000'
    realname = '(null)'
    seat = 'Seat1'
    session-type = ''
    active = TRUE
    x11-display = ':0'
    x11-display-device = '/dev/tty7'
    display-device = '/dev/tty1'
    remote-host-name = ''
    is-local = TRUE
    on-since = '2012-10-24T07:13:02.361157Z'
    login-session-id = '1'
    [leif@krasaki ~]$
    As one can see, the ACTIVE values are here as the wiki says. But no camera. Those values are the same, wheter which way the machine is started. But 2 sessions??
    Further reading in the systemd wiki article and consolekit vs systemd.logind gives a clue.
    From the wiki:
    In order to check the status of your user session, you can use loginctl. To see if your user session is properly set up, check if the following command contains Active=yes. All polkit actions like suspending the system or mounting external drives with Udisks should then work automatically.
    So when started via systemd and running logintctl, it gives this surprising result. Does not matter wheter as normal user, nor as root....
    [leif@krasaki ~]$ loginctl
    SESSION UID USER SEAT
    1 1000 leif seat0
    1 sessions listed.
    [leif@krasaki ~]$ loginctl show-session 1
    Id=1
    Timestamp=Wed, 24 Oct 2012 10:57:03 +0200
    TimestampMonotonic=20040019
    DefaultControlGroup=name=systemd:/user/leif/1
    VTNr=1
    TTY=tty1
    Remote=no
    Service=login
    Leader=315
    Audit=1
    Type=tty
    Class=user
    Active=no
    State=online
    KillProcesses=no
    IdleHint=yes
    IdleSinceHint=1351069009642296
    IdleSinceHintMonotonic=6664433
    Name=leif
    [leif@krasaki ~]$
    Surprising? Should it not have been Active=Yes? So something is wrong in my settings although it had worked "before" starting using systemd..
    OK, so far. Lost? Not yet. Double check again everything and I found the culprit, my  ~/.bash_profile which had worked before seemed a bit different to what is suggested in the wiki. The old one, actually started 2 sessions, as also could be seen here above checking ck-list-sessions. That was the problem
    Using a fresh edited ~/.bash_profile as suggested here, the camera is visible graphically
    Finally, just for fun, start again the old initscipt way. Enabling daemon and so on. Still 2 sessions going on....Here it was the "/.xinitrc, which also had some old fashions and I removed the ck-launch-session from the exec line. So even here, now only 1 session..
    Anyway, now the camera is visible, both starting with initscripts, naturally also some daemons active in rc.conf and by starting with systemd.
    I rest my case and it seems systemd works with everything on my machine which is just a normal desktop used by an old man.
    Thanks for reading...

    Solved now! Boot times are as fast as posssible on my HDD I think. Only thing after uninstalling initscripst and initscripts-systemd was that locale was not set inspite of a correct /etc/locale.conf. I had to make /etc/profile.d/locale.sh with this content;
    if [ -s /etc/locale.conf ]; then
    . /etc/locale.conf
    fi
    export LANG LANGUAGE LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE
    export LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS
    export LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION

  • [solved] systemd power control doesn't work

    Since there is no way of getting systemctl power control work without sudo, I tried modifying sudoers to allow my user to operate them without password.
    However, it still won't work.
    I tried that
    cross ALL = NOPASSWD: /usr/sbin/hibernate,/usr/bin/systemctl suspend,/usr/bin/systemctl reboot,/usr/bin/systemctl suspend,/usr/bin/systemctl hibernate
    and I tried that
    cross ALL = NOPASSWD: /usr/bin/systemctl
    The result was the same:
    $ systemctl suspend
    Failed to issue method call: Access denied
    Failed to issue method call: Access denied
    Last edited by impact (2012-11-09 11:28:17)

    impact wrote:
    Since there is no way of getting systemctl power control work without sudo, I tried modifying sudoers to allow my user to operate them without password.
    However, it still won't work.
    I tried that
    cross ALL = NOPASSWD: /usr/sbin/hibernate,/usr/bin/systemctl suspend,/usr/bin/systemctl reboot,/usr/bin/systemctl suspend,/usr/bin/systemctl hibernate
    and I tried that
    cross ALL = NOPASSWD: /usr/bin/systemctl
    The result was the same:
    $ systemctl suspend
    Failed to issue method call: Access denied
    Failed to issue method call: Access denied
    you have to use "sudo systemctl suspend" still, sudoers is only affecting sudo behavior as it was mentioned...
    nahuy_systemd wrote:systemd very bad system. I solved this. I moved to CRUX.
    ...and you registered to the forum just to tell us that? well, if I were you, i would either change the doctor or make him prescribe me another pills

  • [SOLVED]systemd-tmpfiles-setup.service failure

    Hi guys,
    I just reinstalled arch with the following partitions:
    [root@arch_vinnom vinnom]# gdisk -l /dev/sda
    GPT fdisk (gdisk) version 1.0.0
    Partition table scan:
    MBR: protective
    BSD: not present
    APM: not present
    GPT: present
    Found valid GPT with protective MBR; using GPT.
    Disk /dev/sda: 625142448 sectors, 298.1 GiB
    Logical sector size: 512 bytes
    Disk identifier (GUID): BD3CA679-FA08-4F60-9BAD-B845DE9FF7EB
    Partition table holds up to 128 entries
    First usable sector is 34, last usable sector is 625142414
    Partitions will be aligned on 2048-sector boundaries
    Total free space is 2014 sectors (1007.0 KiB)
    Number Start (sector) End (sector) Size Code Name
    1 2048 4095 1024.0 KiB EF02 BIOS
    2 4096 52432895 25.0 GiB 8300 ROOT
    3 52432896 53481471 512.0 MiB 8300 BOOT
    4 53481472 74452991 10.0 GiB 8300 TMP
    5 74452992 95424511 10.0 GiB 8300 VAR
    6 95424512 602935295 242.0 GiB 8300 HOME
    7 602935296 625142414 10.6 GiB 8200 SWAP
    The problem is that tmpfs is mounted at '/tmp' through '/usr/lib/systemd/system/tmp.mount'
    # This file is part of systemd.
    # systemd is free software; you can redistribute it and/or modify it
    # under the terms of the GNU Lesser General Public License as published by
    # the Free Software Foundation; either version 2.1 of the License, or
    # (at your option) any later version.
    [Unit]
    Description=Temporary Directory
    Documentation=man:hier(7)
    Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
    ConditionPathIsSymbolicLink=!/tmp
    DefaultDependencies=no
    Conflicts=umount.target
    Before=local-fs.target umount.target
    [Mount]
    What=tmpfs
    Where=/tmp
    Type=tmpfs
    Options=mode=1777,strictatime
    Because of this, I'm always getting:
    ● systemd-tmpfiles-setup.service - Create Volatile Files and Directories
    Loaded: loaded (/usr/lib/systemd/system/systemd-tmpfiles-setup.service; static; vendor preset: disabled)
    Active: failed (Result: exit-code) since Dom 2015-05-03 03:29:58 BRT; 27min ago
    Docs: man:tmpfiles.d(5)
    man:systemd-tmpfiles(8)
    Process: 278 ExecStart=/usr/bin/systemd-tmpfiles --create --remove --boot --exclude-prefix=/dev (code=exited, status=1/FAILURE)
    Main PID: 278 (code=exited, status=1/FAILURE)
    Then I tried to change '/tmp' to '/run/tmpfs', folder that I created for this, using tmpfs wiki as reference.
    # This file is part of systemd.
    # systemd is free software; you can redistribute it and/or modify it
    # under the terms of the GNU Lesser General Public License as published by
    # the Free Software Foundation; either version 2.1 of the License, or
    # (at your option) any later version.
    [Unit]
    Description=Temporary Directory
    Documentation=man:hier(7)
    Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
    ConditionPathIsSymbolicLink=!/run/tmpfs
    DefaultDependencies=no
    Conflicts=umount.target
    Before=local-fs.target umount.target
    [Mount]
    What=tmpfs
    Where=/run/tmpfs
    Type=tmpfs
    Options=mode=1777,strictatime,nodev,nosuid,size=1536M
    But the error persists. What I'm missing?
    Last edited by vinnom (2015-05-03 16:51:38)

    ooo wrote:Couldn't you just mask the tmp.mount service? (as mentioned in the wiki page you linked)
    Then your /tmp partition would be mounted according to your fstab
    Raynman wrote:
    The tmp.mount generated from your fstab should override the tmp.mount in /usr/lib/systemd/system. You say
    The problem is that tmpfs is mounted at '/tmp' through '/usr/lib/systemd/system/tmp.mount'
    If that is true (could you show output of mount and your fstab?) that is worth investigating.
    However, your original problem seems to be that systemd-tmpfiles-setup.service fails. If something is wrong with your mounts, that could be related, but it might very well be something else. Is there any more information in the journal to indicate why the service fails (maybe even mentioning a tmpfiles.d config file that is responsible)? Did you create any config files for tmpfiles.d yourself?
    Sorry guys, I tried to be concise, but ended up that I didn't make myself clear.
    My '/tmp' is mounting fine as it takes priority over systemd. In fact, what I wanted to say is that '/tmp' mounts fine, systemd tried to mount tmpfs at '/tmp' and fails and I want to point tmpfs to mount at '/run/tmpfs' which I created for this, but just editing '/usr/lib/systemd/system/tmp.mount' didn't solve.
    As for journalctl, it repeats several times this message:
    Mai 02 22:43:32 arch_vinnom systemd[1]: systemd-tmpfiles-setup.service: main process exited, code=exited, status=1/FAILURE
    Mai 02 22:43:32 arch_vinnom systemd[1]: Failed to start Create Volatile Files and Directories.
    Mai 02 22:43:32 arch_vinnom systemd[1]: Unit systemd-tmpfiles-setup.service entered failed state.
    Mai 02 22:43:32 arch_vinnom systemd[1]: systemd-tmpfiles-setup.service failed.
    foutrelis wrote:
    Depending on how your '/var' file system is created/mounted, you might need to enable ACL on it:
    https://wiki.archlinux.org/index.php/Sy … rt_at_boot
    hmm
    I created my /var during arch installation, with mkfs.reiserfs.
    Using
    tune2fs -l /dev/sdXY | grep "Default mount options:"
    To check if acl was already enabled, I got:
    [root@arch_vinnom vinnom]# tune2fs -l /dev/sda5 | grep "Default mount options:"
    tune2fs: Bad magic number in super-block while trying to open /dev/sda5
    Couldn't find valid filesystem superblock.
    Then I searched a bit and noted that reiserfs isn't compatible with acl =/
    Last edited by vinnom (2015-05-03 15:12:18)

  • [SOLVED] Problems autostarting xbmc after nvidia upgrade

    Hello!
    With nvidia version 302.17-1 and with 302.17.2 xorg errors and fails when autostarting xbmc.:
    Here is my Xorg.0.log: https://gist.github.com/3118969
    Here is my xorg.conf:
    https://gist.github.com/3118996
    But downgrading nvidia and nvidia-utils to version 295.59 makes everything work again.
    So is this considered as a bug or can I change my configuration to make it work with latest nvidia drivers?
    My graphics card is PCI and not PCIe, maybe there is some problem with old PCI cards?
    I am now using standard xbmc package in repositories (earlier I used xbmc-pvr-git but I changed to standard xbmc to see if it was a problem even without using AUR packages).
    Last edited by ronnylov (2012-07-17 14:04:32)

    Thanks. But I got another problem now because I can't upgrade from nvidia 295.59 to the latest version. There is some kind of dependency problem, probably because of the switch from /lib to /usr/lib.
    [ronny@htpc ~]$ sudo pacman -Syu
    Lösenord:
    :: Synkroniserar paketdatabasen...
    core är senaste versionen
    extra är senaste versionen
    community är senaste versionen
    :: Påbörjar full systemuppgradering...
    löser beroenden...
    letar efter inre konflikter...
    Mål (3): cairo-1.12.2-2 nvidia-302.17-2 nvidia-utils-302.17-1
    Total Installationsstorlek: 54,02 MiB
    Nettouppgraderingsstorlek: 0,69 MiB
    Fortsätt med installation? [Y/n]
    (3/3) kontrollerar paketintegritet [######################] 100%
    (3/3) laddar paketfiler [######################] 100%
    (3/3) kontrollerar filkonflikter [######################] 100%
    fel: misslyckades att påbörja överföringen (motstridiga filer )
    nvidia: /usr/lib/modules/extramodules-3.4-ARCH/nvidia.ko.gz existerar i filsystemet
    Fel uppstod, inga paket uppgraderades.
    [ronny@htpc ~]$
    Trying to following the info  here https://wiki.archlinux.org/index.php/De … iki:usrlib:
    [ronny@htpc ~]$ grep '^lib/' /var/lib/pacman/local/*/files
    /var/lib/pacman/local/nvidia-295.59-1/files:lib/
    /var/lib/pacman/local/nvidia-295.59-1/files:lib/modules/
    /var/lib/pacman/local/nvidia-295.59-1/files:lib/modules/extramodules-3.4-ARCH/
    /var/lib/pacman/local/nvidia-295.59-1/files:lib/modules/extramodules-3.4-ARCH/nvidia.ko.gz
    OK the old package installed files in the wrong place when I downgraded nvidia after the update to /usr/lib.
    These packages need rebuilding so as not to include the /lib directory. They can also simply be uninstalled and reinstalled again after upgrading glibc.
    So I try to uninstall nvidia and nvidia-utils:
    [ronny@htpc ~]$ sudo pacman -Rs nvidia nvidia-utils
    Lösenord:
    kontrollerar beroenden...
    fel: misslyckades att förbereda överföring (kunde inte tillfredställa beroenden)
    :: libva: behöver libgl
    :: mesa: behöver libgl
    :: mplayer: behöver libgl
    :: xorg-xdriinfo: behöver libgl
    OK then uninstall these packages as well...
    [ronny@htpc ~]$ sudo pacman -Rs nvidia nvidia-utils libva mesa mplayer xorg-xdriinfo
    kontrollerar beroenden...
    fel: misslyckades att förbereda överföring (kunde inte tillfredställa beroenden)
    :: ffmpeg: behöver libva
    :: freeglut: behöver mesa
    :: glew: behöver mesa
    :: gnome-mplayer: behöver mplayer
    :: vdpau-video: behöver libva
    :: xbmc: behöver libva
    :: xorg-utils: behöver xorg-xdriinfo
    and I get even more dependency problems.. I am a little bit new on this but do I need to reinstall almost everything just to uninstall a video driver? I just want to replace the old driver with the new one...
    I think I need a hint of how to solve my problem. Perhaps this thread belongs somewhere else in the forum?
    Last edited by ronnylov (2012-07-17 11:01:31)

  • Read only after install [SOLVED -- systemd related]

    Anyone know why a new (booted ~2-3 times) install would suddenly mount read-only?  /etc/fstab is fine, /etc/mtab reports rootfs / as rw, and I am logged in as root, but I get "read-only filesystem", hence there are no logs, etc.
    Last edited by goldilocks (2012-10-14 18:01:41)

    DSpider wrote:You probably removed "ro" from syslinux.cfg.
    Nope.   I have a startup service I use on fedora, and since the target I usually use wasn't apparent, I casually systemctl enabled it with WantedBy=local-fs.target, figuring if that was too early it would just fail (it writes to to disk).
    Using "mount -o remount,rw /" worked, so I tried a few things like switching fstab to use a UUID instead of a device node, that didn't work.  Finally I disabled the service and everything is back to normal.
    I did this a couple of times (enabling, rebooting, disabling, rebooting) just to confirm that was the cause. I guess that target runs before the rw remount, maybe this causes systemd to crap out in some way.  Shame it can't just fail the service, log it, and continue.  Maybe even an oversight verging on "bug", though I am sure they are aware of it already.
    I'd mark this "SOLVED" but I don't see a button...
    Last edited by goldilocks (2012-10-14 17:49:16)

  • [Solved] systemd-user-session: Best way to pass global ENV vars?

    Hey guys,
    So when using the [email protected] from the user-session-units what's the best / cleanest way to set global environment variables for that systemd --user instance (and thus, all programs spawned from it)?
    What I'm talking about is /etc/profile and $HOME/.profile.
    For example, I usally configure my XDG_CONFIG_HOME and XDG_CACHE_HOME in my ~/.profile. But since systemd --user is being started by systemd --session none of these environment variables are loaded.
    The solution I've come up is to change the ExecStart in the [email protected] file to something like this:
    ExecStart=/usr/bin/sh -c "source /etc/profile; source $HOME/.config/bash/environment; exec /usr/lib/systemd/systemd --user"
    I know I could use the `EnvironmentFile` option to load the environment variables from a file, but it's not as flexable as a bash script.
    Am I thinking about this problem wrong? Is there a more "systemd --user"-y way of solving the problem?
    Last edited by EvanPurkhiser (2013-08-12 03:02:48)

    I've more or less solved this using my own user-session units. I still don't know if my method would really be considered the proper way or not though.
    Last edited by EvanPurkhiser (2013-08-12 03:02:19)

  • [SOLVED] systemd/User, starting a Dependent service

    I am missing something simple here.  I have two services.  Once is dependent on the other.
    I got the first service to start with:
    $ cat ~/.config/systemd/user/[email protected]
    [Unit]
    Description=Syncthing - Open Source Continuous File Synchronization for %I
    Documentation=https://github.com/syncthing/syncthing/wiki
    After=network.target
    [Service]
    #User=%i
    Environment=STNORESTART=yes
    ExecStart=/usr/bin/syncthing -no-browser -logflags=0
    Restart=on-failure
    SuccessExitStatus=2 3 4
    RestartForceExitStatus=3 4
    [Install]
    #WantedBy=multi-user.target
    WantedBy=default.target
    This autostarts upon logging in with i3 and gnome.  No problem (now).
    The problem I have is with the notifier/watcher:
    $ cat ~/.config/systemd/user/[email protected]
    [Unit]
    Description=Syncthing Inotify File Watcher for %I
    Documentation=https://github.com/syncthing/syncthing-inotify/blob/master/README.md
    After=network.target [email protected]
    [email protected]
    [Service]
    #User=%i
    ExecStart=/usr/bin/syncthing-inotify -logflags=0
    SuccessExitStatus=2
    Restart=on-failure
    ProtectSystem=full
    ProtectHome=read-only
    [Install]
    #WantedBy=multi-user.target
    WantedBy=default.target
    Installed it into my namespace, like I did with the parent service:
    $ systemctl --user enable [email protected]
    On system startup/login, the service is "Dead (inactive)."
    But, I can start it manually:
    $ systemctl --user start [email protected]
    And the status of the service shows it logging and working, picking up changes, etc.
    I must be missing a configuration parameter in the service file.
    Last edited by eduncan911 (2015-05-25 14:39:38)

    mauritiusdadd wrote:
    Just a shot in the dark, but try to change the After= and Requires= lines in [email protected] to
    After=network.target syncthing@%i.service
    Requires=syncthing@%i.service
    You know how you stay up late and everything you do right seems to be wrong?
    When I ran:
    systemctl status [email protected]
    ...it showed inactive (dead) and is the reason I made this thread. 
    Changed it to this:
    systemctl --user status [email protected]
    Allowed me to see it started.  *head smack*
    And btw, I tried "syncthing@%i.service" and it worked too!  I reverted back to "[email protected]" to verify %i fixed it, but it started as well as before.  So "%i" seems agnostic and would work as well.

  • [SOLVED] systemd --user: "Failed to open private bus connection:"

    EDIT: The solution was to set DBUS_SESSION_BUS_ADDRESS, as suggested by gtmanfred in irc.  By putting the following before executing systemd --user, the error vanished:
    export DBUS_SESSION_BUS_ADDRESS=/run/user/$(id -u)/dbus/user_bus_socket
    ===================
    Original problem:
    Everything on my box appears to be working ok, but I'm getting this error consistently in tty1 and at the top of journalctl (as user) whenever I start systemd --user:
    systemd[3975]: Failed to open private bus connection: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
    I roughly have my system setup per this wiki section https://wiki.archlinux.org/index.php/Sy … ur_Session.  I start systemd --user via a small script in my .bash_profile. Here are my relevant dbus{.service,socket} files, from the package user-session-units mentioned in the wiki:  (Edit: xorg is started through xorg-launch-helper, also from that wiki page)  Edit2: I'm not using autologin.  I noticed that under the autologin section of that page, DBUS_SESSION_BUS_ADDRESS is set to some path.  In my setup that isn't set anywhere, so I may try to copy that later but I don't have time to play with it right now.  Will post back later.
    =====/usr/lib/systemd/user/dbus.service=====
    [Unit]
    Description=D-Bus System Message Bus
    Requires=dbus.socket
    [Service]
    ExecStart=/usr/bin/dbus-daemon --session --address=systemd: --nofork --systemd-activation
    ExecReload=/usr/bin/dbus-send --print-reply --session --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig
    =====/usr/lib/systemd/user/dbus.socket=====
    [Unit]
    Description=D-Bus System Message Bus Socket
    [Socket]
    ListenStream=%t/dbus/user_bus_socket
    And the output of sudo systemctl status dbus:
    dbus.service - D-Bus System Message Bus
    Loaded: loaded (/usr/lib/systemd/system/dbus.service; static)
    Active: active (running) since Tue 2013-02-05 14:50:30 EST; 22min ago
    Main PID: 369 (dbus-daemon)
    CGroup: name=systemd:/system/dbus.service
    └─369 /usr/bin/dbus-daemon --system --address=systemd: --no...
    Feb 05 14:50:30 sellers-laptop systemd[1]: Starting D-Bus System Message Bus...
    Feb 05 14:50:30 sellers-laptop systemd[1]: Started D-Bus System Message Bus.
    Feb 05 14:51:18 sellers-laptop dbus-daemon[369]: dbus[369]: [system] Activating via systemd: service name='org.freedesktop.Avahi' unit='dbus-org.freedesktop.Avahi.service'
    Feb 05 14:51:18 sellers-laptop dbus[369]: [system] Activating via systemd: service name='org.freedesktop.Avahi' unit='dbus-org.freedesktop.Avahi.service'
    Feb 05 14:51:18 sellers-laptop dbus[369]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.Avahi.service': Unit dbus-org.freedesktop.Avahi.service failed to load: No such file or directory. See system logs and 'systemctl status dbus-org.freedesktop.Avahi.service' for details.
    Feb 05 14:51:18 sellers-laptop dbus-daemon[369]: dbus[369]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.Avahi.service': Unit dbus-org.freedesktop.Avahi.service failed to load: No such file or directory. See system logs and 'systemctl status dbus-org.freedesktop.Avahi.service' for details.
    I'm not sure what the error even means or how to go about debugging it.  Any suggestions would be appreciated.
    Last edited by Feynman (2013-02-05 22:07:23)

    NVM...didn't notice it was already solved.
    Last edited by the sad clown (2013-02-05 22:33:10)

Maybe you are looking for

  • ORA-29275

    Hi, I am creating a table like this: CREATE tableA As SELECT * FROM tableA@DBLINK; And I get this error: ERROR at line 2: ORA-29275: partial multibyte character Thanks.

  • Mac mini replacement motherboards

    I have a 2.53ghz intel core 2 duo, 4gb of DDR3, 320gb mac mini I purchased in 2009. It stopped working so I took it into apple and they told me the motherboard was out and It would cost $430 to fix. I was wondering if there is an less expensive alter

  • Adding New Custom field in KE30 Report

    Hi Friends, I have the requirement to Add new custon field in the KE30 report . Is this Possible ? Can anyone Tel me how to go about it .? Thanks in advance.

  • Purchasing Quote R12.1.3

    Hi, i know there is not workflow for Purchasing quote so, can any one guide me to how to send notification to specific user or department , or how to customize workflow for this process? Thanks

  • My mac froze up and I tried to restart and now get a blinking ? folder

    My computer froze up and wouldn't shut down or restart, so I restarted it with the power button and now it will only show a blinking folder with a ? mark on it... what do I do?????