GKCmaTV.fr.st / GKC.fr.st Index du Forum  
  Rechercher  •  Liste des Membres  •  Groupes d'utilisateurs   •  S'enregistrer  •  Profil  •  Se connecter pour vérifier ses messages privés  •  Connexion

Vous avez une astuce??

[BlindMan]

Partagez la!! Postez la en section 'discussion diverses', et, après validation, elle apparaîtra à son tour dans cette boite.

 Xdtv record schedule script doesn't work - dirty workaround Voir le sujet suivant
Voir le sujet précédent
Poster un nouveau sujetRépondre au sujet
Auteur Message
Gelo
Newbie


Inscrit le: 01 Mar 2007
Messages: 1

MessagePosté le: Jeudi 1 Mars 2007 16:54:30 Répondre en citantRevenir en haut de page

I had the following problem with the record schedule script of xdtv 2.4.0 running on my openSUSE 10.2 system:
The script created by xdtv_record.sh to start the recording produces an error when starting xdtv. The output sent by mail to the user was:
Citation:
xauth: (argv):1:  bad "add" command line
Will kill all running xdtv !

This is xdtv 2.4.0 running on Linux/i686 (2.6.18.2-34-default).
Error: Can't open display:
connect: No such file or directory

The problem that causes "Error: Can't open display:" seems to be connected to the way the script tries to determin the DISPLAY number. The $DISPLAY variable is empty after the export DISPLAY command. I suppose that the problem is the regular expression in the line
Code:
XLINE=$(ps axuwww | grep -e "[/\s]X .* \?-auth" | head -1)

"grep" should find something in the "ps axuwww" output, problably in my case this line:
Citation:
root 3361 2.9 7.6 69572 39740 tty7 Ss+ 11:06 7:56 /usr/bin/Xorg -br -nolisten tcp :0 vt7 -auth /var/lib/xdm/authdir/authfiles/A:0-nLdWmm

But it doesen't, so XLINE stays empty. This causes the line
Code:
export DISPLAY=$(echo $XLINE | sed 's#.* \(:[0-9]\+\(\.\?[0-9]\+\)\?\).*#\1#' )

to produce no result; DISPLAY is empty.
Unfortunately I don't understand anything about regular expressions, so I am not able to fix this pas ma faute .

The only thing I can offer is a very dirty workaround:

1. You look up your DISPLAY number typing "echo $DISPLAY" at the command line. In my case it is ":0.0".
2. You copy the script xdtv_record.sh to your home directory (you'll find it in /usr/bin), rename it to xdtv_record_new.sh and open it with an editor (e.g. kwrite).
3. Now, you have to search the line that starts with export DISPLAY. After this line you add a line:
Code:
export DISPLAY=:0.0
or another DISPLAY number you found out previously.
4. You save the script.

Now scheduled recording will work if you invoke the script form the command line with the command
Citation:
sh xdtv_record_new.sh

If you have administrator privileges (and you know what you are doing) obviously also you can change the original script in /usr/bin using "su" and then "kwrite /usr/bin/xdtv_record.sh". Then the script will work even if invoked using the buttons in the xdtv program. Don't forget to make a backup copy before editing the original script wink .

I don't know if this will work on other systems and I don't know if it will cause any other problems in other circumstances. So: be carefull and don't blame me for destroyed systems sourit . In my case, it worked fine.

Hopefully there is anyone who knows a littel bit more about programming and is able to correct the problematic line in the script.
Voir le profil de l'utilisateurEnvoyer un message privé
estre
Newbie


Inscrit le: 23 Mar 2006
Messages: 17

MessagePosté le: Vendredi 2 Mars 2007 12:54:56 Répondre en citantRevenir en haut de page

Hello,
this line should be ok :
Code:

ps axuwww | grep -e "[/\s]X[org]* .* \?-auth" | head -1


It will be corrected for the next release,
Thanks, Nicolas.
Voir le profil de l'utilisateurEnvoyer un message privé
Montrer les messages depuis:      
Poster un nouveau sujetRépondre au sujet


 Sauter vers:   



Voir le sujet suivant
Voir le sujet précédent
Vous ne pouvez pas poster de nouveaux sujets dans ce forum
Vous ne pouvez pas répondre aux sujets dans ce forum
Vous ne pouvez pas éditer vos messages dans ce forum
Vous ne pouvez pas supprimer vos messages dans ce forum
Vous ne pouvez pas voter dans les sondages de ce forum


Powered by phpBB © 200-2008 phpBB Group :: FI Theme :: Toutes les heures sont au format GMT + 1 Heure
Traduction par : phpBB-fr.com