GKCmaTV.fr.st / GKC.fr.st Forum Index  
  Search  •  Memberlist  •  Usergroups   •  Register  •  Profile  •  Log in to check your private messages  •  Log in

There is no tips defined in your language

[]

To help us to fill this box, you can create your own tips, or translate the other languaqe's tip

 Xdtv record schedule script doesn't work - dirty workaround View next topic
View previous topic
Post new topicReply to topic
Author Message
Gelo
Newbie


Joined: 01 Mar 2007
Posts: 1

PostPosted: Thursday 1 March 2007 16:54:30 Reply with quoteBack to top

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:
Quote:
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:
Quote:
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
Quote:
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.
View user's profileSend private message
estre
Newbie


Joined: 23 Mar 2006
Posts: 17

PostPosted: Friday 2 March 2007 12:54:56 Reply with quoteBack to top

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.
View user's profileSend private message
Display posts from previous:      
Post new topicReply to topic


 Jump to:   



View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 200-2008 phpBB Group :: FI Theme :: All times are GMT + 1 Hour