[Solved] -bash: /etc/profile.d/bash_completion.sh: No such file or ...

Hi all.
Did a pacman -Syu yesterday, havn't done this for a while. After this, whenever starting a login shell, I'm getting the following:
-bash: /etc/profile.d/bash_completion.sh: No such file or directory
It seems to be caused by sourcing /etc/profile. Now, my /etc/profile hasn't been changed.
[ndlarsen@slave ~]$ . /etc/profile
-bash: /etc/profile.d/bash_completion.sh: No such file or directory
[ndlarsen@slave ~]$ pacman -Qo /etc/profile
/etc/profile is owned by filesystem 2009.07-1
[ndlarsen@slave ~]$ pacman -Ss filesystem | grep core/filesystem
core/filesystem 2009.07-1 (base)
[ndlarsen@slave ~]$ pacman -Qk filesystem
filesystem: 89 total files, 0 missing file(s)
[ndlarsen@slave ~]$ pacman -Q bash-completion
bash-completion 1.0-3
[ndlarsen@slave ~]$ pacman -Ss bash-completion
extra/bash-completion 1.0-3
Programmable completion for the bash shell
[ndlarsen@slave ~]$ pacman -Qk bash-completion
bash-completion: 45 total files, 0 missing file(s)
Now, I'm wondering if this is a bug or feature and what to do about it.
Cheers.
Last edited by ndlarsen (2009-10-30 12:32:54)

Correct, seems to be caused by /etc/profile.bash, which I neither have messed with, though difers for some reason.
[ndlarsen@slave ~]$ . /etc/profile.bash
-bash: /etc/profile.d/bash_completion.sh: No such file or directory
[ndlarsen@slave ~]$ wget -O profile.bash http://repos.archlinux.org/wsvn/packages/bash/repos/core-i686/profile.bash?op=dl&rev=0
[ndlarsen@slave ~]$ diff profile.bash /etc/profile.bash; echo ..Done...
25a26,29
>
> #. bash_completion
> . /etc/profile.d/bash_completion.sh
>
..Done...
[ndlarsen@slave ~]$ pacman -Qo /etc/profile.bash
/etc/profile.bash is owned by bash 4.0.033-1
[ndlarsen@slave ~]$ pacman -Q bash
bash 4.0.033-1
Wonder if the devs have made changes to the svn entries.
Last edited by ndlarsen (2009-10-30 10:57:11)

Similar Messages

  • /etc/openvpn/update-resolv-conf': No such file or directory

    Hi,
    First, sorry if this isn't the right section. I was quite hesitant on which one to post in.
    I was using OpenVPN a few months ago, it was working great. I left it aside during a moment because I didn't need it.
    Recently, I tried to connect to the VPN server I used to use (a friend's server, which is still up and running, I can connect with no problem on my Windows session with openvpn-gui), but I was getting this error each time I tried to connect.
    Here's my command line with the error:
    [brendan@Archisen openvpn]$ openvpn --config client.conf
    Options error: --up script fails with '/etc/openvpn/update-resolv-conf': No such file or directory
    Options error: Please correct this error.
    Use --help for more information.
    [brendan@Archisen openvpn]$
    client.conf
    # Client
    client
    dev tun
    proto tcp
    remote 62.210.207.73 443
    resolv-retry infinite
    cipher AES-256-CBC
    # Cles
    ca ca.crt
    cert brendan.crt
    key brendan.key
    tls-auth ta.key 1
    # Securite
    nobind
    persist-key
    persist-tun
    comp-lzo
    verb 3
    script-security 3 system
    up /etc/openvpn/update-resolv-conf
    If I remove the "up /etc/openvpn/update-resolv-conf" line, OpenVPN doesn't output any error, but I can barely resolve any domain name.
    Do you have an idea on how to fix this?
    Thanks.

    Please post your oracle's .bash_profile.Please have a quick glance at my .bash_profile
    ============================================
    [root@localhost ~]# cat /home/oracle/.bash_profile
    # .bash_profile
    # Get the aliases and functions
    if [ -f ~/.bashrc ]; then
    . ~/.bashrc
    fi
    # User specific environment and startup programs
    PATH=$PATH:$HOME/bin
    export PATH
    unset USERNAME
    ###########oracle variables#############
    echo "welcome to oracle";
    ORACLE_BASE=/u01/app/oracle
    ORACLE_OWNER=oracle;export ORACLE_OWNER
    ORACLE_SID=sai10g
    ORACLE_TERM=xterm; export ORACLE_TERM
    LD_LIBRARY_PATH=$ORACLE_HOME/db_1/lib ; export LD_LIBRARY_PATH
    ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
    export DISPLAY=:0.0
    PATH=$PATH:$ORACLE_HOME/db_1/bin
    export ORACLE_BASE ORACLE_HOME PATH ORACLE_SID
    ########## End of Oracle Variables############
    =============================================
    and also .bashrcHere is .bashrc
    ==================
    [root@localhost ~]# cat /home/oracle/.bashrc # .bashrc
    # User specific aliases and functions
    # Source global definitions
    if [ -f /etc/bashrc ]; then
    . /etc/bashrc
    fi
    ====================
    Can anyone have a quick glance at this and let me know what is the problem and how to solve it?

  • [SOLVED] cronie reports "/usr/sbin/run-cron: No such file or directory

    Hi, I just made a fresh install of Arch Linux x86_64 on my PC and I'm having troubles with cronie.
    cronie emails say:
    /bin/sh: /usr/sbin/run-cron: No such file or directory
    In crond.log I have:
    Jan 2 22:01:01 localhost /USR/SBIN/CROND[4691]: (root) CMD (run-parts /etc/cron.hourly)
    Jan 2 22:47:56 localhost /usr/sbin/crond[5529]: (CRON) STARTUP (1.4.8)
    Jan 2 22:47:56 localhost /usr/sbin/crond[5529]: (CRON) INFO (Syslog will be used instead of sendmail.): No such file or directory
    Jan 2 22:47:56 localhost /usr/sbin/crond[5529]: (CRON) INFO (running with inotify support)
    Jan 2 22:47:56 localhost /usr/sbin/crond[5529]: (CRON) INFO (@reboot jobs will be run at computer's startup.)
    Jan 2 23:00:01 localhost /USR/SBIN/CROND[5733]: (root) CMD (ID=sys-hourly /usr/sbin/run-cron /etc/cron.hourly)
    Jan 2 23:00:01 localhost /USR/SBIN/CROND[5732]: (root) CMDOUT (/bin/sh: /usr/sbin/run-cron: No such file or directory)
    Jan 2 23:01:01 localhost /USR/SBIN/CROND[5748]: (root) CMD (run-parts /etc/cron.hourly)
    I've changed very little of the configuration files provided with the package: root's crontab is completely empty, and cron.hourly only contains the original untouched 0anacron file.
    I have the same basic setup on another machine and I don't have such errors.
    Any hints?
    Thanks
    Last edited by Venator85 (2012-01-03 20:26:16)

    [karol@black ~]$ nosr /usr/sbin/run-cron
    extra/dcron
    community/fcron
    Seems that file is provided by other cron implementations.

  • Build fails no /etc/profile.d/gnome.sh

    I am trying to build gnome-system-tools and I keep failing here:
    [root@localhost system-tools]# makepkg -i
    ==> Making package: system-tools-backends 1.2.0-1 (Fri Sep 21 12:26:10 EDT 2007)
    ==> Checking Runtime Dependencies...
    ==> Checking Buildtime Dependencies...
    ==> Retrieving Sources...
       -> Found system-tools-backends-1.2.0.tar.bz2 in build dir
       -> Found archsupport.patch in build dir
    ==> Validating source files with md5sums
        system-tools-backends-1.2.0.tar.bz2 ... Passed
        archsupport.patch ... Passed
    ==> Extracting Sources...
       -> tar -xf system-tools-backends-1.2.0.tar.bz2
    ==> Removing existing pkg/ directory...
    ==> Starting build()...
    PKGBUILD: line 20: /etc/profile.d/gnome.sh: No such file or directory
    What am I missing?  Why no /etc/profile.d/gnome.sh?
    I am running Gnome 2.18.3 and starting it with gdm.  Totally lost at this point.
    Thanks

    The output in your post says you're trying to build system-tools-backends, not gnome-system-tools. According to the relevant AUR page, that package was submitted over two years ago, and hasn't been updated since. The upstream release date for system-tools-backends 1.2.0 was 08 March 2005.
    Find a more recent release, and see if that builds correctly for you.

  • /etc/profile doesn't get sourced at start of session

    Hello to everyone :D. I've been using Windows my entire life until January when someone recommended me Ubuntu. I tried (and loved it) for some months but got sick of the lack of control, the pre-installed packages and the incorporation of Unity in 11.04, so went all out for Arch.
    It took me 2-whole-days to install everything correctly (because of issues related with the PC rather than Arch itself) and I've been configuring it bit by bit in the last two weeks (wasted my whole winter vacations on it, but it was worth it :P), ran through a lot of trouble which I've been (somehow) able to overcome almost completely by just using the Wikia (and Googling through old forum posts). I also learned a whole lot about Linux in that time and I'm very happy with my new system :D. So a thanks a lot to all the community for the great documentation you've developed, it really made a complete Linux-newbie (with a whole lot of patience :P) get a working system all by himself which is saying a lot.
    ------------------------------------------------------------------START READING HERE TO SKIP PERSONAL INTRO :P ---------------------------------------------------------------------
    However right now I'm having a couple of minor issues which don't prevent me from enjoying the system but I would rather fix in order to have a clean system (and avoid further trouble in the future). I have LXDE installed with Slim as a login manager which I start through inittab in run level 5 to start X (relevant files attached at the end of the post). The system was working perfectly but I noticed that my session wasn't being registered by ConsoleKit (it didn't appear in the "who" command which was a problem for some scripts I was building) so I read the wikia and added the following lines at "slim.conf":
    sessionstart_cmd    /usr/bin/sessreg -a -l $DISPLAY %user
    sessionstop_cmd     /usr/bin/sessreg -d -l $DISPLAY %user
    Which happily made the session appear at the "who" command as I needed. However some days after that, for no apparent reason (actually me touching config files probably), my PATH environment variable was wrong after booting (just had the /bin and /usr/bin on it, not /sbin or /usr/sbin). This just happens when I boot directly to X, when booting from a terminal the variable value was correct.
    After some research (and adding debugging commands in the initialization scripts) I concluded that my "/etc/profile" script wasn't getting ran when I boot directly to X. In order to bypass this problem temporally I made a (absolutely horrible and temporal) patch by adding the line "source /etc/profile" at ".xinitrc" which sourced the file and gave me the right value for the PATH variable. However by doing it seems I ruined the former problem and my session doesn't appear at the "who" command again :S (by removing it again, the session appears again but the PATH variable is wrong). So I've been searching exactly when /etc/profile is sourced and, apparently, it's when the "login" command is executed (which I guess is done by either the LXDE session or Slim itself).
    Since none of these packages got updates when the problem appeared I'm pretty sure it must have been one of my editions of the config files. So I leave the ones I think are relevant to the issue (and the ones that I tinkered it with the most).
    If anyone has the time to point me in the right direction I would greatly appreciate it:
    /etc/rc.conf: http://pastebin.com/qd5xYYsT
    /etc/inittab: http://pastebin.com/M1h60Hym
    /etc/slim.conf: http://pastebin.com/iaRqya07
    /etc/profile: http://pastebin.com/JLtNCMtn
    ~/.xinitrc: http://pastebin.com/XGrNuhpv
    My rc.local file is completely blank and rc.sysinit and rc.multi haven't been modified from their default values. If you need any more files, logs or any kind of experiment to gather more info just let me know and I'll post it as soon as I read it.
    Thanks a lot in advance :-).
    Last edited by facucosta (2011-07-27 08:29:50)

    There is quite some confusion about the different startup files For real terminal work you can check the bash manual. Graphical login managers however do not always follow these rules even though Slim should read /etc/profile as /etc/slim.conf seems to invoke bash with --login... You could try to put the settings in /etc/environment (see the arch wiki). There might also be a slim specific bug
    --edit--
    On second look line 35 seems odd in your slim.conf. You could try to change it to:
    login_cmd           exec /bin/sh --login ~/.xinitrc %session
    Last edited by FarmerF (2011-07-27 11:10:15)

  • [SOLVED] How do I set the default umask? Not in /etc/profile

    Hi guys
    This is probably not what you expect to hear about umasks... I have set it in /etc/profile:
    [2] ognyan@xxxlinux : ~ >grep umask /etc/profile
    #Set our umask
    umask 002
    If I log on via ssh, my umask is 0002. I can start a vnc server and a konsole inside, which has umask 0002. So far so good...
    I also have a vnc server running as a service. If I open a konsole from inside this vnc, bash says umask 0022. So there must be a more-default setting for umask, than /etc/profile. I found a setting in /etc/login.defs and changed it to "UMASK 007", then even rebooted, but bash inside the vnc service stays with umask 0022.
    It seems not to be a setting of KDE, since both vnc sessions have different umasks, inherited by their parents. What provides the environment for the service and how can I control it?
    Last edited by bigblondewolf (2013-12-11 08:37:26)

    on my server i have something like this in ~/.profile:
    # the default umask is set in /etc/profile; for setting the umask
    # for ssh logins, install and configure the libpam-umask package.
    umask 002
    and at home i have ~/.bash_profile, but no umask in it.
    or is this answer too obvious? not quite sure i get your problem.

  • [SOLVED] printenv output differs from settings in /etc/profile

    Hi, I just noticed that
    printenv PATH
    gives me something else (just '/usr/bin') than is defined in /etc/profiles, which is
    PATH="/usr/local/sbin:/usr/local/bin:/usr/bin"
    export PATH
    I'm using fish but there is no entry about variables in ./config/fish/config.fish.
    Thanks for your help!
    Last edited by ysetdng (2014-09-16 23:05:56)

    Let /etc/login.defs be, it isn't supposed to have the full PATH.
    Read https://wiki.archlinux.org/index.php/Fi … leshooting
    Arch wiki wrote:
    If you decide to set fish as your default shell, you may find that you no longer have very much in your path. You can add a section to your ~/.config/fish/config.fish file that will set your path correctly on login. This is much like .profile or .bash_profile as it is only executed for login shells.
    if status --is-login
    set PATH $PATH /usr/bin /sbin
    end
    Note that you will need to manually add various other environment variables, such as $MOZ_PLUGIN_PATH. It is a huge amount of work to get a seamless experience with fish as your default shell.

  • [SOLVED] bash and xterm - which files get read and referenced?

    I currently have my user shell set as /bin/sh (which, as I'm sure you are aware, is a symlink to bash). When I launch xterm, none of my config files seem to be read or sourced. If I login from the console, all is correct.
    According to the documentation I've read, when bash is invoked as sh, it should read /etc/profile, and then .profile, and finally .shrc (which is recommended to be explicitly sourced from .profile). I can see that /etc/profile is being read, as the PATH is being updated from items in /etc/profile.d, but none of my config files in ~ are being read.
    I put in a unique alias in each of .bash_profile, .bashrc, .profile, and .shrc to try to trace the files being read. In console, this reveals that .profile and .shrc are being read (as I would expect). But, in xterm, no aliases are being read.
    Also, PS1 is set to sh-4.2$ (literally set as '\s-\v\$ '). I have tried to grep that sequence in /etc, but that failed to hit on anything.
    I don't have my own .Xresources and nothing in .xinitrc redefines xterm behavior. The only switches I am explicitly sending to xterm redefine appearance (background/foreground color and font).
    The only other relevant piece of information I can think of is that I am using the slim login manager and in slim.conf it defines: login_cmd exec /bin/bash -login ~/.xinitrc %session. I changed that to /bin/sh, but it had no effect.
    Any ideas?
    Solution
    Adding
    XTerm*.LoginShell: True
    to ~/.Xdefaults will cause xterm to behave as expected.
    Last edited by archnet (2011-05-11 00:40:49)

    dmz wrote:
    To answer your actual question:
    strace -eopen xterm
    strace -eopen sh
    Here is the output:
    sh-4.2$ strace -eopen xterm
    open("/etc/ld.so.cache", O_RDONLY) = 3
    open("/usr/lib/libXft.so.2", O_RDONLY) = 3
    open("/usr/lib/libXaw.so.7", O_RDONLY) = 3
    open("/lib/libncursesw.so.5", O_RDONLY) = 3
    open("/lib/libc.so.6", O_RDONLY) = 3
    open("/usr/lib/libfontconfig.so.1", O_RDONLY) = 3
    open("/usr/lib/libX11.so.6", O_RDONLY) = 3
    open("/usr/lib/libXmu.so.6", O_RDONLY) = 3
    open("/usr/lib/libXt.so.6", O_RDONLY) = 3
    open("/usr/lib/libICE.so.6", O_RDONLY) = 3
    open("/usr/lib/libfreetype.so.6", O_RDONLY) = 3
    open("/usr/lib/libXrender.so.1", O_RDONLY) = 3
    open("/usr/lib/libXext.so.6", O_RDONLY) = 3
    open("/usr/lib/libXpm.so.4", O_RDONLY) = 3
    open("/usr/lib/libz.so.1", O_RDONLY) = 3
    open("/usr/lib/libexpat.so.1", O_RDONLY) = 3
    open("/usr/lib/libxcb.so.1", O_RDONLY) = 3
    open("/lib/libdl.so.2", O_RDONLY) = 3
    open("/usr/lib/libSM.so.6", O_RDONLY) = 3
    open("/usr/lib/libXau.so.6", O_RDONLY) = 3
    open("/usr/lib/libXdmcp.so.6", O_RDONLY) = 3
    open("/lib/libuuid.so.1", O_RDONLY) = 3
    open("/proc/meminfo", O_RDONLY) = 3
    open("/home/archnet/.Xauthority", O_RDONLY) = 4
    open("/home/archnet/.Xdefaults", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/lib/locale/locale-archive", O_RDONLY) = 4
    open("/usr/share/X11/locale/locale.alias", O_RDONLY) = 4
    open("/usr/share/X11/locale/locale.alias", O_RDONLY) = 4
    open("/usr/share/X11/locale/locale.dir", O_RDONLY) = 4
    open("/usr/share/X11/locale/en_US.UTF-8/XLC_LOCALE", O_RDONLY) = 4
    open("/home/archnet/.Xdefaults-natoufa", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/home/archnet/.Xdefaults", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/X11/app-defaults/XTerm", O_RDONLY) = 4
    open("/etc/ld.so.cache", O_RDONLY) = 4
    open("/usr/lib/libXcursor.so.1", O_RDONLY) = 4
    open("/usr/lib/libXfixes.so.3", O_RDONLY) = 4
    open("/home/archnet/.icons/default/cursors/xterm", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/home/archnet/.icons/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/icons/default/cursors/xterm", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/icons/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/pixmaps/default/cursors/xterm", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/pixmaps/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/home/archnet/.icons/default/cursors/sb_v_double_arrow", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/home/archnet/.icons/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/icons/default/cursors/sb_v_double_arrow", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/icons/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/pixmaps/default/cursors/sb_v_double_arrow", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/pixmaps/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/home/archnet/.icons/default/cursors/sb_h_double_arrow", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/home/archnet/.icons/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/icons/default/cursors/sb_h_double_arrow", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/icons/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/pixmaps/default/cursors/sb_h_double_arrow", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/pixmaps/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/home/archnet/.icons/default/cursors/sb_up_arrow", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/home/archnet/.icons/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/icons/default/cursors/sb_up_arrow", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/icons/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/pixmaps/default/cursors/sb_up_arrow", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/pixmaps/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/home/archnet/.icons/default/cursors/sb_down_arrow", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/home/archnet/.icons/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/icons/default/cursors/sb_down_arrow", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/icons/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/pixmaps/default/cursors/sb_down_arrow", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/pixmaps/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/home/archnet/.icons/default/cursors/sb_left_arrow", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/home/archnet/.icons/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/icons/default/cursors/sb_left_arrow", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/icons/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/pixmaps/default/cursors/sb_left_arrow", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/pixmaps/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/home/archnet/.icons/default/cursors/sb_right_arrow", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/home/archnet/.icons/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/icons/default/cursors/sb_right_arrow", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/icons/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/pixmaps/default/cursors/sb_right_arrow", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/pixmaps/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/dev/tty", O_RDWR) = 4
    open("/dev/ptmx", O_RDWR) = 4
    open("/home/archnet/.XCompose", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/X11/locale/compose.dir", O_RDONLY) = 5
    open("/usr/share/X11/locale/en_US.UTF-8/Compose", O_RDONLY) = 5
    open("/usr/share/X11/XKeysymDB", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/lib/gconv/gconv-modules.cache", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/lib/gconv/gconv-modules", O_RDONLY) = 5
    open("/usr/share/terminfo/x/xterm", O_RDONLY) = 5
    sh-4.2$ strace -eopen sh
    open("/etc/ld.so.cache", O_RDONLY) = 3
    open("/lib/libreadline.so.6", O_RDONLY) = 3
    open("/lib/libncursesw.so.5", O_RDONLY) = 3
    open("/lib/libdl.so.2", O_RDONLY) = 3
    open("/lib/libc.so.6", O_RDONLY) = 3
    open("/dev/tty", O_RDWR|O_NONBLOCK) = 3
    open("/usr/lib/locale/locale-archive", O_RDONLY) = 3
    open("/proc/meminfo", O_RDONLY) = 3
    open("/etc/nsswitch.conf", O_RDONLY) = 3
    open("/etc/ld.so.cache", O_RDONLY) = 3
    open("/lib/libnss_files.so.2", O_RDONLY) = 3
    open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 3
    open("/usr/lib/gconv/gconv-modules.cache", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/lib/gconv/gconv-modules", O_RDONLY) = 3
    open("/home/archnet/.bash_history", O_RDONLY) = 3
    open("/home/archnet/.bash_history", O_RDONLY) = 3
    open("/usr/share/terminfo/x/xterm", O_RDONLY) = 3
    open("/etc/inputrc", O_RDONLY) = 3
    I don't see it attempting to read any sort of profile for shrc file.

  • [solved][bash] PS1 wrapping problem...

    Hello I have my ps1 set to
    # Prompt
    BGREEN='\[\033[1;32m\]'
    GREEN='\[\033[0;32m\]'
    BRED='\[\033[1;31m\]'
    RED='\[\033[0;31m\]'
    BBLUE='\[\033[1;34m\]'
    BLUE='\[\033[0;34m\]'
    NORMAL='\[\033[00m\]'
    if [ "$TERM" = "linux" ]; then
    PS1="${NORMAL}[\u${BLUE}@\h ${BGREEN}\W${NORMAL}]\$ "
    else
    PS1="\e]2;\u@\H:\w\a${NORMAL}[\u${BLUE}@\h ${BGREEN}\W${NORMAL}]$ "
    fi
    However when my prompt displays [pyther@tux world.pyther.net]$ (color) I can only type 3 characters and then it wraps. Please see the screenshot...
    Using a regular prompt (source /etc/profile) works like a charm. Any help would be great!
    Last edited by pyther (2008-10-15 03:06:48)

    Daenyth wrote:Didn't I just answer this question in another thread? You need to escape the colors codes with \[ \] so that bash knows that they are non-printing characters, otherwise they will be counted in the prompt length.
    You're probably confusing this thread with mine a few days ago about using colors in PS1 in bash. ( http://bbs.archlinux.org/viewtopic.php? … 03#p432903 )
    This issue is very similar indeed
    Last edited by Dieter@be (2008-10-15 19:41:56)

  • /etc/profile.d scripts

    A while ago, I was helping a friend installing archlinux on his laptop.
    He wanted to use tcsh as his main shell, as he is used to this from FreeBSD.
    We then discovered that his path was never updated after installing new packages (for instance firefox) and then running source /etc/profile
    The reason, we later found out, was that most (if not all) of the scripts in /etc/profile.d does not have a valid shebang (usually the top row of a script, looking something like #!/bin/sh , telling the computer which shell to run the script in).
    This, in combination with tcsh (and probably csh as well, we never tested that though), results in our problem, since tcsh does not have the command export, which is built in in bash (and sh, zsh, and most of other shells out there).
    Tcsh uses the command set instead.
    My little question is this: Why doesn't those scripts have proper shebangs, so that it would be possible to use archlinux with tcsh?
    Does anybode have a good answer to that, and is this something that should be corrected in some way?

    As those files are getting sourced through /etc/profile they don't need a proper shebang.
    The only distro I know with support for csh is Slackware, don't expect it in Arch.

  • Can anyone post a mostly-default /etc/profile? I deleted mine -.-

    I was trying out some vim commands and accidentally wiped my /etc/profile -.-
    I've replaced some of the basic stuff like $PATH, but it still looks far shorter than the previous version. I also found some other examples on the web but I'd like to have the Arch defaults back and customize from there (: Could someone post theirs? Thanks a bunch.

    $ cat /etc/profile
    # /etc/profile
    # This file is intended to be used for ALL common
    # Bourne-compatible shells. Shell specifics should be
    # handled in /etc/profile.$SHELL where $SHELL is the name
    # of the binary being run (discounting symlinks)
    # Sections taken from SuSe's /etc/profile
    # Note the explicit use of 'test' to cover all bases
    # and potentially incompatible shells
    #Determine our shell without using $SHELL, which may lie
    shell="sh"
    if test -f /proc/mounts; then
    case $(/bin/ls -l /proc/$$/exe) in
    *bash) shell=bash ;;
    *dash) shell=dash ;;
    *ash) shell=ash ;;
    *ksh) shell=ksh ;;
    *zsh) shell=zsh ;;
    esac
    fi
    # Load shell specific profile settings
    test -f "/etc/profile.$shell" && . "/etc/profile.$shell"
    #Set our umask
    umask 022
    # Set our default path
    PATH="/bin:/usr/bin:/sbin:/usr/sbin"
    export PATH
    # Export default pkg-config path
    PKG_CONFIG_PATH="/usr/lib/pkgconfig"
    export PKG_CONFIG_PATH
    # Some readline stuff that is fairly common
    HISTSIZE=1000
    HISTCONTROL="erasedups"
    INPUTRC="/etc/inputrc"
    LESS="-R"
    export HISTSIZE HISTCONTROL INPUTRC LESS
    # Load profiles from /etc/profile.d
    if test -d /etc/profile.d/; then
    for profile in /etc/profile.d/*.sh; do
    test -x $profile && . $profile
    done
    unset profile
    fi
    # Termcap is outdated, old, and crusty, kill it.
    unset TERMCAP
    # Man is much better than us at figuring this out
    unset MANPATH
    And, you could retrieve that file from core/filesystem too.
    Last edited by hullap (2010-04-04 11:52:47)

  • Not executing /etc/profile

    Hi,
    I installed 10.4.2 from the CD that came with my PowerBook. Later, realising that X11 was not installed automatically, I reinstalled the entire OS using the custom mode. The old OS was shifted to PreviousSystem, which I deleted subsequently.
    I notice that on booting, the command /etc/profile is not executed. As a result, the system wide PATH that should be available for all users does not get set up. Is there a bug or am I looking at the wrong profile file?
    For individual users, .bash_profile is not automatically executed. Every time I have to issue the command "source .bash_profile" to execute them. I have the same question as above: is there a bug, or am I looking at the wrong file?
    Thanks.
    Kannan

    /etc/profile is not supposed to be executed on booting. It and .bash_profile are only executed when a login bash shell is started. A new Terminal window starts a login shell; xterm does not. A non-login shell runs .bashrc. If you are using xterm, and want to run the profiles, you can source them in your .bashrc.

  • When is /etc/profile called?

    with my current boot/startup/login method (see below), /etc/profile is not being called. a little bit of googling tells me that /etc/profile is called at startup - but i'd like to know exactly when and by what. is it only called at bash login? what kind of magic does GDM do to call it?
    i added a script /etc/rc.d/startx:
    #!/bin/bash
    case $1 in
    start)
    su jakob startx&
    stop)
    killall X
    restart)
    echo "invalid argument"
    esac
    and put startx in the DAEMONS array in /etc/rc.conf

    Have your checked that startx is in /etc/rc.d/ folder? . If I remember correct the 'profile' is to be placed at the last position in you grub (menu.lst) of booting kernel.

  • Lost /etc/profile

    Since one of the latest updates, it seems my system is a bit broken. Commands like startx fail, and I recieve masages that xauth, xinit and elf are commands that can't be found. I wanted to have a look at /etc/profile, to check patch declaration, and noticed the whole file is crappy. It now looks like
    ^?ELF^A^A^A^@^
    fffuffffuffff^@^@
    uffffd^G^F^H^ufff
    fE^L^uffffD$^D^uf
    Hm, mysterious. I would be glad if someone could post a standard profile set here to give me a template.

    The original /etc/profile from bash package:
    # /etc/profile
    export PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/opt/bin"
    export MANPATH="/usr/man:/usr/X11R6/man"
    export LESSCHARSET="latin1"
    export INPUTRC="/etc/inputrc"
    export LESS="-R"
    # Locale settings (find your locale with 'locale -a')
    export LANG="en_US"
    export LC_COLLATE="C"
    export COLUMNS LINES
    export PS1='[u@h W]$ '
    export PS2='> '
    umask 022
    if [ "$TERM" = "xterm" -o "$TERM" = "xterm-color" -o "$TERM" = "rxvt" ]; then
    PROMPT_COMMAND='echo -ne "33]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}07"'
    fi
    # load profiles from /etc/profile.d
    # (to disable a profile, just remove execute permission on it)
    for profile in /etc/profile.d/*.sh; do
    if [ -x $profile ]; then
    . $profile
    fi
    done
    unset profile
    # End of file
    If you still have the packages cache, you could also see this file in /var/cache/pacman/pkg/bash-3.0-3.pkg.tar.gz

  • /etc/profile isn't sourced on startx

    the command
    source /etc/profile
    isn't used on startx
    and now all paths and locales aren't set, has anyone an idea whats wrong here?
    if i login on console it behaves normal. But if i login on X with qingy or slim it doesn't work.
    It also doesn't work if i startx on a console with /etc/profile sourced.
    i hope someone can help me.
    so long
    ukognos

    but if i run X, there's no locale set, or environment variable, so how can i set that at startup of X?

Maybe you are looking for

  • Schedule background job to download HR mini Master

    Hi all, We schedule  RPTCC101  program in backgroud daily with No. of days= 9 and date starts at 20.12.2006. So after 9 days, all data transfered to the externel system are invalid. Please give us help B.Regards

  • BI 7.0 Transformation?

    Hi experts, I have this problem: I am in a 7.0 BI release, but when I try to install any Object, for example an InfoCube with data flow before grouping, the system proposes the old type objects (update rule for example) but I can't see the Transforma

  • Get Division based on Product

    I have created one material using COMMPRO1 transaction and i have assigned Division for it. Now i want to know where that division gets stored...so that i can retrieve the division based on product guid. I want the table name for fetching the divisio

  • Currency Conversion Issue

    HI experts, i have an issue with my currency report, where user want see the sales volume data converting from CAD to US $. when i checked the query the conversion type is Avg rate M source to CAD and the Target currency is CAD only. but when he exec

  • Need help in RFP - Migration Estimates for Crystal Reports from BI 3.1 to 4.1

    Hi, I have to migrate 100 crystal reports from BI 3.1 to 4.1. The reports vary from simple to complex in terms of complexity. I want to know the time estimates (no. of hours/report) for the above upgradation for a client proposal. What all parameters