Gnome run command source .bashrc

Hi, after using just xmonad for a long time I'm now trying to get gnome and xmonad to play nicely together.  I am starting my gnome-xmonad session from GDM which was started with runlevel 5 in inittab--I followed the wiki.  Now in gnome, the run command dialogue (alt-f2) does not seem to source my ~/.bashrc.  I use an xmonad run util and under gnome-xmonad that run util does not source my ~/.bashrc either.  I have my PATH specified in my .bashrc but I cannot run the commands that rely on the path set in .bashrc.  I do have a ~/.bash_profile which sources ~/.bashrc, so that is not the issue.  In a terminal, my path is fine, but not from those run dialogues.  The xmonad run util worked fine when I would start xmonad with startx.  Any advice on how to get gnome to source my ~/.bashrc?

I don't know about sourcing your .bashrc in gnome, but you are probably better off moving your PATH definition to your .bash_profile, before you source the .bashrc.

Similar Messages

  • Rc.local, run command as regular user?

    I want to run a command at startup that can't safely be run as root (and I don't want it to be anyway).  The only way I know of to execute a command at startup is rc.local, but that will run the command as root.  I know sudo can be used to run commands as other users.  If I use sudo to change what user the startup command is running as, will that be safe?  In other words, will that effectively make it as if it was being run by a regular user instead of root?  Or is there a better way of doing this?  Thanks.

    You can also put it in your .bashrc, so it will be executed every time you log in. For example, I have it set to mount my external disc if it's plugged but not mounted:
    if [[ -r /dev/disk/by-label/disco-externo && `mount | grep disco-externo | wc -l` -eq 0 ]]
    then
    sudo mount /dev/disk/by-label/disco-externo /mnt/disco-externo
    fi
    If you put the sudo away you can start any command as a regular user under certain circumstances.

  • [solved] hook to run commands when user logs in? (before bash profile)

    Is there any way to run commands when a user logs in but before the bash profile is sourced?
    For example, I have a user account with a home directory on /tmp. When the user logs in, the home directory might not exist so there will be no .bash_profile to source. I want to run a script to create the directory if necessary and copy some files into it. How can that be done?
    I thought of putting something in /etc/profile or /etc/profile.d/, but I would like to run something before the user's shell and environment become active.
    I can use /etc/rc.local to do what I want, but I would prefer a hook to ensure that everything is set right when the user logs in.
    Any ideas?
    *edit*
    Solution
    In my case, I found that I could write my own shell script and set it as a login shell. In the script, I can configure everything I need before launching the interactive shell, then clean up anything after it exits.
    Last edited by Xyne (2011-12-10 19:34:07)

    Thanks, dammannj. PAM could probably do what I need but I think I have found a simpler solution (see original post).

  • URGENT-How to run command in java application???

    URGENT!
    i would like to run command to invoke some applications (like invoke application using command line in DOS) in my java appication.
    Do anyone know how to do this? Thanks a lot.

    This question has been asked upteen times.
    ok the code is
    for win95
    Runtime.getRuntime().exec( "start c:\\tmp.txt" );
    for win 2000
    Runtime.getRuntime().exec( "cmd /C startc:\\tmp.txt" );
    //change the file to your desire file..
    i am not so sure about win98, sorry...

  • Error while running commands at RMAN prompt

    Hi ,
    We have a few oracle 10g(10.2.0.3) databases on AIX platform.We use RMAN backup with a recovery catalog database.
    The rman full(level 0)backups are scheduled dailly and running fine.When I tried to run commands like 'list backup','report obsolete' I'm getting the following errors.
    connected to target database: TICSPROD (DBID=2626621498)
    connected to recovery catalog database
    RMAN> report obsolete;
    RMAN retention policy will be applied to the command
    RMAN retention policy is set to redundancy 3
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of report command at 08/04/2011 07:49:36
    RMAN-06004: ORACLE error from recovery catalog database: ORA-03113: end-of-file on communication channel
    ORACLE error from recovery catalog database: ORA-03114: not connected to ORACLE
    RMAN> list backup;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of list command at 08/04/2011 07:56:25
    RMAN-06004: ORACLE error from recovery catalog database: ORA-03113: end-of-file on communication channel
    ORACLE error from recovery catalog database: ORA-03114: not connected to ORACLE
    But the recovery catalog database is up and running fine.For few other databases I'm able to run the above commands without errors and for some databases I'm getting the errors as mentioned above.
    Could someone help me out with this...

    Thanks Tycho for your reply.
    Please find the output of the query in recovery catalog.
    SQL> select * from v$resource_limit;
    RESOURCE_NAME CURRENT_UTILIZATION MAX_UTILIZATION INITIAL_AL LIMIT_VALU
    processes 49 83 5000 5000
    sessions 30 63 5505 5505
    enqueue_locks 27 94 65910 65910
    enqueue_resources 27 73 24440 UNLIMITED
    ges_procs 0 0 0 0
    ges_ress 0 0 0 UNLIMITED
    ges_locks 0 0 0 UNLIMITED
    ges_cache_ress 0 0 0 UNLIMITED
    ges_reg_msgs 0 0 0 UNLIMITED
    ges_big_msgs 0 0 0 UNLIMITED
    ges_rsv_msgs 0 0 0 0
    gcs_resources 0 0 0 0
    gcs_shadows 0 0 0 0
    dml_locks 0 76 24220 UNLIMITED
    temporary_table_locks 0 3 UNLIMITED UNLIMITED
    transactions 1 10 6055 UNLIMITED
    branches 0 0 6055 UNLIMITED
    cmtcallbk 0 1 6055 UNLIMITED
    sort_segment_locks 0 5 UNLIMITED UNLIMITED
    max_rollback_segments 11 11 6055 65535
    max_shared_servers 20 20 800 800
    parallel_max_servers 0 32 320 3600
    22 rows selected.
    The alert log of the catalog database is continously getting refreshed with the following message.
    Incremental checkpoint up to RBA [0x3b3.a780.0], current log tail at RBA [0x3b3.a78f.0]
    Mon Aug 8 00:16:17 2011
    Incremental checkpoint up to RBA [0x3b3.abf8.0], current log tail at RBA [0x3b3.ac4f.0]
    Mon Aug 8 00:46:19 2011
    Incremental checkpoint up to RBA [0x3b3.1451b.0], current log tail at RBA [0x3b3.1451b.0]
    Mon Aug 8 01:16:21 2011
    Incremental checkpoint up to RBA [0x3b3.14b15.0], current log tail at RBA [0x3b3.14baa.0]
    Mon Aug 8 01:46:23 2011
    Incremental checkpoint up to RBA [0x3b3.14be1.0], current log tail at RBA [0x3b3.14bf0.0]
    Mon Aug 8 02:16:25 2011
    Incremental checkpoint up to RBA [0x3b3.15069.0], current log tail at RBA [0x3b3.150a9.0]
    Mon Aug 8 02:46:27 2011
    Incremental checkpoint up to RBA [0x3b3.150ed.0], current log tail at RBA [0x3b3.150ed.0]
    What could be the potential cause of the issue I'm facing .Could you please guide me...

  • How to run command SQLLoader Oracle in c#

    Hello,
    How to run command SQLLoader Oracle in c#. I try my sourcode for run this SQLLoader, but nothing happen and error "No process is associated with this object.". Please tell me how i fix it. Thanks.
    This is my code:
    System.Diagnostics.Process process1;
    process1 = new System.Diagnostics.Process();
    process1.EnableRaisingEvents = false;
    string strCmdLine;
    strCmdLine = @"/C SQLLDR XL/secreat@O11G CONTROL=E:\APT\LoadXL.ctl";
    System.Diagnostics.Process.Start("CMD.exe", strCmdLine);
    process1.WaitForExit();
    process1.Close();

    jesperdj ,thanks:)
    actually,i am using eclipse to run my ant tasks programmatically,but I got trouble with the AntRunner class.it seems that i should config a proper classloader for it,but i just don't know how.please lend a hand:)thanks
    robin

  • Help required with Gnome 3 Input Sources

    I used CapsLock before gnome 3.6 upgrade all working fine, however new Input Sources broke my system a little bit
    I fixed my CapsLock by dconf-editor org\gnome\desktop\input-sources\xkb-options ['grp:caps_toggle', 'grp_switch', 'grp_led:caps'], but I can't get work
    - language switch indicator not working
    - show-flags does nothing anymore
    Any help fit is required because of usability issues

    Also, with Gnome 3.6 it's no longer possible to switch layouts with the Caps key. That setting is not available even in gnome-tweak-tool.
    I figured out how to do make the settings a lot more flexible, and fix all the layout bugs introduced by 3.6. This is done by configuring everything through setxkbmap and not letting gnome interfere with the settings.
    Remove all input sources, and the typing shortcuts from gnome keyboard settings window.
    Open dconf-editor and remove everything from "org\gnome\desktop\input-sources\xkb-options". I was not able to set it to nothing, but setting it to ['grp_led:caps'] worked. These 2 steps were needed not to interfere with the config described below.
    Install kbdd-git from aur, if you want separate layout for each window.
    Create a script with preferred setxkbmap settings. Here is mine, setting Caps to switch languages, and swapping alt and win keys on MacBook.
    #!/bin/sh
    setxkbmap -layout us,ru
    setxkbmap -option 'grp:caps_toggle'
    setxkbmap -option 'altwin:swap_lalt_lwin'
    # kbdd is needed to keep separate layout for each window.
    `which kbdd` && kbdd
    Launch gnome-session-properties and add this script to the list.
    Last edited by ikatson (2012-11-02 21:51:13)

  • BUG: Run command does not follow current project

    The Debug command respects which project is currently active, i.e. selected by the user in the project folder.
    The Run command, however, does not.
    Version 11.1.1.0.31.51.56
    Workaround:
    Choose a class file with a main method, then issue run.
    Regards,
    Erik

    Hi,
    is it as web project or a Swing project ?
    Frank

  • No "Run" command (FB4 standalone, Mac OS X)

    I downloaded FB4 and installed it as standalone. I can't find a "Run" command that works anywhere in the program's menus or toolbars.
    I had Eclipse (the Cocoa version, hence why I installed FB4 as standalone) and parts of Adobe CS4 Master Collection already installed on this computer. I am positive I'm running the copy of Eclipse that was installed with FB4, rather than my exlsting copy.
    Here are images of my toolbar and the "Run" menu.
    How can I configure FB4 to allow me to test my AS3 programs?

    Hmm, perhaps I spoke too soon.
    The run commands are available in the program's default workspace. They disappear when I switch to another workspace (in this case, example files from a lynda.com course).
    Maybe I should do some more research on my end...

  • Using computer variables in task sequence "Run Command Line"

    I am attempting to deploy VMs through VMware's vRealize Automation tool using CM. The process creates a CM computer object then creates a direct rule on a CM collection for the new computer object. During the creation of the computer object vRA creates computer
    variables provided by me on the computer object. I see the computer object built and i see the custom variables on the computer object:
    Name Value
    dns1 10.10.10.10
    dns2 10.10.10.11
    gateway 10.10.10.1
    ipAddress 10.10.10.2
    netMask 255.255.255.0
    In the task sequence the last step is to "Run Command Line":
    cmd /c netsh int ip set address name="Ethernet0" static %ipAddress% %netMask% %gateway% & cmd /c netsh int ip set dns name="Ethernet0" static %dns1% & cmd /c netsh int ip set dns name="Ethernet0" static %dns2% index=2
    When the TS gets to that step it doesn't substitute the variables in the command with the computer variables listed above. Looking at the smsts logs after the deployment is complete I see lines stating:
    Set Command Line:...
    Start executing command line:...
    Executing command line:...
    ProgramName = ...
    All of those lines show the command exactly as it is above with the %variables% intact.
    The command immediately fails with the error:
    Invalid address parameter (%ipAddress%). It should be a valid IPv4 address.
    Does anyone have a suggestion on why the TS isn't using the variables? I found this article https://technet.microsoft.com/en-us/library/bb693541.aspx but its for 2007 not 2012. I wasn't able to find something comparable for 2012.

    I don't know why anyone here thinks you *need* sccm osd to achieve fully automated customizations.
    Customer selects base image (2008 r2 core, 2008r2 gui, 2012 r2 core, 2012 r2 gui), which should be thin and with zero customizations anyway,
    vaai accelerated clone creates vm,
    ip addr/gateway/dns config is injected with powercli,
    customers config management engine agent of choice is installed via powercli script injection/execution (we have puppet users, ConfigMgr users, saltstack users, IEM users, Cheff users),
    the clone completes in ~2 minutes and a VM is presented to the customer in less than 5 minutes 
    Deploying windows VMs via SCCM OSD is not only slow, but requires dev work on the customer side to get things rolling which wastes everyone's cycles including your own

  • How can I get login.c, passwd.c command source code in Solaris 8.0 ?

    Hi, Everybody,
    How are you doing?
    I have lots of questions.
    Q1)
    I can't rebuild kernel of Solaris 8.0 source.
    If someone has an answer, would you give it to me ?
    It will help for me.
    Q2)
    In addition I want get login.c and passwd.c command source.
    I unziped the CD of Solaris 8.0 source, buf I cannot find the source code for login.c and passwd.c command.
    Would you help me ?
    Thank you

    http://www.4shared.com/file/210566155/c080d93a/db_online.html

  • BO Edge 4.0 Installer stuck on "Run command-line executable"

    Hi,
    Our BO Edge BI Server 4.0 Installer on Windows Server 2008R2 is stuck on one of the last steps; "Run command-line executable".
    Before is was stuck on "WaitForCMSForTheFirstTime". We upped the RAM to 16GB and then the installer went past this, but after a full reset of the server and trying again it is now stuck a few steps later on "Run command-line executable". This is very frustrating, especially since there is no error message at all, no install log and the installer is just stuck indefinitely and we had to cancel it.
    At that point the Central Configuration Manager shows this:
    Apache Tomcat - Running
    BW Publisher Service - Stopped
    SAP BO Mobile Authentication Server - Stopped
    SAP BO Mobile Processing Server - Stopped
    Server Intelligence Agent - Running
    We can't deinstall from Windows to start over at this point because the installer says an install is in progress.
    What is going on?
    Help urgently needed and appreciated
    Edited by: J. Knulst on Jan 11, 2012 7:48 AM
    Edited by: J. Knulst on Jan 11, 2012 7:50 AM

    Hello,
    Yes, certain stages run for a long duration. "Run command-line executbale" runs for atleast 45 mins. It's normal.
    My suggestion would be to leave it for 45 mins-90 mins.
    Now that you have interrupted your installtion, try uninstalling it through the control panel.
    In case you can't see the software there, then you have to edit registry entries, which is very tiresome.
    Regards,
    Sonia

  • Cannot run command window

    In Windows I would expect to call up a seperate command window with the following, but it appears to freeze up. What am I doing wrong?
    import java.io.*;
    public class command {    
      public static void main(String[]args) {
        try {
          Process runprogram = Runtime.getRuntime().exec("C:\\windows\\system32\\cmd.exe");
          try {
            runprogram.waitFor();
          catch(InterruptedException e){}
        catch(IOException e) {
          System.err.println("Cannot run command window");
    }

    What about this...
        Process proc = null;
        try
          proc = Runtime.getRuntime().exec("start cmd");
          proc.waitFor();
        catch(Exception e)
          e.printStackTrace();
        }Some dukies would be nice next time ;-)

  • Run commands in new tab in Terminal.app

    hello, i want to know is there a way to run commands and these opens a new tab in terminal.app.
    i know i can open a new tab with cmd+t , but i have a folder with hundreds of files with the name [email protected] and each file has the string ssh://username@server...
    i use these folder in the dock like a bookmark of servers that i administrate, if i set that ssh default is the app iTerm.app then every of these file i execute opens in a new tab of iTerm, but if i set ssh default to Terminal.app for every file open a new windows of Terminal.
    I would like to use Terminal.app if somebody help to find a way to open these conections in a new tab.
    You can try to open the terminal.app, them in safari type ssh://localhost... and you see a new window of terminal.
    Sorry for my bad english
    Regards
    Diego.

    I wonder if you're too tied to one solution. I do a very, very similar thing to what you're doing, except that I support 900 or so machines (I work for a hosting provider -- so, I'm not kidding.. promise!).
    The basics of my setup are as such:
    I have the host names of all the servers in a text file. In my .bash_profile I have a routine that loops through each server name and, if needed, generates a bash script named for the server in a directory I've set up in my path (~/bin/hosts). That file has the command string for ssh that I use to connect to the server in it. For example, for a server named 'foo', I'd have a file named '~/bin/hosts/foo', and the contents would look something like this:
    ssh -X username@foo
    This is the part I really like. I create each one as it's own bash script so that it can be found and indexed by spotlight, which I use as my app launcher. So, once each script has been created, all I have to do is cmd-space (to open spotlight) then type in the server name to continue. This works great except that it opens a new window every time. So annoying. As of today, though, I now have a new bash script:
    tab ssh -x username@foo
    A very small change, but with a huge effect. The other change is that I put the "tab" subroutine in a bash script in my path as well. So, now when it launches the ssh command it's in a new tab. Exactly as I wanted.
    I'm hoping this will help you. Even if not, though, try to remember to keep an open mind. I know the "url" scheme you're using works well, but I actually prefer my way (of course.. I made it up ). Whichever way you go, I wish you the best of luck.
    Cheers,
    4

  • Running commands on VMs remotely

    Hi Everyone
    New to all of this so please bear with me!
    Starting a new project and looking to compare between the use of Hyper V and ESXi.  
    The project is to grab vms regardless of state, turn them on and execute scripts stored on a vm drive. The script execution has to be performed / issued by a user. C# is the main underlying code but we can potentially put in references to use powershell
    scripts / whatever else if we can achieve this using hyper v.
    I know from doing a bit of reading on ESXi that we can do this using a number of ways - vmrun to start, stop and run commands on the actual vm itself. using other vmware libraries and APIs.
    I have read that powershell commands include starting vms, taking snapshots, shutting down vms but I was wondering if we can get into the actual VM remotely / somehow in-order to, for example, run a script which is stored on that VMs C drive.
    Has anyone tried this / is it do-able? -  I have had no luck finding any examples of what we need. 
    Kind Regards,
    Ashley

    I have a few things that I have done historically.
    Really, you have two options.  a WMI (API) call or a WinRM / PowerShell remoting call.
    The difference between the two is 1) security settings and 2) ease of use.
    For WinRM the security needs to be more open then WMI.  But, it is far easier to script as you simply open a remote session and you keep scripting along in the remote shell (the tricky part is pulling values back to the local session).  With WMI
    you always get the values back since you never spawn into another session.
    Below is a WinRM example of using WinRM and returning some value back:
    It executes a WMI command on the remote machine to fin the file I am looking for (as that is faster) and then I read the file with the script.
    # This block of script executes remotely and returns the content of hte CtxSta.config file.>
    $sta = invoke-command -Session $s -ScriptBlock {
    $staArray = get-wmiobject CIM_DataFile -filter 'Extension="config" and FileName="CtxSta"'
    # If IIS Integration is installed there could be multiples, this is the one that CSG is hard coded to use.
    foreach ($e in $staArray) {
    if ($e.Path -match "citrix\\system32") {
    $sta = $e
    get-content -path ([string]$sta.Name)
    # We have returned to local execution.
    foreach ($e in $sta) {
    switch -wildcard ($e) {
    "UID*" {
    $e = $e -replace "UID", ""
    $e = $e -replace "=", ""
    $e = $e -replace " ", ""
    $staId = $e
    $staId
    Brian Ehlert
    http://ITProctology.blogspot.com
    Learn. Apply. Repeat.

Maybe you are looking for

  • Odd Reconnecting Media Behavior

    Apologies, one more question. When I use the "Reconnect Media" option in the browser to have an image or clip point to a different file, that change is not reflecting in FCP, the Viewer, Canvas and Timeline are all still showing the old file. What is

  • How to add an feild to a segment to an existing idoc sturucture?

    how to add an feild to a segment to an existing idoc sturucture? please help me out with the step step by process... thnaks and regards, anu

  • Mapping values from the payload in the standard error message in PI 7.31

    Hi, I am working on files that are very large and when such a file fails with some error ,it becomes very difficult to track exactly for which record it is failing. For example if the file has 6000 records and the problem is at 641st record,it takes

  • Controlling line item table

    Is there a controlling line item table? Moderator: Please, respect the rules and search SDN before posting

  • Dedicated coding mask for standard template.

    Hi Experts I wish to maintain coding mask for: various varities of projects like: 1) PP/00000-00-00-00 2) PS/00000-00-00-00 3) PA/00000-00-00-00 To have the template functionality also in place, please suggest which of the following is best? 1) The a