How to start deadbeef and set rt priority at boot???

Hi.
I used this two commands to start Deadbeef ( the media player) and set it to real-time priority:
$deadbeef
$chrt -f -p 99 `pgrep deadbeef-main`
Well, it works, but I want to do it at boot, like automatically start the application and automatically set it to realtime priority.
I tried editing /home/<myuser>/.config/openbox/autostart and logged as my user (autologin at slim.conf) and the result is:
WORKS --> $deadbeef
DOESNT WORK -->$chrt -f -p 99 `pgrep deadbeef-main`
I tried editing ~/.config/openbox/autostart and logged as root (autologin at slim.conf) and the result is:
WORKS --> $deadbeef
DOESNT WORK -->$chrt -f -p 99 `pgrep deadbeef-main`
I tried editing /home/<myuser>/.bashrc and logged as my user (autologin at slim.conf) and the result is:
WORKS --> $deadbeef
DOESNT WORK -->$chrt -f -p 99 `pgrep deadbeef-main`
I tried editing ~/.bashrc and logged as root (autologin at slim.conf) and the result is:
WORKS --> $deadbeef
WORKS -->$chrt -f -p 99 `pgrep deadbeef-main`
So, the thing is, it works in the bashrc AND if I log in as root.
Somehow I have to be logged as root to do the $chrt -f -p 99 `pgrep deadbeef-main`
However, I would like it to be possible to start as I log in with my regular user.
Any thoughts?
Thanks in advance.

Oh okay, that seems simple enough.  In your first post, you should change the $chrt lines to #chrt.  In bash $ represents a normal user, and # represents root.  So it appears in your first post that you are running chrt as a normal user here:
I used this two commands to start Deadbeef ( the media player) and set it to real-time priority:
$deadbeef
$chrt -f -p 99 `pgrep deadbeef-main`
I would just make the line in your autostart or whatever begin with sudo, and then use visudo to give NOPASSWD access to that one command.
So simply do
# EDITOR=<your_editor_choice_here> visudo
Then scroll to the end and put something like
%wheel ALL=(ALL) NOPASSWD: /usr/bin/chrt
So now if you simply prepend sudo to your chrt command, it should not ask for a password for anybody who is within the wheel group.  You could also replace %wheel with you AndreProgressive (or whatever your username is).
Edit: Oh yeah, and I mentioned "EDITOR=<editor> visudo" because otherwise you end up with vi.  So if vi is what you like, or something you are comfortable with, great, but just in case, I didn't want to give you a command that gets you stuck in an editor you don't know how to get out of.  Sadly, I have seen people reboot their computers because they haven't a clue how to exit vi[m].
Last edited by WonderWoofy (2012-11-08 15:55:17)

Similar Messages

  • How to start camera and set storing folder via command prompt

    Hello! I Have a windows 8 on my TAB. How I can run camera application and setup storing folder for photos via command prompt?

    This forum is for helping people in rewriting their working software to support more versions of Windows, not for help in using software (yes that includes using Microsoft's software like Windows and Office). 
    For help in using Windows, ask on answers.microsoft.com.
    Visual C++ MVP

  • How do I get and set column attributes in a table or a treetable with Java?

    Using 11.1.1.4.0
    Hi,
    How do I get and set column attributes in a table or a treetable with Java? For a simple example, say I have a table and want certain roles to see all columns (including address), and other roles can see only certain columns (no address). In a Java method, I want to test if a table's column visible attribute is true and if so, set it to false before rendering it.
    Thanks in advance,
    Troy

    Hi,
    this use case would be a perfect example for using seeded MDS customization. Instead of checking what users are allowed to see or not upon rendering time, you have a customization class and thus the framework doing this for you.
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/31-mds-sample-169173.pdf
    In this paper and sample, specific users see different layouts. It also contains a customization class that shows how this can leverage ADF Security
    Frank

  • How do I get and set cookies with JSF?

    How do I get and set cookies in a JSF managed bean?
    Regards,
    Al Malin

    Below is how I did it...I am receptive to improvements.
    FacesContext facesContext = FacesContext.getCurrentInstance();
    HttpSession session = (HttpSession)facesContext.getExternalContext().getSession(false);
    HttpServletRequest request = (HttpServletRequest)facesContext.getExternalContext().getRequest();
    HttpServletResponse response = (HttpServletResponse)facesContext.getExternalContext().getResponse();
    String cookieName = "myCookieName";
    Cookie requestCookie = null;
    Cookie[] cookies = request.getCookies();
    logger.info("looking for cookie...");
    if (cookies != null)
    for (int i = 0; i < cookies.length; i++)
    if (cookies.getName().equals(cookieName))
    requestCookie = cookies[i];
    logger.info(cookieName + " = " + requestCookie.getValue());
    logger.info("done looking for cookie");
    Cookie responseCookie = new Cookie(cookieName, "myCookieValue");
    responseCookie.setPath("/");
    response.addCookie(responseCookie);

  • HT1349 how do I restore and set up as new? I need a passcode. What is that and where do I find it?

    HOw do I restore and set up my phone as new? It asked for a passcode.  What is that?

    Is it asking for a 4 digit passcode at the lock screen or is it asking for a password to activate?

  • How to start CRS and other services after rebooting nodes.

    Hi,
    i have created two node cluster database.how to start CRS and other service after rebooting nodes?
    Thanks,

    use crsctl command start...
    $ORA_CRS_HOME/bin/crsctl start crsOr check status about CLusterware...
    $ORA_CRS_HOME/bin/crsctl check crs
    CSS appears healthy
    CRS appears healthy
    EVM appears healthyIf not OK... check log at $ORA_CRS_HOME/log/hostname/*
    and check status database , service and etc...
    use crs_stat
    $ORA_CRS_HOME/bin/crs_stat -t
    $ORA_CRS_HOME/bin/crs_stat if you find some service or instance ... not online...
    use srvctl command, help to start
    Get Help...
    $ORA_CRS_HOME/bin/srvctl -h

  • When I flag an email with my gmail account using Apple's Mail App how do I flag and set a reminder that at a specific to follow

    When I flag an email with my gmail account using Apple's Mail App how do I flag and set a reminder that at a specific to time to follow up with that email ?

    Welcome to the Apple community.
    If you are unable to remember your password, security questions, don’t have access to your rescue address or are unable to reset your password for whatever reason, your only option is to contact Apple ID Support, upon speaking to an operator you should explain that your problem is related to your Apple ID, this way you will not be charged for assistance, even if you don’t have an AppleCare plan.
    The operator will take you through some steps you may have already tried, however they need to be sure they have exhausted all usual approaches before trying to reset your account, so you should try to be helpful and show patience with the procedure.
    The operator will need to verify they are speaking to the account holder and may ask you some questions that only the account holder could know, and you will need to answer them if the process is to proceed.
    Once the operator has verified your identity they will send a message through to your device which contains an alpha numeric code, which you will need to read back to them.
    Once this has been completed they will send an email to your iCloud email address after a period of 24 hours, so you should check that mail is enabled in your devices iCloud settings.
    Upon receipt of the email, use the reset link provided to reset your password, after which you should be able to make the adjustments to iCloud that you wish to do.

  • HT5569 previous owner isn't with how can start iphon5 and forget previous owner Apple ID ?

    previous owner isn't with how can start iphon5 and haw can forget previous owner Apple ID and how can I use my Apple ID ?

    If you know the previous owner contact them and have them follow the procedure given here:
    http://support.apple.com/kb/PH2702?viewlocale=en_US

  • What is 3G and how do I use and set up for my ipad2?

    hi just got a ipad2 with wifi and 3G off gumtree just wondering what is 3G and how do i use and set it up
    thanks

    no you dont need one follow steps below
    for at&t
    http://support.apple.com/kb/HT4157
    for verizon
    http://support.apple.com/kb/HT4571

  • How to start, stop and restart task

    Hello Everyone,
    Need advice on what is the correct way to start, stop and restart a Java task?
    I have tried with Executors.newCachedThreadPool() or fixedThreadPool() however I was only able to submit the task once. My program crashed when i tried to resubmit the task again after a shutdownnow command()

    Tasks are designed to be run once. If you want restart functionality, use a service:
    http://docs.oracle.com/javafx/2/api/javafx/concurrent/Service.html
    The sample service I posted in the following thread demonstrates how to do this:
    Multithreading
    Use of Executors is not necessary as a Service encapsulates the execution thread management (though you can set your own executor on the service if you really needed it). All you need to do is make use of the service start, cancel, restart and reset methods as required. If you do use the cancel method, then you need to make sure that your service is properly interrupt aware for the cancel to function as you expect.

  • How to start netmgr and xhost on linux Fedora Core 5

    Hi
    I have couple of questions.
    1. I am having problem in starting netmgr on my linux. I am getting following error.
    Exiting
    java.lang.NullPointerException
    at oracle.ewt.lwAWT.BufferedApplet.<init>(Unknown Source)
    at oracle.sysman.emSDK.client.appContainer.WebApplication.<init>(WebApplication.java:752)
    at oracle.net.mgr.container.NetApplication.<init>(Unknown Source)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    2. How to start xhost . The error I am getting is ..
    xhost: unable to open display "xxx.xxx.xxx.xxx:0.0"
    Please help me.
    Thanks,

    Some tips, based on my experience:
    1) Avoid logging in a root, unless you want to allow your Linux machine to be insecure (at least as insecure as any Windows machine);
    2) Never run X11 as root, as X11 has some known insecurities. (X11 means gnome, KDE, and the other window managers.) It is failrly easy for bad gus to take over the machine when running X11 as root.;
    3) Normally log in as a regular user and su to root, not log in to root and su to a user.
    4) The xhost command needs to be run as the user that is running 'X11' because it tells the X program to allow requests from any user on the host specified. Running 'xhost +' means 'any host. Running xhost by rhe owner of the X11 process should be done before issuing the "export DISPLAY=:0.0" and running the request to use the X11 display (invoking the program);
    5) A quick way of checking whether the permissions are set up properly is to run 'xeyes' at the command line. It seems to be almost always installed and sets up faster than most Oracle programs. (Ctrl-C to exit xeyes.)

  • How To Start Forms and Reports From Start Command

    Hi All,
    How to start Oracle Forms and Reports in Oracle8i My OS is Windows 2000.Please tell the procedure to get into forms and reports.
    Otherwise we have to install other software for Forms and Reports.
    Thanks
    Sujan

    Sujan,
    what does the database have to do with starting Forms and Reports ? If you are on Wondows2000 then navigate to the \bin directory if the Oracle Home you installed Oracle9iDS to. Type ifbld90 for Forms and rwbuilder for Reports design environment.
    If your ability to start Forms and Reports from the command line is your only exit criteria in evaluating software for a project , how far will you go with it?
    Frank

  • How to silently install and set default settings

    I need to deploy FireFox 16.0.2 to a bunch of Windows computers and set some default settings. Is there a good article that can walk me through it?
    I also need to set the home page, have it not check for the default browser, and disable updates. The -ms option does silently install FireFox so I guess I just need to know how to configure FireFox for our environment and push out those settings with the install.
    I have versions ranging from 1 to 15. Do those old versions need to be removed first or can 16.0.2 be installed over what is already there? Is there an uninstall switch for this so that I can create a package to remove it?

    hello jmoody76 - you can manage central settings with the mozilla.cfg file in the firefox program folder. this article gives some guidance on how to implement that: [http://kb.mozillazine.org/Locking_preferences]
    i think it may work to just install the new versions on top of the older ones (though i'm not sure if this has any unintended side effects on those very old installations) or according to https://wiki.mozilla.org/Installer:Command_Line_Arguments it's possible to run a silent uninstall through the setup executable by /S.

  • How to start Rescue and Recovery?

    How do you start Rescue and Recovery? I used to just press the Lenovo Care button and it came up. But now... there is a Startup Interrupt Menu. When the computer already booted, it won't allow me to start the thing up. All it says is that changing it could be bad and you shouldn't change it.

    probably you have changed drive D of the system that is the hidden partition on the hard disk  and is dependant to the lenovo onekey cause this is a part of D partition,and some patitioning and formatting may affect on this hidden partition and it causes to deformes lenovo rescue system.

  • How to start SAP and oracle on SUN SOLARIS SYSTEM

    hi.
    Please suggest
    (Mistakenly we restarted the server when SAP is on and now SAP is not starting)
    1. How to start the SAP ECC6 in sun Solaris.(version 10)
    2.How to start the oracle in sun Solaris (version 10)
    We are trying with 
    sh startsap SID
    but it showing SAP SYSTEM NAME NOT FOUND
    Please suggest'
    Regards,

    Dear Ravindra,
    First start oracle :
    login as orasid and login to sqlplus "/as sysdba"
    and then startup and make sure that listener is up and running.
    For that you can lsnrctl status, if its not started just do lsnrctl start.
    After that login as sidadm and then startsap R3
    If still if you face any error like system name not found.
    then try as startsap R3 <hostname> or startsap SID <hostname>
    Defenitely it will resolves your issue.
    Thanks
    Kishore

Maybe you are looking for