startx fails
by Patrick Dupre
Hello,
Can some body tell me what is wrong in the following xorg.conf file:
# Xorg configuration created by system-config-display
Section "ServerLayout"
Identifier "single head configuration"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "InputDevice"
# keyboard added by system-config-display
Identifier "Keyboard0"
Driver "kbd"
Option "XkbModel" "pc105"
Option "XkbLayout" "fr"
Option "XkbVariant" "latin9"
EndSection
Section "Monitor"
# ModeLine "1600x1200" 59.9 1280 1368 1496 1712 1024 1027 1034
1063 -hsync +vsync
Identifier "Monitor0"
ModelName "LCD Panel 1920x1080"
Modeline "1920x1080" 173.00 1920 2048 2248 2576 1080 1083
1088 1120 -hsync +vsync
# Modeline "1600x1200" 161.00 1600 1712 1880 2160 1200 1203
1207 1245 -hsync +vsync
# Modeline "1280x1024_60.00" 109.00 1280 1368 1496 1712 1024
1027 1034 1063 -hsync +vsync
# ModeLine "1280x1024" 109.0 1280 1368 1496 1712 1024 1027 1034
1063 -hsync +vsync
Option "dpms"
EndSection
Section "Device"
Identifier "Videocard0"
Driver "nv"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
# Virtual 1280 1024
Viewport 0 0
Depth 24
# Modes "1280x1024_60.00"
Modes "1920x1080" "1280x1024"
EndSubSection
EndSection
Here is the log file:
[1360468.982]
X.Org X Server 1.9.5
Release Date: 2011-03-17
[1360468.990] X Protocol Version 11, Revision 0
[1360468.992] Build Operating System: x86-06 2.6.32-131.2.1.el6.x86_64
[1360468.995] Current Operating System: Linux eschyle
2.6.35.14-106.fc14.i686.PAE #1 SMP Wed Nov 23 13:39:51 UTC 2011 i686
[1360468.998] Kernel command line: ro root=/dev/sdb5 rd_NO_LUKS rd_NO_LVM
rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16
KEYTABLE=fr-latin9
[1360469.004] Build Date: 13 October 2011 02:23:54PM
[1360469.007] Build ID: xorg-x11-server 1.9.5-2.fc14
[1360469.009] Current version of pixman: 0.18.4
[1360469.012] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[1360469.018] Markers: (--) probed, (**) from config file, (==) default
setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[1360469.027] (==) Log file: "/var/log/Xorg.0.log", Time: Wed Mar 28
15:34:33 2012
[1360469.031] (==) Using config file: "/etc/X11/xorg.conf"
[1360469.034] (==) Using system config directory
"/usr/share/X11/xorg.conf.d"
[1360469.080] (==) ServerLayout "single head configuration"
[1360469.080] (**) |-->Screen "Screen0" (0)
[1360469.080] (**) | |-->Monitor "Monitor0"
[1360469.080] (**) | |-->Device "Videocard0"
[1360469.080] (**) |-->Input Device "Keyboard0"
[1360469.080] (==) Automatically adding devices
[1360469.080] (==) Automatically enabling devices
[1360469.081] (==) FontPath set to:
catalogue:/etc/X11/fontpath.d,
built-ins
[1360469.081] (==) ModulePath set to "/usr/lib/xorg/modules"
[1360469.081] (II) The server relies on udev to provide the list of input
devices.
If no devices become available, reconfigure udev or disable
AutoAddDevices.
[1360469.081] (II)
***************************************************************
***************************************************************
** Fedora switched to udev-based device detection with **
** xorg-x11-server-1.7.99.901-1. Custom HAL configuration **
** stored in /etc/hal/fdi/policy will not be seen by this **
** server version. If you have such configuration you will **
** need to update it to the new format. **
** For more information, see the Fedora wiki page **
** https://fedoraproject.org/wiki/Input_device_configuration **
***************************************************************
***************************************************************
[1360469.081] (WW) AllowEmptyInput is on, devices using drivers 'kbd',
'mouse' or 'vmmouse' will be disabled.
[1360469.081] (WW) Disabling Keyboard0
[1360469.081] (II) Loader magic: 0x822a0e0
[1360469.081] (II) Module ABI versions:
[1360469.081] X.Org ANSI C Emulation: 0.4
[1360469.081] X.Org Video Driver: 8.0
[1360469.081] X.Org XInput driver : 11.0
[1360469.081] X.Org Server Extension : 4.0
[1360469.084] (--) PCI:*(0:1:0:0) 10de:0185:10b0:0422 rev 193, Mem @
0xfd000000/16777216, 0xe8000000/134217728, BIOS @ 0x????????/131072
[1360469.084] (II) LoadModule: "extmod"
[1360469.084] (II) Loading /usr/lib/xorg/modules/extensions/libextmod.so
[1360469.092] (II) Module extmod: vendor="X.Org Foundation"
[1360469.092] compiled for 1.9.5, module version = 1.0.0
[1360469.093] Module class: X.Org Server Extension
[1360469.093] ABI class: X.Org Server Extension, version 4.0
[1360469.093] (II) Loading extension SELinux
[1360469.093] (II) Loading extension MIT-SCREEN-SAVER
[1360469.093] (II) Loading extension XFree86-VidModeExtension
[1360469.093] (II) Loading extension XFree86-DGA
[1360469.093] (II) Loading extension DPMS
[1360469.093] (II) Loading extension XVideo
[1360469.093] (II) Loading extension XVideo-MotionCompensation
[1360469.093] (II) Loading extension X-Resource
[1360469.093] (II) LoadModule: "dbe"
[1360469.093] (II) Loading /usr/lib/xorg/modules/extensions/libdbe.so
[1360469.100] (II) Module dbe: vendor="X.Org Foundation"
[1360469.100] compiled for 1.9.5, module version = 1.0.0
[1360469.100] Module class: X.Org Server Extension
[1360469.100] ABI class: X.Org Server Extension, version 4.0
[1360469.101] (II) Loading extension DOUBLE-BUFFER
[1360469.101] (II) LoadModule: "glx"
[1360469.101] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[1360469.114] (II) Module glx: vendor="X.Org Foundation"
[1360469.114] compiled for 1.9.5, module version = 1.0.0
[1360469.114] ABI class: X.Org Server Extension, version 4.0
[1360469.114] (==) AIGLX enabled
[1360469.114] (II) Loading extension GLX
[1360469.114] (II) LoadModule: "record"
[1360469.114] (II) Loading /usr/lib/xorg/modules/extensions/librecord.so
[1360469.126] (II) Module record: vendor="X.Org Foundation"
[1360469.126] compiled for 1.9.5, module version = 1.13.0
[1360469.126] Module class: X.Org Server Extension
[1360469.126] ABI class: X.Org Server Extension, version 4.0
[1360469.126] (II) Loading extension RECORD
[1360469.126] (II) LoadModule: "dri"
[1360469.127] (II) Loading /usr/lib/xorg/modules/extensions/libdri.so
[1360469.136] (II) Module dri: vendor="X.Org Foundation"
[1360469.136] compiled for 1.9.5, module version = 1.0.0
[1360469.136] ABI class: X.Org Server Extension, version 4.0
[1360469.136] (II) Loading extension XFree86-DRI
[1360469.136] (II) LoadModule: "dri2"
[1360469.136] (II) Loading /usr/lib/xorg/modules/extensions/libdri2.so
[1360469.152] (II) Module dri2: vendor="X.Org Foundation"
[1360469.152] compiled for 1.9.5, module version = 1.2.0
[1360469.152] ABI class: X.Org Server Extension, version 4.0
[1360469.152] (II) Loading extension DRI2
[1360469.152] (II) LoadModule: "nv"
[1360469.153] (II) Loading /usr/lib/xorg/modules/drivers/nv_drv.so
[1360469.165] (II) Module nv: vendor="X.Org Foundation"
[1360469.165] compiled for 1.8.99.904, module version = 2.1.15
[1360469.165] Module class: X.Org Video Driver
[1360469.165] ABI class: X.Org Video Driver, version 8.0
[1360469.165] (II) NV: driver for NVIDIA chipsets: RIVA 128, RIVA TNT,
RIVA TNT2,
Unknown TNT2, Vanta, RIVA TNT2 Ultra, RIVA TNT2 Model 64,
Aladdin TNT2, GeForce 256, GeForce DDR, Quadro, GeForce2 MX/MX
400,
GeForce2 MX 100/200, GeForce2 Go, Quadro2 MXR/EX/Go,
GeForce2 Integrated GPU, GeForce2 GTS, GeForce2 Ti, GeForce2
Ultra,
Quadro2 Pro, GeForce4 MX 460, GeForce4 MX 440, GeForce4 MX 420,
GeForce4 MX 440-SE, GeForce4 440 Go, GeForce4 420 Go,
GeForce4 420 Go 32M, GeForce4 460 Go, Quadro4 550 XGL,
GeForce4 440 Go 64M, Quadro NVS, Quadro4 500 GoGL,
GeForce4 410 Go 16M, GeForce4 MX 440 with AGP8X,
GeForce4 MX 440SE with AGP8X, GeForce4 MX 420 with AGP8X,
GeForce4 MX 4000, GeForce4 448 Go, GeForce4 488 Go, Quadro4 580
XGL,
Quadro4 NVS 280 SD, Quadro4 380 XGL, Quadro NVS 50 PCI,
GeForce4 448 Go, GeForce4 MX Integrated GPU, GeForce3,
GeForce3 Ti 200, GeForce3 Ti 500, Quadro DCC, GeForce4 Ti 4600,
GeForce4 Ti 4400, GeForce4 Ti 4200, Quadro4 900 XGL, Quadro4 750
XGL,
Quadro4 700 XGL, GeForce4 Ti 4800, GeForce4 Ti 4200 with AGP8X,
GeForce4 Ti 4800 SE, GeForce4 4200 Go, Quadro4 700 GoGL,
Quadro4 980 XGL, Quadro4 780 XGL, GeForce FX 5800 Ultra,
GeForce FX 5800, Quadro FX 2000, Quadro FX 1000,
GeForce FX 5600 Ultra, GeForce FX 5600, GeForce FX 5600XT,
GeForce FX Go5600, GeForce FX Go5650, Quadro FX Go700,
GeForce FX 5200, GeForce FX 5200 Ultra, GeForce FX 5200,
GeForce FX 5200LE, GeForce FX Go5200, GeForce FX Go5250,
GeForce FX 5500, GeForce FX 5100, GeForce FX Go5200 32M/64M,
Quadro NVS 55/280 PCI, Quadro FX 500/600 PCI,
GeForce FX Go53xx Series, GeForce FX Go5100, GeForce FX 5900
Ultra,
GeForce FX 5900, GeForce FX 5900XT, GeForce FX 5950 Ultra,
GeForce FX 5900ZT, Quadro FX 3000, Quadro FX 700,
GeForce FX 5700 Ultra, GeForce FX 5700, GeForce FX 5700LE,
GeForce FX 5700VE, GeForce FX Go5700, GeForce FX Go5700,
Quadro FX Go1000, Quadro FX 1100, GeForce 6800 Ultra, GeForce
6800,
GeForce 6800 LE, GeForce 6800 XE, GeForce 6800 XT, GeForce 6800
GT,
GeForce 6800 GT, GeForce 6800 GS, GeForce 6800 XT, Quadro FX 4000,
GeForce 6800 GS, GeForce 6800, GeForce 6800 LE, GeForce 6800 XT,
GeForce Go 6800, GeForce Go 6800 Ultra, Quadro FX Go1400,
Quadro FX 3450/4000 SDI, Quadro FX 1400, GeForce 6600 GT,
GeForce 6600, GeForce 6600 LE, GeForce 6600 VE, GeForce Go 6600,
GeForce 6610 XL, GeForce Go 6600 TE/6200 TE, GeForce 6700 XL,
GeForce Go 6600, GeForce Go 6600 GT, Quadro NVS 440, Quadro FX
550,
Quadro FX 550, Quadro FX 540, GeForce 6200, GeForce 6500,
GeForce 6200 TurboCache(TM), GeForce 6200SE TurboCache(TM),
GeForce 6200 LE, GeForce Go 6200, Quadro NVS 285, GeForce Go 6400,
GeForce Go 6200, GeForce Go 6400, GeForce 6250, GeForce 7100 GS,
GeForce 6800, GeForce 6800 LE, GeForce 6800 GT, GeForce 6800 XT,
GeForce 6200, GeForce 6200 A-LE, GeForce 7800 GTX, GeForce 7800
GTX,
GeForce 7800 GT, GeForce 7800 GS, GeForce 7800 SLI, GeForce Go
7800,
GeForce Go 7800 GTX, Quadro FX 4500, GeForce 7350 LE,
GeForce 7300 LE, GeForce 7300 SE, GeForce Go 7200, GeForce Go
7300,
GeForce Go 7400, GeForce Go 7400 GS, Quadro NVS 110M,
Quadro NVS 120M, Quadro FX 350M, GeForce 7500 LE, Quadro FX 350,
GeForce 7300 GS, GeForce 7650 GS, GeForce 7600 GT, GeForce 7600
GS,
GeForce 7300 GT, GeForce 7600 LE, GeForce 7300 GT, GeForce Go
7700,
GeForce Go 7600, GeForce Go 7600 GT, Quadro NVS 300M,
GeForce Go 7900 SE, Quadro FX 550M, Quadro FX 560, GeForce 7900
GTX,
GeForce 7900 GT, GeForce 7900 GS, GeForce 7950 GX2, GeForce 7950
GX2,
GeForce 7950 GT, GeForce Go 7950 GTX, GeForce Go 7900 GS,
GeForce Go 7900 GTX, Quadro FX 2500M, Quadro FX 1500M,
Quadro FX 5500, Quadro FX 3500, Quadro FX 1500, Quadro FX 4500 X2,
GeForce 6150, GeForce 6150 LE, GeForce 6100, GeForce Go 6150,
Quadro NVS 210S / NVIDIA GeForce 6150LE, GeForce Go 6100,
GeForce 6150SE, GeForce 6100 nForce 405, GeForce 6100 nForce 400,
GeForce 6100 nForce 420, GeForce 7025, GeForce 7050,
GeForce 8800 GTX, GeForce 8800 GTS, GeForce 8800 Ultra,
Quadro FX 5600, Quadro FX 4600, GeForce 8600 GTS, GeForce 8600 GT,
GeForce 8600 GT, GeForce 8600 GS, GeForce 8400 GS, GeForce 9500M
GS,
GeForce 8600M GT, GeForce 9650M GS, GeForce 8700M GT, Quadro FX
370,
Quadro NVS 320M, Quadro FX 570M, Quadro FX 1600M, Quadro FX 570,
Quadro FX 1700, GeForce 8400 SE, GeForce 8500 GT, GeForce 8400 GS,
GeForce 8300 GS, GeForce 8400 GS, GeForce 8600M GS, GeForce 8400M
GT,
GeForce 8400M GS, GeForce 8400M G, Quadro NVS 140M, Quadro NVS
130M,
Quadro NVS 135M, GeForce 9400 GT, Quadro FX 360M, GeForce 9300M G,
Quadro NVS 290, GeForce GTX 295, GeForce GTX 280, GeForce GTX 260,
GeForce GTX 285, Quadro CX, Quadro FX 5800, Quadro FX 4800,
Quadro FX 3800, GeForce 8800 GTS 512, GeForce 9800 GT,
GeForce 8800 GT, GeForce 9800 GX2, GeForce 9800 GT, GeForce 8800
GS,
GeForce 9800M GTX, GeForce 8800M GTS, GeForce 9800M GT,
GeForce 8800M GTX, GeForce 8800 GS, GeForce 9600 GSO,
GeForce 8800 GT, GeForce 9800 GTX, GeForce 9800 GTX+,
GeForce 9800 GT, GeForce GTS 250, GeForce 9800M GTX, Quadro FX
3700,
Quadro FX 3600M, Quadro FX 3700M, GeForce 9600 GT, GeForce 9600
GS,
GeForce 9600 GSO 512, GeForce GT 130, GeForce GT 140,
GeForce 9800M GTS, GeForce 9700M GTS, GeForce 9800M GS,
GeForce 9800M GTS, Quadro FX 1800, Quadro FX 2700M, GeForce 9500
GT,
GeForce 9400 GT, GeForce 9500 GT, GeForce GT 120, GeForce 9600M
GT,
GeForce 9600M GS, GeForce 9600M GT, GeForce 9700M GT,
GeForce 9500M G, GeForce 9650M GT, GeForce 9500 GT, Quadro FX 380,
Quadro FX 580, Quadro FX 770M, GeForce 9300 GE, GeForce 9300 GS,
GeForce 8400 GS, GeForce 9300M GS, GeForce G100, GeForce 9200M GS,
GeForce 9300M GS, Quadro NVS 150M, Quadro NVS 160M, Quadro NVS
420,
Quadro FX 370 LP, Quadro NVS 450, Quadro NVS 295
[1360469.170] (--) using VT number 7
[1360469.183] The PCI device has a kernel module claiming it.
[1360469.183] This driver cannot operate until it has been unloaded
[1360469.183] (EE) No devices detected.
[1360469.183]
Fatal server error:
[1360469.183] no screens found
[1360469.183]
Please consult the Fedora Project support
at http://wiki.x.org
for help.
[1360469.183] Please also check the log file at "/var/log/Xorg.0.log" for
additional information.
[1360469.183]
Thank
--
---
==========================================================================
Patrick DUPRÉ | |
Department of Chemistry | | Phone: (44)-(0)-1904-434384
The University of York | | Fax: (44)-(0)-1904-432516
Heslington | |
York YO10 5DD United Kingdom | | email: patrick.dupre(a)york.ac.uk
==========================================================================
12 years, 1 month
Timezones and SELinux...
by Marko Vojinovic
Hi folks!
// This is a repost from the KDE mailing list, with the hope that more eyes
will see it here... //
After the yum update, both before and after the restart of the system (there
was a new kernel as well), my timezone setting is wrong (again) --- it is set
to Lisbon (GMT), which was my previous setting, rather than Belgrade (GMT+1)
which was my current setting (prior to update). AFAIK, this should not happen
unless I ask for the timezone change.
Second, when I open systemsettings to change the timezone, after clicking
"apply" and giving the root password, the timezone change fails, and SELinux
gives an alert:
===== long quote =====
SELinux is preventing /usr/libexec/kde4/kcmdatetimehelper from using the
dac_override capability.
***** Plugin dac_override (91.4 confidence) suggests ***********************
If you want to help identify if domain needs this access or you have a file
with the wrong permissions on your system
Then turn on full auditing to get path information about the offending file and
generate the error again.
Do
Turn on full auditing
# auditctl -w /etc/shadow -p w
Try to recreate AVC. Then execute
# ausearch -m avc -ts recent
If you see PATH record check ownership/permissions on file, and fix it,
otherwise report as a bugzilla.
***** Plugin catchall (9.59 confidence) suggests ***************************
If you believe that kcmdatetimehelper should have the dac_override capability
by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep kcmdatetimehelp /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp
Additional Information:
Source Context system_u:system_r:gnomeclock_t:s0-s0:c0.c1023
Target Context system_u:system_r:gnomeclock_t:s0-s0:c0.c1023
Target Objects [ capability ]
Source kcmdatetimehelp
Source Path /usr/libexec/kde4/kcmdatetimehelper
Port <Unknown>
Host Yoda
Source RPM Packages kde-workspace-4.8.1-6.fc16.x86_64
Target RPM Packages
Policy RPM selinux-policy-3.10.0-75.fc16.noarch
Selinux Enabled True
Policy Type targeted
Enforcing Mode Enforcing
Host Name Yoda
Platform Linux Yoda 3.2.10-3.fc16.x86_64 #1 SMP Thu Mar
15
19:39:46 UTC 2012 x86_64 x86_64
Alert Count 1
First Seen Mon 19 Mar 2012 08:00:25 AM WET
Last Seen Mon 19 Mar 2012 08:00:25 AM WET
Local ID 6c829d68-d5d6-4696-b636-f6efa26b8b49
Raw Audit Messages
type=AVC msg=audit(1332144025.273:73): avc: denied { dac_override } for
pid=2173 comm="kcmdatetimehelp" capability=1
scontext=system_u:system_r:gnomeclock_t:s0-s0:c0.c1023
tcontext=system_u:system_r:gnomeclock_t:s0-s0:c0.c1023 tclass=capability
type=SYSCALL msg=audit(1332144025.273:73): arch=x86_64 syscall=access
success=no exit=EACCES a0=1db33d8 a1=2 a2=200 a3=0 items=0 ppid=1 pid=2173
auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0
tty=(none) ses=4294967295 comm=kcmdatetimehelp
exe=/usr/libexec/kde4/kcmdatetimehelper
subj=system_u:system_r:gnomeclock_t:s0-s0:c0.c1023 key=(null)
Hash: kcmdatetimehelp,gnomeclock_t,gnomeclock_t,capability,dac_override
audit2allow
#============= gnomeclock_t ==============
allow gnomeclock_t self:capability dac_override;
audit2allow -R
#============= gnomeclock_t ==============
allow gnomeclock_t self:capability dac_override;
===== end of long quote =====
Somehow I feel that I am not supposed to tweak SELinux policy in order to
change my timezone setting. In the past I would put SELinux into permissive
mode, change the timezone, and then re-enforce SELinux. But the issue keeps
reappearing, so I don't believe that this is the right solution.
Ideas?
Best, :-)
Marko
12 years, 1 month
WTH is wrong with PackageKit?
by Mark Haney
Why is it that PackageKit is sitting in the background constantly
leaving me pretty much unable to install any software from the command
line? Did I configure something to make it do that? And how in the
world can I make it stop?
--
Mark Haney
Software Developer/Consultant
AB Emblem
markh(a)abemblem.com
Linux marius.homelinux 3.3.0-4.fc16.x86_64 GNU/Linux
12 years, 1 month
rc.local not loaded on boot
by Bruno Martins
Hello list,
I can read here:
http://docs.fedoraproject.org/en-US/Fedora/16/html/Release_Notes/sect-Rel...
the following:
3.2.4. rc.local no longer packaged
The |/etc/rc.d/rc.local| local customization script is no longer
included by default. Administrators who need this functionality merely
have to create this file, make it executable, and it will run on boot.
Upgrades are not affected by this change.
However, in my system this isn't happening.
[skorzen@g62 ~]$ ls -l /etc/rc.d/rc.local
-rwxr-xr-x 1 root root 543 Mar 24 22:11 /etc/rc.d/rc.local
[skorzen@g62 ~]$ cat /etc/rc.d/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
#exit 0
## Defaults brightness to maximum.
echo 10 > /sys/class/backlight/acpi_video0/brightness
## Enables mousepad tapping in LXDE.
synclient TapButton1=1
## Enables mousepad vertical scrolling in LXDE.
synclient VertEdgeScroll=1
#exit 0
However, if I run the file manually, it loads OK.
Can you please give me a tip on this?
Best regards,
--
*Bruno Martins*
bruno(a)member.fsf.org <mailto:bruno@member.fsf.org>
12 years, 1 month
dual monitors - one desktop image spanning both?
by Wolfgang S. Rupprecht
Is it possible to get one backdrop image in F16 to span both monitors in
a dual-monitor setup? I'm using xfce4 and the desktop settings tool
seems to only offer a per-monitor image selection. Is there some way of
selecting one image perhaps from gconfig directly? Ditto for the login
screen. Having the same cloned Verne image on both monitors is kind of
lame. It would look a lot nicer if one image spanned both monitors.
-wolfgang
--
g+: https://plus.google.com/114566345864337108516/about
12 years, 1 month
parallel bash scripts
by bruce
hi.
got a couple of test bash scripts.
dog.sh, cat.sh
each script runs the underlying php in an endless loop.
I'm trying to figure out how to run the scripts in parallel, from the
same parent shell script. something like:
test.sh
dog.sh > &2
cat.sh > &2
where dog.sh would be :
--------------------------------
while true
do
pgrep dog
if [ $? -ne 0 ]
then
/dog.php
fi
sleep 5
done
my current tests, run dog.sh, which runs the dog.php ... but the test
never gets to run cat.sh
thoughts/comments...
thanks
12 years, 1 month
Using CPAN to update perl modules
by Mark Haney
This may sound kinda silly, but it's the first time I've ever really
encountered this before. I'm finding I have a need to update some perl
modules that aren't yet packaged by Fedora. Is using CPAN to update
them going to cause any problems? Are there any caveats to using CPAN
to install other modules not packaged in RPM form?
--
Mark Haney
Software Developer/Consultant
AB Emblem
markh(a)abemblem.com
Linux marius.homelinux 3.3.0-4.fc16.x86_64 GNU/Linux
12 years, 1 month
Re: parallel bash scripts
by Mark LaPierre
I don't understand what you are trying to do.
Do you want to run these commands in series? Run one, wait for it to
complete, then start the other?
If that's where you want to go then leave off the trailing ampersand but
keep the redirection. The output of the first program will appear in
the terminal due to the redirection. When the first program ends the
second program will start. That one needs redirection of standard out
to standard error too so that it's output will appear in the terminal as
well.
Solution with trailing ampersand is appropriate for endless loops.
Solution without trailing ampersand is appropriate for serial operation.
I put the loop counter in the demo program just to stop the thing
without having to us ps and kill. Without the loop counter they will
continue to print inter-twined messages forever.
Does the program webservice_setup.sh start programs itself that you are
trying to read the output from? Are they correctly redirected to send
their standard output to standard error?
On 03/27/2012 10:01 PM, bruce wrote:
> Hi mark.
>
> the following is part of what i have tried... and what isn't working.
> i changed the test shell scripts to no longer have infinite loops.
> they simply execute the php app one time.
>
> however, it still doesn't work.
>
> in the initial shell script, it calls a php app that does some mysql
> processes. the php app has a number of echo/print msgs to track what's
> going on for testing.. when running as a background process the shell
> script/php app isn't working.
>
> the cmdline sits.. when i select the "return" key.. the process is
> diplayed as being stopped...
>
> if i remove the background "&" the shell script runs...
>
> #### -- not working
> /apps/parseapp2/webservice_setup.sh 1>&2&
>
> #### -- works
> /apps/parseapp2/webservice_setup.sh
>
> /apps/parseapp2/webservice_setup.sh
> -------------------------------
> echo "starting the osu webservice test"
> mysql -uroot1 -pfoo< /apps/parseapp2/setup_tblDb.sql
> mysql -uroot1 -pfoo< /apps/parseapp2/webservice/webservice_tbls.sql
> /apps/parseapp2/parse_tbl_setup.php
> echo "started the osu webservice test"
>
>
> thoughts???
>
> thanks
>
>
>
>
>
> On Tue, Mar 27, 2012 at 9:37 PM, Mark LaPierre<marklapier(a)aol.com> wrote:
>> Check out the redirection at the end of each command. 1>&2 redirects the
>> standard out of your child command to the standard error which then appears
>> in the parent shell. At the end the last& launches your command into a
>> background shell and then moves on to launch the next command. The
>> redirections don't care if the command ever terminates.
>>
>> The result is that both commands are launched and the parent shell
>> terminates leaving the standard error attached to the terminal that the
>> parent was launched in.
>>
>>
>> On 03/27/2012 09:08 PM, bruce wrote:
>>>
>>> marklapier(a)aol.com
>>>
>>> hey mark....
>>>
>>> what you have, appears to be pretty close to what i had... except my
>>> tests never ended... the loops are infinite...
>>>
>>> can i do a fpaste and have you take a look at what i have?
>>>
>>> -btuce
>>>
>>>
>>> On Tue, Mar 27, 2012 at 9:00 PM, Mark LaPierre<marklapier(a)aol.com> wrote:
>>>>
>>>> On 03/27/2012 05:25 PM, bruce wrote:
>>>>>
>>>>>
>>>>> hi.
>>>>>
>>>>> got a couple of test bash scripts.
>>>>>
>>>>> dog.sh, cat.sh
>>>>> each script runs the underlying php in an endless loop.
>>>>>
>>>>> I'm trying to figure out how to run the scripts in parallel, from the
>>>>> same parent shell script. something like:
>>>>>
>>>>> test.sh
>>>>>
>>>>>
>>>>> where dog.sh would be :
>>>>> --------------------------------
>>>>> while true
>>>>> do
>>>>> pgrep dog
>>>>> if [ $? -ne 0 ]
>>>>> then
>>>>> /dog.php
>>>>> fi
>>>>> sleep 5
>>>>> done
>>>>>
>>>>> my current tests, run dog.sh, which runs the dog.php ... but the test
>>>>> never gets to run cat.sh
>>>>>
>>>>> thoughts/comments...
>>>>>
>>>>> thanks
>>>>
>>>>
>>>> Hey Bruce,
>>>>
>>>> Do you mean to run these subprograms in parallel or in series?
>>>>
>>>> cat.sh
>>>> #! /bin/bash
>>>>
>>>> CAT=0
>>>> until [ $CAT -eq 10 ]
>>>> do
>>>> echo "Inside a dog it's too dark to read. $CAT"
>>>> CAT=$[$CAT + 1]
>>>> sleep 2
>>>> done
>>>>
>>>>
>>>> dog.sh
>>>> #! /bin/bash
>>>>
>>>> DOG=0
>>>> until [ $DOG -eq 10 ]
>>>> do
>>>> echo "Next to a dog a book is man's best friend. $DOG"
>>>> DOG=$[$DOG + 1]
>>>> sleep 2
>>>> done
>>>>
>>>>
>>>> test.sh
>>>> #! /bin/sh
>>>>
>>>> /home/mlapier/test/dog.sh 1>&2&
>>>> /home/mlapier/test/cat.sh 1>&2&
>>>>
>>>>
>>>> [mlapier@mushroom test]$ ./test.sh
>>>> [mlapier@mushroom test]$ Next to a dog a book is man's best friend. 0
>>>> Inside a dog it's too dark to read. 0
>>>> Next to a dog a book is man's best friend. 1
>>>> Inside a dog it's too dark to read. 1
>>>> Next to a dog a book is man's best friend. 2
>>>> Inside a dog it's too dark to read. 2
>>>> Next to a dog a book is man's best friend. 3
>>>> Inside a dog it's too dark to read. 3
>>>> Next to a dog a book is man's best friend. 4
>>>> Inside a dog it's too dark to read. 4
>>>> Next to a dog a book is man's best friend. 5
>>>> Inside a dog it's too dark to read. 5
>>>> Next to a dog a book is man's best friend. 6
>>>> Inside a dog it's too dark to read. 6
>>>> Next to a dog a book is man's best friend. 7
>>>> Inside a dog it's too dark to read. 7
>>>> Next to a dog a book is man's best friend. 8
>>>> Inside a dog it's too dark to read. 8
>>>> Next to a dog a book is man's best friend. 9
>>>> Inside a dog it's too dark to read. 9
>>>>
>>>>
>>>>
>>>> --
>>>> users mailing list
>>>> users(a)lists.fedoraproject.org
>>>> To unsubscribe or change subscription options:
>>>> https://admin.fedoraproject.org/mailman/listinfo/users
>>>> Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
>>>> Have a question? Ask away: http://ask.fedoraproject.org
>>
>>
12 years, 1 month
Re: parallel bash scripts
by Mark LaPierre
On 03/27/2012 09:37 PM, Mark LaPierre wrote:
> Check out the redirection at the end of each command. 1>&2 redirects the
> standard out of your child command to the standard error which then
> appears in the parent shell. At the end the last & launches your command
> into a background shell and then moves on to launch the next command.
> The redirections don't care if the command ever terminates.
>
> The result is that both commands are launched and the parent shell
> terminates leaving the standard error attached to the terminal that the
> parent was launched in.
>
> On 03/27/2012 09:08 PM, bruce wrote:
>> marklapier(a)aol.com
>>
>> hey mark....
>>
>> what you have, appears to be pretty close to what i had... except my
>> tests never ended... the loops are infinite...
>>
>> can i do a fpaste and have you take a look at what i have?
>>
>> -btuce
>>
>>
>> On Tue, Mar 27, 2012 at 9:00 PM, Mark LaPierre<marklapier(a)aol.com> wrote:
>>> On 03/27/2012 05:25 PM, bruce wrote:
>>>>
>>>> hi.
>>>>
>>>> got a couple of test bash scripts.
>>>>
>>>> dog.sh, cat.sh
>>>> each script runs the underlying php in an endless loop.
>>>>
>>>> I'm trying to figure out how to run the scripts in parallel, from the
>>>> same parent shell script. something like:
>>>>
>>>> test.sh
>>>>
>>>>
>>>> where dog.sh would be :
>>>> --------------------------------
>>>> while true
>>>> do
>>>> pgrep dog
>>>> if [ $? -ne 0 ]
>>>> then
>>>> /dog.php
>>>> fi
>>>> sleep 5
>>>> done
>>>>
>>>> my current tests, run dog.sh, which runs the dog.php ... but the test
>>>> never gets to run cat.sh
>>>>
>>>> thoughts/comments...
>>>>
>>>> thanks
>>>
>>> Hey Bruce,
>>>
>>> Do you mean to run these subprograms in parallel or in series?
>>>
>>> cat.sh
>>> #! /bin/bash
>>>
>>> CAT=0
>>> until [ $CAT -eq 10 ]
>>> do
>>> echo "Inside a dog it's too dark to read. $CAT"
>>> CAT=$[$CAT + 1]
>>> sleep 2
>>> done
>>>
>>>
>>> dog.sh
>>> #! /bin/bash
>>>
>>> DOG=0
>>> until [ $DOG -eq 10 ]
>>> do
>>> echo "Next to a dog a book is man's best friend. $DOG"
>>> DOG=$[$DOG + 1]
>>> sleep 2
>>> done
>>>
>>>
>>> test.sh
>>> #! /bin/sh
>>>
>>> /home/mlapier/test/dog.sh 1>&2&
>>> /home/mlapier/test/cat.sh 1>&2&
>>>
>>>
>>> [mlapier@mushroom test]$ ./test.sh
>>> [mlapier@mushroom test]$ Next to a dog a book is man's best friend. 0
>>> Inside a dog it's too dark to read. 0
>>> Next to a dog a book is man's best friend. 1
>>> Inside a dog it's too dark to read. 1
>>> Next to a dog a book is man's best friend. 2
>>> Inside a dog it's too dark to read. 2
>>> Next to a dog a book is man's best friend. 3
>>> Inside a dog it's too dark to read. 3
>>> Next to a dog a book is man's best friend. 4
>>> Inside a dog it's too dark to read. 4
>>> Next to a dog a book is man's best friend. 5
>>> Inside a dog it's too dark to read. 5
>>> Next to a dog a book is man's best friend. 6
>>> Inside a dog it's too dark to read. 6
>>> Next to a dog a book is man's best friend. 7
>>> Inside a dog it's too dark to read. 7
>>> Next to a dog a book is man's best friend. 8
>>> Inside a dog it's too dark to read. 8
>>> Next to a dog a book is man's best friend. 9
>>> Inside a dog it's too dark to read. 9
>>>
>>>
>>>
>>> --
>>> users mailing list
>>> users(a)lists.fedoraproject.org
>>> To unsubscribe or change subscription options:
>>> https://admin.fedoraproject.org/mailman/listinfo/users
>>> Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
>>> Have a question? Ask away: http://ask.fedoraproject.org
>
12 years, 1 month