You are not logged in.

#1 2014-09-21 16:53:07

porphyry5
Member
Registered: 2014-06-04
Posts: 88

[SOLVED] where locate 'shopt -s extglob' so in effect when X starts

One of my scripts includes the command

ls "$d"*.@(avi|mp4|mkv|m4v|rmvb|divx|xvid)
    which requires
shopt -s extglob 

for the ls command to work properly.

I have the shopt command in my .bashrc and normally all is well.  But now I have set one of my computers to log me in and startx automatically and within an xterm also automatically run the script containing the fateful ls command, which bash rejects as a syntax error.  Apparently X is using bash without sourcing my .bashrc.
I autorun the script in my .xinitrc with the command

xterm  -g 113x59+550+0 -e /home/g/Scripts/movie.sh & 

I've tried including the shopt command in .xinitrc, .bash_profile and in  startx, to no effect.  But in any event none of those should have been necessary as /etc/profile sources /etc/bash.bashrc in which I have included a command to source my .bashrc so that my bash functions etc are available to me when working as root.

Where can I locate the shopt command  so that it is in effect when X starts?

Last edited by porphyry5 (2014-09-21 18:04:22)

Offline

#2 2014-09-21 17:41:18

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

Re: [SOLVED] where locate 'shopt -s extglob' so in effect when X starts

Put it in your script.


This silver ladybug at line 28...

Offline

#3 2014-09-21 18:02:20

porphyry5
Member
Registered: 2014-06-04
Posts: 88

Re: [SOLVED] where locate 'shopt -s extglob' so in effect when X starts

lolilolicon wrote:

Put it in your script.

Many thanks.

Offline

Board footer

Powered by FluxBB