SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I would be very interested to know if it is possible to configure xclock to bring up say 3 or 4 different displays simultaneously each with a different time zone.
So it can say for instance London Mon15:30
- New York Mon06:30
- Sydney Mon15:30
Is there a simple answer to this?
phil
xclock -> starts a clock with the current (local) time, `TZ=GMT ; xclock` => starts xclock showing GMT time.
Like I stated, I tried this on a solaris box (I'm at work, no linux box around). I do assume that linux doesn't use/set the TZ variable, but something simular must be possible. I'll give it another look when I'm back home and come back with the results.
I should learn to read more carefully, the :[filespec] notation is indeed in the manpage and I completely overlooked it. Just tried the :PDT notation and it works beautifully.
Thanks guys.
I tried all these things and they work A ok!
What I need to know now is: how to start 3 clocks at the same time and keep them alive as a permanent desktop application or on a tool bar.
Can one construct an application that can be run on demand with the 3 clocks in a single window perhaps?
Phil
If you want to manipulate the positioning, xclock can use the -geometry +x+y notation. For example: xclock -geometry +0+0 will place your clock in the upper left counter.
It helps a good deal.
It works, yes.
I tried to substitute xclock with
<xclock -d -strftime %A-%H:%M-%Z -geometry 200x30>
in order to make it a digital clock inside a small box along with the weekday and timezone name. O dear then it complains
"syntax error near unexpected token `-d'"
Does this mean that the command is getting too long and too complicated?
Phil.
If I try your code (xclock -d -strftime %A-%H:%M-%Z -geometry 200x30) on my box, it works nicely. I do assume that the < and > are _not_ part of your code.
yes. Works absolutely 100 % fine. Thanks for all the pointers.
Its all part of a learning curve, so the next step I see is - How does one make this so that it can be evoked from a menu item called worldclock or something like that.
Phil
Just paste the contents of the above script into a new text document named worldclock.
Then make it executable: 'chmod 755 worldclock'
Then place a copy in /usr/local/bin and type 'worldclock' or place the command in your xintrc file(may need to background it: 'worldclock &').
Yeah that works perfectly and Ive learned quite a bit via this exercise. Now I don know if this is pushing it a bit but how would one then put all these three clock displays into one window so they dont open as three different little windows but as three features in one window?
phil.
rewrite the program. On the other hand there is a clock that does what you need, but I don't remember the name of it now. Maybe searching sourceforge for 'linux clock' might find it.
Yes I have searched sourceforge extensively. But on the other hand It would be good to learn to do this myself. Maybe there is some reading matter on a website that can read and follow this up.
phil
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.