[solved!] Running a command to detect the current resolution of X?

I want to write a script that detects the resolution I'm running and echo it to a configuration file.  I've heard of xrandr, but when I run it, I get ...
[max@pwn rigsofrods]$ xrandr
Xlib: extension "RANDR" missing on display ":0.0".
RandR extension missing
This script will be a part of a PKGBUILD, so I'm hoping there's something really simple and seamless that I could use for just about anyone's computer regardless of configuration.
Last edited by synthead (2008-12-24 00:33:27)

Haha.  I made a better solution with the PKGBUILD, actually   Rigs of Rods isn't the "smartest" linux game so lots of configs are in the program directory.  Just like any other big game, I put it in /opt, so there were a lot of permission issues and complications when regular users tried to configure the game.  What I ended up doing is replacing the blank config it comes with with a very basic 800x600 windowed configuration, and if a user runs RoR, a little script makes a hidden folder and copies it to it.  From there, that section of the configuration utility edits the ~/.rigsofrods configuration   And as you would expect, its in plaintext, so you can edit it by hand too.
But not ignoring all the other configs that have to be in /opt/rigsofrods, I made a group called "ror" that allows rw access to config files and allows you to fully configure the game.

Similar Messages

  • I updated my Itunes to the latest version(11.1.4) and it isn't running on my laptop. The current OS is a W7 ultimate 64bits, when i try to run it, opens a message box with the following error message: error 7 (windows error 1114) . What should I do?

    I updated my Itunes to the latest version(11.1.4) and it isn't running on my laptop. The current OS is a W7 ultimate 64bits, when i try to run it, opens a message box with the following error message: error 7 (windows error 1114) . What should I do?

    Try the following user tip:
    Troubleshooting issues with iTunes for Windows updates

  • Detecting the current window in Forms 4.5

    Hello,
    Is there a way to detect the current window that is in use? I want to find the window's x/y coordinates to center another form or LOV on top of it. Thanks for any help you can provide.
    Frank

    To help make it more clear... If I have a 'root_window' and I launch an LOV or another form with a button on the window, I want to pass in the form or LOV (to be centered) into a procedure pCenterLOV('myLOV') without having to pass in the window name too. Hope this makes more sense.
    Thanks again for your time.
    null

  • Detect the current transaction used in MIRO :EXIT_SAPLMR1M_001

    hi ,
    my requirment is to find  a way to detect the current transaction used within the MIRO transaction ,which can be one among
    invoice/ credit memo/ subsequent debit/subsequent credit .if the user  is using the credit memo ,  then prevent him from posting based on the authority /role given to him. Im making use of the Exit:EXIT_SAPLMR1M_001 for this.
    Please let me know which field of the exit parameters should be made use for detecting if the user is in credit memo transaction.
    Thanks in advance,
    Shyam.

    Hi
    Define a variable for VORGANG and set a value in the same way that from VORGANG SAP gives values for other fields in include LMR1MF5G (FORM vorgang)
      CASE rm08m-vorgang.
        WHEN '1'.                          " Rechnung
          rbkpv-xrech      = 'X'.          " - Rechnungs-Kennzeichen
          rbkpv-tbtkz      = space.        " - Nachbelastungs-Kennzeichen
          rbkpv-xrechl     = 'S'.
          rbkpv-xrechr     = 'H'.
        WHEN '2'.                          " Gutschrift
          rbkpv-xrech      = space.
          rbkpv-tbtkz      = space.
          rbkpv-xrechl     = 'H'.
          rbkpv-xrechr     = 'H'.
        WHEN '3'.                          " nachträgliche Belastung
          rbkpv-xrech      = 'X'.
          rbkpv-tbtkz      = 'X'.
          rbkpv-xrechl     = 'S'.
          rbkpv-xrechr     = 'H'.
        WHEN '4'.                          " nachträgliche Entlastung
          rbkpv-xrech      = space.
          rbkpv-tbtkz      = 'X'.
          rbkpv-xrechl     = 'H'.
          rbkpv-xrechr     = 'S'.
    So, do the algorithm in the reverse for fields XRECH, TBTKZ, XRECHL and XRECHR in MRM_RBKPV.
    I hope this helps you
    Regards
    Eduardo

  • SetRepo command to view the current Index repository location

    Hi,
    I am using the following command to view the current location of the index repository.
    ./lh -Djava.ext.dirs=/usr/WebSphere/AppServer/java/jre/lib/ext:/usr/WebSphere/AppServer/lib setRepo -icom.ibm.websphere.naming.WsnInitialContextFactory -c
    However I get the following error
    Feb 11, 2009 5:08:28 PM com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl
    SEVERE: SET_METHOD_EXCP_J2CA0036
    Feb 11, 2009 5:08:29 PM com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl
    SEVERE: CREATE_MANAGED_CONNECTION_FACTORY_DETAILS_EXCP_J2CA0009
    Feb 11, 2009 5:08:29 PM com.ibm.ws.naming.util.Helpers
    WARNING: jndiGetObjInstErr
    Feb 11, 2009 5:08:29 PM com.ibm.ws.naming.util.Helpers
    WARNING: jndiNamingException
    com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. [Root exception is java.lang.reflect.InvocationTargetException]
    Cannot reach current repository location:com.waveset.util.ConfigurationError: Failed to load JDBC DataSource 'jdbc/eumdevrepo2':
    ==> com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object
    From my appserver admin console, I am able to test my datasource and it works fine without any issues. any ideas as to what could be the problem?
    thanks

    Hi  ,
    No, there is not a shortcut keyboard command to insert the current date into a Date cell in Datasheet view.
     For your issue, you can set the default value of  the Date column to “Today’s Date”:
    Go to your list -> List Settings -> select the Date column 
    under Columns section.
    Select “Today’s Date” to default value.
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Is there a command to know the current throughput fo an IPS

    Hi guys
    I need to get some information from my CISCO IPS. I need to get the current throughput from the IPS but I cannot find any command that could bring such information.
    If somebody know how to get this information it will be great.
    Regards!

    I had a script that would log in, run a "show stat analysis" twice, 60 seconds apart. Then it would pull the byte count from the interfaces, subtract the smaller number from the larder, device by 60 (seconds) and multiply by 8 (bytes to bits).
    Results in b/s for each interface.
    - Bob

  • Detecting The Current Brush Size

    Hi all,
    Is there anyway in javascript to detect the pixel size of the current brush? I want to use that value as a variable in a script.
    Thanks for any help.

    >
    > Is there anyway in javascript to detect the pixel size of the current brush?
    It's fairly easy to set the current brush size via scripting listener code, but
    reading the current value does not appear to be as simple.
    If I had to do it, I would create a new (temporary) brush preset, save the
    preset to disk, delete the temporary in-memory preset, then pick apart the saved
    brush file to extract the brush size.
    The last part is the only part that gets a bit tedious. The others can all be
    taken care of via SL code. Or, even easier, the PresetsManager script in xtools.
    -X
    for photoshop scripting solutions of all sorts
    contact: [email protected]

  • Can I run ck40n two times in the current month??

    Hi,
    I execute ck40n for June month, but after finish there was an activity price should be change,
    so can i change and run ck40n again in the current month??

    Hi,
    Somehow, I agree with Ali.
    Though the system allows you to release more than once but it is not recommended as there will more one standard price available for the same material which may lead inappropriate variance calculation and other inconsistency may crop up. Further system will revaluate all the inventory value with the new price.
    You can also change the price manually through MR21 (this is not recommended but it is a work around).
    Regards
    Mohit

  • Clear screen in "Run SQL Command Line" causes the utility to dump in Window

    Just for your notice... I have not checked if i can reproduce this on Linux platform or on second node running Windows XP Pro.
    But if I use "Run SQL Command Line" utility and do
    clear screen
    The utility dumps, (not the database though only the utlility)
    Maybe some other people could confirm if this findings is a bug or not and if it is a port specific issue with Windows XP only.
    Kindly Rgds
    /Ulf, Kentor IT Sweden

    Tracking info is in
    Re: SQL*Plus generated Program Error
    -- cj

  • Maverick 10.9 download.  Command key makes the current page hide and return.  How can I stop this?

    Hello,
    The Maverick update on my 2009 Mac caused the command key to cause the current page to hide.  It sometimes stays in the side but mostly, after a delay, will return to the screen with the action completed.  Such commands as Print, Copy, Paste, all of the Command shortcuts do this.
    It is impossible to focus on the work since it disappears, delays and then returns. 
    How can I change this to act like the usual commands and just make the action occur instantly on the page as it rests on the screen?
    Thanks

    Hello,
    The Maverick update on my 2009 Mac caused the command key to cause the current page to hide.  It sometimes stays in the side but mostly, after a delay, will return to the screen with the action completed.  Such commands as Print, Copy, Paste, all of the Command shortcuts do this.
    It is impossible to focus on the work since it disappears, delays and then returns. 
    How can I change this to act like the usual commands and just make the action occur instantly on the page as it rests on the screen?
    Thanks

  • [SOLVED] Running sudo command to be executed on dmenu

    I'm using "sudo grub-reboot 2". What is the best way to run this command with dmenu, considering that sudo is necessary, without sacrificing security?
    Last edited by Quatro (2014-08-19 00:22:24)

    My dmenu power menu script looks like this.
    power_menu.sh
    #!/bin/bash
    # dmenu2 power menu
    OPT=$(echo -e "suspend\npoweroff\nreboot" | dmenu -f -h 28 -fn "Ubuntu Mono-12" -x 460 -y 370 -w 360 -nb black -nf white -sb white -sf black )
    case $OPT in
    suspend) sudo systemctl suspend ;;
    poweroff) sudo systemctl poweroff ;;
    reboot) sudo systemctl reboot ;;
    esac
    And the following file allows me to run those commands without being prompted for a password.
    /etc/sudoers.d/include
    slithery ALL=(ALL) NOPASSWD:/usr/bin/systemctl suspend
    slithery ALL=(ALL) NOPASSWD:/usr/bin/systemctl poweroff
    slithery ALL=(ALL) NOPASSWD:/usr/bin/systemctl reboot
    Just use these as an example and you should get what you're after.
    Last edited by slithery (2014-08-18 11:52:31)

  • [SOLVED] Running Two Commands at Boot

    I've tried adding to the Startup Manager in Gnome and since that didn't work, I tried adding to rc.local to no avail. The only way I can run these scripts is manually through the terminal. The commands are to enable wireless and compiz:
    wireless.sh
    sudo wicd -foe
    /usr/bin/wicd-client
    compiz.sh
    LIBGL_ALWAYS_INDIRECT=1 compiz --replace ccp & emerald --replace &
    Here's what I put in rc.local
    /etc/rc.local
    #!/bin/bash
    # /etc/rc.local: Local multi-user startup script.
    sh ~/Scripts/wireless.sh
    LIBGL_ALWAYS_INDIRECT=1 compiz --replace ccp & emerald --replace &
    Last edited by vahnx (2010-08-31 05:30:34)

    They didn't work in rc.local since that loads before you log in (I think right after it finishes loading all the daemons). You'll need to run the full path (not using ~). Also, that won't help you with running GUI apps (like compiz, or the wicd tray icon). Also, if your sudo asks for a password that's probably why it doesn't work from Gnome startup (not sure about the compiz one, maybe try putting env before the command like "env LIBGL_ALWAYS_INDIRECT=1 compiz --replace ccp && emerald --replace" And oh yeah, to run another command it's "&&", not "&" (you can also use a
    Last edited by doorknob60 (2010-08-31 05:21:31)

  • Detecting the current tab page

    Hello All,
    I am working on a task for our current project which requires that I correctly identify the
    current tab page selected on the user's page.
    Toward that, I was passed some information about the function:
    wwpob_api_page
    function get_selected_tabs( p_pageid in number,
    p_store in wwsto_api_session,
    p_tabstring in varchar2,
    p_tabviewprivs in out wwsbr_type.boolarray,
    p_pages in out page_table,
    p_base in boolean
    return varchar2;
    which appeared in version 3.0.6.X.
    I was unable to locate this function in the 3.0.7 / 3.0.8 api installed on our machine, but since I
    only have access to view the public interface of this package, and wondered if this function was
    still available.
    Has the function been moved, or included elsewhere, or deleted?
    The success of this task depends on having a reliable way to determine which tab page is
    currently selected/viewable.
    Is there another / better method for accomplishing this?
    Any help would be most appreciated.
    Stuart Dautrich

    That isn't a supported API yet. I'm not aware of any current functionality that will allow you to find the current tab.

  • [SOLVED] Script to clear all but the current packages from cache?

    Has anyone written, found such a script, or like to write one?
    It just has to delete all older duplicate packages in /var/cache/pacman/pkg/ .  After which keeping a superseded copy of packages just comes down to when you use the script.
    It would keep the /var/cache/pacman/pkg/ directory slimmer, (though it would still have more than is required in it I know) & ensure a quick recovery through downgrading to a known good package when required.
    It would be so easy to run the script before an -Syu --aur  so that if you have any problems you still have the superseded version of whatever, that you can downgrade to until the problem is solved
    Last edited by handy (2008-12-18 07:37:10)

    man pacman wrote:
    SYNC OPTIONS
           -c, --clean
               Remove packages that are no longer installed from the cache as well
               as currently unused sync databases to free up disk space. When
               pacman downloads packages, it saves them in a cache directory. In
               addition, databases are saved for every sync DB you download from,
               and are not deleted even if they are removed from the configuration
               file pacman.conf(5). Use one --clean switch to only remove packages
               that are no longer installed; use two to remove all packages from
               the cache. In both cases, you will have a yes or no option to
               remove packages and/or unused downloaded databases.
               If you use a network shared cache, see the CleanMethod option in
               pacman.conf(5).
    Does "pacman -Sc" not do what you are suggesting?

  • [solved] Running a command in background (bash script)

    Salut,
    as netcfg2 does not work with my wireless connection, I have to set up the connection manually. For not having to type in the commands every time, I created a bash script.
    #!/bin/bash
    iwconfig wlan0 mode managed essid mynetwork channel 6
    ifconfig wlan0 up
    wpa_supplicant -D wext -i wlan0 -c /etc/wpa_supplicant.conf -dddd &
    dhcpd wlan0
    This works fine till the wpa_supplicant line. wpa_supplicant is not started in the background (as I thought, the ampersand at the end of the line would.
    So how can I get wpa_supplicant run in the background?
    Thanks in advance,
    Stefan
    Last edited by vbtricks (2008-05-11 09:13:36)

    Ramses de Norre wrote:How do you know it isn't? What exactly does happen?
    The script does not return to the user-prompt. Is an ampersand at the end of the line the correct solution, or are you unsure yourself?
    bender02 wrote:On thing is that even if it starts, it does take it a couple of seconds to connect, so it's probably not very good to run dhcpcd right after wpa_supplicant. Another thing is that you probably have a typo up there, shouldn't it be 'dhcpcd' instead of 'dhcpd'?
    Well, as the wpa_supplication command is not really run in the background the script did never execute the dhcpcd command. After having solved the above, correcting the spell-mistake will be a smaller problem. Even calling the dhcpcd command myself would be no unworkable way, the open root-shell (as I have to use another as the one calling the script is blocked) is a far greater problem...

Maybe you are looking for