How autostart Interactive program at boot before tty appears

I'm coming from Ubuntu to Arch Linux, I'm trying to autostart an interactive program written in C++ at boot before tty1 appears.
I have created a file called /etc/systemd/system/myapp.service with the following contents:
[Unit]
Description=myapp
[Service]
Type=oneshot
ExecStart=/home/xxx/myapp.exe start
StandardOutput=tty
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
And then run
sudo systemctl enable myapp
Unfortunately, it does not work as expected:
1. I can't interact with myapp
2. I do not want tty1 to appear until the program ends
Last edited by mafrek (2013-09-05 07:30:45)

thank you . thank you . thank you .
the secret thing in magic line `StandardInput=tty`
my final  /etc/systemd/system/myapp.service
contents:
[Unit]
Description=myapp
After=sysinit.target
[Service]
Type=oneshot
StandardInput=tty
StandardOutput=tty
RemainAfterExit=yes
ExecStart=/home/xxx/myapp.exe start
ExecStop=/home/xxx/myapp.exe stop
[Install]
WantedBy=multi-user.target
AND i disable tty1
sudo systemctl disable [email protected]
Now tty1 is my app (-:
Another problem )-:
ExecStop=/home/xxx/myapp.exe stop
not working, i want run myapp with stop parameter on shutdown/reboot system
thanks for ( Trilby, progandy )
Last edited by mafrek (2013-09-06 09:43:13)

Similar Messages

  • How to configure SLiM to boot before terminal

    Hi, I've just installed Archlinux for the first time in a while... it's been a while since I last used Arch and i'm having an issue with the following:
    I used to be able to configure some tty5 stuff in a file I can't remember right now to be able to boot my computer directly into my display manager without having to see the login prompt from the terminal. I know it's kind of sillo to get bothered by something like this, but I'd really like to know if there is a way now with systemd to do the same.
    PS: My computer DOES boot into SLiM without me doing anything, but I'm able to see the login prompt at the terminal for about a second before SLiM launches.

    I guess you could simply create a unit that switches to VT7 (or any other VT you use for X11) early in the boot process.
    Use Exec=/bin/chvt 7
    Edit: And maybe add console=tty1 to your kernel bootline.
    http://zeeky-h-bomb.blogspot.de/2012/09 … ernel.html
    Last edited by progandy (2013-09-02 23:19:39)

  • HT4859 The guy at the verizon store programmed my phone before I got the chance to restore my apps, etc. from icloud- therefore i did not get to go through the setup assistant..  How do i get my apps and app data back on my phone w/o having to go through

    The guy at the verizon store programmed my phone before I got the chance to restore my apps, etc. from icloud- therefore i did not get to go through the setup assistant..  How do i get my apps and app data back on my phone w/o having to go through and re-

    To restore from an iCloud backup you have to erase the phone and start over.  To do this, go to Settings>General>Reset, tap Erase All Content and Settings, then go through the setup assistant again and when given the option, choose Restore from iCloud Backup.  There is no other way to do this.
    Be sure you phone is connected to wifi and your charger as this is likely to take some time to finish.

  • I have a draft email that keeps crashing the Mail program.  How do I delete the draft before the program locks up?

    I have a draft email that has an attachment that keeps crashing Mail.  How do I delete the draft before it locks up the program with the spinning color wheel?

    Assuming you're using some IMAP mail service, disconnect from the internet first and quit Mail
    Next, click on Finder, choose 'Go' in the menubar and hold down the 'option' key. Choose 'Library' from the menu.
    Navigate to
    Mail/V2/Mailboxes
    In there you'll see some folders called things like IMAP-{yourEmailAddress.com} for each email address you have. In each one there is a Drafts folder. Locate the correct one and delete the file.
    Do NOT restart Mail, but open your internet connection, go to your web-based email through your browser and delete the draft from there too.
    Now you can restart Mail. Choose 'Rebuild' from the Mailbox menu in the menubar.

  • How can I get Firefox to boot before windows?

    My hard drive will not boot or read. I'm using Windows 7 and apparently it's a virus infected nothing works except for the blue screen of death. Can't I use Firefox to boot my computer instead of windows? How do I get to boot during the start up?

    Start your '''Computer''' in safe mode with networking.
    '''[http://encyclopedia2.thefreedictionary.com/Linux+Safe+Mode Starting The Computer In Safe Mode;<br>Free Online Encyclopedia]'''
    If the menu has a '''Repair''' option, try using it.
    If you can't fix this yourself, you will need a tech. Good luck.

  • Start programs at boot

    I haven't yet been able to figure out how to start a program from boot on any distro. I like to run a keyboard daemon called hotkeys (not hotkey), but currently I have to type hotkeys -t msnetpro everytime I want to use it. Any way to make it start and configure the keyboard automatically? 
    Thanks

    ezzetabi wrote:
    @FUBAR
    You obviously have no idea at all how to start a service in windows, it is not as putting an icon the start menu at all. A service is a program who start before the users log in and stops only when the computer turn off or it is stopped manually...
    In windows only special coded programs can started this way otherwise you need something like http://www.codeproject.com/system/xyntservice.asp as wrapper.
    In linux since all programs are the same, this problem does not exist at all
    I know the difference between a service (daemon), controlled with "services.msc" on Windows, and a simple program run at boot time that can be configured in many different places.
    I was just too lazy to type the whole thing.

  • No Interactive Programming Guide--Even AFTER STB Reset: HELP!

    I have been living without my interactive programming guide for more than a week now. I never know what is on TV!
    I have tried resetting the router by unplugging it from the electrical outlet, removing all the cords for 15 seconds at a time and pushing the reset button with a paperclip.
    I have tried resetting the STB a handful of times as well. First, I disconnected all wires and cords for about 45 seconds. Since then I have continued to disconnect the power cord for various lengths of time--still nothing.
    I have even tried the online troubleshooting tool to reset it from the internet--nothing.
    Has anyone else has this problem?
    Christina
    Solved!
    Go to Solution.

    Christina,
    Yes I have experienced this. And I have never figured out why, but I think I do know the "what."
    This problem is usually caused by the router and the STB failing to communicate. So first lets verify that that really is the problem. On the STB remote do the following:
    Menu ==>  Settings ==> System Information
    Is there any thing other than 0.0.0.0 shown in the IP Address field? If not then the STB is not communicating with the router. You can also see there how many days of guide data the STB has; it is probably zero now, usually it is somewhere in the 8 to 9 days range.
    Assuming that there is no IP address, then we need to try to figure out why and hopefully fix it. By the way, in the steps below I am assuming you have the most common Verizon router, the ActionTec. If you have the Westel, I have never seen one so I don't know exactly what you might see, but I hope it would be similar.
    1) The coax connection to your STB is obviously ok or you would not be getting a picture. But the Guide data, widgets, VOD all come through the router first before they go to the STB on the coax, unlike the regular TV channels which go directly from the ONT through the splitter to the STB via coax. So, check the coax connection to your router, at both the router itself and the wall connection. They need to be good and tight.
    2) Unplug the power from the STB, wait 15-20 seconds, plug it back in, wait until it is up, then check the IP address again. Is there one? If so, just wait for a while, the Guide will gradually repopulate, and all should be ok.
    3) If no, unplug the power from the router, wait 15-20 seconds, plug it back in, wait a little while and check the IP address in the STB again. OK?
    4) If no, the next step is to log into the router and check what it sees on your network. The login is usually "admin" and "password1" (the password must be changed the first time you log in, most installers set it to "password1), but since you have reset the router it is probably now back to "admin" and "password". Once you log in (and change the password), in the middle of the page should be a listing of all devices on your network, your PC(s) and STB(s). Do you see any STBs? If yes, just wait a while and all should be ok.
    5) If no, try unplugging the power from the STB again, then plugging it back in. I have experienced the loss of connectivity to one or more of my STBs maybe 3 or 4 times in almost 4 years with the FiOS TV service, have never been able to figure out the exact procedure to get the connectivity back, but removing the power and putting it back several times, in different sequences on the router and the STB, eventually has gotten it working.
    If the above steps don't work I think you have either a broken router or a broken STB and will need to call the FSC to get a tech dispatched.
    I hope the above helps. If I have screwed up the procedure a little bit in the description I am sorry, or if you don't understand something I have written, post back and I or someone else will be happy to try again.
    Justin
    Verizon FiOS TV, Internet, and phone
    IMG 1.6.2, Build 08.58
    Keller, TX 76248

  • Interactive Program

    I am designing an interactive program and need to know how to create individual accounts for a user to access the program. Basically whenever they would access it, they would sign in using their account or create one if they had never used it before. I only am familiar with the basics of director so any samples or advice you have would be a huge help.
    Thanks

    Thanks for the reply. I will try to answer your questions to the best of my ability.
    1. I do not know what the older interactive program was made from. It contains an exe file that opens and runs the program. It is flash based and runs in a browser although it does not require an internet connection.
    2. The structure of the program is an application that opens up, asks for an account to be created where all data is stored and then begins a virtual classroom. It contains a series of videos and quizzes. I have attached a screeshot of what the folder containing the interactive program looks like. 
    3. I am looking for a digital interactive template that I could then write to a cd or dvd-rom. It would contain a similar program to the usb drive, but updated.
    Let me know what other information you need and I can do my best to provide it.

  • I am having much trouble with the new reminders in IOS7 and how it interacts with Outlook Exchange. Many features lost in the new version.

    When I downloaded IOS7, I found that the reminders/task app and how it interacts with Outlook Exchange is much more difficult to use. Some of the issues that I am having are...
    1. Trying to edit my task on my phone is not possible, if the notes are lengthy. When you click on the text to edit data near the top, it will scroll to the bottom and not allow you to edit the text because you cant see it.
    2. Now all of my task are in one long list. I can not move from day to day like we could in previous version IOS6
    3. When I do edit a short task reminder and click done, it crashes and completly goes away. It does save the edit though
    4. You can only add task at the bottom of each days reminders. This is very inconvient and much more difficult than IOS6
    5. There is a major delay or latency when interacting inside of reminders in this version. Much more than IOS6. It is very unstable and quirky.
    I have never seen Apple take a step back with a product until now. I am a huge Apple fan and always will be, so I am hoping they make enhancements to fix these issue. It is a big time prodcutivity killer.
    Thanks for any and all help you can give.
    Troy Meachum

    Some power supplies or designed so that if there is a short or overload they shut them selfs off and some will not turn back on. Some have a relay that will click back on and work, some you have to  cycle the power switch. Those that won't come back on will have to be replaced. I'm not saying that yours is that type as I have no way of telling. But if you have a friend who will loan you a good power supply you might try it. As someone else said just turning off the power will not darn all the power from some motherboards. To test this turn off your power supply than turn on the computer with the start botton. Mine will flash the lights and fans will start to spin than die. So every time you turn off computer to work on it. After turning off PSU hit the start botton to drian any power left in it before working on it. Also do this after unplugging it just to make sure.

  • How to use ssd as boot drive and hdd as storage on a macbook pro 13

    Does anyone know how to use SSD as boot drive and have HDD in optical bay as storage on a Macbook pro 13. I mean in that both drives work as one . by formatting using mac software . I would like to run all programs and OS but would love to have my downloads and useless data on run on my 1tb 5400rpm hdd without me have to manual send it there..

    Does anyone know how to use SSD as boot drive and have HDD in optical bay as storage on a Macbook pro 13. I mean in that both drives work as one
    Each drive mounts as a separate volume. There is no convenient way to make them look like one contiguous volume.*
    Franky, with an hdd and a ssd I would recommend you put your home dir on the hdd and leave the ssd for the OS and your key applications.  It's relatively easy to do and I think better than moving only portions of your stuff.
    How to Move the Home Folder in OS X – and Why
    * There are ways to to make musltiple volumes appear as one large drive but I think it is beyond the scope of this discussion and not appropriate to this configuration.

  • How Do I Make a Boot/Startup on CD not Floppy?

     I have a Lenovo Thinkpad R61li 15.4" screen laptop.  It's important that I keep this computer in service with the Win XP Pro Sp 3 because I have two vital programs which will not install on Win 8.
    This computer has never had a "A: Floppy dirve" and only a CD drive but the installation options for making a Boot Disk/ Start-up Disk only consider a Floppy drive and not a CD drive.   I need to make a Boot/Start-up disk on a CD so that if I get locked out of my computer AGAIN, I can boot back into Windows and then either fix the problems or restore from my current backups.
    I have two new sets of Rescue Disks but they don't boot into the current OS so that I can access my backups. And if I can't access Safe Mode or do a repair, I'm stuck with the problem of having to reinstall an old version of XP, which is then not compatible with my backups because the backups have new Windows files from all the upgrades.
    How can I make a Boot Disk/Start-up Disk like we used to use in the "old days" to start the initial system files and boot into Windows so that I can either make repairs to restore from my backups using current Winows files?
    Thank you so much.  I love this computer and this operating system and I want to continue to hold onto them
    Judi :-)
    Solved!
    Go to Solution.

    Hi, Richk...
    OMG!!  I had no idea in the world that I could do that.. Yes, indeed, that sure would be a solution.  I'm going to do exactly that and buy a box of floppy disks right away.
    I can't believe that it's so difficlult to make a CD boot disk, but this sure is the perfect solution.
    I just can't thank you enough.  Please give yourself a  BIG hug for me..
    Yay!!!
    Judi :-)

  • How do I make a boot disk?

    How do I make a boot disk in OSX 10.4 something and have some tools like Disk Warrior on it? I found one program at versiontracker that does this but it doesn't work in .4, oh well ...... or I can just wait for several days til my DiskWarrior CD comes in the mail ....... but who can be without their computer that long in today's day and age? yup, you guessed it, my powerbook won't start up and I've tried lots so far ...... hoping dw will do the trick.

    http://www.macosg.com/group/viewtopic.php?t=13956
    -Bmer
    Mac Owners Support Group
    Join Us @ MacOSG.com
    iTunes: MacOSG Podcast
     An Apple User Group 
    Disclaimer required by Apple Discussions Terms of Use: MacOSG - a non-profit Apple User Group - may receive some form of compensation, financial or otherwise, from my recommendation or link.

  • On slide No. 13 of my Keynote presentation, I have varous pictures that go through automatically just as I programmed them, but if I I want to get by clicking to the next slide , it does not let me. How can I program so when I want goes to next slide?

    On slide No. 13 of my Keynote presentation, I have varous pictures that go through automatically just as I programmed them, but if I I want to get by clicking to the next slide , it does not let me. How can I program so when I want goes to next slide?

    Keynote is programmed to execute all of the effects in a build sequence before it will move to the next slide.
    If you want tobe able to move to the next slide at any time in a sequence of builds, you will need to set all of the builds on that slide to:  "on click". You will then need to execute each build by pressing the space bar or click the left mouse button for each object.

  • How come this program compiles?

    class Base
         Base()
              int i = 100;
              System.out.println(i);
    public class Pri extends Base
         static int i = 200;
         public static void main(String[] args)
              System.out.println(i);
              Pri p = new Pri();
    i get very confused here. in the main, the value of "i" will be printed to the standard output even before the class Pri is instantiated! how come this program can compile?
    your help will be very much appreciated.
    eileen2

    This is because your class Pri extends Base. Because you didn't specify any class Pri constructor, java automatilcally created a no-argument constructor of class Pri with a call to the superclass constructor Base(). You can validate this by adding another Base constructor with arguments and then removing the no-argument Base constructor. Pri() will not compile.

  • How to create program for bapi?

    hi all,
    how to create program for bapi?
    reply me soon now.....
    can anybody help me.....
    thanks,
    S.Suresh.
    Title was edited by:
            Alvaro Tejada Galindo

    Hi ...Here is the step by step procedure for creating BAPIs.
    There are 5 different steps in BAPI.
    - Create BAPI Structure
    - Create BAPI Function Module or API Method.
    - Create BAPI object
    - Release BAPI Function Module.
    - Release BAPI object.
    Step1. Creating BAPI Structure:
    - Go to <SE11>.
    - Select Data Type & Enter a name.
    - Click on Create.
    - Note: Always BAPI should be in a development class with request number (Not Local Object).
    - Select Structure & hit ENTER.
    - Enter the fields from your database. Make sure that the first field is the Primary Key Field.
    - Then SAVE & ACTIVATE.
    Step 2. Creating BAPI module:
    - Enter TR.CODE <SE37>.
    - Before entering any thing, from the present screen that you are in, select the menu
    Goto -> Function Groups -> Create Group.
    Enter a name (Note: This name Must start with ZBAPI)
    Let this screen be as it is and open another window and there, enter TR.CODE <SE80).
    Click on the Third ICON that says Inactive Objects.
    Select the group that you just created and click on Activate.
    Notice that the group you created will disappear from the list of inactive objects.
    - Go back to ><SE37> screen and enter a name and hit <ENTER>. Then enter the group name that you just created and activated.
    NOTE: When you release a function module the respective group will be attached to that particular application. It cannot be used for any other application. NEVER include an already existing group that is attached to another module.
    Now click on the first Tab that says [ATTRIBUTES] and select the radio button that says remote-enabled module since we will be accessing this from any external system.
    Then click on the second tab that says [IMPORT].
    Enter a PARAMETER NAME, TYPE and the structure you created in the first step. Also select the check box ‘Pa’. All remotely enabled functional modules MUST be Pa enabled, where Pa means ‘Passed by Value’ and if you don’t select ‘Pa’, then that means it will be passed by reference..
    Then click on tab that says [EXPORT].
    Enter the following as is in the first three fields
    RETURN TYPE BAPIRETURN (These 3 field values are always same)
    Here also select ‘Pa’ meaning Pass by value.
    Note: BAPIRETURN contains structure with message fields.
    Then SAVE and ACTIVATE.
    Step 3. Creating BAPI object:
    - Enter Tr.Code <SWO1> (Note. It is letter ‘O’ and not Zero).
    - Enter a name and then click on create. Enter details.
    NOTE: Make sure that that Object Type and Program name are SAME.
    - Enter Application ‘M’, if you are using standard table Mara. If you are using your own database then select ‘Z’ at the bottom.
    - Then hit <ENTER>.
    - Now we have to add ‘Methods’. High light METHODS and then select the following from the menu:
    Goto Utilities -> API Methods -> Add Methods.
    - Enter function Module name and hit <ENTER>.
    - Select the second FORWARD ARROW button (>)to go to next step.
    - Check if every thing looks ok and again click on FORWARD ARROW button (>).
    - Then select ‘YES’ and click on <SAVE>.
    - Now on a different screen goto TR.CODE <SE37>. Enter Function Module name and select from the top menu Function Module -> Release -> Release.
    - Goback to TR.CODE <SWO1>.
    Here select the menu combination shown below in the same order.
    - Edit -> Change Release Status -> Object Type Component -> To Implemented.
    - Edit -> Change Release Status -> Object Type Component -> To Released.
    - Edit -> Change Release Status -> Object Type -> To Implemented.
    - Edit -> Change Release Status -> Object Type -> To Released.
    - Then click on <SAVE>.
    - Then click on Generate Button (4th button from left hand side looks like spinning wheel).
    - Then Click on the button that says ‘PROGRAM’ to see the source code.
    To check if this is present in work flow goto TR.CODE <BAPI>.
    Here it shows business object repository.
    - First click on the middle button and then select “ALL” and hit ENTER.
    - Goto tab [ALPHABETICAL] and look for the object that you created. This shows that the BAPI object has been created successfully
    Overall Info :
    http://help.sap.com/saphelp_47x200/helpdata/EN/00/32a43697bc11d1acf9080009b0fb56/frameset.htm
    BAPI Creation Info :
    http://help.sap.com/saphelp_47x200/helpdata/EN/e0/9eb2370f9cbe68e10000009b38f8cf/frameset.htm
    Reference :
    http://help.sap.com/saphelp_47x200/helpdata/EN/00/32a43697bc11d1acf9080009b0fb56/frameset.htm
    http://help.sap.com/saphelp_47x200/helpdata/EN/00/32a43697bc11d1acf9080009b0fb56/frameset.htm
    http://help.sap.com/saphelp_47x200/helpdata/EN/e0/9eb2370f9cbe68e10000009b38f8cf/frameset.htm

Maybe you are looking for

  • OpenSQLException - Cannot assign double value

    Hello,   I have some table in database with field of type 'double'. I use JDBC to store data in this table and sometimes I would like to place special values in it, eg: preparedStatement.setDouble(1, Double.MIN_VALUE); Unfortunately I get exception l

  • How can i change the default view of recent calls?

    Hi, A similar question was asked here: https://discussions.apple.com/thread/3072545?start=0&tstart=0 And was not answered. The default view of recent calls is missed calls on my current configuration. Not a long time ago the default was all calls. I

  • Change currency at header level in shopping cart

    Hello I'm working with SRM 7.0 in classic scenario. We are facing an issue, because even if we change the currency at item level, when the PO is created in back-end it is the default currency of the supplier. We can change behaviour in Badi BBP_CREAT

  • Help! Safari crashing when using finder to download/upload

    Any time I try to do anything which involves Finder popping up such as uploading photos to Facebook, I get a message saying, "Safari quit unexpectedly while using the FinderKit plug-in", can anybody help me?! This is the detailed feedback about it Pr

  • New update 10.2.1.2102 problems on Z10

    Hello, I just did the new 10.2.1.2102 update and now my text will only show up in the Hub but not in the actual "Text" option--- it shows "No entries in this view" It also does not notify me when a text comes in even though the settings are in correc