This is a strange problem and I can't find any info on it. I'm using chromium-browser on Ubuntu 16.04. Whenever I download a file, no matter what type of file it's meant to be, chromium wants to save it as .bin. It doesn't even show what the original extension was supposed to be.
Chromium on Linux – All downloaded files have .bin extension
browserchromemime-types
Related Solutions
As found at AskUbuntu:
Java (IcedTea) doesn't have a PPAPI plugin available, and so it's not usable in Chromium, since Chromium 34 in Trusty has switched to the Aura rendering framework and no longer allows NPAPI plugins. See also https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1308783.
I guess it's a same with Oracle Java plugin. At least it works with Firefox so you can use FF until the PPAPI implementation is available.
When you close a GNOME Terminal window, a SIGHUP is sent to the shell that it was running. The shell will typically send a SIGHUP to every process group that it knows it created - even ones started with nohup
- and then exit. If the shell is bash
, it will skip sending a SIGHUP to any process group that the user marked with disown
.
Running a command with nohup
makes it ignore SIGHUP, but the process can change that. When the disposition of SIGHUP for a process is the default, then if it receives a SIGHUP, the process will be terminated.
Linux provides some tools to examine a running process's signal settings.
The chromium-browser shell script does an exec
of the compiled app, so its process ID remains the same. So to see its signal settings, I ran nohup chromium-browser &
and then looked at /proc/$!/status
to see the signal disposition.
SigBlk: 0000000000000000
SigIgn: 0000000000001000
SigCgt: 0000000180014003
Those are hex numbers. This shows that SIGHUP is not caught and is not ignored. Only SIGPIPE (the 13th bit in SigIgn) is ignored. I traced this to the following code:
// Setup signal-handling state: resanitize most signals, ignore SIGPIPE.
void SetupSignalHandlers() {
// Sanitise our signal handling state. Signals that were ignored by our
// parent will also be ignored by us. We also inherit our parent's sigmask.
sigset_t empty_signal_set;
CHECK(0 == sigemptyset(&empty_signal_set));
CHECK(0 == sigprocmask(SIG_SETMASK, &empty_signal_set, NULL));
struct sigaction sigact;
memset(&sigact, 0, sizeof(sigact));
sigact.sa_handler = SIG_DFL;
static const int signals_to_reset[] =
{SIGHUP, SIGINT, SIGQUIT, SIGILL, SIGABRT, SIGFPE, SIGSEGV,
SIGALRM, SIGTERM, SIGCHLD, SIGBUS, SIGTRAP}; // SIGPIPE is set below.
for (unsigned i = 0; i < arraysize(signals_to_reset); i++) {
CHECK(0 == sigaction(signals_to_reset[i], &sigact, NULL));
}
// Always ignore SIGPIPE. We check the return value of write().
CHECK(signal(SIGPIPE, SIG_IGN) != SIG_ERR);
}
Despite the comment, signals ignored by the parent are not being ignored. A SIGHUP will kill chromium.
The workaround is to do what @xx4h points out: use the disown
command in your bash so that, if bash has to exit, it does not send SIGHUP to the chromium-browser
process group. You can write a function to do this:
mychromium () { /usr/bin/chromium-browser & disown $!; }
Best Answer
I quickly found the answer. Silly thing I didn't notice. You have to uncheck automatic file type selection...