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

Thread: Opening PDF at startup

  1. #1

    Default Opening PDF at startup

    My apologies, I am probably missing something obvious. I am trying to setup OpenSUSE 15.2 Leap as a kiosk that will cycle through a PDF full of images.
    I have a script that contains
    Code:
    evince /home/lobbypc/Documents/test.pdf &
    I can open a terminal, run the script, and everything works fine. But I cannot get the script to run at startup.

    My last attempt was to create /etc/systemd/system/script001.service which contained the following:
    Code:
    # /etc/systemd/system/script001.service
    #
    
    [Unit]
    Description=Run my boot script
    
    [Service]
    Type=oneshot
    ExecStart=/bin/sh -c "/home/lobbypc/bin/slideshow.sh"
    
    [Install]
    WantedBy=multi-user.target
    I then started and enabled the service and rebooted. Script did not run. Any suggestions greatly appreciated. Thanks!

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    29,694
    Blog Entries
    15

    Default Re: Opening PDF at startup

    Quote Originally Posted by ketter View Post
    My apologies, I am probably missing something obvious. I am trying to setup OpenSUSE 15.2 Leap as a kiosk that will cycle through a PDF full of images.
    I have a script that contains
    Code:
    evince /home/lobbypc/Documents/test.pdf &
    I can open a terminal, run the script, and everything works fine. But I cannot get the script to run at startup.

    My last attempt was to create /etc/systemd/system/script001.service which contained the following:
    Code:
    # /etc/systemd/system/script001.service
    #
    
    [Unit]
    Description=Run my boot script
    
    [Service]
    Type=oneshot
    ExecStart=/bin/sh -c "/home/lobbypc/bin/slideshow.sh"
    
    [Install]
    WantedBy=multi-user.target
    I then started and enabled the service and rebooted. Script did not run. Any suggestions greatly appreciated. Thanks!
    Hi
    Just autostart when the kiosk user logs in? Your wanted by is incorrect, multi-user is console, graphical is a GUI session...
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3

    Default Re: Opening PDF at startup

    I corrected that, but now I get this...

    Aug 28 10:07:22 pc344 sh[3268]: Unable to init server: Could not connect: Connection refused
    Aug 28 10:07:22 pc344 sh[3268]: Cannot parse arguments: Cannot open display:

    I'm searching for a solution, but any help appreciated.

  4. #4
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    29,694
    Blog Entries
    15

    Default Re: Opening PDF at startup

    Quote Originally Posted by ketter View Post
    I corrected that, but now I get this...

    Aug 28 10:07:22 pc344 sh[3268]: Unable to init server: Could not connect: Connection refused
    Aug 28 10:07:22 pc344 sh[3268]: Cannot parse arguments: Cannot open display:

    I'm searching for a solution, but any help appreciated.
    Hi
    You either need to use as a 'user' systemd file, or have the X/Wayland/Sway/Cage etc system up and running and autostart via a desktop file, or in .profile.

    Is all your wanting to run is this pdf?
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  5. #5

    Default Re: Opening PDF at startup

    The plan is for this PC to just sit there and continually run this PDF as a slideshow in our building lobby. Currently doing this with a Win10 box, but it doesn't work the best. What I had hoped to do though, was to have a script that I would cron that would check a network folder for a PDF file. Any time that folder contained a PDF, the script would copy it locally, kill the current PDF display, and display the new one. Which as I am thinking this through means that I really don't need to have the script run at startup. Cron will handle running the script.

  6. #6
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    29,694
    Blog Entries
    15

    Default Re: Opening PDF at startup

    Quote Originally Posted by ketter View Post
    The plan is for this PC to just sit there and continually run this PDF as a slideshow in our building lobby. Currently doing this with a Win10 box, but it doesn't work the best. What I had hoped to do though, was to have a script that I would cron that would check a network folder for a PDF file. Any time that folder contained a PDF, the script would copy it locally, kill the current PDF display, and display the new one. Which as I am thinking this through means that I really don't need to have the script run at startup. Cron will handle running the script.
    Hi
    Cron is dead! Use a systemd timer and the the service to start the job I would look at using cage then along with a JeOS setup created via kiwi? Have a read here: https://forums.opensuse.org/showthre...st-for-Wayland
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  7. #7
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    27,152

    Default Re: Opening PDF at startup

    You do not say which desktop you use, but DEs normaly have a place where you can configure things to be started at login.

    What you show is on the system level, not on the "user in s desktop" level. And thus it starts things at boot far before any user is loged in at all.
    Henk van Velden

  8. #8

    Default Re: Opening PDF at startup

    Quote Originally Posted by malcolmlewis View Post
    Hi
    Cron is dead! Use a systemd timer and the the service to start the job I would look at using cage then along with a JeOS setup created via kiwi? Have a read here: https://forums.opensuse.org/showthre...st-for-Wayland
    This is getting frustrating. I can't even think about any of that because now I find a problem with Evince. Evince will display my slideshow, but it ignores the loop setting within the PDF. Gets to the end and displays "End of presentation. Press ESC or click to exit." Do you know of a program that will run on OpenSUSE 15.2 that will display a PDF slideshow in a continuous loop?

  9. #9
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    29,694
    Blog Entries
    15

    Default Re: Opening PDF at startup

    Quote Originally Posted by ketter View Post
    This is getting frustrating. I can't even think about any of that because now I find a problem with Evince. Evince will display my slideshow, but it ignores the loop setting within the PDF. Gets to the end and displays "End of presentation. Press ESC or click to exit." Do you know of a program that will run on OpenSUSE 15.2 that will display a PDF slideshow in a continuous loop?
    Hi
    I would try impressive http://impressive.sourceforge.net/ maybe pdfpc in X11:Utilities repo.
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

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

    Default Re: Opening PDF at startup

    Any reason you're not running your slideshow as a losckscreen screensaver?
    There must be any number of solutions, either already installed on your system (depends on your Desktop) or installed app, plugin or whatever.

    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

Posting Permissions

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