LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-15-2010, 06:58 AM   #1
unix1adm
Member
 
Registered: Oct 2008
Posts: 688

Rep: Reputation: 32
need help seting system defaults screensaver gnome


what file do you set the defaults in?
I want to set all my users to use a blank screensaver and a time out of 20min. password required
Have been looking all over the place for a valid config file I can edit and the syntax for it.
I should also mention I want these to be default for all user that CANNOT be changed except by root.
Red Hat running gnome in my case.

I need this for an audit so please advise thank you.

Last edited by unix1adm; 02-16-2010 at 06:22 AM. Reason: fix typo
 
Old 02-15-2010, 06:59 AM   #2
unix1adm
Member
 
Registered: Oct 2008
Posts: 688

Original Poster
Rep: Reputation: 32
I found this here
http://live.gnome.org/GnomeScreensav..._in_as_root.3F


but they dont tell me where this file is .. When I do a find on the system it give me directories not a file GConf.

find / -name GConf
/usr/lib/GConf
/usr/share/GConf
/usr/lib64/GConf


I'm a systems administrator. How can I set policies for all users of my system?

You can set mandatory policies in GConf. Here are some typical policies for a "locked down" system:

gconftool-2 --direct \
--config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \
--type bool \
--set /apps/gnome-screensaver/idle_activation_enabled true
gconftool-2 --direct \
--config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \
--type bool \
--set /apps/gnome-screensaver/lock_enabled true
gconftool-2 --direct \
--config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \
--type string \
--set /apps/gnome-screensaver/mode blank-only
gconftool-2 --direct \
--config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \
--type int \
--set /apps/gnome-screensaver/idle_delay 10
 
Old 02-15-2010, 09:29 AM   #3
unix1adm
Member
 
Registered: Oct 2008
Posts: 688

Original Poster
Rep: Reputation: 32
ahhh I think I understand this now. This is not a file to be edited but a command to be run on the system...

But I want to edit a default file so when I build a golden image and build systems from that it will have these values already set from the start and I wont have to do this every time.
 
Old 02-15-2010, 09:37 AM   #4
unix1adm
Member
 
Registered: Oct 2008
Posts: 688

Original Poster
Rep: Reputation: 32
so I tried this in a script and on a command line...

gconftool-2 --direct \
> --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \
> --type bool \
> --set /apps/gnome-screensaver/idle_activation_enabled true
Resolved address "xml:readwrite:/etc/gconf/gconf.xml.mandatory" to a writable configuration source at position 0



I cd to /etc/gconf/gconf.xml.mandatory do an ls and I see this
/etc/gconf/gconf.xml.mandatory/apps
ls
%gconf.xml gnome-screensaver

/etc/gconf/gconf.xml.mandatory/apps/gnome-screensaver

drwxr-xr-x 2 root root 4096 Feb 15 10:32 .
drwxr-xr-x 3 root root 4096 Feb 15 10:30 ..
-rw-r--r-- 1 root root 468 Feb 15 10:32 %gconf.xml

more %gconf.xml
<?xml version="1.0"?>
<gconf>
<entry name="idle_delay" mtime="1266247854" type="int" value="30">
</entry>
<entry name="mode" mtime="1266247854" type="string">
<stringvalue>blank-only</stringvalue>
</entry>
<entry name="lock_enabled" mtime="1266247854" type="bool" value="true">
</entry>
<entry name="idle_activation_enabled" mtime="1266247930" type="bool" val
ue="true">
</entry>
</gconf>
 
Old 02-15-2010, 09:47 AM   #5
unix1adm
Member
 
Registered: Oct 2008
Posts: 688

Original Poster
Rep: Reputation: 32
I am guessing this is the file I need to modify. Not sure why the commands are not working and give that error. Still researching

If I run this it works.
gconftool-2 --get /desktop/gnome/background/picture_filename
/usr/share/backgrounds/images/default.jpg
 
Old 02-15-2010, 09:55 AM   #6
unix1adm
Member
 
Registered: Oct 2008
Posts: 688

Original Poster
Rep: Reputation: 32
ok so it looks like this is not really an error. I will need to check the setting by logging in and running a vnc connection to see if it works.

I might just be miss reading the msg.
 
Old 02-15-2010, 10:28 AM   #7
unix1adm
Member
 
Registered: Oct 2008
Posts: 688

Original Poster
Rep: Reputation: 32
So i made the changes and vnc into the server with my uid and I still show a 10 min timeout and default setting.

So the "global" setting I thought would work did not ...

Last edited by unix1adm; 02-15-2010 at 10:52 AM.
 
Old 02-15-2010, 11:44 AM   #8
arizonagroovejet
Senior Member
 
Registered: Jun 2005
Location: England
Distribution: openSUSE, Fedora, CentOS
Posts: 1,094

Rep: Reputation: 198Reputation: 198
I believe that the changes to mandatory settings won't affect any users that are currently logged in and running GNOME. So log out any users running GNOME, set the relevant settings, then log in as someone and run GNOME.

On machines I manage (SUSE Linux Enterprise Desktop, GNOME 2.24) I have a script which sets gconf stuff during boot to ensure my desired config it already in place. Here's what I use:

Code:
gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type int  --set /apps/gnome-screensaver/idle_delay 4
gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type boolean --set /apps/gnome-screensaver/lock_enabled true
gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type boolean  --set /apps/gnome-screensaver/idle_activation_enabled true
gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --set --type list --list-type=string /apps/gnome-screensaver/themes [blank-only]
Which means

- The screensaver activates after four minutes. Users cannot change this.
- The screensaver will lock the screen. Users cannot change this.
- Users cannot disable the screensaver.
- The default screensaver is to just blank the screen, but users can change this if they desire.

Change 4 to 20 in the first command and defaults to mandatory in the last command and I think you have what you want.
 
Old 02-15-2010, 12:31 PM   #9
unix1adm
Member
 
Registered: Oct 2008
Posts: 688

Original Poster
Rep: Reputation: 32
happy camper... for now...I got a nasty msg when I logged out and back in and tried to change the screen saver... Just what i wanted...

Thank you for the help.
 
Old 02-15-2010, 12:46 PM   #10
unix1adm
Member
 
Registered: Oct 2008
Posts: 688

Original Poster
Rep: Reputation: 32
now the tasks becomes how to remove the menu option all together. I remember stumbling across a link now if I can just find it.

found it
http://www.redhat.com/docs/manuals/e...ddg-menus.html

Last edited by unix1adm; 02-16-2010 at 06:10 AM.
 
Old 02-15-2010, 01:12 PM   #11
arizonagroovejet
Senior Member
 
Registered: Jun 2005
Location: England
Distribution: openSUSE, Fedora, CentOS
Posts: 1,094

Rep: Reputation: 198Reputation: 198
You could try removing read permissions from .desktop file for the entry in Control Centre.

Code:
$ chmod go-r /usr/share/applications/gnome-screensaver-preferences.desktop
You could also remove read/execute from the executable the .desktop file calls.

Code:
$ chmod go-rx /usr/bin/gnome-screensaver-preferences
The permissions will probably be reverted back to the defaults when you install updates though.
 
Old 02-15-2010, 02:04 PM   #12
unix1adm
Member
 
Registered: Oct 2008
Posts: 688

Original Poster
Rep: Reputation: 32
OK now I stumbled on something and we have to figure out how to lock down individual users from setting a proxy server. Its a server not a WS so it should never go to the internet.

Love Linux... This is getting fun...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Arch Install with GNOME, system defaults to GDM, GDM no mouse or keyboard lupusarcanus Linux - Newbie 8 01-30-2011 04:30 PM
Can't reset Gnome to defaults jim.smith Linux - Desktop 2 07-06-2009 09:09 PM
revert rh9/gnome back to system defaults? brandnewbie Red Hat 0 06-08-2004 01:55 PM
Gnome/KDE defaults granny Linux - General 3 02-26-2004 12:16 AM
How can i set system defaults for gnome? ac1980 Linux - General 0 12-12-2003 03:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration