How to prevent GPG from showing its head text - gnupg

Can any one know how to delete the head text of gpg about license when we launch it. For example
gpg2 --delete keyname
gpg (GnuPG) 2.0.14; Copyright (C) 2009 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law
Thanks

From man gpg:
--no-greeting
Suppress the initial copyright message.

Related

Can't disable pagination in gdb

I can't seem to disable pagination in gdb. I've read all of the various answers suggesting to add set pagination off or set height 0 or set height unlimited to my ~/.gdbinit file, and I've tried all of them, but gdb seems to be ignoring them all. When I start gdb, it is clearly reading the ~/.gdbinit file, as I am able to set the auto-load safe-path, however every time I start, I have to hit enter again to start gdb, which is intensely frustrating. It's as if it's just completely ignoring the pagination off command. I've also tried adding these commands to the system-wide gdbinit (in /etc/gdb/gdbinit), but this didn't work either.
For what it's worth, I'm running Xubuntu 18.04 with GDB version (GNU gdb (Ubuntu 8.1-0ubuntu3.2) 8.1.0.20180409-git). The .gdbinit file currently reads:
set auto-load safe-path /
#set height 0
#set height unlimited
set pagination off
EDIT: To clarify, for various reasons I have to have my terminal fairly short (~13 lines or so). When I start GDB, I am greeted by the following:
GNU gdb (Ubuntu 8.1-0ubuntu3.2) 8.1.0.20180409-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
---Type <return> to continue, or q <return> to quit---
After hitting <return>, the rest of the intro message is displayed, and I can start using GDB. This is not desirable behaviour for me, and I would prefer if this pagination did not occur.
After hitting , the rest of the intro message is displayed, and I can start using GDB.
Reproduced.
The issue is that GDB prints the copyright banner before it reads ~/.gdbinit. Since the copyright doesn't fit, and since the .gdbinit hasn't yet been read, you get the pagination prompt.
Solution is trivial: suppress the copyright banner, like so: gdb -q ....

kgdb virtualbox target returning error code 22

I'm trying to debug a live Linux kernel running on virtualbox. I added the appropriate settings in the kernel (using the .config file, by enabling KGDB and adding the debug info in the kernel).
My serial port is a named pipe (socket) which I then redirect using socat to get the corresponding PTY.
$ socat -d -d ./slackpipe PTY
2015/03/16 00:04:02 socat[2723] N opening connection to AF=1 "./slackpipe"
2015/03/16 00:04:02 socat[2723] N successfully connected from local address AF=1 "\x82q\xEE\x7E"
2015/03/16 00:04:02 socat[2723] N successfully connected via <anon>
2015/03/16 00:04:02 socat[2723] N PTY is /dev/pts/15
2015/03/16 00:04:02 socat[2723] N starting data transfer loop with FDs [3,3] and [4,4]
Then I fire up gdb with the corresponding vmlinux file and target the PTY obtained from the socat above
$ gdb vmlinux
GNU gdb (Ubuntu 7.7-0ubuntu3.1) 7.7
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from vmlinux...done.
(gdb) c
The program is not being run.
(gdb) target remote /dev/pts/15
Remote debugging using /dev/pts/15
qTStatus: Target returns error code '22'.
kgdb_breakpoint () at kernel/kgdb.c:1748
1748 kernel/kgdb.c: No such file or directory.
qTStatus: Target returns error code '22'.
What I do not understand is, this never used to be happen earlier. All of a sudden this seems to be appearing.
Keen for your input

sed works quite different in two servers

I run below command with the same file on two servers, the test.txt size is 270m.
Server A runs only 9s, Server B runs about 1500s.
sed -i "s/aaa/bbb/g" test.txt;
I have checked the linux version and sed version by below command as well, they're almost the same except the server name. And both servers are with the same hardware set(3T mem, 64 core).
uname -a
Linux serverA 2.6.32-431.17.1.el6.x86_64 #1 SMP Fri Apr 11 17:27:00 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux
uname --version
uname (GNU coreutils) 8.4
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by David MacKenzie.
sed --version
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,
to the extent permitted by law.
GNU sed home page: <http://www.gnu.org/software/sed/>.
General help using GNU software: <http://www.gnu.org/gethelp/>.
E-mail bug reports to: <bug-gnu-utils#gnu.org>.
Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.
Any idea to check the cause? Thanks a lot.
Two thing could explain that behaviour. The most probable is that the file resides on filesystems with different performances on each machine. Use the df command to learn what filesystem is used:
df -kh <path to the directory where the file is>
It could very well be that for the fast machine it is a local filesystem, and for the slow machine it is a remote (network) filesystem. Or both remote filesystem but one on a fast network and the other one on a slower network.
The other possibility would be that one machine is being heavily used by other processes, eating all the RAM for instance, or all the CPUs, while the other one is not. You can check the current global load of the machine with the uptime command.
The first step to find the culprit would be to verify the behaviour is reproduced every time, and then enquiry about the actual physical location of the file from each computer's point of view.

How do you compile Winff?

I downloaded the WinFF source code in the hopes the new version would solve a segfault.
It's sitting, extracted, in its folder. But I see no ./configure, nothing make would know what to do with, no binaries, and no compilation instructions:
$ ls
AUTHORS COPYING README-Presets.txt unit2.lfm unit4.pas winff.1 winff.rc
changelog.txt docs README.txt unit2.pas unit5.lfm winff.ico
clean.bat languages RESOURCES.RC unit3.lfm unit5.pas winff-icons
clean.sh potranslator.pas unit1.lfm unit3.pas unit6.lfm winff.lpi
COMPILE.TXT presets.xml unit1.pas unit4.lfm unit6.pas winff.lpr
Does anyone know how I can try to actually compile the code?
All we get is a README.txt:
Winff - graphical video and audio batch converter using ffmpeg or
avconv Copyright © 2006-2012 Matthew Weatherford
http://www.winff.org
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at
your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/.
WinFF is a GUI for the command line video converter FFmpeg or avconv.
Get the latest ffmpeg builds and source from http://ffmpeg.org/
The answer is in COMPILE.TXT:
winff is compiled with lazbuild -B winff.lpr or manually in the
Lazarus IDE.

How to make gdb run a user-defined function (defined in .gdbinit) everytime it starts?

I have a set of basic breakpoints defined in a user-defined fn setup in my .gdbinit. So, every time i start gdb, I have to execute that fn. to set all my brkpoints , before I start debugging. Can I configure my .gdbinit so that whenever it starts , it first executes my user-defined fn setup ?
Just call it by function name:
My .gdbinit:
define setup
echo Foobar\n
end
setup #This is the function call
And when I run it:
$ gdb
GNU gdb Fedora (6.8-37.el5)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Foobar
(gdb)

Resources