Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: How to start appimaged via systemd

  1. #1
    Join Date
    Aug 2008
    Location
    Almere, The Netherlands
    Posts
    63

    Default How to start appimaged via systemd

    Guru's,

    I am struggeling a bit with starting appimaged via systemd. The appimaged package is installed and comes with a service file in /usr/lib/systemd/user/appimaged.service (which makes sence since it should run under uid of a "normal" user).
    In /home/arjan/.config/systemd/user/graphical.target.wants a link is made to the (package) appimaged.service file:

    Code:
    arjan@arjanpc:~> ls -l /home/arjan/.config/systemd/user/graphical.target.wants
    totaal 0
    lrwxrwxrwx 1 arjan users 39 15 jan 20:53 appimaged.service -> /usr/lib/systemd/user/appimaged.service
    arjan@arjanpc:~>
    The service file itself is straightforward:
    Code:
    [Unit]
    Description=AppImage daemon
    After=basic.target
    
    [Service]
    ExecStart=/usr/bin/appimaged
    Restart=always
    RestartSec=5s
    StartLimitInterval=0
    
    [Install]
    WantedBy=graphical.target
    I have enabled (as user arjan) appimaged but after login appimaged is not started, however if I start it manually it does what it should do.
    Code:
    arjan@arjanpc:~> systemctl --user status  appimaged
    ● appimaged.service - AppImage daemon
       Loaded: loaded (/usr/lib/systemd/user/appimaged.service; enabled; vendor preset: disabled)
       Active: inactive (dead)
    arjan@arjanpc:~> systemctl --user start  appimaged
    arjan@arjanpc:~> systemctl --user status  appimaged
    ● appimaged.service - AppImage daemon
       Loaded: loaded (/usr/lib/systemd/user/appimaged.service; enabled; vendor preset: disabled)
       Active: active (running) since Thu 2020-01-16 20:09:02 CET; 17s ago
     Main PID: 2881 (appimaged)
       CGroup: /user.slice/user-1000.slice/user@1000.service/appimaged.service
               └─2881 /usr/bin/appimaged
    arjan@arjanpc:~>
    Any hints or tips on what I am missing?
    Thanks in advance,

    Arjan ten Hoopen

  2. #2
    Join Date
    Sep 2012
    Posts
    5,323

    Default Re: How to start appimaged via systemd

    There is no user graphical.target, just user default.target.

  3. #3
    Join Date
    Aug 2008
    Location
    Almere, The Netherlands
    Posts
    63

    Default Re: How to start appimaged via systemd

    Quote Originally Posted by arvidjaar View Post
    There is no user graphical.target, just user default.target.
    Sorry but there IS a graphical.target, loaded and set as default target:
    Code:
    arjanpc:/usr/lib/systemd # cat ./system/graphical.target
    #  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=Graphical Interface
    Documentation=man:systemd.special(7)
    Requires=multi-user.target
    Wants=display-manager.service
    Conflicts=rescue.service rescue.target
    After=multi-user.target rescue.service rescue.target display-manager.service
    AllowIsolate=yes
    arjanpc:/usr/lib/systemd # systemctl list-units --type target
    UNIT                   LOAD   ACTIVE SUB    DESCRIPTION                  
    basic.target           loaded active active Basic System                 
    cryptsetup.target      loaded active active Local Encrypted Volumes      
    getty.target           loaded active active Login Prompts                
    graphical.target       loaded active active Graphical Interface          
    local-fs-pre.target    loaded active active Local File Systems (Pre)     
    local-fs.target        loaded active active Local File Systems           
    multi-user.target      loaded active active Multi-User System            
    network-online.target  loaded active active Network is Online            
    network.target         loaded active active Network                      
    nfs-client.target      loaded active active NFS client services          
    nss-lookup.target      loaded active active Host and Network Name Lookups
    nss-user-lookup.target loaded active active User and Group Name Lookups  
    paths.target           loaded active active Paths                        
    remote-fs-pre.target   loaded active active Remote File Systems (Pre)    
    remote-fs.target       loaded active active Remote File Systems          
    rpcbind.target         loaded active active RPC Port Mapper              
    slices.target          loaded active active Slices                       
    sockets.target         loaded active active Sockets                      
    sound.target           loaded active active Sound Card                   
    swap.target            loaded active active Swap                         
    sysinit.target         loaded active active System Initialization        
    time-sync.target       loaded active active System Time Synchronized     
    timers.target          loaded active active Timers                       
    
    LOAD   = Reflects whether the unit definition was properly loaded.
    ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
    SUB    = The low-level unit activation state, values depend on unit type.
    
    23 loaded units listed. Pass --all to see loaded but inactive units, too.
    To show all installed unit files use 'systemctl list-unit-files'.
    arjanpc:/usr/lib/systemd # systemctl get-default
    graphical.target
    arjanpc:/usr/lib/systemd #
    So I must be missing/overlooking something else

    BUT, thanks for looking at suggestion!!
    Thanks in advance,

    Arjan ten Hoopen

  4. #4
    Join Date
    Aug 2008
    Location
    Almere, The Netherlands
    Posts
    63

    Default Re: How to start appimaged via systemd

    arvidjaar, I have to admit that my previous reply was send to early. You speak about "user" targets while I was refering to "system" targets. ... sorry my mistake.

    The test I did was that I extended my systemd configuration in $HOME/.config:

    Code:
    arjan@arjanpc:~/.config/systemd/user> ls -lR
    .:
    totaal 8
    drwxr-xr-x 2 arjan users 4096 17 jan 11:45 default.target.wants
    drwxr-xr-x 2 arjan users 4096 15 jan 20:53 graphical.target.wants
    
    ./default.target.wants:
    totaal 0
    lrwxrwxrwx 1 arjan users 39 17 jan 11:45 appimaged.service -> /usr/lib/systemd/user/appimaged.service
    
    ./graphical.target.wants:
    totaal 0
    lrwxrwxrwx 1 arjan users 39 15 jan 20:53 appimaged.service -> /usr/lib/systemd/user/appimaged.service
    arjan@arjanpc:~/.config/systemd/user> cat /usr/lib/systemd/user/appimaged.service
    [Unit]
    Description=AppImage daemon
    After=basic.target
    
    [Service]
    ExecStart=/usr/bin/appimaged
    Restart=always
    RestartSec=5s
    StartLimitInterval=0
    
    [Install]
    #WantedBy=graphical.target
    WantedBy=default.target
    arjan@arjanpc:~/.config/systemd/user>
    The graphical.target.wants folder was already there, I created the default.target.wants folder and created a link to the service file. The service file states the default.target.

    Logged-out and in ... still inactive
    Thanks in advance,

    Arjan ten Hoopen

  5. #5
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,774

    Default Re: How to start appimaged via systemd

    Quote Originally Posted by athoopen View Post
    Sorry but there IS a graphical.target, loaded and set as default target:
    Code:
    arjanpc:/usr/lib/systemd # cat ./system/graphical.target
    #  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=Graphical Interface
    Documentation=man:systemd.special(7)
    Requires=multi-user.target
    Wants=display-manager.service
    Conflicts=rescue.service rescue.target
    After=multi-user.target rescue.service rescue.target display-manager.service
    AllowIsolate=yes
    arjanpc:/usr/lib/systemd # systemctl list-units --type target
    UNIT                   LOAD   ACTIVE SUB    DESCRIPTION                  
    basic.target           loaded active active Basic System                 
    cryptsetup.target      loaded active active Local Encrypted Volumes      
    getty.target           loaded active active Login Prompts                
    graphical.target       loaded active active Graphical Interface          
    local-fs-pre.target    loaded active active Local File Systems (Pre)     
    local-fs.target        loaded active active Local File Systems           
    multi-user.target      loaded active active Multi-User System            
    network-online.target  loaded active active Network is Online            
    network.target         loaded active active Network                      
    nfs-client.target      loaded active active NFS client services          
    nss-lookup.target      loaded active active Host and Network Name Lookups
    nss-user-lookup.target loaded active active User and Group Name Lookups  
    paths.target           loaded active active Paths                        
    remote-fs-pre.target   loaded active active Remote File Systems (Pre)    
    remote-fs.target       loaded active active Remote File Systems          
    rpcbind.target         loaded active active RPC Port Mapper              
    slices.target          loaded active active Slices                       
    sockets.target         loaded active active Sockets                      
    sound.target           loaded active active Sound Card                   
    swap.target            loaded active active Swap                         
    sysinit.target         loaded active active System Initialization        
    time-sync.target       loaded active active System Time Synchronized     
    timers.target          loaded active active Timers                       
    
    LOAD   = Reflects whether the unit definition was properly loaded.
    ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
    SUB    = The low-level unit activation state, values depend on unit type.
    
    23 loaded units listed. Pass --all to see loaded but inactive units, too.
    To show all installed unit files use 'systemctl list-unit-files'.
    arjanpc:/usr/lib/systemd # systemctl get-default
    graphical.target
    arjanpc:/usr/lib/systemd #
    So I must be missing/overlooking something else

    BUT, thanks for looking at suggestion!!
    You show the system graphical target, not the user graphical target (which I can understand that it does not exist).
    Henk van Velden

  6. #6
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,774

    Default Re: How to start appimaged via systemd

    Ps, I never tried to use systemd on the user level, but found this: https://wiki.archlinux.org/index.php/Systemd/User

    There is something there about the target.
    Henk van Velden

  7. #7
    Join Date
    Sep 2012
    Posts
    5,323

    Default Re: How to start appimaged via systemd

    Quote Originally Posted by athoopen View Post
    Logged-out and in ... still inactive
    "Logged-out" does not necessarily mean systemd user instance was stopped and then started. Reboot to be sure; if it still does not work, post (upload to https://susepaste.org) output of "journalctl -b".

  8. #8
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,774

    Default Re: How to start appimaged via systemd

    It seems that my answer was about 14 minutes after you detected that already. Sorry, but in the mean time I tried to find some information about this and kept the answer open without sending it.
    Henk van Velden

  9. #9
    Join Date
    Aug 2008
    Location
    Almere, The Netherlands
    Posts
    63

    Default Re: How to start appimaged via systemd

    All, Thanks for spending time on this. I'll investigate further and let you know the outcome.
    Thanks in advance,

    Arjan ten Hoopen

  10. #10
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,853
    Blog Entries
    2

    Default Re: How to start appimaged via systemd

    Quote Originally Posted by athoopen View Post
    Guru's,

    I am struggeling a bit with starting appimaged via systemd. The appimaged package is installed and comes with a service file in /usr/lib/systemd/user/appimaged.service (which makes sence since it should run under uid of a "normal" user).
    In /home/arjan/.config/systemd/user/graphical.target.wants a link is made to the (package) appimaged.service file:

    Code:
    arjan@arjanpc:~> ls -l /home/arjan/.config/systemd/user/graphical.target.wants
    totaal 0
    lrwxrwxrwx 1 arjan users 39 15 jan 20:53 appimaged.service -> /usr/lib/systemd/user/appimaged.service
    arjan@arjanpc:~>
    The service file itself is straightforward:
    Code:
    [Unit]
    Description=AppImage daemon
    After=basic.target
    
    [Service]
    ExecStart=/usr/bin/appimaged
    Restart=always
    RestartSec=5s
    StartLimitInterval=0
    
    [Install]
    WantedBy=graphical.target
    I have enabled (as user arjan) appimaged but after login appimaged is not started, however if I start it manually it does what it should do.
    Code:
    arjan@arjanpc:~> systemctl --user status  appimaged
    ● appimaged.service - AppImage daemon
       Loaded: loaded (/usr/lib/systemd/user/appimaged.service; enabled; vendor preset: disabled)
       Active: inactive (dead)
    arjan@arjanpc:~> systemctl --user start  appimaged
    arjan@arjanpc:~> systemctl --user status  appimaged
    ● appimaged.service - AppImage daemon
       Loaded: loaded (/usr/lib/systemd/user/appimaged.service; enabled; vendor preset: disabled)
       Active: active (running) since Thu 2020-01-16 20:09:02 CET; 17s ago
     Main PID: 2881 (appimaged)
       CGroup: /user.slice/user-1000.slice/user@1000.service/appimaged.service
               └─2881 /usr/bin/appimaged
    arjan@arjanpc:~>
    Any hints or tips on what I am missing?
    Read any system events related to this service with the following command. If you want to read a previous boot, apply the addiitonal "-b -number" flag where number is the iternative boot count. You're looking for whether the service started at all when you logged in and then stopped or if it never started at all.
    Code:
    journalctl -u appimaged.service
    You can also try running the following as described in the ArchWiki reference by henk... It is used to automatically start any User systemd services on login...
    Code:
    # loginctl enable-linger username
    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •