LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 04-19-2018, 03:27 PM   #1
Vanyel
Member
 
Registered: Jul 2007
Location: NY, NY
Distribution: RHEL, CentOS, MacOS X
Posts: 158

Rep: Reputation: 29
Question Rhel/CentOS 7 - set time to display in 12 hour format in gnome


I'm doing a bunch of RHEL/CentOS 7 installs and by default all the machines come up with a 24-hour clock display in gnome. I'm getting sick and tired of having to go to Applications -> System Tools -> Settings -> Date & Time over and over again to manually set the 12 hour display.

I found the one-liner "gsettings set org.gnome.desktop.interface clock-format 12h" but that only works per-user and the user has to be logged in at the keyboard. It won't work ssh'd in remotely to pre-set the default.

From the command line, how can I set the 12-hour time display as the default for all Users created on a machine? Then I can have ansible do it as part of my setup and forget about it.
 
Old 04-19-2018, 10:42 PM   #2
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
This might work: http://alotofbytes.blogspot.com/2013...t-from-24.html
 
Old 04-23-2018, 02:24 PM   #3
bgstack15
Member
 
Registered: Jul 2017
Distribution: korora
Posts: 90

Rep: Reputation: Disabled
To plagiarize the contents of the above link, in case the destination site disappears:
Quote:
Code:
cat >> /usr/share/glib-2.0/schemas/org.gnome.desktop.interface.gschema.override << EOF
[org.gnome.desktop.interface]
clock-format='12h'
EOF
glib-compile-schemas /usr/share/glib-2.0/schemas
 
  


Reply

Tags
time


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
I'm hesitant to try Fedora for the first time, perhaps RHEL or CentOS instead? punchy71 Fedora 9 06-20-2014 09:29 PM
How to set user specific Time Zone in RHEL rajaniyer123 Linux - General 2 11-19-2012 12:14 PM
Set time format using command linux_ Linux - Newbie 4 02-26-2011 02:30 AM
No 12 hour format available in gnome clock (UK English) solitaira Linux - Newbie 4 09-05-2010 04:47 PM
How do i set time in 24 hour format pinga123 Linux - Newbie 9 04-13-2010 11:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 02:22 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