[CentOS] Custom wallpaper on CentOS 7?

2015-02-14 Thread Niki Kovacs

Hi,

I just installed CentOS 7 + GNOME on my Asus S300 laptop. So far 
everything runs very nice and smoothly, and I'm quite happy with it.


Curiously enough, I can't seem to be able to set a custom wallpaper. I 
tried various locations like /usr/share/backgrounds, 
/usr/share/backgrounds/gnome and /usr/share/backgrounds/images, but the 
images don't appear in the wallpaper selection window.


Any suggestions?

Cheers,

Niki Kovacs
--
Microlinux - Solutions informatiques 100% Linux et logiciels libres
7, place de l'église - 30730 Montpezat
Web  : http://www.microlinux.fr
Mail : i...@microlinux.fr
Tél. : 04 66 63 10 32
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] C5 BASH IF

2015-02-14 Thread J Martin Rushton
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Try using [[ and ]] rather than [ and ].  Under BASH the double form
are reserved words with special meaning to the shell whereas the
single form are just a synonym for test.  Parsing and splitting rules
are different, in particular word splitting and pathname expansion are
not performed.  Consider:

#!/bin/sh
myvar=""
set -vx
[[ -n $myvar ]] && echo "non-null"
[ -n $myvar ] && echo "non-null"

bash-4.2$ ./X
[[ -n $myvar ]] && echo "non-null"
+ [[ -n '' ]]
[ -n $myvar ] && echo "non-null"
+ '[' -n ']'
+ echo non-null
non-null
bash-4.2$

Note how in the second case $myvar has been parsed out of existence!

On 14/02/15 05:54, Always Learning wrote:
> 
> On Fri, 2015-02-13 at 23:46 -0600, Les Mikesell wrote:
> 
>> I think you are missing some very basic concepts here.  First, 
>> the shell likes to parse things separated by white space. Second,
>> [ is a synonym for test which is a build-in version of /bin/test,
>> so try 'man test' for the syntax of tests.   And third, you
>> generally should use double quotes around variables in tests so
>> they continue to exist as an empty string if the variable happens
>> to not be set.
> 
> Thanks for that.  I assumed if test 1 worked, so would test 2.
> 
> Have re-run test 2 with
> 
> 
>> 16 if  [ $file = "law00css" ] 17   then 18echo $file 19 
>> echo "css" 20 else 21echo "no css" 22 fi
> 
> and got
> 
>> + '[' law45p07a01 = law00css ']' + echo 'no css' no css + exit
> 
> which is correct (for the first time). It seems that following your
> good advice and plonking spaces around the = has solved the 
> problem.
> 
> Thank you very much. Now I can go to bed a satisfied person :-)
> 
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (GNU/Linux)

iQIcBAEBAgAGBQJU3xUdAAoJEAF3yXsqtyBlOHYQAN6KUdCq8YL+CIn+qTtFI++W
mm44gmikluttmHl+llH17jaaaznakhZ+RmFjtygaHCSPZxxHZB9y5Dwv7czOaGpP
ECbsCGUSHRa/yDZNcTy/5deXCta+mEeUkx105u6Usou+DA9XCYXqvWpNDPopNRJF
Y4mwtgH7Jx2EgILgauECJFnuTtzHcZ2ps88d7H1nkJl49Q0EfmSPbcFrOoTJFeyM
Qs2nl7OpPCQh/nNAuVW3S+aiYF+7Oe++tx3MaPYI6Y5GUhoAKmfM/Ab58iT+4ckV
ha8tFY5cbCIPhKEzOTGK7rbEhmae9jgBl6s3HqaWiMrNPVrsKw/OLz0/V0j8S8Ib
d2AOKJBaVYAZgYOW7yI9vhzO+zdUnhHXHHx9hT5kk7Jg5YI3nhMfotdVpOwZgu3i
DewEa4bm4tR13ku54lYqmG1ehxyjxDUtPCF9DKyXriViGT+mpX7go4A3XPmnEk1n
K48gQOHA4q4t1DTv6t3ATP3TkBlXWG0NzHprw9wB0LKgv00//9AJ5me+Mtwx8GTi
g9Vg4jHH0EPu3WBBRnI5H3hFHRh/NtpSsEl0dGST5SpAUnuQikE6LXMmn1gw9bfa
8jsHL4mi/c70ugi4GQJyrhuZ/YIcIC6JSpugfRp7iqadJ2QiB4TmcgZl9R+7eAYu
4sK0nBvbVxh6ZQVrRhL0
=2980
-END PGP SIGNATURE-
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Custom wallpaper on CentOS 7?

2015-02-14 Thread Earl A Ramirez
On Sat, 2015-02-14 at 10:07 +0100, Niki Kovacs wrote:
> Hi,
> 
> I just installed CentOS 7 + GNOME on my Asus S300 laptop. So far 
> everything runs very nice and smoothly, and I'm quite happy with it.
> 
> Curiously enough, I can't seem to be able to set a custom wallpaper. I 
> tried various locations like /usr/share/backgrounds, 
> /usr/share/backgrounds/gnome and /usr/share/backgrounds/images, but the 
> images don't appear in the wallpaper selection window.
> 
> Any suggestions?
> 
> Cheers,
> 
> Niki Kovacs

Hello Niki,

I believe that you can change your desktop from 'Tweak Tool', which can
be found under | Application | Utilities, under the Desktop option you
will see Picture URI. On my desktop I simply right click on the desktop
and select 'Change Background'. 

You can also change the background from the settings.

Hope this helps.



___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] list moderation transparency

2015-02-14 Thread Jim Perrin
I've had a few people ask me privately "Why hasn't X been told", which
seems a legitimate question on the surface. Here's what has happened
thus far:


I've sent a few people emails off-list with examples of what I feel to
be inappropriate posts to the list since the announcement. I don't see
any need yet for a 'public name and shame' style posting. I prefer to
handle matters with a bit of discretion in a direct, and private manner
out of respect for members on the list.

tl;dr, just because you don't see it publicly doesn't mean we're not
taking corrective action.


-- 
Jim Perrin
The CentOS Project | http://www.centos.org
twitter: @BitIntegrity | GPG Key: FA09AD77
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] C5 BASH IF

2015-02-14 Thread Les Mikesell
On Fri, Feb 13, 2015 at 11:54 PM, Always Learning  wrote:
>
>> And third, you generally should use
>> double quotes around variables in tests so they continue to exist as
>> an empty string if the variable happens to not be set.
>
> Thanks for that.  I assumed if test 1 worked, so would test 2.
>
> Have re-run test 2 with
>
>
>> 16 if  [ $file = "law00css" ]

You still missed the part about quoting variables.  You quote plain
strings to hold embedded spaces together (or single-quotes to avoid
parsing metacharacters).  You use double quotes around  $variables so
they don't disappear completely if the variable isn't set, causing a
syntax error.  To understand it completely you need to know the order
of operations as the shell makes multiple passes over the line,
parsing, processing metacharacters, and expanding variables.   And I
don't know where to find a concise description of that any more.

-- 
   Les Mikesell
 lesmikes...@gmail.com
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] C5 BASH IF

2015-02-14 Thread Robert Nichols

On 02/13/2015 11:47 PM, Always Learning wrote:

I re-ran the script with 'set -x' for

16 if  [ $file='law00css' ]
17   then
18echo $file
19echo "css"
20 else
21echo "no css"
22 fi

and received:-

+ '[' law45p07a01=law00css ']'
+ echo law45p07a01
law45p07a01
+ echo css
css


Correct. You invoked the test command with a single argument, the
string "law45p07a01=law00css". With a single argument, the test is
just whether that argument in non-null, which it is. To perform
a comparison you need 3 separate arguments (2 operands and an
operator), not 1.

--
Bob Nichols "NOSPAM" is really part of my email address.
Do NOT delete it.

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] C5 BASH IF

2015-02-14 Thread Chris Adams
Once upon a time, Les Mikesell  said:
> On Fri, Feb 13, 2015 at 11:54 PM, Always Learning  wrote:
> >> 16 if  [ $file = "law00css" ]
> 
> You still missed the part about quoting variables.  You quote plain
> strings to hold embedded spaces together (or single-quotes to avoid
> parsing metacharacters).  You use double quotes around  $variables so
> they don't disappear completely if the variable isn't set, causing a
> syntax error.  To understand it completely you need to know the order
> of operations as the shell makes multiple passes over the line,
> parsing, processing metacharacters, and expanding variables.   And I
> don't know where to find a concise description of that any more.

The thing to remember is that originally, the left square bracket [ was
an external command (an alias of the "test" command).  The shell
interpreter just ran commands and tested the output.  So, consider
everything past the "if" as a single command, and treat it accordingly
(so quoting arguments just like you would to "ls" or something).

So, in the above line, $file would be expanded by the shell as part of
command argument processing, and it is empty/not set, the command would
be run as:

[ = law00css ]

That's invalid syntax.  If instead, you call it with $file in quotes:

[ "" = law00css ]

That's valid syntax (and then tests as false).

-- 
Chris Adams 
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] C5 BASH IF

2015-02-14 Thread J Martin Rushton
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



On 14/02/15 16:53, Les Mikesell wrote:

> To understand it completely you need to know the order of
> operations as the shell makes multiple passes over the line, 
> parsing, processing metacharacters, and expanding variables.   And
> I don't know where to find a concise description of that any more.

man bash, about 900 lines down under "EXPANSION".
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (GNU/Linux)

iQIcBAEBAgAGBQJU34eBAAoJEAF3yXsqtyBlNuYP/iPLOPY/SbXeGgpZOnJKZ3qH
U7cnh56unXT3pTwQ8podSDNbLtiSOt8R729JFpNMwNb4Bzf9XFGaDyCn11DIdOuU
RpuZ72NFxC8ezPcWlzvlYZuNRDIso4iQbHt5BjEutJ7RfSOdl+FoUdtXpXYATtaB
YB4UQMShFVAr2AeNbJd/IuOopYSplZwd2qJXpAq0cZwtTWjbTkQG4zJOWIAip1kM
0q+5u3BKrP6ZEY7fWDhdCcJFZRRv+zAQaEnz42WUmEOROziF9sWzSxLOug87diA0
WcdEIoiNTuprFIeuICJvzTL1AhhjcYgm8+zBUb+xKpbBpJePQOtJ7Wd3RbkgEFhe
66hSNbLvYovqHgmz9E4H12ZnYW4JTmV8UE842JoliWqfNaD6v9wwaDmISekqm9jS
3f7Oc4fC7O+xao77T2jIHW4syMmG5Fdt8enyTR4QkRnx6W6sSTR6JKjii9GGo6P0
j5mA31KDQQyrJU6WqjL2TFgdZTF2zuL65xtEzxcWumpkqi6TaJodSnkIRH+ldgdg
medZ910pxmJphojST0dsefJeptJfTw8qq16siatqj5r3+c6mUjTRRHkVVTyrlYHf
2h0t3ax+pQq0Fa9zx7Y0wIS+Qg8ihFC4XLJOQ+RI1WkG2jPCsaUHtkCYQxiZ/VK9
HOoe2d0MAGmNc4Yy2ex/
=UeON
-END PGP SIGNATURE-
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] C5 BASH IF

2015-02-14 Thread Les Mikesell
On Sat, Feb 14, 2015 at 11:36 AM, J Martin Rushton
 wrote:
> 
>> To understand it completely you need to know the order of
>> operations as the shell makes multiple passes over the line,
>> parsing, processing metacharacters, and expanding variables.   And
>> I don't know where to find a concise description of that any more.
>
> man bash, about 900 lines down under "EXPANSION".

But it is not 'just' expansions.  You need to know the full order of
operations with all the steps - word splitting, quote removal,  i/o
redirection, groupings, etc., some of which is repeated over the line
after some of the other steps happen.   I think I saw this in an
understandable form for the bourne shell back in the 1980's but can't
remember it well enough to describe and all the bash docs I've seen
are way too convoluted to just see the order of operations as a simple
set of steps - that you need to know before any of the rest will make
sense.

-- 
   Les Mikesell
  lesmikes...@gmail.com
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] C5 BASH IF

2015-02-14 Thread Robert Nichols

On 02/14/2015 12:03 PM, Les Mikesell wrote:

On Sat, Feb 14, 2015 at 11:36 AM, J Martin Rushton
 wrote:



To understand it completely you need to know the order of
operations as the shell makes multiple passes over the line,
parsing, processing metacharacters, and expanding variables.   And
I don't know where to find a concise description of that any more.


man bash, about 900 lines down under "EXPANSION".


But it is not 'just' expansions.  You need to know the full order of
operations with all the steps - word splitting, quote removal,  i/o
redirection, groupings, etc., some of which is repeated over the line
after some of the other steps happen.   I think I saw this in an
understandable form for the bourne shell back in the 1980's but can't
remember it well enough to describe and all the bash docs I've seen
are way too convoluted to just see the order of operations as a simple
set of steps - that you need to know before any of the rest will make
sense.


It's the 4 paragraphs at the start of the "EXPANSION" section:

   Expansion is performed on the command line after it has been split into
   words. There are seven kinds of expansion performed: brace expansion,
   tilde expansion, parameter and variable expansion, command substitution,
   arithmetic expansion, word splitting, and pathname expansion.

   The order of expansions is: brace expansion, tilde expansion, parameter,
   variable and arithmetic expansion and command substitution (done in a
   left-to-right fashion), word splitting, and pathname expansion.

   On systems that can support it, there is an additional expansion avail-
   able: process substitution.

   Only brace expansion, word splitting, and pathname expansion can change
   the number of words of the expansion; other expansions expand a single
   word to a single word. The only exceptions to this are the expansions of
   "$@" and "${name[@]}" as explained above (see PARAMETERS).

--
Bob Nichols "NOSPAM" is really part of my email address.
Do NOT delete it.

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] C5 BASH IF

2015-02-14 Thread Les Mikesell
On Sat, Feb 14, 2015 at 1:13 PM, Robert Nichols
 wrote:
>
>> But it is not 'just' expansions.  You need to know the full order of
>> operations with all the steps - word splitting, quote removal,  i/o
>> redirection, groupings, etc., some of which is repeated over the line
>> after some of the other steps happen.   I think I saw this in an
>> understandable form for the bourne shell back in the 1980's but can't
>> remember it well enough to describe and all the bash docs I've seen
>> are way too convoluted to just see the order of operations as a simple
>> set of steps - that you need to know before any of the rest will make
>> sense.
>
>
> It's the 4 paragraphs at the start of the "EXPANSION" section:
>
>Expansion is performed on the command line after it has been split into
>words. There are seven kinds of expansion performed: brace expansion,
>tilde expansion, parameter and variable expansion, command substitution,
>arithmetic expansion, word splitting, and pathname expansion.
>
>The order of expansions is: brace expansion, tilde expansion, parameter,
>variable and arithmetic expansion and command substitution (done in a
>left-to-right fashion), word splitting, and pathname expansion.
>
>On systems that can support it, there is an additional expansion avail-
>able: process substitution.
>
>Only brace expansion, word splitting, and pathname expansion can change
>the number of words of the expansion; other expansions expand a single
>word to a single word. The only exceptions to this are the expansions of
>"$@" and "${name[@]}" as explained above (see PARAMETERS).

I think that is still an oversimplification because more than
expansion is involved and the order related to other steps.  When does
it do i/o redirection; which things happen before/during starting
subshells/pipes; what if you use 'eval', etc.?

-- 
   Les Mikesell
 lesmikes...@gmail.com
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] C5 BASH IF

2015-02-14 Thread PatrickD Garvey
On Sat, Feb 14, 2015 at 11:28 AM, Les Mikesell  wrote:
> On Sat, Feb 14, 2015 at 1:13 PM, Robert Nichols
>  wrote:
>>
>>> But it is not 'just' expansions.  You need to know the full order of
>>> operations with all the steps - word splitting, quote removal,  i/o
>>> redirection, groupings, etc., some of which is repeated over the line
>>> after some of the other steps happen.   I think I saw this in an
>>> understandable form for the bourne shell back in the 1980's but can't
>>> remember it well enough to describe and all the bash docs I've seen
>>> are way too convoluted to just see the order of operations as a simple
>>> set of steps - that you need to know before any of the rest will make
>>> sense.
>>
>>
>> It's the 4 paragraphs at the start of the "EXPANSION" section:
>>
>>Expansion is performed on the command line after it has been split into
>>words. There are seven kinds of expansion performed: brace expansion,
>>tilde expansion, parameter and variable expansion, command substitution,
>>arithmetic expansion, word splitting, and pathname expansion.
>>
>>The order of expansions is: brace expansion, tilde expansion, parameter,
>>variable and arithmetic expansion and command substitution (done in a
>>left-to-right fashion), word splitting, and pathname expansion.
>>
>>On systems that can support it, there is an additional expansion avail-
>>able: process substitution.
>>
>>Only brace expansion, word splitting, and pathname expansion can change
>>the number of words of the expansion; other expansions expand a single
>>word to a single word. The only exceptions to this are the expansions of
>>"$@" and "${name[@]}" as explained above (see PARAMETERS).
>
> I think that is still an oversimplification because more than
> expansion is involved and the order related to other steps.  When does
> it do i/o redirection; which things happen before/during starting
> subshells/pipes; what if you use 'eval', etc.?
>
> --
>Les Mikesell
>  lesmikes...@gmail.com

On my bookshelf is a copy of "Learning the bash Shell" by Cameron
Newham & Bill Rosenblatt,
http://shop.oreilly.com/product/9780596009656.do ISBN 10:0-596-00965-8

I admit I have not completed reading it for the first time, but it has
taught me what I DO know about bash.
I would love to compile a list of books others have used to learn what
they know about bash. Even if you no longer regularly use what is on
your shelf, new community members may be able to locate a copy in a
public library and advance their knowledge.
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] C5 BASH IF

2015-02-14 Thread Chris Adams
Once upon a time, Les Mikesell  said:
> I think that is still an oversimplification because more than
> expansion is involved and the order related to other steps.  When does
> it do i/o redirection; which things happen before/during starting
> subshells/pipes; what if you use 'eval', etc.?

Try this: "An Introduction to the UNIX Shell" (by the person who wrote
the Bourne shell, on which bash is based):

http://people.fas.harvard.edu/~lib113/reference/unix/bourne_shell.pdf

Or, the current version of the standard specification of the POSIX
shell, which bash implements:

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html
-- 
Chris Adams 
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Custom wallpaper on CentOS 7?

2015-02-14 Thread Niki Kovacs

Le 14/02/2015 13:22, Earl A Ramirez a écrit :

I believe that you can change your desktop from 'Tweak Tool', which can
be found under | Application | Utilities, under the Desktop option you
will see Picture URI. On my desktop I simply right click on the desktop
and select 'Change Background'.

You can also change the background from the settings.


Thanks. The wallpaper can be changed indeed using Tweak Tool. But 
there's no way custom imported wallpapers can be made to appear in the 
preview window.


I'm right now discovering GNOME 3 Classic, and I must say I like it. On 
the other hand, the missing wallpaper review is really a bad design.


Cheers,

Niki

--
Microlinux - Solutions informatiques 100% Linux et logiciels libres
7, place de l'église - 30730 Montpezat
Web  : http://www.microlinux.fr
Mail : i...@microlinux.fr
Tél. : 04 66 63 10 32
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] LC_COLLATE variable?

2015-02-14 Thread Niki Kovacs

Hi,

I'm running my CentOS 7 desktop in french. LANG is set to fr_FR.UTF-8.

In GNOME 3, the menu entries are listed in alphabetical order. 
Unfortunately, entries beginning with an accented character (like 
"Éditeur de texte") appear at the bottom of the list.


I know that in order to correct this, I have to set the LC_COLLATE 
variable to fr_FR.UTF-8. What would be a sensible place to do this 
system-wide under CentOS 7?


Cheers,

Niki
--
Microlinux - Solutions informatiques 100% Linux et logiciels libres
7, place de l'église - 30730 Montpezat
Web  : http://www.microlinux.fr
Mail : i...@microlinux.fr
Tél. : 04 66 63 10 32
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos