Could anyone help me get my NETGEAR WNA3100 (Broadcom BCM43231) wireless adapter to work?

I had exactly the same problem with my WNA3100 and Ubuntu 11.04
After two weeks of trying all suggestions I could find on the net, I succeeded. I hardly know anything about Linux and found it quite simple. You just need the right driver.

Do the following step by step:

plug in the wna3100
open the terminal and type: lsusb
hit enter, you should see something like this:

Bus 001 Device 002: ID 0846:9020 NetGear, Inc.

if the answer is yes go on with the following
create a folder somewhere you could find it easily (name it wifi driver or so)
download the driver from here: (just copy the url, paste it in your web browser and hit enter if the link doesn't work)

http://media.cdn.ubuntu-de.org/forum/attachments/2612284/Broadcom_bcm43xx_USB_32_64bit_v2.tar.gz
You will get a box that ask to open or save the driver file
open it with whatever program you use to unzip (or save it somewhere and unzip it from there)
unzip it to the folder you created in the first step
right click both .inf files, go to tab 'rights' and click on the make file executable box (mine is in dutch so I don't know if the translation is right)
close that window
do the same for the .sys files
now open the windows wireless driver program (download it from ubuntu software center if you don't have it)
browse the .inf file with that program and click install.
never erase the folder where the .inf and .sys files are found
pull out the wna3100
reboot your computer
plug in the wna3100, when it stops blinking open the network manager.
You should be able to see your wireless network.
if yes, then jump up like me and shout yeehaah (or something alike)
if not, i feel really sorry for you, but somehow this worked for me and my ubuntu 11.04.


First you'll want to sudo apt-get update in your terminal and look for any repositories that show 404 or Unable to Fetch ...

You'll then want to open your Software Sources and uncheck those corresponding lines.

If you still have Unable to Fetch archives then you should make sure your mirror is set to Main Server in your Software Sources.

To make sure it's fixed, when you run sudo apt-get update it should never say 404 or Unable to Fetch ...


The best way to install ubuntu with windows is to partition it yourself when you do not have that option. It is in your link at the this section

Also note that you need completely "FREE SPACE" in the partition table. Windows is still able to claim the free space as its own and make it unavailable for partitioning.


How to reset Ubuntu 18.04 to default theme?

It may be easiest for you at this point to reset your theme and icons to the Ubuntu factory defaults with two command in the terminal:

gsettings reset org.gnome.desktop.interface gtk-theme
gsettings reset org.gnome.desktop.interface icon-theme

Open a terminal, copy and paste these two commands and your theme and icons will be reset to those of a freshly installed Ubuntu system.
To change to other installed themes later on, you can use Tweak Tool.


Program compatibilty assistant warning after Unetbootin makes bootable USB

Yes sure, It is just an additional program compatibility feature in windows. You can ignore that error safely.


installing i8kutils stops loud fan noise

I solved the problem with this tutorial;
http://keenformatics.blogspot.com.tr/2013/06/how-to-solve-dell-laptops-fan-issues-in.html


Turn off screen by pressing the power button

You can use xdotool to assign commands to a keyboard button
for example :
xdotool key 121
assigns the command entered  to button F1

You first need to assign the command [xset dpms force off] to keyboard shortcuts [ex F1] found in: system settings -> shortcuts and gestures in kde

You even could trigger the command by drawing a mouse gesture ..

Also, this can be done easily in kde, system settings -> power management

system settings


Are the programs in Ubuntu Software Center spyware free?

Is there a process to ensure there's no malware? No. There are no guarantees at all.

There are, however, several mechanisms to try and detect it but while I don't want to get too doom-and-gloom, if we're honest, you're probably not as safe as you'd like to be.

A project first has to get added to Ubuntu. As Rinzwind says, checks are made at this stage but that's really only the tip of the iceberg that is the life of a package in Ubuntu.
The first real line of defence for long term packages are their project maintainers. These people look after their projects and accept patches to improve them. They are human. They make mistakes and miss things. And some might be lazy.

It is possible that a bad person could sneak some malware past them by including genuine improvements along with the malware.

If something bad is admitted into a project by its maintainer, save a successful audit, chances are that code will end up on Ubuntu users' machines.
Security audits are the second step. This is examining the code and running it against monitors to detect bad things. As far as I know, there isn't an official Canonical team dedicated to security but there are two community teams (Ubuntu Security and MOTU SWAT) that handle all the packages between them.

Auditing only really works if every line of code is checked properly before it goes out to users. This isn't really practical for the amount of code and number of updates we're talking about. It would take a huge amount of time and money to do it this way.

There is an assumption in the open source world that just because somebody can view the source, they have. This is a very dangerous ethos to maintain.

Security fixes are largely reactionary to people finding and disclosing holes. What happens if somebody discloses a hole they find?
Other "end users" reporting problems is the final real detection mechanism and let's be honest, good malware won't let the user know there's a problem until it's far too late to make a difference. Well written malware isn't going to flip your screen or steal all your bandwidth, it's going to sit there in the background, logging all your banking details before it posts them all off to some anonymous dump somewhere.

The whole process depends on upstream projects to maintain their own security levels. If somebody slipped something past the maintainer of the Gnome calculator, chances are it's going to get missed by everybody else down the line. A security-team will never suspect it either.

Thankfully most maintainers are good at what they do. They know their codebase and if they don't understand patches, they'll reject them on the basis that they're not clear enough.

In terms of risk assessment, by using something that is a lot less popular, there are likely fewer eyes checking the code. But similarly there are probably fewer commits, so as long as the maintainer isn't lazy (or evil), they might have more time to deal with each commit. It's hard to say exactly how much risk you're at. Open source software's security depends on capable people looking at the code.

Conversely the closed source items (in the partner and purchase repos) are completely unaudited by the community. Canonical may have some source access, but frankly I doubt they have the resources to give things thorough audits even if they had source access and wanted to.

Similarly with PPAs, you get very little protection unless you want to dive into the source yourself. Users can add whatever they like to the source code and unless you're going to check it out yourself (and you're capable of detecting malware), you're a sheep surrounded by wolves. People can report bad PPAs but something happening depends on other people checking and confirming the problem. If a big site (eg OMGUbuntu) recommended a PPA (as they often do), lots of users may have issues down the line.

To compound the problem, the lower market share of Linux user means there's just less software available for us hunt down bad code. I hate to say it but at least with Windows, you have dozens of companies spending every working day, finding out how bad software works, how to detect it and how to remove it. That was a market born from necessity and while I hate to say this too, things are probably going to get worse here before they get better.

For the security paranoids, I wrote a short article a while ago: Linux isn't invulnerable. Don't say it is.. Sneaking things into the repository probably isn't going to be the primary attack vector for the asshats that distribute malware. It's far more likely (IMO) that they'll play on the greed and stupidity of users to get them to install infected .debs.


How can my audio input always be the webcam microphone?

Changing default settings for PulseAudio
When running pulseaudio all settings can be defined by putting custom configuration files in the hidden .pulse directory in your HOME. If these file do not yet exist there you can use the standard files from /etc/pulse/ as a template. Most entries have verbous explanations in these files.

~/.pulse/default.pa to load modules and define defaults
~/.pulse/client.conf to configure a client for the sound server
~/.pulse/daemon.conf to define sample rates and buffers

To make your webcam the default source we need to know this source's name and number by looking through the list produced by the following command in a terminal:
pacmd list-sources

We then edit the following line in ~/.pulse/default.pa:
set-default-source [name]

and replace [name] by the name or the source number for the desired source. We then need to make sure that the source is unmuted by adding this line:
set-source-mute [name]|[#n]> 0

Give the name or the index of your source. You can add a variety of other settings that are referenced in the PulseAudio Wiki (now on man page: man pulse-cli-syntax).
It is recommended to first test all commands through the command line interface before changing the configuration files. This can be opened with pacmd in a terminal


How do I permanently remove my wireless interface?

The driver is the kernel module ath5k.

You can prevent it from being loaded by adding blacklist ath5k to a new file in /etc/modprobe.d. In a terminal, run:

echo blacklist ath5k | sudo tee /etc/modprobe.d/blacklist-custom.conf

The driver is part of the standard Ubuntu kernel and so cannot be completed removed unless you compile your own kernel excluding it.


There's no Sound Mixer menu, missing menu option in Sound Recorder

The same problem here, couldn't find any solution. I suggest subscribing to the bug at Launchpad - https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/889624


How to remove windows 10 and install a fresh Ubuntu server (20.04)

In the BIOS/UEFI settings, change the disk mode from RAID to to AHCI, and the installer should run.  In the case of wanting to dual boot with Windows, ensure that the AHCI drivers for Windows have been downloaded before you change the disk mode.


Help to recover personal files from encrypted Home folder, Im on USB live USB

If you can see the files, you can change the last step.

Press Alt-F2 and type gksu nautilus + Enter.  This will launch Nautilus with root rights and you should be able to do whatever you want with the files.

I am not 100% sure gksu exists on the Live CD but if it doesn't, go ahead and install it: sudo apt-get install gksu.  It will disappear after the next reboot but it will install normally for you to do your job.


Step one, back up all your data to EXTERNAL MEDIA, which is to say, not a drive internal to your computer.  Even if your D drive is a physically separate drive, it is possible that your data could be overwritten, and I would wager that would make you very unhappy.

Step two, install ubuntu choosing the Side By Side option.  This preserves your windows installation, but does not guarantee that some other error, such as a power failure during the automated partitioning process, could destroy all of your data, (hence step one).


I assume you meant 12.04 LTS. 11.04 is not a LTS, the previous LTS is 10.04.

According to http://packages.ubuntu.com/precise/perl, Ubuntu 12.04 will have Perl 5.14.2. On the same site you'll find other packages. Do note that packages are directly copied from Debian until 29th December 2011 according to the Release Schedule for 12.04.


Why doesn't Canonical use pings from the Update Manager to gauge the size of the Ubuntu installbase?

There are several issues with this level of tracking:

As others have said in this thread, most people use the most geographically "relevant" mirror possible as it speeds things up for them. These mirrors are mostly not under the control of Canonical.

Even if Canonical could grab the remote logs, there'd be international privacy laws to obey which would end up with users perhaps having to agree to multiple agreements depending on the jurisdiction of a chosen server.
Some people don't use public mirrors at all. If you're using Ubuntu in a farm or corporate scenario over dozens or hundreds of machines (anything over three machines would make sense IMO), people proxy the repositories so only the first hit would count.
Some people could just beat on the refresh link all day. Not only would that skquiff the statistics but it would also gum the servers up more than they needed to be.
Sometimes it's better not to know.

It sounds stupid but one of my jobs is maintaining a webapp for a company that several large businesses use to train their employees. I've talked about adding extra data collection so we have a better idea what a user is doing as that would be handy for improvement but if we collect that data (and advertise that fact, as we're required to by UK law), our clients will expect to know the results of our collection.

That's fine if the data shows strong growth (or lots of their employees using the webapp in my case) but if it doesn't, it can really undermine marketing efforts. Not all data can be spun into something positive.

Because the data would not be a full representation of all users, any statistics drawn would be lower than actual values and Microsoft (et al) could very quickly bomb them with a few sales stats.

There is a package for OEM installs called canonical-census but as I've already detailed this only works for OEM installs. Read the link to see how it works but I will say it's slightly better than repo-logging.

I guess one question to ask  you back would be: Why do Canonical need these numbers? Even if they were great results, the problem still exists that there just isn't that much money to market Ubuntu. And if they weren't as stellar as needed for certain advertising claims (or weren't released for that reason), the collection would certainly undermine the project.


I had no keys under desktop/gnome/tumbnailers in gconf-editor on 11.10 and 12.04.
All thumbnails were generated normally, except for movies, because i uninstalled totem.

To use ffmpegthumbnailer i installed it like in upper post:

sudo apt-get install ffmpeg ffmpegthumbnailer gstreamer0.10-ffmpeg

Then deleted thumbnail cache like in upper post:

rm ~/.thumbnails/fail/gnome-thumbnail-factory/*
rm ~/.thumbnails/normal/*

I then made a change in /usr/share/thumbnailers/totem.thumbnailer

from this:

[Thumbnailer Entry]
TryExec=/usr/bin/totem-video-thumbnailer
Exec=/usr/bin/totem-video-thumbnailer -s %s %u %o

to this:

[Thumbnailer Entry]
TryExec=ffmpegthumbnailer
Exec=ffmpegthumbnailer -s %s -i %i -o %o -c png -f -t 10

And exited nautilus:

nautilus -q

It is all working great now. Hope it helps!

If thumbnails still fail to generate, you might need to add the following to /usr/share/thumbnailers/totem.thumbnailer:

MimeType=application/mxf;application/ogg;application/ram;application/sdp;application/vnd.ms-wpl;application/vnd.rn-realmedia;application/x-extension-m4a;application/x-extension-mp4;application/x-flash-video;application/x-matroska;application/x-netshow-channel;application/x-ogg;application/x-quicktimeplayer;application/x-shorten;image/vnd.rn-realpix;image/x-pict;misc/ultravox;text/x-google-video-pointer;video/3gpp;video/dv;video/fli;video/flv;video/mp2t;video/mp4;video/mp4v-es;video/mpeg;video/msvideo;video/ogg;video/quicktime;video/vivo;video/vnd.divx;video/vnd.rn-realvideo;video/vnd.vivo;video/webm;video/x-anim;video/x-avi;video/x-flc;video/x-fli;video/x-flic;video/x-flv;video/x-m4v;video/x-matroska;video/x-mpeg;video/x-ms-asf;video/x-ms-asx;video/x-msvideo;video/x-ms-wm;video/x-ms-wmv;video/x-ms-wmx;video/x-ms-wvx;video/x-nsv;video/x-ogm+ogg;video/x-theora+ogg;video/x-totem-stream;audio/x-pn-realaudio;audio/3gpp;audio/ac3;audio/AMR;audio/AMR-WB;audio/basic;audio/midi;audio/mp2;audio/mp4;audio/mpeg;audio/ogg;audio/prs.sid;audio/vnd.rn-realaudio;audio/x-aiff;audio/x-ape;audio/x-flac;audio/x-gsm;audio/x-it;audio/x-m4a;audio/x-matroska;audio/x-mod;audio/x-mp3;audio/x-mpeg;audio/x-ms-asf;audio/x-ms-asx;audio/x-ms-wax;audio/x-ms-wma;audio/x-musepack;audio/x-pn-aiff;audio/x-pn-au;audio/x-pn-wav;audio/x-pn-windows-acm;audio/x-realaudio;audio/x-real-audio;audio/x-sbc;audio/x-speex;audio/x-tta;audio/x-wav;audio/x-wavpack;audio/x-vorbis;audio/x-vorbis+ogg;audio/x-xm;application/x-flac;

And again run nautilus -q in terminal.


How to make UEFI Ubuntu bootable from MBR drive?

Before going further, you should back up a bit. The key point for system compatibility is not the partition table type; it's the boot loader. Every computer has firmware that controls the boot process, and the boot loader must be able to work with that firmware. For x86 and x86-64 systems, the firmware is usually either the old-style BIOS or the newer EFI (or UEFI, which is just EFI 2.x). Either type of firmware can boot from either MBR or GPT disks, although BIOS systems usually employ MBR and EFI systems usually employ GPT.

The point of this is that you must assess whether the computers you want to boot use BIOSes, EFIs, or a mixture of both, and pick a suitable boot loader. It's possible to install both BIOS-mode and EFI-mode boot loaders, but this can be tricky, especially if you want to use GRUB for both modes. If you must support both boot modes, I recommend using GRUB for BIOS and something else for EFI, or vice-versa. This means you'll have to learn about alternatives to GRUB.

GRUB is available for many different types of firmware, including both BIOS and EFI. An "EFI-mode install" of Ubuntu just means an Ubuntu installation that includes the EFI version of GRUB (or, in principle, some other EFI boot loader, but GRUB is the only one that the Ubuntu installation tools will set up automatically). Note that when you install GRUB in Ubuntu, this involves both setting up a bunch of scripts and copies of binaries in the Linux filesystem and copying relevant pieces to privileged locations on the disk (and, in the case of EFI, registering NVRAM entries). In other words, you cannot install a BIOS-mode GRUB using the EFI-mode GRUB package you have installed on your computer right now. To install a BIOS-mode GRUB, you must do one of a few things:

Install the BIOS-mode GRUB package (grub-pc), which will also uninstall the EFI-mode package
Get the GRUB source code, or perhaps a binary build without actually installing a Debian package, and install it manually (a tricky process)
Install GRUB to the boot medium from a live disk.

In most cases, the Boot Repair tool can be used to install a different variety of GRUB than what's already there. The trick is to boot whatever disk you use to run Boot Repair in the desired boot mode -- if you boot in BIOS mode, Boot Repair will install BIOS-mode GRUB; and if you boot in EFI mode, it will install EFI-mode GRUB. There's also the complication that you want to install to a USB device; I'm not sure if Boot Repair will install GRUB to that disk or try to install to your internal disk.

There's another complication for EFI-mode boots of external disks: Instead of installing to a conventional OS-specific location (EFI/ubuntu, in the case of Ubuntu), the boot loader on removable disks should normally be installed to the fallback filename of EFI/BOOT/bootx64.efi. This may require manual copying of boot loader files.


Ubuntu 16.04 Server black screen after grub

So the issue was with the latest kernel update (4.4.0-108) I downgraded to 104, then installed the latest kernel update 109

The answer to this question: Kernel panic after update to 4.4.0-108-generic solved it for me


No wifi in ubuntu 16.04 after suspended. A reboot is required to get things working

In my case with a lenovo E540 whenever a usb port was used on wakeup the wifi would not work but when no USB was plugged in the wifi was waking up fine

You might want to try unplugging usb ports on wakeup and plug them in a few seconds

I realize this is just a workaround or it can be used to find the source of the problem.


How to install Ubuntu Core to x86 (actually ARMv7) architecture board (BPi-M1)?

Your title contradicts your question, ARM is not x86, they are two different architectures, you need Ubuntu for ARM not x86.

As you use Banana pi specifically, you can take your pick of images for that device on there website.

The Ubuntu versions available are Lubuntu and Ubuntu, no versions are given on the page but the Ubuntu at least is 15.04 and that may be an issue but there are many more distributions to choose from.


If you are able to boot in Windows the BIOS can be re-flashed with the Y50-70 Laptop BIOS Update If you are not able to boot then you will not be able to run the BIOS update. You will have to send the laptop to Lenovo to re-flash the BIOS.

A clip From Phoronix - Ubuntu 17.10 Temporarily Pulled Due To A BIOS Corrupting Problem:

Should your BIOS be corrupted, you may need to replace your motherboard if there is not a removable flash chip. There are some reports that resetting the BIOS does work, but it's too early to know if that works for everyone. This issue has been confirmed for several different lines of Lenovo laptops including the Yoga and IdeaPad products. There is also the reports of it affecting a few Acer, Toshiba and Dell laptops.

When the BIOS is corrupted by the Intel SPI kernel driver, the effects range from being unable to save BIOS settings to no longer being able to boot from USB devices.

The Intel SPI kernel driver is responsible for reading/writing to SPI serial flash. Due to the SPI serial flash holding the BIOS and other platform specific data, Intel's driver is supposed to make the contents read-only, but clearly something is going awry with the driver in 17.10.


How do I disable displaying the current directory size in SSH?

That computation is done in your bash "Prompt" (see man bash). Edit your ~/.bashrc and look for where the PS1 value is defined.


You don't have enough room on /boot (Where the kernel is stored) for the operation to continue. You'll need to allocate more space in /boot before you continue. Typically each kernel needs about 17M of space.

You can delete older kernel installs (sometimes using sudo apt-get autoremove) Or by just uninstalling that specific version kernel. It's strongly recommended you keep at least two working kernel versions in case something in your more recent Kernel goes awry.


utorrent server, libssl.so.1.0.0: wrong ELF class: ELFCLASS64

Install the 32 bit version of libssl

sudo apt-get install libssl1.0.0:i386

Note all the other libraries are 32 bit.  The libcrypto should be in that package also.


I don't think you want to try 4.16.9 but
Go to: http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.16.9/
Select the files:

linux-headers-4.16.9-041609_4.16.9-041609.201805161024_all.deb
linux-headers-4.16.9-041609-generic_4.16.9-041609.201805161024_amd64.deb
linux-image-unsigned-4.16.9-041609-generic_4.16.9-041609.201805161024_amd64.deb
linux-modules-4.16.9-041609-generic_4.16.9-041609.201805161024_amd64.deb

for downloading to a directory, say ~/Downloads.
Then change to the directory, confirm they have finished downloading and install the new kernel:
$ cd ~/Downloads
$ ll *.deb
-rw-rw-r-- 1 rick rick 10956316 May 16 21:59 linux-headers-4.16.9-041609_4.16.9-041609.201805161024_all.deb
-rw-rw-r-- 1 rick rick  1062312 May 16 21:59 linux-headers-4.16.9-041609-generic_4.16.9-041609.201805161024_amd64.deb
-rw-rw-r-- 1 rick rick  7938532 May 16 21:59 linux-image-unsigned-4.16.9-041609-generic_4.16.9-041609.201805161024_amd64.deb
-rw-rw-r-- 1 rick rick 45088060 May 16 21:59 linux-modules-4.16.9-041609-generic_4.16.9-041609.201805161024_amd64.deb
$ sudo dpkg -i *.deb
Selecting previously unselected package linux-headers-4.16.9-041609.
(Reading database ... 603082 files and directories currently installed.)
Preparing to unpack linux-headers-4.16.9-041609_4.16.9-041609.201805161024_all.deb ...
Unpacking linux-headers-4.16.9-041609 (4.16.9-041609.201805161024) ...
Selecting previously unselected package linux-headers-4.16.9-041609-generic.
Preparing to unpack linux-headers-4.16.9-041609-generic_4.16.9-041609.201805161024_amd64.deb ...
Unpacking linux-headers-4.16.9-041609-generic (4.16.9-041609.201805161024) ...
Selecting previously unselected package linux-image-unsigned-4.16.9-041609-generic.
Preparing to unpack linux-image-unsigned-4.16.9-041609-generic_4.16.9-041609.201805161024_amd64.deb ...
Unpacking linux-image-unsigned-4.16.9-041609-generic (4.16.9-041609.201805161024) ...
Selecting previously unselected package linux-modules-4.16.9-041609-generic.
Preparing to unpack linux-modules-4.16.9-041609-generic_4.16.9-041609.201805161024_amd64.deb ...
Unpacking linux-modules-4.16.9-041609-generic (4.16.9-041609.201805161024) ...
Setting up linux-headers-4.16.9-041609 (4.16.9-041609.201805161024) ...
dpkg: dependency problems prevent configuration of linux-headers-4.16.9-041609-generic:
 linux-headers-4.16.9-041609-generic depends on libssl1.1 (>= 1.1.0); however:
  Package libssl1.1 is not installed.

dpkg: error processing package linux-headers-4.16.9-041609-generic (--install):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-image-unsigned-4.16.9-041609-generic:
 linux-image-unsigned-4.16.9-041609-generic depends on linux-base (>= 4.5ubuntu1~16.04.1); however:
  Version of linux-base on system is 4.0ubuntu1.

dpkg: error processing package linux-image-unsigned-4.16.9-041609-generic (--install):
 dependency problems - leaving unconfigured
Setting up linux-modules-4.16.9-041609-generic (4.16.9-041609.201805161024) ...
Errors were encountered while processing:
 linux-headers-4.16.9-041609-generic
 linux-image-unsigned-4.16.9-041609-generic

Then you'll see an error message because of this bug. Now you'll have to fix it using this answer: Unable to upgrade kernel after 4.16.3


Getting "'file' is different from the same file on the system" when I attempt to update through synaptic

Specific answer

Try these commands in a terminal:

sudo dpkg -r libjack-jackd2-0
sudo apt-get -f install
sudo apt-get update
sudo apt-get upgrade

The commands remove the offending file, attempts to fix the broken dependency and updates your system.

General answer

  Errors were encountered while processing:
  /var/cache/apt/archives/libjack-jackd2-0_1.9.8~dfsg.2-1precise1_i386.deb
  E: Sub-process /usr/bin/dpkg returned an error code (1)

If you are getting an E: Sub-process /usr/bin/dpkg returned an error code (1) (Should be error code (1)), you can attempt to fix this with the following things in mind:

Take note of the package name after /var/cache/apt/archives/. In this case, the filename is libjack-jackd2-0_1.9.8~dfsg.2-1precise1_i386.deb, so the package name is libjack-jackd2-0 (take the filename up until the first '_', generally). With these in mind, just run the following commands:

sudo dpkg -r libjack-jackd2-0
sudo apt-get -f install
sudo apt-get update
sudo apt-get upgrade


HP Laser Jet Pro P1102 shared from Winows 7 Pro

Answer to this was quite obvious...
For Ubuntu 12.04 and printer HP Laser Jet Pro P1102 over network. You need to:
download and install HPLIP
http://hplipopensource.com/hplip-web/models/laserjet/hp_laserjet_professional_p1102.html
Add in system settings -> printing add new printer. And when the "select drivers" dialog appear chose HP -> LaserJet Pro P1102 (not proffesional) the driver there is Foomatic/foo2zjs-z2 Thats it.
Happy Printing...


Enabling OpenGL in Windows 10 Guest VM in QEMU

Thanks Christian for the feedback.  I did try to use spice with GL, but kept getting an error trying to start the VM with it enabled and didn't go down that rabbit hole yet.  I had passed through that GPU to my VM and no matter what I tried to do, updating Windows or drivers, trying to delete the other display and video through virt-manager (couldn't seem to delete them all), OpenGL wasn't showing as installed. Maybe if I'd deleted the display and video from the virsh xml file it would have worked, but I decided to start from scratch and got it to work finally so here are the steps I took if anyone else runs into this in the future.

Pre-requisites

Ubuntu 18.04 with QEMU (I have 3.1.0, would likely be similar with 2.11 or others).  There are a few steps needed for Nvidia cards, not sure what would be needed for AMD.  This guide is what I mostly mimicked to get everything working including my steps below.  This was another one with similar info on Nvidia card setups.

As a note - when I first physically added the GPU, I could no longer access my machine over my network (headless) because adding the GPU changed the network interface which broke my netplan.  Could have connected a monitor, but I have an IPMI port on my MB so connected that way and got the new network interface to update netplan.

Then

Create Windows 10 VM in virt-manager - at the end choose advanced options

In Options - use OVMF bios and Q35 chipset. SeaBIOS doesn't work, had to "sudo apt install ovmf". OVMF can't use IDE drives, so changed to SATA to start (SCSI didn't work either), made Virtio later.

In Options - delete all display and video devices

In Options - pass through PCI devices of GPU video (have monitor directly connected to Nvidia video card) AND audio (failed with only video)

In Options - pass through usb keyboard/mouse (since deleted all display and video options to be safe, couldn't interact remotely)

Start VM and load Windows 10 - on first startup it dropped me straight to the UEFI shell which I had to exit out of and took me to the BIOS where I could go to the boot menu and choose the Win10 iso I'd attached as a CD over SATA to boot from.

After Windows loaded and I'd shut the VM down, I edited the XML per the above guides to be sure I didn't have the Code 43 error with the GPU (specifically adding the 3 lines where noted - "vendor_id state='on' value='1234567890ab'/", "hidden state='on'/", and "ioapic driver='kvm'/").

Load Virtio drivers and utility

Load latest Nvidia drivers

Check for OpenGL and it was finally there.

Installed Sketchup and it ran just fine.

I usually use remote desktop for Windows VM's but I still wanted to try to have the ability to connect from virt-manager, so after it was all working, I did go back and add a VNC display and Virtio video to the VM so I can connect and interact through virt-manager or the like.  This only seems to work if the Nvidia monitor is physically disconnected, otherwise I get a "guest has not initialize the display (yet)" which I'm sure there is a solution for, but I don't plan on having a monitor connected anyway so I have not investigated that.

Thanks for the input here and my previous post Christian, I'll add a short note to the old one as well linking here as they are related.


Any way to automatically set my sound output to HDMI when the cable is plugged in and off when it's plugged out?

Sorry, I don't have the right answer for you but I can offer you the next best thing:
Create a toggle to the next audio output sink with click of the mouse.

Motivation to the solution:
My system has an HDMI port+audio, a USB audio bar and the green audio socket.
When USB audio is selected, my system does not detect when the audio jack of my earphones is (un)plugged. So I am unable to use hardware events and react on them.
Therefor I decided to use pacmd; a tool to manipulate the audio system.
It can be used interactively (pacmd) or with arguments (pacmd --help).

Short description:
A script and a launcher on my Xubuntu panel. A click on the launcher will toggle to the next audio output sink. If any program is playing audio, its audio input sink is forced to the output sink and notify-send is used to inform which audio output sink is active.

Actions:
The number of audio devices and their names are likely different on your system so some (minor) changes to the script are required.
The comments I put in the script (further down) will help to customize it.
Copy & paste the script into a file named ToggleAudioOutput.
Make it executable. Filemanager -> Rightclik -> Permissions -> Tick Allow...
In Terminal -> Change Directory to the location of the file.

  $ chmod +x ToggleAudioOutput

Launcher on Panel:
Right click the panel -> Panel > Add New Items -> Launcher.
Click Add & Close.
On the right the empty launcher appears; right click it.
Properties -> click small plus
Name: ToggleAudioOutput
Command: browse to where you stored the file and click it
Icon: select a nice one
Click Create & Close
Right-click the launcher again -> Move it to a nice spot on the panel.

Link on Desktop:
Open File Manager and browse to the location of ToggleAudioOutput.
Right-click it -> Send to Desktop (create link)

Let me know if its usefull to you !

#!/bin/bash
# -- ToggleAudioOutput -- Script to change audio output sink.
#
# The script is based on the output of this command line.
# Of course the output varies per system. Copy & paste this command line
# in a terminal to find the number of devices and their names.
#
# $ pacmd list-sinks | grep -e 'index:' -e 'alsa.name' | awk 'NR%2{printf "%s",$0;next;}1'
#   index: 0                alsa.name = "HDMI 0"
# * index: 1                alsa.name = "USB Audio"
#   index: 2                alsa.name = "ALC662 rev3 Analog"
#
# Output sequence doesn't change except for the asterix (active device)
# and after (un)plugging usb audio devices. If your system has more or
# less devices, change the case statement accordingly.
##############################################################################
# Determine the current audio output sink, 0, 1 or 2.
OutputIndex=$(pacmd list-sinks | grep '\* index:' | awk '{ print $3 }')

# To force output to USB Audio add the command:  ToggleAudioOutput 1
# in an entry in Session and Startup -> Application Autostart.
if [ "$1" == "1" ]
then OutputIndex=1; Name="USB Audio"
else
   case $OutputIndex in
   0) OutputIndex=1; Name="USB Audio"
      ;;
   1) OutputIndex=2; Name="Speaker/Headphones"
      ;;
   2) OutputIndex=0; Name="HDMI 0"
# I don't use HDMI audio, so delete this and the following line if needed.
      OutputIndex=1; Name="USB Audio"
      ;;
   esac
fi
##############################################################################
# Do the work...
pacmd set-default-sink $OutputIndex
notify-send "Audio output device set to:   >$Name<" -t 5000

# Any programs playing audio? Force them to the current audio output sink.
for InputIndex in $(pacmd list-sink-inputs | grep 'index:' | awk '{print $2}')
do
   pacmd move-sink-input $InputIndex $OutputIndex
done
##############################################################################
#EOF


Why the "service --status-all | grep mysql" get many unrelated result?

service --status-all shows its output on both STDOUT (file descriptor 1) and STDERR (file descriptor 2), with the services for which the status can be determined on STDOUT (indicated by [+] or [-]) and the services whose status can not be determined on STDERR (indicated by [?]).

While doing service --status-all | grep mysql, you are running grep over only the STDOUT of service --status-all, that's why everything showing on STDERR are being shown (along with the possible output of grep).

To get only the desired result, redirect both run redirect both STDOUT and STDERR to grep:

service --status-all |& grep mysql

Test:

Look at the signs inside []:

% service --status-all >/dev/null  ## Discarding STDOUT
 [ ? ]  apport
 [ ? ]  binfmt-support
 [ ? ]  console-setup
 [ ? ]  dns-clean
 [ ? ]  irqbalance
 [ ? ]  killprocs
 [ ? ]  kmod
 [ ? ]  lightdm
 [ ? ]  mysql

% service --status-all 2>/dev/null  ## Discarding STDERR
 [ + ]  acpid
 [ - ]  anacron
 [ - ]  apparmor
 [ + ]  atd
 [ + ]  atop
 [ + ]  avahi-daemon
 [ + ]  bluetooth
 [ - ]  brltty
 [ + ]  cron


what do you mean by system menu? are you using unity or ubuntu classic? ,,,if you are using unity it does not have a drop down menu's like gnome2.x but you can still use the older desktop. log out and at the bottom were it say's session pick ubuntu classic.


I run `sudo apt-get remove python2.7`, can I restore my Ubuntu now?

While reinstalling Ubuntu is probably the easiest way, it's worth pointing out that it's possible to recover without reinstalling everything.

To do this, manually download the python2.7 package (and its dependencies), and manually install them using dpkg (bypassing APT, which requires Python). Once that's installed, apt should work again, and so apt-get install ubuntu-desktop will restore your system. (If apt-get still doesn't work, you might also need to download and install any missing dependencies.)

In the future, if you need to reinstall a package, instead use

sudo apt-get install --reinstall python2.7

or

sudo aptitude reinstall python2.7

which reinstalls the package without having to remove the dependencies.


USB port forwarding in Ubuntu AWS machine from windows client

i will assume you are using Remmina Remote Desktop Client it's installed by default in ubuntu 14.04  , in the dash write Remmina Remote Desktop Client and open it

if not installed you can install it from Ubuntu Software Center

start a new connection

you will find the option to share folders from your local computer as in this photo

for more information about the connection you may check the following Reference


Install Ubuntu Server 13.04 on hard drive and data on another

I'm assuming that you want to put the data for your web sites on this external hard drive.  The best way to do this would probably be to mount the 2TB hard drive in the web server directory, which I'll assume to be /var/www/.

Once you have a file system in the 2TB drive, you can mount it with the mount command temporary, then permanently in the /etc/fstab file.  Assuming that the larger drive is /dev/sdb and the filesystem is /dev/sdb1, the command to mount it is

sudo mount /dev/sdb1 /var/www/

and the line to add to fstab would be

/dev/sdb1 /var/www ext4 defaults 0 0

Note that when mounting, the directory where you mount it needs to exist before hand, and should be empty (the previous contents of that directory will not be accessible after mounting, so if you already have something there, copy over the files to somewhere else, or mount /dev/sdb1 somewhere else first to copy over the files).

Mounting a drive makes it become part of the file system, and from apache's perspective the directory might as well be on the same drive.

Even if this answer is not exactly what you want, I hope that it gives enough insight into mounting for you to apply it to your specific purposes.


Nitrux Icon's Battery indicator symbol is incorrect - how do I fix this?

Depending from where you downloaded the Icons, you may not have the current version of them and yours might not include this particular icon.

As you can see from my screenshot:

The current version of the icon set does contain the icon. If it's not present in yours please update, if not drop a comment on the Icons page at deviantART, I'll check it and see what can be done.


How to upgrade from 12.04.1 LTS to 12.04.4 LTS from USB?

You don't need USB for that because it is not upgrade it is Update !

Open a tty Terminal (Ctrl+Alt+F1) and:

sudo apt-get update
sudo apt-get upgrade

Note:

the first command updates packages list
the second command downloads and updates software installed on your PC


Ubuntu 19.04 | Hibernate not working - swap missing in /etc/fstab

If I am not mistaken to use hybernate you need more than 32 GB swap file. There was a document explainin optimum swapfile sizes for linux kernel. If it is more than 2xRAM size it somehow lags and drops performance if you dont hybernate you can use ideally 0.5xRAM size, it claimed swap size shoudl be 2xRAM size if you plan to use hybernate.

I have found a similar article:
Optimal Swap Size


Should I use 32bit version of ubuntu 12.10 or 64bit version?

With your CPU architecture and your 8GB ram go for the 64bit version.


I assume the executable julia is under ~/julia/ folder. Use the following command in terminal to make a softlink in /usr/local/bin,

sudo ln -s /home/<username>/julia/julia /usr/local/bin

Replace <username> with your actual username. Or,

sudo ln -s "$HOME"/julia/julia /usr/local/bin

Note: you need to use sudo to access /usr/local/bin as it is system directory.

Alternate User level Method (if you do not have root access)

You can create a folder $HOME/bin and put it in path, use the following commands in terminal,

cd
mkdir bin
echo "export PATH=\$HOME/bin:\$PATH" >> ~/.bashrc
. ~/.bashrc

Now create a softlink in $HOME/bin as,

ln -s "$HOME"/julia/julia "$HOME"/bin


Try again.. looks like a temporary problem - or change your Ubuntu Mirror (just remove us-west-1.ec2. from your /etc/apt/sources.list lines) and run sudo apt-get update.


You can use dpkg :

sudo dpkg -P --force-all (name of package)


Try this:

mysqldump -u root -p --all-databases | zip /var/www/html/db-$(date +\%F-\%T).zip

You will only have one file into the zip archive having - as file name.


How do I configure the width of application launcher?

In Ubuntu 11.04 and upwards, you can do this from ccsm.

Open the Unity plugin options and choose the launcher size you would like from there:


Default nodejs that comes with Ubuntu can be executed the following way:

nodejs -v

If you upgrade to the latest using https://github.com/nodesource/distributions, you will be able to execute it with

node -v


Make sure you have the System76 Driver installed, along with all of the latest updates installed.

To install the System76 Driver, open a terminal window by pressing Ctrl+Alt+T, then enter all of the following commands:

sudo add-apt-repository ppa:system76-dev/stable
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install system76-driver


Ubuntu 18.04 can't write on NTFS partition

your windows is putting the "read-only" flag on all detectable ntfs partitions everytime it shuts down or reboots.

If you don't want it to do that, boot to your windows, open up a administator powershell (to do that find powershell in start, right click on it, then select "run as Administrator").

then type :

powercfg -h off


I've found that removing then re-adding the btusb kernel module, then using rfkill unblock bluetooth will bring Bluetooth up. This causes the Bluetooth section of the control panel to start working again, as well as indicator-bluetooth to appear.

If I turn off Bluetooth with either of these, indicator-bluetooth disappears, and neither will work to turn Bluetooth back on again.


18.04 sudo prime-select intel gives ERROR the installed packages do not support PRIME

Try
sudo apt install nvidia-prime

Also, you may need to do as described here:
sudo systemctl disable nvidia-fallback.service

Add
nouveau.blacklist=1

in /etc/default/grub in the line GRUB_CMD_LINUX_DEFAULT
sudo update-grub

Install bbswitch-dkms (sudo apt install bbswitch-dkms), and add bbswitch to /etc/modules.


problme with Uget after unistalling elementary-desktop

It is not a good idea to install additional desktops with Unity, it does not play well with others. Pantheon, aka elementary-desktop, also does not play well with others so combining them is a recipe for disaster.

Essentially, what just happened is Pantheon replaced the existing GTK packages and config files. It also seems to have replaced some GTK modules with Pantheon modules which as you've removed are now completely gone.

I'd suggest saving all of your files and settings that you want to keep before continuing. Once that is done, try uninstalling ubuntu-desktop which will break more stuff but since we have a backup it's ok. Then reinstall the ubuntu-desktop package again to let it reset the stuff that elementary broke.

This is not a guaranteed fix but theoretically it should work. If all else fails a reinstall of the entire system would put it back to a usable state. Then you would move your backed up files back onto the new install.


You are missing the kernel for Ubuntu Vivid. Probably it was remove by accident. So here are the steps.

# Install latest kernel
$ sudo apt-get install linux-generic

# Restart your machine ...

# Recompile the kernel module for Virtualbox
$ sudo /etc/init.d/vboxdrv setup

I had the same problem after trying to install Virtualbox 5.0 on Ubuntu 15.04 and I think I 've removed also the kernel while purging the virtualbox packages.


Sublime Text doesn't run with `sudo` without `-E`

The problem is in the environment set by the sudo command.

The non-functional environment is set because of this line in /etc/sudoers:

Defaults env_keep="https_proxy"

Which affects the environment in different ways, such as:

DISPLAY andXAUTHORITY not set (which cause the problem)
HOME set to /home/root

And probably in other ways as well.

If you wish to keep https_proxy from the previous environment when running sudo (this is often useful in order to be able to use a proxy when running apt-get), change the line to this one:

Defaults env_keep+="https_proxy"

So that the other needed environment variables won't be unset.

Otherwise if you don't have a reason to keep https_proxy from the previous environment when running sudo, you can just remove the whole line altoghether.


Go to your Emacs lisp directory. If you don't know the name of this directory, in Emacs you can type C-h v load-path <RET> and that will list the directories that Emacs search for files to load. Look for the name of a directory beginning with "~/" or "/home/abhishek/": this is your Emacs lisp directory. Check if the files dinotrace.el and sim-log.el are in this directory. If they are not, you can obtain them from the dinotrace-9.4d/lisp/ directory that you have downloaded and simply copy them to your Emacs lisp directory.

Update:

If you don't have such a directory, you can create it and define it in your .emacs configuration file. For instance, in your home directory you can create a directory called emacs. Then edit your .emacs file and add this line to it:

  (setq load-path (cons "~/emacs" load-path))

This command adds your ~/emacs directory to the existing load path.


Cursor is not changing when hovers on links while browsing in Kubuntu 13.04

I had the same problem on linux mint 13 - KDE..

You need to add the line:

gtk-cursor-theme-name="Oxygen_Blue"

to your ~/.gtkrc-2.0-kde4 file.


14.04 ships with an old version of the driver.
Try to update your driver / firmware. Take a look at https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi/core_release


Updated to ubuntu studio 17.10 volume control shortcuts not working

I had a similar problem. My problem was that I was using the Unity GNOME, because I like it better, instead of the new Xorg one. Switching to the new one again solved the problem for me.


12.04 Install Problem , Configuring Hardware

Just after you BIOS finishes displaying its stuff, press shift a few times to make the GRUB menu appear.  Choose Ubuntu advanced options and choose to boot in safe graphics mode.

You should be able to do the install.  After the install if you still have problems (like I did) the do this.

Boot in safe graphics mode again, but this time from the HDD and not the Disk, and log in.  If this doesn't work you can try hit ctl-alt-F1 and log in via the command prompt.

Once in the safe graphics mode open up a terminal by pressing ctl-alt-T [not necassary if you did the ctl-alt-F1 step]

Type these command in one by one.

    sudo apt-get --purge remove xserver-xorg-video-nouveau
    sudo apt-get install linux-headers-`uname -r`
    sudo apt-add-repository ppa:ubuntu-x-swat/x-updates
    sudo apt-get update
    sudo apt-get install nvidia-current
    sudo update-alternatives --config gl_conf
    sudo ldconfig
    sudo update-initramfs -u
    sudo nvidia-xconfig

Reboot.  This worked for me.

Good luck


How to search for an installed app in the Dash when I forgot its name

I frequently type only the first letter of an application's name in order to make an application's icon show in the Dash, for example I type v to show the VirtualBox icon. I have multiple image editors installed, and I can show them all by typing the image editor search term in the Dash search box. I need to add the editor search term after the image term or else the Dash shows the icon for the Image Viewer app too.


Adobe Reader application association issue

Following muktupavels' comment above, i replaced the line Exec=acroread with Exec=acroread %F in /usr/share/applications/AdobeReader.desktop file and this solved the issue.


Is it safe to execute sudo apt-get autoremove after every update

Yes! It actually tells you to run it on most updates.


System Requirements For Installing Ubuntu

Without a semi-recent graphics card, Unity performance will probably suffer. Xubuntu and/or Lubuntu will do just fine, though.


xdotool - segmentation fault (core dumped)

You might be using not real display. To correct this, do:

export DISPLAY=:0
xdotool getmouselocation

If it did not work, this link might be useful.


I can't install ubuntu , due to my old hard drive

You should replace this unreliable disk and reinstall.


Uninstall all the packages which are installed?

See /var/log/apt/history.log for a complete listing of installed packages, with time stamps and commands. Start at the end and work your way backwards.


You can use ImageMagick to convert images in varying ways, and it should be able to this quite easily. First you can split up into to parts (original.png being the source image, and in this case 32x32pixels in size):

convert original.png -crop 32x32 parts-%02d.png

You can then convert it into a animation (use -loop 1 if you don't want it to loop):

convert -loop 0 -page +0+0 ./parts*.png output.gif

Resulting in:

The output PNGs of the first command have a offset included in them, so without the -page +0+0 option the animation ends up like:

There are varying other options you can include (mainly in the second command), such as -delay etc - you can also optimize the animation so it is smaller (and faster to load/render) - e.g. borrowed from here:

convert output.gif -fuzz 10% -layers Optimize optimised.gif

or using gifsicle

gifsicle -O output.gif -o optimised.gif

EDIT: If the frames are transparent, you can set the frames to replace by adding the  -dispose Background option, so when a frame is disposed of when the next one is loaded:

  Example above done without the page option so it shows clearly

The problem with this is you probably can't optimize the resulting image much then - so another way may be to make the frames opaque so the next frame covers the previous.


Why are you so against services? This is exactly what they're for!

The repo-packaged memcached ships with an init.d service that can be controlled and monitored through sudo /etc/init.d/memcached {start|stop|restart|force-reload|status}
And it's pretty simple to write an Upstart script for a Java program:

Starting java processes with Upstart

That gives you sudo start|stop|status myjob access.


hostnamectl is provided by systemd-services package in Ubuntu 14.04. You need to install that package to get the command line utility

sudo apt-get install systemd-services


Yes, the graphics hardware of your computer supports CUDA. However, it appears that the dedicated Nvidia graphics adapter is currently inactive in favour of the integrated Intel graphics.

As a first step you need to ensure that the Nvidia graphics drivers are installed.


Monitors do not have "drivers" really.

I'm also not sure what you're expecting. The external monitor is physically larger than the laptop's internal display, but they both have the same number of available pixels, so any content displayed on the external monitor will indeed be physically larger due to the lower DPI (the pixels themselves are larger, so there are fewer per inch).


Copy, extract and launch a script upon Ubuntu installation

Ok, this is 2 years late, I hope you already found the answer. But, for anyone who is coming here let me share whats worked for me. I used Debian but I think works for ubuntu.

The problem here is here:

in-target cp /cdrom/dev-master.tar.gz /target/home/; \

in-target means in installed operation system folder tree.
/cdrom does not belong to the OS that just had been installed. /cdrom is where the iso is monted on the installation system. So you can remove the in-target parameter:

cp /cdrom/dev-master.tar.gz /target/home/; \


Shift + special key does not work using real vnc viewer in windows to access ubuntu

After spending two days with this issue I have found this thread from 2009: https://bugzilla.gnome.org/show_bug.cgi?id=353304#c21

Solution:
Run in Ubuntu terminal: xmodmap -e 'keycode 23 = Tab'

EDIT: to make the fix permanent run sudo vim /usr/share/X11/xkb/symbols/pc and change the line

  key  <TAB> {  [ Tab,  ISO_Left_Tab    ]   };

to

  key  <TAB> {  [ Tab                   ]   };

After that reboot.


Install the apt-transport-tor package and then:

Edit /etc/apt/sources.list to add the prefix tor+ to your repositories.

deb     tor+http://deb.debian.org/debian unstable main
deb-src tor+http://deb.debian.org/debian unstable main

This will allow apt to run over tor.

Note: Substitute http://deb.debian.org/debian unstable main with the appropriate sources for your distribution.


Navigate to your home directory, press CTRL+H, then find the folder called ".gimpx.x" and delete it. This is where all of your settings are stored for your account, and this will work with most any program... Just delete the hidden folder in your home directory.


The live CD is usually created with a filesystem called squashfs. Squashfs is read only compressed filesystem that allow us to squeeze our system into a single CD. Note that your system has to be about 2GB (this might need some trial an error) to produce a compressed image that fits on the CD. Otherwise, you will have to use a DVD

Creating a live CD from an existing/new installation

Follow the procedure to create a live cd from your current installation.

Set up some variables:

export WORK=~/temp
export CD=~/livecd
export FORMAT=squashfs
export FS_DIR=casper

Replace ~/temp with a path to a temporary
directory in which we will work in.
Replace ~/livecd with a path to the
CD tree.
Make the folder structure.
sudo mkdir -p ${CD}/{${FS_DIR},boot/grub} ${WORK}/rootfs
Now we will need to install some packages:

sudo apt-get update && sudo apt-get install grub2 xorriso squashfs-tools

Now we will copy the current installation, modify the exclude flags to fit your needs:

sudo rsync -av --one-file-system --exclude=/proc/* --exclude=/dev/* \
--exclude=/sys/* --exclude=/tmp/* --exclude=/home/* --exclude=/lost+found \
--exclude=/var/tmp/* --exclude=/boot/grub/* --exclude=/root/* \
--exclude=/var/mail/* --exclude=/var/spool/* --exclude=${WORK}/rootfs \
--exclude=/etc/fstab --exclude=/etc/mtab --exclude=/etc/hosts \
--exclude=/etc/timezone --exclude=/etc/shadow* --exclude=/etc/gshadow* \
--exclude=/etc/X11/xorg.conf* --exclude=/etc/gdm/custom.conf \
/ ${WORK}/rootfs

Note -If you have a separate boot partition, execute this: sudo cp -av /boot/* ${WORK}/rootfs/boot

Note-If you want to copy settings and some files from the home directory then First, define what directories we want to copy:
        CONFIG='.config .gconf Desktop "some-other-folder" "and-another-folder"'
And now we copy that:

    cd ~ && for i in $CONFIG
    do
    sudo cp -rpv --parents $i ${WORK}/rootfs/etc/skel
    done

Nautilus stores its settings in a directory called .config in the home directory, so I added .config to the variable $CONFIG:

Now we chroot into the new system and modify it.

sudo mount  --bind /dev/ ${WORK}/rootfs/dev
sudo mount -t proc proc ${WORK}/rootfs/proc
sudo mount -t sysfs sysfs ${WORK}/rootfs/sys
sudo mount -t devpts devpts ${WORK}/rootfs/dev/pts
sudo chroot ${WORK}/rootfs /bin/bash

The next commands are done in chroot:

LANG=
apt-get update
apt-get install casper

Casper contains live scripts.
If you want an installer too, run this:

apt-get install ubiquity ubiquity-frontend-gtk

Or if you want KDE:

apt-get install ubiquity ubiquity-frontend-kde

Update modules.dep and initramfs:

depmod -a $(uname -r)
update-initramfs -u -k $(uname -r)

Remove non-system users - do not worry, we have copied the settings and data into the "skeleton" of users. That means all new users will have them.

for i in `cat /etc/passwd | awk -F":" '{print $1}'`
do
    uid=`cat /etc/passwd | grep "^${i}:" | awk -F":" '{print $3}'`
    [ "$uid" -gt "999" -a  "$uid" -ne "65534"  ] && userdel --force ${i} 2>/dev/null
done

Clean up:

apt-get clean
find /var/log -regex '.*?[0-9].*?' -exec rm -v {} \;
find /var/log -type f | while read file
do
    cat /dev/null | tee $file
done
rm /etc/resolv.conf /etc/hostname

Exit chroot. exit
Now, we copy the kernel:

export kversion=`cd ${WORK}/rootfs/boot && ls -1 vmlinuz-* | tail -1 | sed 's@vmlinuz-@@'`
sudo cp -vp ${WORK}/rootfs/boot/vmlinuz-${kversion} ${CD}/boot/vmlinuz
sudo cp -vp ${WORK}/rootfs/boot/initrd.img-${kversion} ${CD}/boot/initrd.img
sudo cp -vp ${WORK}/rootfs/boot/memtest86+.bin ${CD}/boot

If you have installed the installer, you will need to do this, so that the installer doesn't install things like casper:

sudo chroot ${WORK}/rootfs dpkg-query -W --showformat='${Package} ${Version}\n' | sudo tee ${CD}/${FS_DIR}/filesystem.manifest
sudo cp -v ${CD}/${FS_DIR}/filesystem.manifest{,-desktop}
REMOVE='ubiquity casper user-setup os-prober libdebian-installer4'
for i in $REMOVE
do
    sudo sed -i "/${i}/d" ${CD}/${FS_DIR}/filesystem.manifest-desktop
done

Unmount what we have mounted:

sudo umount ${WORK}/rootfs/proc
sudo umount ${WORK}/rootfs/sys
sudo umount ${WORK}/rootfs/dev/pts
sudo umount ${WORK}/rootfs/dev

Convert to squashfs:

sudo mksquashfs ${WORK}/rootfs ${CD}/${FS_DIR}/filesystem.${FORMAT}

Make filesystem.size:
echo -n $(sudo du -s --block-size=1 ${WORK}/rootfs | tail -1 | awk '{print $1}') | sudo tee ${CD}/casper/filesystem.size
And md5: find ${CD} -type f -print0 | xargs -0 md5sum | sed "s@${CD}@.@" | grep -v md5sum.txt |sudo tee ${CD}/md5sum.txt
Now grub.cfg:

sudo nano ${CD}/boot/grub/grub.cfg

(replace nano with your fav text editor, it doesn't matter)
Paste this and save:

set default="0"
set timeout=10

menuentry "Ubuntu GUI" {
linux /boot/vmlinuz boot=casper quiet splash
initrd /boot/initrd.img
}

menuentry "Ubuntu in safe mode" {
linux /boot/vmlinuz boot=casper xforcevesa quiet splash
initrd /boot/initrd.img
}

menuentry "Ubuntu CLI" {
linux /boot/vmlinuz boot=casper textonly quiet splash
initrd /boot/initrd.img
}

menuentry "Ubuntu GUI persistent mode" {
linux /boot/vmlinuz boot=casper boot=casper persistent quiet splash
initrd /boot/initrd.img
}

menuentry "Ubuntu GUI from RAM" {
linux /boot/vmlinuz boot=casper nopersistent toram quiet splash
initrd /boot/initrd.img
}

menuentry "Check Disk for Defects" {
linux /boot/vmlinuz boot=casper integrity-check quiet splash
initrd /boot/initrd.img
}

menuentry "Memory Test" {
linux16 /boot/memtest86+.bin
}

menuentry "Boot from the first hard disk" {
set root=(hd0)
chainloader +1
}

Make the CD/DVD!
    sudo grub-mkrescue -o ~/live-cd.iso ${CD}
Test it using a virtual machine!

All credit goes to capink, because the guide is from here.

I copied it from here and made a few edits


Where do I even start if hibernate / un-hibernate is slow?

The official hibernate troubleshooting page is Debugging Kernel Hibernate

However, this forums article looks like it might be more useful (start at comment #4).


Kernel custom building not working due to missing "binary-generic" recipe

If you are looking for Debug Symbols (dbgsym) of unmodified kernel then just download them from the official repository, as documented in these:

How to install a package that contains Ubuntu kernel debug symbols?
Ubuntu Wiki - Debug Symbol Packages

Otherwise for any kernel from other sources (as Debian package).

Ubuntu Wiki - Build Your Own Kernel: Debug Symbols
All you need to do is just install pkg-config-dbgsym package and add skipdbg=false flag to Debian make file (debian/rules)
sudo apt-get install pkg-config-dbgsym
LANG=C fakeroot debian/rules clean
LANG=C fakeroot debian/rules binary-headers binary-generic binary-perarch skipdbg=false

Important Note clean command here is a must after changing config, adding flags or missed to install some build dependencies. So for each try, you need to run clean command, make will reconfigure the build tree with updated and current settings.


Fixing a broken dpkg and apt package manger

Could see only one old kernel from dpkg status, but I'm not sure if it really on the disk.

Anyway:

Make a backup of the DPKG status file

cp /var/lib/dpkg/status /var/lib/dpkg/status.backup0

Clear those manually removed kernels from the DPKG status

Check which line is the package entry

grep -n linux-image-extra-3.13.0-93-generic /var/lib/dpkg/status

Open status for edit (change xxxxx with the line number)

nano +xxxxx /var/lib/dpkg/status

Change its status to deinstall as this example

Package: linux-image-extra-3.13.0-93-generic
Status: install ok installed

to

Package: linux-image-extra-3.13.0-93-generic
Status: deinstall ok config-files

Ctrl+O to save & Ctrl+X to exit
Make the previous step for the following packages

linux-image-3.13.0-93-generic
linux-image-extra-3.13.0-101-generic
linux-image-3.13.0-101-generic

Modify DBus post -install script to skip errors

nano /var/lib/dpkg/info/dbus.postinst

and comment set -e → #set -e (around line # 5)
Continue previous installation

dpkg --configure -a

Fix dependencies

apt -f install


To make the file executable:-

Press CTRL+T to open a terminal.

Enter this command chmod +x /home/hunter/Downloads/minecraft.jar


tar: Child returned status 2

Simple : You got a corrupt package. Please delete, and download a new one: http://ufpr.dl.sourceforge.net/project/marathon/Aleph%20One/2015-06-19/AlephOne-20150619.tar.bz2

About tar :

  From /usr/doc/tar-1.15.1/NEWS , slackware 10.2 , tar version 1.15 -
  Sergey Poznyakoff, 2004-12-20

  Compressed archives are recognised automatically, it is no longer necessary to specify -Z, -z, or -j options to read them.  ( Thus, you
  can now run `tar tf archive.tar.gz'.)

So with an OS from year 2005 or later you can just do:
tar xvf [archive] with tar.gz and tar.bz2.
And around 2009, suffix .xz was also added, for lzma compressed archives.


You should be able to solve this issue by using grep.

To get just the -/+ buffers/cache line, alter your free commands to this:

free -mt | grep buffers/cache >> memory.txt;
free -mt | grep buffers/cache;

To get only the temperatures try:

sensors | grep °C >> temp.txt;
sensors | grep °C;

So using the following script:

#!/bin/bash

clear;
echo "---------------------------RAM Load------------------------------$"
free -mt | grep buffers/cache >> memory.txt;
free -mt | grep buffers/cache;
echo "---------------------------Temperature---------------------------$"
sensors | grep °C >> temp.txt;
sensors | grep °C;

Produces this output:

---------------------------RAM Load------------------------------$
-/+ buffers/cache:       1545        449
---------------------------Temperature---------------------------$
Physical id 0:      N/A  (high = +100.0°C, crit = +100.0°C)
Core 0:             N/A  (high = +100.0°C, crit = +100.0°C)
Physical id 2:      N/A  (high = +100.0°C, crit = +100.0°C)
Core 0:             N/A  (high = +100.0°C, crit = +100.0°C)
aploetz@dockingBay94:~$

For removing the extra text that you don't want, you could try using awk.

$ free -mt | grep buffers/cache | awk '{print $3"\t"$4}'
1588    406

The temperatures will be a bit trickier, but can be done with tr.

$ sensors | grep Physical | tr -d '(),' | awk '{print $7"\t"$10}'
+100.0°C    +100.0°C
+100.0°C    +100.0°C

$sensors | grep Core | tr -d '(),' | awk '{print $6"\t"$9}'
+100.0°C    +100.0°C
+100.0°C    +100.0°C

If you wanted to get rid of the plusses as well, just add '+' to the delete flag:

$ sensors | grep Core | tr -d '(),+' | awk '{print $6"\t"$9}'
100.0°C 100.0°C
100.0°C 100.0°C


I solved the problem. I just added the smbpasswd before I added the user with adduser. I just used smbpasswd -a user again


GPG error while trying to install tor from external repository

In order to be able to install from a secured repository you will need to add their public key to apt.

You should have received an information on where to get the public key from the makers of the repository. Download this key and save it on your drive.

The we can add this key with

sudo apt-key add </path/name_of_downloaded_key_file>


Will I have the option of allowing dual boot during installation?

Yes, the graphical installer will present you with an option to keep Windows. What will happen is that you're asked how much space of the harddisk Windows should have access to, and how much Ubuntu should use. That's just a slider and you can choose 50%, for instance. You should be aware that while Windows is not capable of reading Ubuntus data, Ubuntu is capable of reading and writing to Windows' file system.

The difference between Wubi and a normal install in that regard, is that Wubi installs do not resize the Windows file system, but creates a folder in it where Ubuntu can be "installed". If you've heard of ISO images that's used instead of CD-ROM discs, that is the same type. Instead of simulating a CD-ROM in a file, wubi simulates a harddisk for Ubuntu to use. But this also means Wubi installs usually are less efficient and might also be less stable. A normal install is preferred, and is very easy to do. Just follow the onscreen instructions and you shouldn't have any difficulties.

But please do pay attention. For instance, if you choose not to keep windows, it cannot be undone afterwards. So make sure before you click. :)


What exactly is this Shell Script doing?

This Script takes name of files as inputs and then print the content of those files in a format like this:

cat>FILE_NAME<<'end of FILE_NAME'
"Here goes the content"
End of FILE_NAME

To run this script

sh SCRIPT_NAME.sh fileA fileB fileC ....

The image illustrates more


How do I make modprobe changes permanent?

If you are using a generic synaptic touchpad, but it fails to respond to tapping or scrolling actions under a new installation, you can run the following two commands to immediately make it work:

modprobe -r psmouse
modprobe psmouse proto=imps

To make this change permanent, create a file such as touchpad.conf under /etc/modprobe.d/, and put the following line in it:

options psmouse proto=imps


How can I open ~/Desktop if I click on "Open in terminal" from the Desktop?

Script-less solution

Open Nautiuls in your home folder.
In your home folder, right click on Desktop, click Make link. You will be presented with Link to Desktop file.
Place link on your Desktop. Now whenever you right click on it, and select Open in Terminal it will open terminal with current working directory set as desktop.


Install fancontrol

Also update your BIOS like @psusi suggested.


You shouldn't be worried about partitions (if you are installing Ubuntu for the first time). Just get Ubuntu from here (I recommend using BitTorrent client).
Burn the image you downloaded to any CD/DVD or USB Flash. Insert the disc in the tray and restart your computer. The Ubuntu installer will pop up. Try Ubuntu without installing if you want or install it right away (you can also cancel the installation,obviously). If you still want to partition it yourselves, refer to this article or this one.
I recommend you do not partition the drive yourselves as you can damage your system (as I did). If you do not do the partitioning correctly, Ubuntu will fail to mount the partitions. That's all! Hope it was not boring and it helps! Cheers! :)


How can i speed up abiword 2.9.2 in xubuntu? It runs too slow.

You might consider asking the Abiword team.  Where did you get your installed version?  You should always go for the version presented in the Ubuntu Software Centre.  If you got it anywhere else then get rid of it and re-install from the Ubuntu Software Centre.  If the problem is with the Abiword Ubuntu package, report this as a bug using ubuntu-bug abiword in the terminal.


Temporarily change the mirror you download the packages from:

Open the System Settings from the Session Indicator (this icon in the top right corner in Unity: )
Run Software Sources
Choose Main Server from the Download From drop-down box.

How do I change which mirror I get updates and software from?


How do I/is it possible to remove the Broadcast option from the messaging indicator?

What I did was create the folder ~/.config/indicators/messages/applications-blacklist.  Then inside it, I created a text file called gwibber.indicator with only one line:

/usr/share/applications/gwibber.desktop

Now log out and back in (or kill and restart the panel) and you should see the broadcast item is gone.

The authoritative source for this is here.  It explains how to blacklist items on the messaging menu by using the above procedure.  One thing that is perhaps not explained is how to find the right name to use for the text file (why gwibber.indicator instead of just gwibber for example) and how to find the path to the desktop file.

To find the name, you can simply ls /usr/share/indicators/messages/applications.  The desktop path should be like the one for the gwibber example above, but you can ls /usr/share/applications/ to check it's there.

To add your own application to the messaging menu, you need to create a folder:

mkdir ~/.config/indicators/messages/applications

Then put a text file with the a path to the application's desktop file; I think you can pick any name here.

References:

How can I remove "Set Up Mail" and other entries from the message indicator?


Making network connection "available to all users" and "connect automatically" has no effect

1: That VPN connections do not auto-connect is a known problem.

"NetworkManager does not auto-connect to VPNs marked "Connect Automatically"

https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/280571

2: The other user possibly can't connect because they can't access credentials files stored in your home directory.  Look in /etc/NetworkManager/system-connections/myvpncnnctn. Do you see file references in there such as cert=/home/X/openvpn/foo.crt? These may fail to be accessible to other users, e.g., because X's home directory is encrypted.

3: Failing that, it's possible the other user can't connect because the VPN password is stored in X's keyring. If this is your problem then change password-flags in the [vpn] section from 1 to 0 and add your password to the [vpn-secrets] section.

[vpn-secrets]
password=your_password

Double-check that the file in question is only readable by its owner (root).

Ref: https://bugzilla.redhat.com/show_bug.cgi?id=710552#c3

Similar question and answer: Connect/disconnect from VPN from the command line


I've had the same problem. I resolved it by running the command

sudo prime-select nvidia

and rebooting.

After reboot I was able to open nvidia X server settings.


Text editor disappeared in LibreOffice Math

One slightly blunt fix is to close all of your LibreOffice windows down and then rename your user details. This will allow LibreOffice to receate the defaults which may be enough to bring your window back!

Trusty Tahr has LibreOffice 4 so for this Ubuntu release run the following:

mv -v $HOME/.config/libreoffice/4/user $HOME/.config/libreoffice/4/user_bak

Then reopen LibreOffice Math and hopefully all will be well...


This problem has now been solved, for those of you which are having the same problem as I did use this as your JVM Arguments:

-Xmx1G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=16M


Trying to figure out what the command mean

-q runs wget in quiet mode.

 -O file
       --output-document=file
           The documents will not be written to the appropriate files, but all
           will be concatenated together and written to file.  If - is used as
           file, documents will be printed to standard output, disabling link
           conversion.  (Use ./- to print to a file literally named -.)

sh is the Bourne shell. There are several shells, of which Bourne is the old standard.

Your command above is saying to run wget in quiet mode (-q) and because output (O) takes -, instead of providing a file as destination, documents will be printed to standard output, disabling link conversion. Then the use of pipe | starts sh.


where to find Terminal log history with commands and it's results?

Please help to see complete log where i can find the writeback data after entering command

Nowhere.

  also how can i increase no. of lines?.

gnome-terminal See edit > profiles > edit > tab scrolling


change gsettings without running X and Unity

It's possible to run gsettings without X11 using dbus-launch --exit-with-session:

dbus-launch --exit-with-session gsettings set com.canonical.unity-greeter background "'/usr/share/backgrounds/micros-background.png'"


Why won't Cairo-Dock recognize the icons for Chrome app links?

I had a slightly different problem but with a similar solution I feel. When I created a prism shortcut which I believe is probably treated in the same or similar way.

The Icon will be here ~/.local/share/icons/hicolor/16x16/apps
The desktop file will be in ~/desktop if you open it in gedit you will see the Icon reference at the bottom.
The fav Icon is small 16*16 and is a png so it will look crap on your cairo dock so see if you can find a svg replacement.

Once you have it there is a guide here on a couple of different ways to change the Icon on your dock How To – Configuring Cairo-Dock


Can't boot Windows Vista after installing Ubuntu

When booting back up, you should see the GRUB menu. In this menu, you should see a list of the operating systems you can boot up. Arrow down to Windows Vista and hit enter. Then it should boot Windows Vista.  If you don't see the GRUB menu or you don't see Windows Vista listed, then you probably accidentally erased Vista while installing Ubuntu.


Try to see whether a radio killswitch is active using rfkill (example output on HP machine):

rfkill list
0: hci0: Bluetooth
        Soft blocked: no
        Hard blocked: no
2: hp-wifi: Wireless LAN
        Soft blocked: yes
        Hard blocked: no
3: hp-bluetooth: Bluetooth
        Soft blocked: no
        Hard blocked: no

If it's just 'Soft blocked', then unblock it:

sudo rfkill unblock bluetooth

If it's 'Hard blocked' try to find the hardware switch on your laptop or an option in your BIOS may be preventing Bluetooth from being enabled.


What are the different ways to install a software on Ubuntu?

I'll step you through each method.

apt-get uses the Debian PPA system to install software. It is what goes on in the background when you install software from the software center.
dpkg is even further in the background. It is what Ubuntu uses to actually install software, as opposed to simply managing it. You should not use this method if you can help it, since higher-level methods, such as apt-get, are superior in utility.
Installing from the Software Center is the highest-level method of package installation. It is not designed for advanced users, who tend to prefer apt-get. However, it makes the Ubuntu ecosystem more accessible for the general user.
Synaptic package manager is like a GUI alternative to apt-get. For apt-get, you need to know the name of a package. Synaptic instead lists packages that your computer knows of, and allows you to install those by clicking on them. It is more advanced than the Software Center and still has the same usage of apt-get.
Adding links to sources.list is a way to add a PPA that may require a key. This is the method for installing some proprietary apps like Google Chrome. Doing this does not actually install the app, you still need to update your sources, then perform apt-get install or use Synaptic afterwards. Like Sparhawk said, these can also be used for official repositories, whereas PPAs cannot.
PPAs are needed to update software. They are generally what is used to install as well. They are also the main reason apt-get is superior to dpkg for the installation process. apt-get can provide you with updates and dpkg cannot. As Sparhawk said, it is important to note that PPA stands for Personal Package Archive. These are not official repositories, which instead belong in sources.list.


Ubuntu suspended - external harddrive no longer powers?

This is the result of the ( brain-damaged imho ) way Linux handles USB disks during suspend.  It can't be sure that you didn't unplug the disk, plug it into another computer, modify it, and plug it back in to this one while it was suspended, so it just assumes you did unplug the drive, and breaks the mount point.

You'll have to make sure the drive is unmounted ( a reboot will be sure to do the trick ), and then plug the drive back in, and fsck it.  You can do this with either the gnome-disk-utility or gparted.


Fix Windows MBR using Ubuntu Live CD and ms-sys tool

To restore the MBR, the accepted method is to use a Windows CD. We didn’t have that luxury. Fortunately we had a Ubuntu Live USB in hand.

The method to fix the MBR is:

Boot the machine using the Live USB/CD.
Install lilo sudo apt-get install lilo
Fix the MBR using lilo using the command: sudo lilo -M /dev/sda mbr

Works like a charm!


Upgrading from 12.04 to 13.10 and having problems

Open a terminal.
Type

sudo software-properties-gtk

Press ENTER.
Uncheck EVERYTHING under the "Installable from CDROM/DVD" category.
Close that window and type this in terminal"

sudo apt-get update

After that completes, type in terminal

sudo apt-get dist-upgrade

Enjoy Ubuntu!

Edit: Made it simpler and faster.


Resizing ubuntu partition after uninstalling windows using GParted

Because you're using a MBR partition table, and using extended partitions, resizing can be a little bit tricky, but here we go...

Note: If you have good backups, you may just wish to wipe the disk and reinstall Ubuntu fresh

Note: You don't want to add space to sdb3, but rather sdb6 and sdb7.

Make sure that you have a good backup of your important Ubuntu files, as this procedure can corrupt or lose data.

Keep these things in mind:

always start the entire procedure with issuing a swapoff on any mounted swap partitions, and end the entire procedure with issuing a swapon on that same swap partition
a move is done by pointing the mouse pointer at the center of a partition and dragging it left/right with the hand cursor
a resize is done by dragging the left/right side of a partition to the left/right with the directional arrow cursor
if any partition can't be moved/resized graphically, you may have to manually enter the specific required numeric data (don't do this unless I instruct you to)
you begin any move/resize by right-clicking on the partition in the lower pane of the main window, and selecting the desired action from the popup menu, then finishing that action in the new move/resize window

Do the following...

Note: if the procedure doesn't work exactly as I outline, STOP immediately and DO NOT continue.

boot to a Ubuntu Live DVD/USB, in “Try Ubuntu” mode
start gparted
remember your swapoff command for /dev/sdb5
right-click on /dev/sdb3 in the lower pane and select move
move /dev/sdb3 partition all the way left

if this gives you trouble, stop here, let me know, and we'll do it another way

resize the right side of /dev/sdb3 all the way right
resize the right side of /dev/sdb7 right to add ~70G to /home
move /dev/sdb7 partition all the way right
resize the right side of /dev/sdb6 all the way right, adding ~15G to /
click the Apply icon


If you're setting DISPLAY then you're overriding ssh's X11 forwarding; ssh sets DISPLAY properly itself with the -X or -Y option (you probably want the latter).

Once you connect, run echo $DISPLAY , you should see 10:0

Beyond that, your attempt to connect X11 directly (don't do that; it's extremely insecure) is likely being dropped by a firewall.

Also, if you are wanting to tunnel http traffic, rather then forwarding firefox, it is better to use port forwarding, ie a socks proxy.

  ssh -C2qTnN -D 8080 username@server

See: https://calomel.org/firefox_ssh_proxy.html


Booting Ubuntu 13.10 from external hard disk on both uefi and bios?

It's definitely possible, I have it configured in pretty much the same way (eSATA disk on which I installed Ubuntu). I had similar issues -- Ubuntu installer was booting to EFI, but was unable to create EFI partition. After installation it was trying to boot via legacy BIOS.

Long story short, I believe you have two ways -- decide, whether you are using EFI or legacy boot, pick one of them in settings and stick to it (either switch entirely to legacy mode or don't use legacy mode at all). Less confusion this way and it will ease things up during installation and dual-booting too.


Collect notifications in a submenu such as Windows

The GNOME Shell extension Dash-to-Panel seems to do what you want.

There are over 1,200 extensions available for your review. You can enter the word panel in the search box which will narrow them down to only about 200 extensions. The GNOME Tweak Tool also allows changing Panel options.


Will Ubuntu run fine in EFI mode on a Macbook that needs to run Windows 10 in legacy (BIOS) mode?

Some early Intel Macs with 64 bit processors had only a 32 bit EFI in the firmware. There used to be versions of Ubuntu installers which would create a BIOS booting GRUB. However, GRUB still recognized and used the GPT partitioning table. In these cases, the drives were hybrid partition only because the Mac firmware would not BIOS boot unless there was hybrid partitioning. Once Ubuntu was booted by GRUB, Ubuntu would ignore then hybrid partitioning and only use the GPT.
At least since 2007, all Intel Macs have a 64 bit EFI. For these Macs, Ubuntu should be installed to 64 bit EFI boot even if the EFI is not UEFI compliant. Any hybrid partitioning is ignored by GRUB and Ubuntu.
In conclusion, there is no good reason to hybrid partition for the sole purpose of installing Ubuntu on a 2012 Mac. If you already have Window installed to BIOS boot, then Ubuntu can be installed to EFI boot and will ignore the hybrid partitioning.


having trouble with broadband modem connection in ubuntu 15.10

You may need to run the dhclient command under root. If that does not work try running ifconfig. It may also be a problem with your network card, this command will show you your network cards ip link show.
Here is what output will look like:

 $ 1: lo:  mtu 16436 qdisc noqueue state UNKNOWN
 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00


514 Authentication required when using Tor

Usually this message comes when you entered a wrong port. Please check that you chose port 9050 in your Firefox settings. The 514 error code comes when you choose 9051. This port is called control port and works only with some form of authentication. However a better alternative is to use Polipo or Privoxy. If you also install them you have to choose port 8123 for Polipo and 8118 for Privoxy. After entering those data you should visit the check page. It will tell you if you are using Tor or not.


Quote the directory name:

$ cd '#foo'

Or escape it using a backslash:

$ cd \#foo
$ cd bar#  #works

The second one works since a comment at the end of the line must have whitespace before #.

Or give the full path:

$ cd ./#foo


BQ Aquaris Ubuntu Phone sync with thunderbird on computer?

You cannot directly sync contacts with an Ubuntu phone at the moment. You will need to have your contacts in Google for example, and then sync both the phone and Thunderbird with your Google account. There's currently no other supported way of syncing contacts between the phone and a PC.


Install Ubuntu 14.04.1 64-bit onto an Acer v11 touch

What does shim do:
shimx64.efi is a relatively simple program that provides a way to boot a computer with Secure Boot active (or ON). On such a computer, an unsigned version of GRUB won't launch, and signing GRUB with Microsoft's keys is impossible, so shim bridges the gap and adds its own security tools that parallel those of Secure Boot. In practice, shim registers itself with the firmware and then launches GRUB.
Why do I need it?
Your computer came with UEFI, an updated replacement of BIOS, that comes with all computer shipping with Windows 8 or above. In these computers the secure boot option is turned on by default in the UEFI. This is a requirement by Microsoft. You could turn secure boot OFF in the UEFI before installing Ubuntu and then you wouldn't need shim.
Why didn't it happen automatically?
I don't know. The installer did put the shimx64.efi at the right location. It is not clear why it didn't activate it. Probably the installer did not expect secure boot to be ON, as you  deleted Windows 8.1. Consider filing a bug report against shim so that the developers are aware of the problem and can try to fix it. Open a terminal by pressing Ctrl+Alt+T and enter the following command to file the bug report:
ubuntu-bug shim

For more details about shim see What is the difference between grubx64 and shimx64?
Hope this helps


Where do I modify the CUPS printer configuration?

cupsd.conf should be in /etc/cups for Ubuntu. If not, just create the file.

From the terminal, type

sudo nano /etc/cups/cupsd.conf

and then copy paste the above lines


Combining Bash Script and Script Resources into One Executable

Self-extracting scripts are possible, and not uncommon. They are often used by installers. The idea is simple:

The top part of the script sets up the execution of the bottom
In the middle there is an exit command, to avoid executing the end part
The end part is a payload

Here's a concrete example. Create script.sh with this content:

#!/usr/bin/env bash

me=$(cd "$(dirname "$0")"; pwd)/"$(basename "$0")"

cd "$(mktemp -d)"
tail -n +10 "$me" | tar zx
cat local.txt

exit

This corresponds to the top and middle part I mentioned earlier.
Essentially this does:

Extract the end part (line 10 and beyond) of this script itself into a temporary directory, using tar
Print the content of local.txt, which is expected in the temporary directory
Exit

This script is not complete, we need to add the end part, which is expected to be a zipped tar, containing a file named local.txt. Let's create that file first:

echo hello world > local.txt

And let's put that file in a tar, and append it at the end of the script:

tar zc local.txt >> script.sh

If you reopen script.sh in a text editor, you will see some gibberish at the end. That's binary data, the content of a zipped tar archive with local.txt in it. If you run this script, it will output hello world, from the embedded local.txt file that it unzips from itself.

You can use the same technique to create something meaningful and sophisticated.


I use nautilus-open-terminal  (click to install) from the ubuntu repos (no need to add a ppa!). This adds a "open in terminal" item to the right-click  menu in nautilus.

sudo apt-get install nautilus-open-terminal

Afterwards you have to restart nautilus by logging out then back in, or this command:

nautilus -q && nautilus &


Line 58 of the file /etc/apt/sources.list seems to start with “deb instead of deb.

Open the file as root in an editor, for example using

sudo nano /etc/apt/sources.list

from the command line, and remove the “ (and if there's a ” at the end of the line remove that, too).


Installed psensor, I am having a hard time identifiying which reading corresponds to my gpu

Click on the psensor icon
Choose Sensor Preferences
In the window now showing up, go to the Graph tab:

For everything showing up in the Name list, remove the Draw sensor curve from all items except GEForce GTX 1060 temp (in your case, I have a 1070)

GPU Temp identified!
(as it's the only line left)
:-)


What you're probably seeing is a bare repository.
A regular repository is a working directory with a .git folder that contains all the tracking information. Bare repositories however are designed for servers that you only want to push and pull from, they're just a folder containing what would normally be in the .git folder.

Try manually creating a git repo with a simple git init and see if Gitosis will work with that.


Your problem here is that the command you try to run with sudo is  python; the script is first argument to python. Instead , your script should has executable permissions, and you're supposed to run it as sudo script_name.

Second, when you do python script_name , it won't necessarily look for your script, wherever it's stored. You either would have to give full path, or again, have the script itself live in one of directories listed in PATH variable.


Filtering the lines which are greater than a percentage value

Try this:

awk '{RS=">"; FS=" "; original_block=$0; gsub(/\(|\)|%/,""); if ($25 >= 85) print original_block}' example.txt > output.txt

Explaination:

RS=">" will treat input as blocks starting with >.
FS=" " will set your field separator to spaces and tabs to get right field count.
original_block=$0 will save the original block with parentheses () and percent sign % for printing purposes later.
gsub(/\(|\)|%/," ") will remove () and % so that the number can be matched.
if ($25 >= 85) checks if the value of the number in the 25th field in that block is greater than or equal to 85.
print original_block prints the whole matching block in its original format.


Deleted Ubuntu partion, can't get boot menu up

I made the same mistake not long ago, I used a windows 7 repair disc to get my PC working again(You didn't mention whether or whether not you had a dual-boot setup, deleting the partition broke both OS for me), then added Ubuntu back on. I realize this may not be the best solution (and may not be valid, as I'm assuming you have windows 7) but it worked.


It looks like your user has been added to an invalid group. Run grep {your username} /etc/passwd and your user-group number is the 4th field (usually a number just before your full name). In Ubuntu you should be in a group of the same name (and number) as your user. For you this is probably set to 1096358339 for some reason, so set it to be the same as the number in the 3rd column, which is your user number.

Also, if this is the case, you may need to fix your files after you change your group or they have invalid ownership. Run chown -R {your username}:{your username} from your home directory, substituting in your yoursername.


ubuntu 20.04.1 in hp laptop boot at grub command line everytime

reinstalling grub solved my problem. link below for how to reinstall grub
https://www.howtogeek.com/114884/how-to-repair-grub2-when-ubuntu-wont-boot/


playing Urban Terror on Ubuntu 14.04, while in Urban Terror the mouse is jerky & slow

Try raise mouse sensitivity from:

Setup → Controls → Misc → Sensitivity
If it did not work, then may be one of the other point devices is very sensitive so it affect your mouse movement or even shoot (1st button click) like mine.

Check them one by one:

xinput --disable "SynPS/2 Synaptics TouchPad"
xinput --disable "TPPS/2 IBM TrackPoint"
xinput --disable "ELAN Touchscreen"

To enable it back use:

xinput --enable <devicename>


If you add the Jenkins repository to your /etc/apt/sources.list and run the command sudo apt update && sudo apt install jenkins apt will install the latest version of Jenkins.

wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -

Then add the following entry in your /etc/apt/sources.list:

deb https://pkg.jenkins.io/debian binary/

Update your list of available software, then install Jenkins:

sudo apt update
sudo apt install jenkins

If you need the *.deb file for a specific version of Jenkins, go to the Jenkins Debian packages webpage, download the Jenkins .deb file manually, and double-click the Jenkins .deb file that you downloaded to open it for installation in the Ubuntu Software Center.

Alternatively you can install jenkins_2.50_all.deb from the terminal by changing directories with cd to the directory containing jenkins_2.50_all.deb and installing it using this command:

sudo apt install ./jenkins_2.50_all.deb


If you remove APT using sudo apt remove apt, following packages are affected in a standard installation (at least in bionic (18.04)):

apt apt-utils ubuntu-minimal ubuntu-release-upgrader-gtk ubuntu-desktop update-manager update-notifier update-notifier-common

To reinstall APT:

Download the .deb file of APT.

wget http://mirrors.edge.kernel.org/ubuntu/pool/main/a/apt/apt_1.6.8_amd64.deb

Install using dpkg.

sudo dpkg -i apt_1.6.8_amd64.deb

Since you deleted /etc/apt as well, download the zip for bionic from GitHub, extract it and copy the apt folder using:

sudo cp -r ~/Downloads/Bionic/apt /etc/

And run update:

sudo apt update

Install removed packages again.

sudo apt install apt-utils ubuntu-minimal ubuntu-release-upgrader-gtk ubuntu-desktop update-manager update-notifier update-notifier-common

Also, never try to mess up system files/packages like Python, APT, etc which are very essential for the OS. They may cause your system to break. If you need to reinstall a package, run:

sudo apt install --reinstall <package>


How to get speakers working in 10.04, when they are silent at any volume?

Your lscpi output is a little weird. Run the following in the terminal:

sudo update-pciids

Once it's done, check out this guide. Read and go through the steps 5, 6, and 7. If the problem persists go through the "Manual Installation" section.


How to disable mouse interference with Alt+Tab?

I don't think this is possible directly. The whole point of a graphical user interface is to use the mouse.

However, depending on your desktop environment you can change the style of the Alt-Tab switcher. For example in Cinnamon there are the Coverflow and Timeline styles for the Alt-Tab switcher where passing over with a mouse has no effect on the selected application. In Unity you may be able to change it by using the compiz setting manager (sudo apt install compizconfig-settings-manager and compiz-plugins-extra).


How to boot Ubuntu faster from USB-install. What factors affects the OS?

I think in your case the bottleneck seems to be the USB 2 480 Mbit/s max conetcetion, that make it feel painfull slow.

So another internal drive conectect via USB2 won't help, you need to either install it intenaly, (but I assume, windws lays there already or us USB 3 speed hardware.

Feel free to ask futher if there are questions open.

edit: and Welcome to Stack Exchange.


Disable SSL certificate validation in Ubuntu totally

Fortunately that is not really possible apart from compiling the relevant applications again and disabling certificate validation in the code.

The proper way to proceed is not to disable validation but to add the CA certificate used by the proxy as trusted. This way you can use the proxy without any warnings but are still not vulnerable to arbitrary man in the middle attacks like you would be if you disable all validation.

Please ask your network administrators for the proper CA certificate and then install it as described for example here for Firefox (although this specific site is for Windows it is the same with Firefox on Linux).


Given you are seeing "fork failed: Cannot allocate memory" I'm guessing you have run out of memory or a related resource.  Try closing you browser and other memory hungry applications before you reattempt.  A reboot would also help.


Try adding to your preseed config  (assuming you are preseeding, as "install unattended"):

rabbitmq-server    rabbitmq-server/upgrade_previous    note

If not doing unattended install, can pass these options to debconf-set-selections (as root):

echo "rabbitmq-server rabbitmq-server/upgrade_previous note" | debconf-set-selections


Can I move my compiled executable C code to another laptop without installation of the package?

Not likely. When you compile c/c++ code on a linux machine it (typically) forms an ELF binary, which windows (and mac) cannot use. You can, however, use mingw-w64 to crosscompile from a linux host to a windows binary, and you can do similar things for cross compiling to mac (but the process is by and far more complicated).

Then comes the fact you mention libcurl. Perhaps you just compiled the source of that, or you wrote your own program that depends on libcurl. In the former case, the presence of libcurl on the target machine does not matter, in the latter, depending on whether you static or dynamicly link libcurl into the program, you may need the appropreate library (dll or dynlib) on the target machine.

Regardless, across widely differing operating systems one cannot simply copy/paste a binary from one to the other and expect it to work. You have to give a fair amount of forethought into the process.