Using /etc/bash.bashrc to set system-wide alias

Hi,
I would like to set some system-side aliases and from what I read /etc/bash.bashrc is the correct place to put them.
However, it seems that the root account doesn't load this file. 
What is the correct way to define system-wide aliases?
Thanks.

To be more specific, the aliases are not visible when I use a login shell i.e. 'su -'.
According this explanation http://stefaanlippens.net/bashrc_and_others this is correct. 
So, do I need to duplicate the aliases in /etc/profile so they are visible from login shells?  Or there is a way to define system-wide aliases for
login and non-login shells?
Thx.

Similar Messages

  • Set system wide default mailto url

    I'm trying to configure system wide settings in linux so any new user will apply for this settings.
    I want register my zimbra server with mailto links.
    I've found some information here:
    http://www.zimbra.com/forums/general-questions/48547-how-control-mailto-selection-firefox.html
    but this must be performed by the user and I want to be preconfigured.
    I also tried to play with mimeTypes.rdf, but it seems that there's no system wide mimetypes file. is just created when users changes something.
    how can I setup that setting system wide?

    I've found a partial solution.
    create an application file, for example '''/usr/share/applications/zimbra.desktop''' with this content:
    [Desktop Entry]
    Icon=mail-message-new
    MimeType=x-scheme-handler/mailto;
    Name=Zimbra
    Comment=Zimbra
    Exec=xdg-open https://my.zimbraserver.com/zimbra/?view=compose&to=%u
    Type=Application
    X-XFCE-MimeType=x-scheme-handler/mailto;
    then modify file '''/etc/gnome/defaults.list''', find and substitute '''x-scheme-handler/mailto''' with filename you just created:
    ''x-scheme-handler/mailto=zimbra.desktop''
    the caveat is only works with unity, if you use another wm probably won't work

  • W2K8 & Win7 - Setting system-wide Trusted file locations not working

    Win 2008 Network, Win 7 workstations.
    RE: Setting system-wide trusted file locations
    I have an application using Flash stored on a network location that accesses other files in the same location.  This causes the security warning "The following local application... is trying to communicate with this internet-enabled..."  I can add the location to the trusted sites in the Setting Manager and the warning goes away.  It is not practical however to do this on every machine on the network.  I have tried the FlashPlayerTrust directory and mms.cfg file and neither of these seem to work.  Is there a trick to getting the FlashPlayerTrust directory to work properly.  If I could get this working, I could create a script that copies this file to all machines on the network. 
    Any help you be greatly appreciated. 

    Hi Todd,
    Can you please provide just a little more detail?
    * When you say "accessess", what API is being used?  Are the paths to the other files relative, file: URI http: URI, other?
    * In the FlashPlayerTrust directory, are you using the same path notation as appears in the Settings Manager?  What's a sample {filename}.{ext} being used?
    Thanks!
    -Erica

  • Bash 4.2.008-1 does not source /etc/bash.bashrc.local

    I don't know if this was intended change or not but it seems that /etc/bash.bashrc.local is no longer sourced by default.  All the global alias that I had set there are no longer being set.  Was /etc/bash.bashrc.local depreciated (if so where is the new place for such aliases) or is this a bug?

    Allan wrote:/etc/bash.bashrc does not source /etc/bash.bashrc.local by default.  You can either put your alias in /etc/bash.bashrc directly or do the sourcing yourself.
    Hmmm, you are right http://projects.archlinux.org/svntogit/ … 657ba94213
    Last edited by karol (2011-05-01 00:03:02)

  • Set system-wide Finder view preferences

    I know that .DS_Store files are created in every directory I enter with the finder in Mac OS X, and that keeps track of the folder's metadata (including how is it being displayed). I also know that this command:
    sudo find /Users/[USERNAME]/ -name ".DS_Store" -depth -exec rm -f {} \;
    ... will recursively delete all .DS_Store files insite the /Users/[USERNAME]/ folder.
    Also, I know that when pressing CMD+J inside a finder window, selecting the configuration I want (40x40 icons, small-medium grid space, arrange by kind, text size 10px, show item info, show icon preview, background white) and selecting "use as defaults" will.. well, make it the default, and holding OPT will restore it to THAT default.
    The thing is that, when I create a new folder, it doesn't take those parameters. And the folders that HAD .DS_Store files deleted keep that previous configuration, not the "default" one.
    What can I do to set a system-wide, consistent finder look?
    I'm on Mac OS X 10.6.6.

    Hi,
    I think I remember a similar problem in Tiger yonks ago. I recall the solution was to make all the changes to the Finder whilst in an Admin account - this way the choices stick for all windows?
    Worth a shot.
    S.

  • Urgent Assistance Needed:  All Documents deleted after setting system-wide viewing preferences for Finder

    I got myself into some trouble...
    Following the guide here to force a default Folder view to sub folders:  http://apple.stackexchange.com/questions/10488/system-wide-finder-view-preferenc es
    Which is:
    There is a simpler way.
    In the Terminal, navigate to your $HOME directory: cd ~
    Remove all the .DS_Store files:find ~ -name ".DS_Store" -depth -exec rm -f {} \;
    Relaunch finder going to: Force Quit → Finder
    Set your global preferences using ⌘J and press the Use as default button.
    Now, every folder you open or create will have the new settings.
    I now have the existing Folder structure in tact for Documents, but every single file is gone (in my entire Documents directory).
    Naturally I'm thinking two things:
    1)  Oh no.  I knew better than to go down this path without knowing exactly what I was doing.
    2)  How do I "get my files back..."
    I'm not sure if they're just not viewable or if they were deleted.  Essentially everything I've configured on the machine (From Apple login to mouse scroll reversal) has been undone.  I don't have TimeMachine set up yet - I brought two remote hard drives to work today to get it done but they're both NTFS so I couldn't progress. 
    I'm reasonably technical but new to Mac. 
    Advice is greatly appreciated... I'm GREATLY distressed at the moment...
    <Edited by Host>

    Ok so "DS_Store files are used by Mac OS X to store folder specific metadata information."  Supposedly they get recreated... except I didn't get a nice smooth transition of newly created invisible, instead every file on my machine is "gone."

  • Setting System-Wide Max Heap Size

    We want to set the heap-size of Java-Plugin 1.5.0_14 for a company-wide rollout to a fixed size under Windows XP.
    In deployment.config under C:\Winnt\Sun\Java\deployment I am giving this:
    deployment.system.config=file:C:\\WINNT\\Sun\\Java\\Deployment\\deployment.properties
    deployment.system.config.mandatory=true
    In the respective deployment.properties I am giving
    #deployment.properties
    deployment.cache.max.size=50m
    deployment.javapi.jre.1.5.0_14.args=-Xmx256m -Xms75m
    While the cache-parameter is taking effect (visible in the Java Control Panel) there is no change in the Max Heap Size.
    Any idea how this could be achieved?
    Thank you
    Michael

    MaxHeapSize I determine with Runtime.getRuntime().maxMemory()
    Setting it manually in the javacpl via -Xmx works fine but....
    Problem is that we do not want each user to open his Java Control Panel and set this value manually.
    May be error prone and difficult to communicate in a scenario where you have hundreds of users in different locations, countries etc.
    Should be possible to set this value once installing the Java Plugin
    Thank You
    Michael

  • Change the file set icons system wide

    Hello,
    I am trying to change all my .html, .js, .css file sets, system wide. Right now they are all the plain boring white with text. If I go into a folder they quickly appear with their more colorful Dreamweaver, photoshop, etc icon, but quickly jump back to the plain white, boring icon. I know how to change the files icons one by one, but obviously that could take a while.
    Looking for an easy way to change my files system wide wothout screwing anything up. Recently came from a PC and loving my mac (never going back).
    Thanks in advance!

    Hi
    Still no :o)
    The only way around it, is to wrap your conc process that generates the etext output either with another program or if its an Oracle Report based program, in the after report trigger. That will get a handle on the generated file, easy enough cos you'll know the requestid, and then copy and rename it to the same or another location. We used to do this for a payments process in the Netherlands localization we ship.
    Tim

  • Changes recenly in the bash.bashrc?

    so, i'm in some sort situation i wasn't able to fix in the last hours (hours bc of rebooting).. the last yaourt -Syua , full system upgrade left me with nothing but
    (none) (user) (or was it "(none) (tty1)? I'm writing this from memory)
    i made the mistake to not always care about .pacnews, so i have no automerge/vimmerge or whatever program at hand, also not vim because i have no access to my systen apart from archlivecd > mount the partition my system is on.
    the recent .pacnews (fstab,gshadow,bash.bashrc,rc.conf) had no visible changes for me, diff (oldfile) (file.pacnew) was no big help. so the only file with visible changes was bash.bashrc.
    so i did try and error, inserting lines of the old bash.bashrc, but mo success.
    what i don't think is problem related is that i excluded the KDE-* package from updates but i still use kdm for starting i3 / scrotwm, i haven't got the time up to now to get ridd of kdm.
    the source of the problem must be /etc/bash.bashrc or did I miss some updated file? find / *pacnew (or sth llike that) did uotput only the 4 files in /etc
    a lot of searching forums/searchmachines didn't help. i know this sounds somehow 'greenhornish' but i have no access to the computer or access to output of cmds or some files, also sorry for constant lowercase letters but i'm typing this on my n900.
    /add: keyboard at login shell doesn't work either, every reboot is pushing button.
    Last edited by gpunkt (2011-04-16 09:21:10)

    gpunkt wrote:- was about to delete the contents of the above thread ....
    No. Never do that. It makes for nonsensical threads and is also against forum rules.

  • Preferences API plus Linux. Saving entries system wide.

    Hi:
    I hope you know a little more about this than I do:
    I want to (one time) write a key-value pair into the Registry (Windows) / the according xml file (Linux).
    Since this entry should be available for all users, I used the following line to save it system wide:
    Preferences prefs = Preferences.systemRoot().node(this.getClass().getName());
    In the Windows Registry it can be found here:
    HKEY_LOCAL_MACHINE/ SOFTWARE/JavaSoft/Prefs
    Under Linux the prefs.xml file which contains the key value pair can be found here:
    /etc/.java/.systemPrefs/_!':!.../prefs.xml
    But, in order to create this file under Linux I had to temporarily change the access rights of the directory "/etc/.java/.systemPrefs" plus the two files inside this directory (".system.lock" and ".systemRootModFile") to 777.
    Afterwards I executed my Java program which set the entry I am talking about.
    At the end I set back the access rights of the ".systemPrefs" directory plus the two files mentioned above.
    The file prefs.xml has the following access rights:
    -rw-r--r--
    So, everyone has at least read access (which is great).
    My question:
    - Since other people should use this program in the future too: is there an easier / better way to set system wide preferences?
    For an answer thank you very much in advance.
    Joey

    Hi jschell:
    Thank you for your answer.
    The way you describe it is exactly how it is done till now.
    My task is to find out the way to do it using the Properties API plus solving potential problems (like the one described above).
    I just took a look at my question again. I wrote "Since other people should use this program in the future too: is there an easier / better way to set system wide preferences?".
    What I wanted to ask is: "Since other people should install this program in the future too, is there an easier / better way to set system wide preferences (by using the Properties API)?"

  • System Wide RTSI Trigger - Multiple Instrument​s

    Hello,
    The application design requires a group of VIs whose job is to select a test point, look up what device and channel it is connected to, and then assign it as a trigger on the RTSI bus. The four instruments will then use this RTSI channel as a system wide trigger.
    For example, can a VI assign Channel 3 on Device 1 as a trigger on RTSI Channel 0; then a completely separate VI that contains the driver for Device 1 (and is responsible for data acquisition) utilizes RTSI 0 as it's trigger (the same trigger that it is supplying)? There are four instruments, and the trigger can be selected from any channel on any of these instruments.
    Or, does the trigger have to be set at the time of acquisition, t
    herefore, amidst initializing the driver?
    Thanks for your help!
    Mark Roberto
    MD Robotics

    Mark,
    Here is how you can setup were to look for triggers. When we set a DAQ board to trigger we use Trigger Config VI which can be found in the advanced pallettes for Analog Input, Analog Output, and Digital I/O.
    When we want to route the trigger setup in Trigger Config to the RTSI bus to make the signal available to other DAQ boards then we use Route Signal for E-series and Analog output boards or RTSI Connect for 653x boards.
    Regarding he question about assigning channel 3 on Device 1 as a trigger on the RTSI channel, this is not directly possible.
    The RTSI bus only takes digital signals and therefore you can not route an Analog signal on channel 3 to the RTSI bus. However you can setup Device 1 to trigger off an analog trigger (if the DAQ board supports Anal
    og Triggering) and then pass the digital trigger that is set over the RTSI bus.
    When you set up analog triggering you can only specify the first channel in your channel string as the analog trigger source. In this case you can not monitor 4 channels and trigger when either of the 4 channels reach a trigger condition. You can only monitor one channel for the trigger condition.

  • [Solved]Terminals won't start after merging bash.bashrc

    Hi all,
    As the topic states, after merging the files using meld, none of my terminals will start. I've never modified bash.bashrc and seeing that the developers decided to change it, I'll like to get this working.
    Current bash.bashrc
    # /etc/bash.bashrc
    # If not running interactively, don't do anything
    [[ $- != *i* ]] && return
    PS1='[\u@\h \W]\$ '
    PS2='> '
    PS3='> '
    PS4='+ '
    case ${TERM} in
    xterm*|rxvt*|Eterm|aterm|kterm|gnome*)
    PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"'
    screen)
    PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"'
    esac
    [ -r /etc/bash_completion ] && . /etc/bash_completion
    [ -r /etc/bash.bashrc.local ] && . /etc/bash.bashrc.local
    Thanks in advance!
    EDIT: This is embarrassing... A crappy alias in my .bashrc was causing this. Sorry for wasting your time
    Last edited by Jodell (2011-02-22 02:40:25)

    startx at the command line.
    I just tried Xorg -reconfigure again, adding the AutoAddDevices = false option - still doesn't work, giving the error about config/hal. Without the option, it just goes back to the terminal with no errors.
    Pacman log says the only thing upgraded today (after pacman) was the kernel, nvidia, and kernel-firmware. cdfs conflicted with the new kernel, so I removed it. Then I rebooted, and X stopped working. Downgrading those back again doesn't fix it. I don't get it.
    >>EDIT:
    Okay - what does cdfs have to do with Xorg???? This makes no sense. I downgraded the kernel pkgs and nvidia again, and this time installed cdfs, which I forgot to do last time. Now X starts. I don't really get it.
    Maybe hal in xfce or some plugin needs to use cdfs for something?? I don't really know - but I'm just glad it's working. I guess I'll file a bug report for cdfs so it can be built to the new kernel and hold off upgrading until it's fixed with 2.6.31. sheesh! too weird.
    Last edited by userlander (2009-10-10 23:27:36)

  • Use system-wide Text replacement to superscript characters? 1st, 2nd, etc

    I wanted to use the new text substitution in Snow Leopard to transform typed "1st" and "2nd's" into their 'correct' form with superscripted numerical suffixes. I tried to just easy do it by copying a corrected form out of Pages where I had created a proper "1st,", "2nd," and so on, but when I would paste them into the system prefs pane, they would just paste as regular numerals & letters instead of the superscripted variety.
    I then thought to see if I could find the proper superscripted letters in the character viewer but came up empty. Does anyone know of a way to get this working? it's minor and all, but would be a nice addition.

    1) yes, I know that
    2) how would that help this situation any even if I hadn't? i didn't say "I can't get my text replacements to be accepted in any applications," I stated that I cannot find a way to get the Text System Prefs pane to accept supercripted numerical suffixes.
    Sorry to be an *** about it, but everyone's always lambasting posters for not being clear enough or specific enough in what they're trying to do, and I was very clear about what I was asking and even in giving specifics on what i had done to try and remedy the situation myself.
    I'm not asking how to get text replacement to work in apps, I'm asking how to get the system-wide text replacement to accept superscripted numerical suffixes in the first place. Maybe it's not possible? maybe it is and I'm missing something, but if so it's specific to the prefs pane, not other applications.

  • System-wide MTU 1400 setting?

    How do I setup the interfaces to use MTU of 1400?
    I have been able to add "mtu 1400" to /etc/hostname.XXX and got those NICs to set mtu to 1400.
    However when I bring up the zones, the virtual NICs that get created in the process, sets the MTU to 1500.
    Similarly in Veritas Cluster environment, when I bring up the service group, the virtual NIC that gets plumbed, also sets MTU to 1500.
    Other than running a script to scan each NIC and executing - ifconfig <NIC> mtu 1400 - is there a way I can set the MTU to 1400 system-wide?
    I need this setting for both Solaris 10 and Solaris 9 boxes.
    If anybody has any input/suggestion on how to do this, please reply.
    Thanks.
    - SG

    Unfortunately I am unable to debate why MTU is set to 1400. I have been requested to do that by the Architect/Network/Firewall engineers. Even the Windows guys have to do this on this boxes as well. Please if anybody knows how I can make this a system-wide setting without having to write a script, I would deeply appreciate it. Any engineers working at Sun who monitor these forums care to reply, please?
    - SG

  • Setting ALSA sound card system wide (rather than just in KDE)

    Hi,
    I've got an HTPC with an ATI Radeon HD 4350 graphics card running Arch x86. It has its own integrated sound card for outputting audio via HDMI, which is detected by ALSA as a separate device. I've managed to set it as the default audio device in KDE 4 (via System Settings). This allows applications such as Amarok and SMPlayer to properly output audio to the HD 4350's integrated sound card, but software such as Flash and MPlayer (from the command line) are still outputting audio to the motherboard's built-in sound card. How can I change this setting on a system-wide level? I've tried running alsaconf as root and adding
    pcm.!default {
    type hw
    card 2
    device 3
    to ~/.asoundrc; I got the card and device numbers from aplay:
    [htpc@exia ~]$ aplay -l
    **** List of PLAYBACK Hardware Devices ****
    card 0: Intel [HDA Intel], device 0: HDA Generic [HDA Generic]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 1: HDMI [HDA ATI HDMI], device 3: ATI HDMI [ATI HDMI]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    Here is the output from MPlayer when I try to play a video, complete with errors regarding audio:
    MPlayer UNKNOWN-4.4.0 (C) 2000-2009 MPlayer Team
    137 audio & 296 video codecs
    mplayer: could not connect to socket
    mplayer: No such file or directory
    Failed to open LIRC support. You will not be able to use your remote control.
    Playing /tmp/FlashmvWXPy.
    libavformat file format detected.
    [flv @ 0xac7d250]skipping flv packet: type 18, size 294, flags 0
    [lavf] Video stream found, -vid 0
    [lavf] Audio stream found, -aid 1
    VIDEO: [H264] 854x480 0bpp 29.970 fps 0.0 kbps ( 0.0 kbyte/s)
    ==========================================================================
    Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
    Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
    ==========================================================================
    ==========================================================================
    Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
    FAAD: compressed input bitrate missing, assuming 128kbit/s!
    AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16000->176400)
    Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio))
    ==========================================================================
    [AO OSS] audio_setup: Can't open audio device /dev/dsp: Device or resource busy
    [AO_ALSA] alsa-lib: confmisc.c:768:(parse_card) cannot find card '2'
    [AO_ALSA] alsa-lib: conf.c:3513:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
    [AO_ALSA] alsa-lib: confmisc.c:392:(snd_func_concat) error evaluating strings
    [AO_ALSA] alsa-lib: conf.c:3513:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
    [AO_ALSA] alsa-lib: confmisc.c:1251:(snd_func_refer) error evaluating name
    [AO_ALSA] alsa-lib: conf.c:3513:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
    [AO_ALSA] alsa-lib: conf.c:3985:(snd_config_expand) Evaluate error: No such file or directory
    [AO_ALSA] alsa-lib: pcm.c:2211:(snd_pcm_open_noupdate) Unknown PCM default
    [AO_ALSA] Playback open error: No such file or directory
    [JACK] cannot open server
    [AO SDL] Samplerate: 44100Hz Channels: Stereo Format s16le
    [AO_ALSA] alsa-lib: confmisc.c:768:(parse_card) cannot find card '2'
    [AO_ALSA] alsa-lib: conf.c:3513:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
    [AO_ALSA] alsa-lib: confmisc.c:392:(snd_func_concat) error evaluating strings
    [AO_ALSA] alsa-lib: conf.c:3513:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
    [AO_ALSA] alsa-lib: confmisc.c:1251:(snd_func_refer) error evaluating name
    [AO_ALSA] alsa-lib: conf.c:3513:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
    [AO_ALSA] alsa-lib: conf.c:3985:(snd_config_expand) Evaluate error: No such file or directory
    [AO_ALSA] alsa-lib: pcm.c:2211:(snd_pcm_open_noupdate) Unknown PCM default
    [AO SDL] Unable to open audio: No available audio device
    DVB card number must be between 1 and 4
    AO: [null] 44100Hz 2ch s16le (2 bytes per sample)
    Starting playback...
    VDec: vo config request - 854 x 480 (preferred colorspace: Planar YV12)
    VDec: using Planar YV12 as output csp (no 0)
    Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
    VO: [xv] 854x480 => 854x480 Planar YV12
    Thanks!
    Last edited by w1ntermute (2009-06-28 18:40:03)

    whoops wrote:Do you use the motherboard sound-card?
    No.
    whoops wrote:If not - did you try just turning it off in bios (or blacklisting the driver)?
    No, I haven't tried that. I'll give it a shot. Thanks for the tip!
    Last edited by w1ntermute (2009-07-02 18:11:53)

Maybe you are looking for