top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

xset and display invalid id in bash script

0 votes
386 views

Have the following in xfce autostart:

#!/bin/bash
# Disable screensaver and dpms emergy star.
export DISPLAY :0.0 
xset s off && 
xset -dpms 

on running:

./xset
./xset: line 4: export: `:0.0': not a valid identifier

It appears to be the correct display going by:

echo $DISPLAY
:0.0
posted Jun 5, 2013 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

export DISPLAY=:0.0

answer Jun 5, 2013 by anonymous
Similar Questions
0 votes

Here, I want to filter some specific files and directories.

+1 vote

I have got a bash script that has two parts.
1. runs a script as a different user (using su -c )
2. when that part finishes, the script does a copy of the files created to another directory
I want to log the output of the entire script into one file. i.e.: internal script>external script> logfile
Whats the best way to do this?

+1 vote

I am trying to understand how to use named pipes in python to launch external processes (in a Linux environment).

As an example I am trying to "imitate" the behaviour of the following sets of commands is bash:

> mkfifo named_pipe
> ls -lah > named_pipe &
> cat < named_pipe

In Python I have tried the following commands:

import os
import subprocess as sp

os.mkfifo("named_pipe",0777) #equivalent to mkfifo in bash..
fw = open("named_pipe",'w')
#at this point the system hangs...

My idea it was to use subprocess.Popen and redirect stdout to fw... next open named_pipe for reading and giving it as input to cat (still using Popen).

I know it is a simple (and rather stupid) example, but I can't manage to make it work..

How would you implement such simple scenario?

+2 votes

I want to run a command in every 10 minute which should return the maximum CPU utilization of a linux machine in last 10 min irrespective of no. of core present.
Thanks in advance.

...