Desktop Clock?

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
User avatar
muffybean
Level 5
Level 5
Posts: 568
Joined: Thu Oct 17, 2019 8:22 am
Location: Pembrokeshire-Wales

Re: Desktop Clock?

Post by muffybean »

I hope I have not created a problem here. It was just something I was interested in but not to cause all this fuss. I'd rather not continue with this than see all this happen. The more important issue for me is my PC not switching off properly. I do thank you all for your help.
Running Linux Mint MATE on 2 desktops + Linux Mint Xfce on Netbook + Cinnamon VM on 3rd Desktop
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Desktop Clock?

Post by rene »

Absolutely not; this is your thread; I as said only pointed out why your xclock didn't survive a close of the terminal --- even though now it's turned into a exit vs. close-terminal thing. I will not pursue that discussion until you're satisfied (which launching xclock from a launcher as karlchen is instructing could make you).
User avatar
muffybean
Level 5
Level 5
Posts: 568
Joined: Thu Oct 17, 2019 8:22 am
Location: Pembrokeshire-Wales

Re: Desktop Clock?

Post by muffybean »

I don't really know enough to create a launcher as suggested. More concerned as I said about this shut down thing on my media machine.
Running Linux Mint MATE on 2 desktops + Linux Mint Xfce on Netbook + Cinnamon VM on 3rd Desktop
User avatar
karlchen
Level 23
Level 23
Posts: 18224
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Desktop Clock?

Post by karlchen »

rene wrote: Sat Dec 21, 2019 6:34 pmI will not pursue that discussion
No need to continue. The mystery has been cleared up. ;-) post above. - And it is irrelevant for the xclock application launcher. (menu, desktop or startup application, because the parent process will not terminate before your user session does.) :lol:
Much ado about nothing.
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Desktop Clock?

Post by rene »

Pray tell?

[EDIT] Ah, saw your edit. OK. Note though that having to disown a job before killing the terminal it was started from is the expected behaviour (that, or start it though nohup).
User avatar
muffybean
Level 5
Level 5
Posts: 568
Joined: Thu Oct 17, 2019 8:22 am
Location: Pembrokeshire-Wales

Re: Desktop Clock?

Post by muffybean »

Hey guys I am trying to follow you here but as a relative newbie to Linux you are talking in a foreign language here. :roll:
Running Linux Mint MATE on 2 desktops + Linux Mint Xfce on Netbook + Cinnamon VM on 3rd Desktop
User avatar
Moem
Level 22
Level 22
Posts: 16233
Joined: Tue Nov 17, 2015 9:14 am
Location: The Netherlands
Contact:

Re: Desktop Clock?

Post by Moem »

Maybe we can circle back to the original question. Gurus, would there be anything usable here? https://www.fossmint.com/best-free-alar ... for-linux/
Image

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!
User avatar
karlchen
Level 23
Level 23
Posts: 18224
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Desktop Clock?

Post by karlchen »

Hi, rene.

Yes, correct. Except for this bloody little xclock commandline, which I had initially just given in order to demonstrate that a clock application was present on Mint and how it could be launched, all the long running jobs, which I launch in the background start with with the command nohup and end with the &.
But I will definitely not discuss these jobs here and in this thread. Doing so would definitely make this thread go completely off-topic. Oracle database clone restores are pretty unrelated to having a desktop clock on the Mint desktop.

So only pending task in this thread (on-topic), as far as I can tell is: provide a functional xclock launcher file, which will launch xclock after each login to the GUI (automatic startup application launcher).
Raises the question: spoon-feeding or teach how to fish?

Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Desktop Clock?

Post by rene »

I vote spoon.
User avatar
muffybean
Level 5
Level 5
Posts: 568
Joined: Thu Oct 17, 2019 8:22 am
Location: Pembrokeshire-Wales

Re: Desktop Clock?

Post by muffybean »

Sounds good to me as I don't expect to be getting anywhere fast for some time yet. I am trying, I am making mistakes but jumping into Linux is like learning to walk again having spent 25 years working on another planet called M$S control. :lol:
Running Linux Mint MATE on 2 desktops + Linux Mint Xfce on Netbook + Cinnamon VM on 3rd Desktop
User avatar
karlchen
Level 23
Level 23
Posts: 18224
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Desktop Clock?

Post by karlchen »

Hi, muffybean.

As I have contributed into making a thread which started with a pretty simple, straight forward question into a long and confusing mess, here is an early "Christmas present":
  • Navigate to the directory ~/.config/autostart
    You may have to make hidden directories and files visible in your file manager by pressing <Ctrl>H once.
    ~ is equal to $HOME, which is your home directory. Home directory is not /home, but /home/muffybean. (Replace muffybean by your Mint username).
  • In the directory ~/.config/autostart right-click on the empty space and select "Create new document".
  • Enter as filename: xclock.desktop
  • Right click on the filename xclock.desktop and select open with text editor.
  • Inside the text editor, paste the complete text in the code box below into the editor window.

    Code: Select all

    [Desktop Entry]
    Version=1.0
    Name=Xclock
    Comment=Clock application
    Icon=deja-dup
    Exec=/usr/bin/xclock -update 1 -geometry 180x180-20+20
    StartupNotify=false
    NoDisplay=false
    Type=Application
    Categories=Utility;
  • Save the file and exit the text editor.
  • Log off from the graphical desktop and log back in.
  • xclock should be displayed in the upper right hand corner of the screen. (Worked here.)
Cheers,
Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
User avatar
muffybean
Level 5
Level 5
Posts: 568
Joined: Thu Oct 17, 2019 8:22 am
Location: Pembrokeshire-Wales

Re: Desktop Clock?

Post by muffybean »

Will try this later Karlchen. At 78 I'm a bit slower getting going early in these cold mornings but will look into it later when I have a bit of time as my son is here for Christmas and I only see him once or sometimes twice a year. :P
Running Linux Mint MATE on 2 desktops + Linux Mint Xfce on Netbook + Cinnamon VM on 3rd Desktop
User avatar
muffybean
Level 5
Level 5
Posts: 568
Joined: Thu Oct 17, 2019 8:22 am
Location: Pembrokeshire-Wales

Re: Desktop Clock?

Post by muffybean »

Yes that worked fine Karlchen. Is there a way of changing the clock face colour?
Running Linux Mint MATE on 2 desktops + Linux Mint Xfce on Netbook + Cinnamon VM on 3rd Desktop
User avatar
karlchen
Level 23
Level 23
Posts: 18224
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Desktop Clock?

Post by karlchen »

Hi, muffybean.

I am afraid I will not be able to tell you how to change the "face" colour. :cry:
In the brief section on the option -face, man xclock told me that I should find the right format in the help on the file fonts.conf.
So I did man 5 fonts.conf and got lost in a wall of text. Sadly, I did not come across any usable example. So after a while I gave up trying to change the face colour.
Sorry.

Maybe someone else is smarter than me and knows how to achieve the goal.

Regards,
Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
User avatar
muffybean
Level 5
Level 5
Posts: 568
Joined: Thu Oct 17, 2019 8:22 am
Location: Pembrokeshire-Wales

Re: Desktop Clock?

Post by muffybean »

OK Karlchen, I thank you for your help and wish you a happy Christmas.
Running Linux Mint MATE on 2 desktops + Linux Mint Xfce on Netbook + Cinnamon VM on 3rd Desktop
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Desktop Clock?

Post by rene »

xclock's face colour is controlled by the standard X Toolkit "background" resource, settable as "XClock*background" from e.g. ~/.Xresources --- note, a file which you may depending on distribution need to source manually these days; frankly no idea if it's setup by default on Ubuntu/Mint --- and which is also available simply as the X Toolkit option -bg; see man X, heading OPTIONS for more such standard toolkit options.

That is, xclock -bg red or xclock -bg rgb:ff/00/00. See /usr/share/X11/rgb.txt for a list of predefined named colour values.
rjsrjs

Re: Desktop Clock?

Post by rjsrjs »

I just made a new launcher and entered "xclock -update 1" without quotes, and seems to work ok. I usually use the clock in compiz for myself.
User avatar
muffybean
Level 5
Level 5
Posts: 568
Joined: Thu Oct 17, 2019 8:22 am
Location: Pembrokeshire-Wales

Re: Desktop Clock?

Post by muffybean »

That is, xclock -bg red or xclock -bg rgb:ff/00/00. See /usr/share/X11/rgb.txt for a list of predefined named colour values.
Where do you get all this stuff from? Is it some site that this is on?
Running Linux Mint MATE on 2 desktops + Linux Mint Xfce on Netbook + Cinnamon VM on 3rd Desktop
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Desktop Clock?

Post by rene »

muffybean wrote: Tue Dec 31, 2019 7:34 am Is it some site that this is on?
Yes. Or to be precise, on a combination of parts of 131256 of them.
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Desktop Clock?

Post by Flemur »

muffybean wrote: Sat Dec 21, 2019 11:20 am When I run that in Terminal it just opens that clock in Terminal screen, I want it on my desktop.
Just bragging about fluxbox: if you were using it you could easily send the window to "Desktop" (under all normal windows) and remove the titlebar and border:
~/.fluxbox/apps file:

Code: Select all

[app] (name=xclock) (class=XClock)
  [Dimensions]  {9% 18%}
  [Deco]    {NONE}
  [Layer]   {12}
[end]
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Locked

Return to “MATE”