Command sleep [solved]

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

Command sleep [solved]

Postby petrherynk » May 10th, '12, 16:48

I would like to use this command. I used "sleep 5s" without success. I use KDE environment.
Last edited by petrherynk on May 13th, '12, 08:50, edited 2 times in total.
petrherynk
 
Posts: 60
Joined: Apr 7th, '11, 16:27

Re: Command sleep

Postby doktor5000 » May 10th, '12, 21:13

What do you want to use it with, or what do you think it should do or want it to do? Normally you use it together with something else, e.g. in a terminal sometimes i use
Code: Select all
sleep 10 && ksnapshot

What this basically does is wait ten seconds, then the first command successfully completes, and with the && it executes the second command, which is a screenshot tool.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18055
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Command sleep

Postby petrherynk » May 10th, '12, 23:14

[petrherynk@localhost ~]$ su
Heslo:
[root@localhost petrherynk]# sleep 10 && ksnapshot
ksnapshot(3082)/kdeui (kdelibs): Session bus not found
To circumvent this problem try the following command (with Linux and bash)
export $(dbus-launch)
KCrash: Application 'ksnapshot' crashing...
KCrash: Attempting to start /usr/lib/kde4/libexec/drkonqi from kdeinit
sock_file=/root/.kde4/socket-localhost/kdeinit4__0
Warning: connect() failed: : Adresář nebo soubor neexistuje
KCrash: Attempting to start /usr/lib/kde4/libexec/drkonqi directly
drkonqi(3083)/kdeui (kdelibs): Session bus not found
To circumvent this problem try the following command (with Linux and bash)
export $(dbus-launch)
[root@localhost petrherynk]# export $(dbus-launch)
[root@localhost petrherynk]# sleep 10 && ksnapshot
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
kbuildsycoca4 running...
petrherynk
 
Posts: 60
Joined: Apr 7th, '11, 16:27

Re: Command sleep

Postby djennings » May 10th, '12, 23:26

[root@localhost petrherynk]# sleep 10 && ksnapshot
ksnapshot(3082)/kdeui (kdelibs): Session bus not found


You are getting this problem because your terminal is running as root user.
To launch a graphical application as root you must use
Code: Select all
su -
Note the '-'
User avatar
djennings
 
Posts: 613
Joined: Jun 2nd, '11, 23:51
Location: Wokingham, UK

Re: Command sleep

Postby Ken-Bergen » May 10th, '12, 23:46

djennings wrote:You are getting this problem because your terminal is running as root user.
To launch a graphical application as root you must use
Code: Select all
su -
Note the '-'
Code: Select all
export $(dbus-launch)
does the same thing as using the dash with the added benefit that it doesn't do that annoying (cd /root) that (su -) does.
Ken
Ken-Bergen
 
Posts: 1019
Joined: Mar 30th, '11, 02:45
Location: Chilliwack, BC, Canada

Re: Command sleep

Postby petrherynk » May 11th, '12, 14:43

Thank you, for me this problem is solved.
petrherynk
 
Posts: 60
Joined: Apr 7th, '11, 16:27

Re: Command sleep

Postby isadora » May 11th, '12, 15:48

Image
..........bird from paradise..........

Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
—Antoine de Saint-Exupéry
User avatar
isadora
 
Posts: 2766
Joined: Mar 25th, '11, 16:03
Location: Netherlands


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest

cron