pgrep -f 'foo' | wc -l -- curiousity!
by bruce
Hey peeps.
From a fed/centos cmdline...
pgrep -f "foo" | wc -l
will return 0 -- if "foo" doesn't exist in the procTBL, and something
else if "foo" is running.
The curiousity... When I have a simple php
<?php
$f="pgrep -f 'foo' | wc -l";
$t=`$f`;
print $t
?>
$t isn't 0!! -- it's actually 1, or something else if foo is running..
Any ideas why?? I've used the different methods php provides to "run"
shell/.cmdline processes. I get the same results.
Now.. I can do something like
ps aux | grep 'foo' | grep -v 'grep' | wc -l
and get the correct results within the php as well as the shell.
Didn't find anything via the 'net or SO on this..
Thoughts/comments??
6 years, 8 months
simple shell script question
by bruce
trying to get the following to output
pgrep -f 'bash' | wc -l
the var $xx has the cmd...
something's missing to allow the backtics to run the cmd..
if the cmd is hadcoded.run, it works..
can't see what the homer simpson "doh" moment is!
thanks
#!/bin/bash
#
# ptest.sh
#
# use predefined variables to access passed arguments
#
# $1
aa=$1
aa='bash'
echo $aa " pp"
xx="pgrep -f '"${aa}"' | wc -l"
echo $xx <<< this dsplays the test pgrep
echo `$xx` << err msg
echo `${xx}` << err msg...
## trying to get -- pgrep -f 'bash' | wc -l <<
## i'm getting a Usage: pgrep [....] err msg..
6 years, 8 months
Fedora 26
by Thomas Dineen
Gentle People:
I hate to interrupt your Fedora 26 party, but well here goes a dose
of reality from the
USER's PROSPECTIVE!
1) First of all F26's performance is very poor. its a CPU hog and DRAM !
I installed F26 in a Virtual Box (VBox)
on a two processor machine and it is so slow that it is barely usable.
In the _same environment_ CentOS performs
with quite excellent performance. You have a massive performance problem
here!
2) Your new menu system is a joke. I use the system for application code
development so I want Text Editor
windows and shells. Why did you hide these in the basement and the very
bottom of the menu system?
Also your menus are slow and cumbersome. What was wrong with the
previous menu system? Is this simply
change for the sake of change? Have your group been taken over by Marketing?
3) Look and feel. Why in the name of hell did you want this look and
feel? I use Linux for application code
development. I want Text Editors, shell Windows, gcc, gdb , and ddd. Why
are all the engineering tools hidden?
If I wanted the look and feel of Windows I would buy windows!
4) Text Editor: Go back to the old one it works way better!
5) Your new Services configuration is a blithering disaster! Please
bring back the configuration GUIs for
Services and Users. Keep in mind here I am not a Linux System
administrator! I am a user! I perform
a complex configuration of user and group numbers to maintain NFS
compatibility with Solaris.
This configuration is difficult even with the GUIs, without them forget it.
6) Cut and paste: I don't know what you did to that! (Well it use to
work)! P.S. Solaris has a great User I/F
GUI for cut and paste.
6) Yum and rpm: Please print to the screen the directories where S/W is
installed. So that I don't have to
waste time going looking for it.
7) Convenience: STOP CHANGING THE CONFIGURATION INTERFACES. Every time
you change the configuration
methodology we the users have to waste hours and even days learning the
new configuration methodology.
8) Are you on drugs? What in the hell gave you the insane idea that a
command line interface for configuration
was some how better that a GUI?
Please consider carefully the possibility that you are going in the
wrong direction!
Overall I continue to be disappointed in Fedora and thank heavens
for CentOS.
Thomas Dineen
6 years, 8 months
Fedora 26 boot messages -
by Bob Goodwin
I prefer not watching the blank screen with the egg turning into an F
and normally remove rhgb from /etc/default/grub.
That is not having the desired effect on this Fedora-26 system.
[root@Box10 bobg]# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.11.11-300.fc26.x86_64
Found initrd image: /boot/initramfs-4.11.11-300.fc26.x86_64.img
Found linux image: /boot/vmlinuz-4.11.10-300.fc26.x86_64
Found initrd image: /boot/initramfs-4.11.10-300.fc26.x86_64.img
Found linux image: /boot/vmlinuz-4.11.8-300.fc26.x86_64
Found initrd image: /boot/initramfs-4.11.8-300.fc26.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-aa89d651e4d748019730a305625d3df0
Found initrd image:
/boot/initramfs-0-rescue-aa89d651e4d748019730a305625d3df0.img
Found Fedora 25 (Twenty Five) on /dev/sdb3
done
It appears to be saving to the wrong system on another hard drive,
Fedora 16 is on /dev/sda:
/dev/sda4 49G 25G 22G 53% /
tmpfs 3.9G 16K 3.9G 1% /tmp
/dev/sda2 976M 167M 742M 19% /boot
/dev/sda1 200M 9.5M 191M 5% /boot/efi
/dev/sda5 858G 13G 802G 2% /home
Obviously this is wrong? Whay should I be doing or is this something I
can no longer change?
Bob
--
Bob Goodwin - Zuni, Virginia, USA
http://www.qrz.com/db/W2BOD
box10 FEDORA-26/64bit LINUX XFCE Fastmail POP3
6 years, 8 months
How to disable the Qt automatic HiDPI scaling?
by Frederic Muller
Hi!
I run GNOME on a 2560x1440 resolution display where I disabled the
"double scaling" (not sure how it's called). So one pixel is one dot.
Unfortunately when running Qt applications such as VLC for example they
autoscale to 1 dot for 4 pixels making those huge and taking most of my
display area. When on dual screen they even recognize which screen is
HiDPI and therefore automatically scale back on the non HiDPI screen
kind of forcing me to run all my Qt apps on that external screen.
Unfortunately I do not always have an external screen to save me...
So is there a way (like with GNOME) to disable this feature and have Qt
apps display "normally"?
Thank you.
Fred
6 years, 8 months
X driver -- sna vs uxa
by Jonathan Ryshpan
These should be easy to find out but they don't seem to be:
What X driver does my system use? If as I suspect it's for intel/Haskel, is it set to use sna or uxa acceleration?
Hardware is:4 core
Intel(R) Core(TM) i5-4460 CPU @ 3.20GHzSoftware is:Fedora-26 with all updatesKernel 4.11.12-200.fc25.x86_64KDE Frameworks 5.36.0
Thanks - jon
6 years, 8 months
XDG – creating submenus
by Angelo Moreschini
Hi,
….after installing 'libre office' on my computer, the lauchers of the
various applications that are part of libre office, were visible on the
desktop individually (in a separate and independent way).
I wanted to group all these launchers, on my desktop, inside a “submenu”
(and this accomplishment can also be a general requirement for displaying
programs grupper by “categories” on the desktop ).
I used the program “xdg-desktop-menu” to accomplice this purpose; so I run
this command line from the terminal
xdg-desktop-menu install /usr/share/desktop-directories/-kde-office.directory
libreoffice-calc.desktop libreoffice-calc.desktop ibreoffice-math.desktop
libreoffice-draw.desktop libreoffice-base.desktop
libreoffice-impress.desktop
*More clearly:*
xdg-desktop-menu install (option install of the command)
kde-office.directory (the <.directory file> that describe the icon and the
libreoffice-calc.desktop way to present the group of programs.
libreoffice-math.desktop the list all the launchers <there .desktop files>
libreoffice-draw.desktop to be groupped)
libreoffice-base.desktop
libreoffice-impress.desktop
the command created this file :
/etc/xdg/menus/applications-merged/kde-office.menu
[angelo_dev@localhost ~]$ cat
/etc/xdg/menus/applications-merged/kde-office.menu
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" "
http://www.freedesktop.org/
<http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd>">
<!-- Do not edit manually - generated and managed by xdg-desktop-menu -->
<Menu>
<Name>Applications</Name>
<Menu>
<Name>kde-office</Name>
<Directory>kde-office.
<Include>
<Filename>libreoffice-calc.
<Filename>libreoffice-calc.
<Filename>libreoffice-math.
<Filename>libreoffice-draw.
<Filename>libreoffice-base.
<Filename>libreoffice-impress.
</Include>
</Menu>
</Menu>
I hoped this was enough for my purpose, but as well this, *the submenu
<office> still not appears on the desktop*
*W*hy this ??
how it works xdg-desktop-menu for creating submenus ???
Regards
thank you
6 years, 8 months
is systemd killing my sessions?
by Neal Becker
Aug 7 11:07:57 nbecker7 systemd-logind: Removed session 154.
I'm trying to use x2go, but it seems when I try to suspend/resume a session
it isn't working - on reconnect a new session is started. Is the system?
The above log message suggests maybe.
In logind.conf I see:
#KillUserProcesses=no
Supposedly, the compiled-in default is "no", but is that not true? (I know,
I could just change the file and reboot but I can't reboot this machine
now).
6 years, 8 months
Disappearing files
by Marmorstein, Robert
Hi all,
Long time Linux user, new Fedora user (well, at least since FC 3), so be gentle.
I installed asterisk and dahdi from source and they were working great, but when I reboot one of two things happens:
1. Ownership of /var/lib/asterisk and /var/run/asterisk is reset from group "asterisk" to "root".
2. The /var/run/asterisk folder disappears completely.
If I change them back, my asterisk setup works fine, but after a reboot, one of those two happens again. What could be mucking with my permissions (and removing a folder!?) in the boot process?
Thanks,
Robert M. Marmorstein
Associate Professor of Computer Science
Longwood University, Ruffner 329
201 High Street, Farmville, VA 23909
434.395.2185
marmorsteinrm(a)longwood.edu
6 years, 8 months
Re: OT: Metapost experts help with soccerball
by Antonio Olivares
-----Inline Attachment Follows-----
It does not have the pentagons filled
with color. This does not make the picture come to
life.
There might be some mathematica
notebooks out there, but they are not free, and cannot
translate to code that we can use such as octave, or
maxima. I have found a Geogebra page which does have
the filled pentagons
https://www.geogebra.org/material/show/id/AfNmbnDD
But I would prefer it be in
metapost. Not all my machines have texlive, not all of
them have java as well. I hope that with a bit of
time, someone who knows metapost can help translate the code
from the hoist point website which is more precise. Or
a more solidly colored geogebra one.
@all,
I have found the following page which may help generate a nice looking soccer ball
https://mathematica.stackexchange.com/questions/118604/3d-graphic-of-socc...
Problem it is for mathematica, converting to maxima, octave, plain gnuplot, or metapost would be optimal.
Best Regards,
Antonio
6 years, 8 months