The small linux problem thread

CTRL-ESC is exactly the same escape sequence as ESC by itself (0x1B). It’s not possible for any console program to tell the difference, unless it does tricky, low-level reading of the keyboard.

1 Like

I ended up mapping it in the iterm which works but idk if I’ll stick with it. I want to use hotkeys that are portable, but I also don’t like ctrl-b or ctrl-a.

why not just tar [read not tar.gz] the file and then encrypt that then. No compression and should be a quick conversion?

Or am I missing something else in your workflow?

1 Like

try to install linux-firmware and realtek/atheros-firmware

I’m not sure I follow. So I make a .tar archive and then add that to another archive?

Tar is an archive with no compression. You had mentioned that you just wanted to archive with nor compression since the data is negligeably compress-able. Right?

I see, you are trying to use the built in ecryption feature of 7zip. In that case, i see what younare saying. You don’t want to have to do multiple steps, like run through a separate encryption process.

1 Like

Yeah. I ultimately resolved the issue today by transferring the files to my windows pc and zipping them up with winrar.
But that’s not really a good solution. I’ll have to look more into it later.

Got any ideas?

Well, two solutions present itself.

First off, whenever you want to do something non-standard in Linux, the command line comes to the rescue! According to the 7z man page, this should do the trick:

7z a -mhe=on -pmagic -mx=9 archive.7z Documents/secret

Encrypts and stores the folder ‘secret’ in the Documents folder in the archive archive.7z. -mx=9 set the compression level (1-9 where 9 is highest), -mhe=on sets header encryption to on and -pmagic sets the string ‘magic’ as the password.

This gets complicated fast though, so you might prefer my second solution, which is to install a third party GUI archiver like FreeArc. Might do the trick… :slightly_smiling_face:

1 Like

Is is too bad to store stuff in a container, if compression is irrelevant?
Is 7z just a vessel to encrypt, or actually key to the process?

(have never tried myself, just wondering)

[edit, 7z actually looks pretty easy for this, so sorry for the comperssion]

But I don’t want any compression? The files can’t be compressed in any meaning full way, yet it tries like crazy to do it, so it takes forever, and saves maybe 10 MB on a 50 GB file.

I hadn’t found that, I’ll take a look at :slight_smile:

Probably not, but I wasn’t aware I could make an encrypted file container? What software could I use? And preferably with an gui :slight_smile:
7z is just the vessel, since I want to be able to download the files to any os and extract them if need be.


It seems most containers want a fixed size to begin, from the brief browsing I did.

if I was you, I’d look into Veracrypt

It might allow mounting through a gui, and so mount the encrypted likes like CD’s that you can upload wherever.

There Must be some kind of performance inpact, but no harm in giving it a go and seeing.

Otherwise, luks and gpg were the ones I thought of, but again, I only had a quick look.

I was impressed by this article, the last one talking about Veracrypt?

Okay, so you want an encrypted archive of files that don’t compress well, so no compression?


tar -cf files-unencrypted.tar ./path/to/desired/files
gpg --encrypt --sign -r [email protected] files-unencrypted.tar

First command creates a tar, (tape archive). By default tarballs are not compressed. Second command uses GPG to encrypt all the data in the tarball with your GPG key.


Where does it find the public key? is it stored on the web somewhere?

I presume you have to create a keypair first?

Okay, reading the manual, key gets stored to ~/.gnupg/ but you don’t have to pass a keyfile, it looks up the file corresponding to the email address you provide, I think

1 Like

So earlier I found the DeaDBeeF audio player via this post and in a few hours I got it to look and behave pretty much like my Windows (and WINE) version of foobar2000. The only thing it seems to be missing is a library viewer for whatever strange reason…

I found this GitHub which should fill that need. I realise it is quite old, but I wanted to try it anyway. Unfortunatel when compiling I get this:

[[email protected] deadbeef-librarybrowser]$ make
(CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /home/tarulia/Documents/dev/deadbeef-librarybrowser/missing autoheader)
rm -f stamp-h1
cd . && /bin/sh ./config.status config.h
config.status: creating config.h
config.status: config.h is unchanged
make  all-am
make[1]: Entering directory '/home/tarulia/Documents/dev/deadbeef-librarybrowser'
/bin/sh ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.    -std=c99 -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/fribidi -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/atk-1.0 -pthread  -Wall -Werror  -g -O2 -Wall -g -MT ddb_misc_filebrowser_GTK2_la-filebrowser.lo -MD -MP -MF .deps/ddb_misc_filebrowser_GTK2_la-filebrowser.Tpo -c -o ddb_misc_filebrowser_GTK2_la-filebrowser.lo `test -f 'filebrowser.c' || echo './'`filebrowser.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -std=c99 -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/fribidi -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/atk-1.0 -pthread -Wall -Werror -g -O2 -Wall -g -MT ddb_misc_filebrowser_GTK2_la-filebrowser.lo -MD -MP -MF .deps/ddb_misc_filebrowser_GTK2_la-filebrowser.Tpo -c filebrowser.c  -fPIC -DPIC -o .libs/ddb_misc_filebrowser_GTK2_la-filebrowser.o
In file included from /usr/include/gtk-2.0/gtk/gtkobject.h:37,
                 from /usr/include/gtk-2.0/gtk/gtkwidget.h:36,
                 from /usr/include/gtk-2.0/gtk/gtkcontainer.h:35,
                 from /usr/include/gtk-2.0/gtk/gtkbin.h:35,
                 from /usr/include/gtk-2.0/gtk/gtkwindow.h:36,
                 from /usr/include/gtk-2.0/gtk/gtkdialog.h:35,
                 from /usr/include/gtk-2.0/gtk/gtkaboutdialog.h:32,
                 from /usr/include/gtk-2.0/gtk/gtk.h:33,
                 from filebrowser.c:35:
/usr/include/gtk-2.0/gtk/gtktypeutils.h:236:1: error: ‘GTypeDebugFlags’ is deprecated [-Werror=deprecated-declarations]
  236 | void            gtk_type_init   (GTypeDebugFlags    debug_flags);
      | ^~~~
In file included from /usr/include/glib-2.0/gobject/gobject.h:24,
                 from /usr/include/glib-2.0/gobject/gbinding.h:29,
                 from /usr/include/glib-2.0/glib-object.h:22,
                 from /usr/include/glib-2.0/gio/gioenums.h:28,
                 from /usr/include/glib-2.0/gio/giotypes.h:28,
                 from /usr/include/glib-2.0/gio/gio.h:26,
                 from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
                 from /usr/include/gtk-2.0/gdk/gdk.h:32,
                 from /usr/include/gtk-2.0/gtk/gtk.h:32,
                 from filebrowser.c:35:
/usr/include/glib-2.0/gobject/gtype.h:679:1: note: declared here
  679 | {
      | ^
In file included from /usr/include/gtk-2.0/gtk/gtktoolitem.h:31,
                 from /usr/include/gtk-2.0/gtk/gtktoolbutton.h:30,
                 from /usr/include/gtk-2.0/gtk/gtkmenutoolbutton.h:30,
                 from /usr/include/gtk-2.0/gtk/gtk.h:126,
                 from filebrowser.c:35:
/usr/include/gtk-2.0/gtk/gtktooltips.h:73:3: error: ‘GTimeVal’ is deprecated: Use 'GDateTime' instead [-Werror=deprecated-declarations]
   73 |   GTimeVal last_popdown;
      |   ^~~~~~~~
In file included from /usr/include/glib-2.0/glib/galloca.h:32,
                 from /usr/include/glib-2.0/glib.h:30,
                 from /usr/include/glib-2.0/gobject/gbinding.h:28,
                 from /usr/include/glib-2.0/glib-object.h:22,
                 from /usr/include/glib-2.0/gio/gioenums.h:28,
                 from /usr/include/glib-2.0/gio/giotypes.h:28,
                 from /usr/include/glib-2.0/gio/gio.h:26,
                 from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
                 from /usr/include/gtk-2.0/gdk/gdk.h:32,
                 from /usr/include/gtk-2.0/gtk/gtk.h:32,
                 from filebrowser.c:35:
/usr/include/glib-2.0/glib/gtypes.h:547:8: note: declared here
  547 | struct _GTimeVal
      |        ^~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:552: ddb_misc_filebrowser_GTK2_la-filebrowser.lo] Error 1
make[1]: Leaving directory '/home/tarulia/Documents/dev/deadbeef-librarybrowser'
make: *** [Makefile:417: all] Error 2

Is there an easy way to fix this (preferably without C coding knowledge :confused: )?

Somewhere (likely in your Makefile or Makefile.common) is an error=deprecated-declarations option. Remove that bit, and your compilation will proceed.

1 Like

Unfortunately not :frowning: not even a recursive grep finds anything :confused:

grep -Rn -e 'depracated'
[[email protected] deadbeef-librarybrowser]$ grep -Rn -e 'deprecated'
Makefile:721:                  "legacy program 'compress' is deprecated." >&2
Makefile:728:                  "deprecated." >&2
aclocal.m4:802:             [$0: two- and three-arguments forms are deprecated.])                       "legacy program 'compress' is deprecated." >&2                       "deprecated." >&2
.deps/ddb_misc_filebrowser_GTK2_la-filebrowser.Tpo:110: /usr/include/glib-2.0/glib/deprecated/gallocator.h \
.deps/ddb_misc_filebrowser_GTK2_la-filebrowser.Tpo:111: /usr/include/glib-2.0/glib/deprecated/gcache.h \
.deps/ddb_misc_filebrowser_GTK2_la-filebrowser.Tpo:112: /usr/include/glib-2.0/glib/deprecated/gcompletion.h \
.deps/ddb_misc_filebrowser_GTK2_la-filebrowser.Tpo:113: /usr/include/glib-2.0/glib/deprecated/gmain.h \
.deps/ddb_misc_filebrowser_GTK2_la-filebrowser.Tpo:114: /usr/include/glib-2.0/glib/deprecated/grel.h \
.deps/ddb_misc_filebrowser_GTK2_la-filebrowser.Tpo:115: /usr/include/glib-2.0/glib/deprecated/gthread.h /usr/include/pthread.h \
.deps/ddb_misc_filebrowser_GTK2_la-filebrowser.Tpo:288: /usr/include/cairo/cairo-deprecated.h \
.deps/ddb_misc_filebrowser_GTK2_la-filebrowser.Tpo:301: /usr/include/harfbuzz/hb-deprecated.h /usr/include/harfbuzz/hb-map.h \
autom4te.cache/traces.2:68:dnl Although the argument is deprecated and no longer documented,
autom4te.cache/traces.2:83:dnl Although the argument is deprecated and no longer documented,
autom4te.cache/traces.2:1121:             [$0: two- and three-arguments forms are deprecated.])
autom4te.cache/traces.0:912:dnl Although the argument is deprecated and no longer documented,
autom4te.cache/traces.0:927:dnl Although the argument is deprecated and no longer documented,
autom4te.cache/traces.0:2109:             [$0: two- and three-arguments forms are deprecated.])
config.guess:93:# use `HOST_CC' if defined, but it is deprecated.

And yes, I also tried deprecated-declarations, which doesn’t find anything at all.

The only thing in the Makefile regarding flags seems to be this:

# normal lib
#DEBUG_FLAGS = -g3 -ggdb
ddb_misc_filebrowser_GTK2_la_SOURCES = $(filebrowser_SOURCES)
ddb_misc_filebrowser_GTK2_la_LDFLAGS = -module
ddb_misc_filebrowser_GTK2_la_LIBADD = $(LDADD) $(GTK2_DEPS_LIBS)
ddb_misc_filebrowser_GTK2_la_CFLAGS = -std=c99 $(GTK2_DEPS_CFLAGS) -Wall -Werror $(DEBUG_FLAGS)
ddb_misc_filebrowser_GTK3_la_SOURCES = $(filebrowser_SOURCES)
ddb_misc_filebrowser_GTK3_la_LDFLAGS = -module
ddb_misc_filebrowser_GTK3_la_LIBADD = $(LDADD) $(GTK3_DEPS_LIBS)
ddb_misc_filebrowser_GTK3_la_CFLAGS = -std=c99 $(GTK3_DEPS_CFLAGS) -Wall -Werror $(DEBUG_FLAGS)

I’m just assuming those are the compiler flags, not sure…

removed -Werror (maybe not the best thing?) and it compiles, but the plugin doesn’t seem to do what it’s supposed to :thinking:

I find the 7z command very hard to use, and that it doesn’t fit in Linux very well. For example, using standard input needs shell tricks. The version of 7z on Linux comes with p7zip, a “quick” port to Linux in 2016. p7zip makes it fit, but is a bit old now and doesn’t accept anything like -9 or -mx=9.
xz and lzip use the same LZMA algorithm and give similar results to 7z, but are integrated into Linux well (though lzip can’t run muti-threaded and is slower anyway). For example, GNU tar can pipe its output through them.

I never had a problem the few times I used p7zip, but I was not concerned with encryption, just compressing files then uncompressing the other side. It does seem to have very good compression, but at the expense of speed.

I think-mx=0 turns off the compression all together, but cannot try it at the moment.

can confirm -mx=0 does ignore any compression, resulting in slightly larger, but very quick file.

Please be aware 7z does not store user permissions etc, as per the manual, if that is important; any files extracted will be fair game
(file I tested with, was archived by usera with rw-rw-r and extracted by userb with rw-rw-r and userb’s user and group settings)

1 Like