Why is Xorg taking up so much memory and CPU?

TL;DR Try unplugging your USB hub (and potentially other USB devices)

My Xorg did not consume a lot of CPU but within about a day that the computer was up, it bloated up to 1.2 Gigabytes of memory. The only way to correct this was a hard reboot.
After trying disabling NVidia drivers, switching to cinnamon, switching to gdm and finally kicking the damn thing (that was just for me to feel better), I noticed that as I switched to a console tty ( ALT + F1 or F2, ..., F6 ) during some gdm/lightdm service restart, there were a lot of error messages scrolling down the screen. Note, that I had only switched to ALT + F1, I had not logged in yet.

The messages were reporting that my usb tv-tuner card was not properly initialised. These messages kept scrolling on and on as if the system was stuck in an infinite loop trying continuously to initialise the tv card (and of course failing every time).
As expected, as soon as I disconnected the usb tv-card, the messages stopped, but to my amazement Xorg stopped inflating too. Just to make sure, I reconnected the usb tv tuner and the error messages came up, and again Xorg started gorging memory like an SUV filling up at a gas station.

But, right before the villagers (a.k.a ubuntu users) are about to smash their dysfunctional usb equipment and stone the dysfunctional usb equipment vendor, there is a sudden turn in the scenario. It is NOT actually the usb tv-card that caused all this trouble. The tv-card was only the symptom and not the source of the problem. The plot thickens...

Having used this tv-card before without an incident, I took a better look at the error message complaining about the tv-card. There was another line complaining about the usb port of the usb-hub, where I plugged in my tv-card. Hmmm, I had just bought this hub. So then I tried plugging the tv-card in a usb port directly on the motherboard. And everything worked fine! No error messages, and no Xorg bloating.
So at the end the actual problem was this:

Xorg was consuming memory because of initialisation errors of a usb device (and in my book this is a serious bug). Since a lot of people report problems with Xorg in ubuntu 12.04, I suggest that you also take a look at your usb devices. My tv-card could not be initialised when plugged in my new usb-hub, and that caused the problem. Putting it in a separate usb port on the motherboard fixed the problem.

P.S. The usb-hub is most likely either linux-incompatible, or should be replaced by one that has its own power adapter instead of being powered by the computer's usb bus (see USB hub not working properly Ubuntu 12.04). My web-cam also does not work when I plug it in the hub. It does work if plugged in a usb port on the motherboard. However note that, when I plug it in the usb-hub, dmesg reports that the web cam is properly recognised and initialised (although cheese gives me just a black image), and since there are no error messages, Xorg does not fill up the computer's memory.

P.P.S. I invite the distraught villagers to gather outside one-eyed Tim's barn, to throw their dysfunctional usb-hubs in a big festive bonfire. When the fire has built up, we will throw in the usb-hub vendor too. Free beer for everyone! Mua ha ha ha ha (deep voice laughter)
:-)


You can clone your 64Gb disk using DD Command - not for the feint hearted!

The DD command (Dataset Definition) comes integrated with the Linux Operating System and permits multiple management tasks on hard drives securely and straightforwardly keeping their integrity.

With DD cloning a partition or a complete unit, deleting all data from a disk, it must be used with caution.

The basic syntax of the command in terminal is:

sudo dd if=source of=destination

  IF= Input File –

  OF= Output File –

In addition to the previous syntax, add the following lines:

bs=64K conv=noerror,sync

The 64K value indicates the size of the blocks, bs (Block Size). The larger the size of the block the faster the transfer but, the smaller, the more reliable.

To see the units in Ubuntu 18.04, use the command:

sudo fdisk -l

If the objective is to clone the path/dev/sda2 in the destination /dev/sdb, for this execute the following:

dd if=/dev/sda2 of=/dev/sdb bs=64K conv=noerror,sync

Then it will be necessary to wait for the cloning process which depends on the capacity and content of the source disk.
Using this method, you have the possibility to clone your hard drives and in this way it always guarantees the integrity and availability of the information hosted there.

A first step would be to open a terminal and type man dd as this will give you the instructions on the use of the dd command.

Incidentally, in a standard(ish) 18.04 installation I am only using just over 25 GiB of a 128 GiB SSD and other files/data not associated with the maintenance of the OS are stored elsewhere (such as Dropbox and a NAS).


`curl -O` stores an empty file though `wget` works well

You've missed to follow redirections with curl as the URL endpoint is redirected (301) to another endpoint (https://s3.amazonaws.com/logzio-elk/apache-daily-access.log); sending a request with HEAD method (-I) to the specified URL:

% curl -LI https://logz.io/sample-data
HTTP/1.1 301 Moved Permanently
...
...
Location: https://s3.amazonaws.com/logzio-elk/apache-daily-access.log
...

HTTP/1.1 200 OK
...
...
Server: AmazonS3

As curl does not follow HTTP redirections by default, you need to tell curl to do so using the -L/--location option:

curl -LO https://logz.io/sample-data

As wget follows redirections by default, you're getting to the eventual URL with wget as-is.


To make things easier, here's a script that I've written before, but modified for your question. This makes it easy to add desired amount of swap with a single command. It can be also found on my personal github repository, which may include additional fixes and updates.

Steps to set it up:

Copy the script presented below
Save it as file somewhere in come directory. Name it addswap.sh
Open terminal and do cd <directory where you saved the script>
Run chmod +x ./addswap.sh

Usage is very simple:

sudo ./addswap.sh INTEGER LETTER

For adding 1 gigabyte you would do sudo ./addswap.sh 1 G. For adding 1 megabyte do sudo ./addswap.sh 1 M.

Script

#!/bin/bash
set -e  # bail if anything goes wrong

is_root(){
   if [ "$( id -u )" -ne 0  ] ; then
      return 1
   fi
   return 0
}

get_swap_amount(){
    # Obtain amount of swap in Gigabytes
    awk '/SwapTotal/{printf "%.2f",($2/1048576)}' /proc/meminfo
}

make_swap_file(){
   # This is the function that does the job of creatig swap file
   # and enabling it.  All files are timestamped
   printf "Current swap ammount: %f\n" "$(get_swap_amount)"
   printf "Working on creating swap file\n"
   DATE=$(date +%s) # append date of creation to filename
   filename="/swapfile.""$DATE" # File will be /swapfile.$DATE
   dd if=/dev/zero  of="$filename" bs=1"$2" count="$1"
   chmod 600 "$filename"
   mkswap "$filename" &&
   swapon "$filename" &&
   printf "\nCreated and turned on %s\n"  "$filename"
   printf "Current swap ammount: %f" "$(get_swap_amount)"
}

ask_to_enable_on_boot(){
   # Prompt user to enable this new swap file on boot. If user
   # enters y, the swap file will be added to /etc/fstab
   printf "Do you want to turn on this file at boot?[y/n]\n"
   read ANSWER
   case "$ANSWER" in
    [Yy]) printf "\n%s none swap defaults 0 0\n" "$filename"  >> /etc/fstab &&
       printf "\n %s added to /etc/fstab successfuly\n" "$filename"
       exit 0 ;;
    [Nn]) printf "Exiting\n" && exit 0 ;;
    *) printf "Wrong input: %s . Exiting. /etc/fstab not altered\n" "$ANSWER" && exit 1 ;;
   esac

}

bad_arguments(){
     # check if second argument is a character
     case "$2" in
         [A-Z]) return 1;;
         *) return 0;;
     esac

    # Check if first argument is a digit.
    # https://stackoverflow.com/a/3951175/3701431
    case "$1" in
        ''|*[!0-9]*) return 0;;
        *) return 1 ;;
    esac

}

main(){

    # Check if we're root and if args are OK. If everything is ok, do stuff

    if is_root
    then
        if [ $# -ne 2   ] ||  bad_arguments "$@"
        then
            printf "%s\n" ">>> ERR: $0: bad or insufficient arguments" > /dev/stderr
            printf "%s\n" ">>> Usage: $0 INTEGER LETTER" > /dev/stderr
            exit 2
        fi
        make_swap_file "$@" && ask_to_enable_on_boot
    else
        printf ">>> ERR: $0 must run as root\n" > /dev/stderr
        exit 1
    fi
}

main "$@"

Test run

$ sudo ./addswap.sh 1 G
[sudo] password for xieerqi:
Current swap ammount: 4.000000
Working on creating swap file
1+0 records in
1+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 6.83322 s, 157 MB/s
Setting up swapspace version 1, size = 1024 MiB (1073737728 bytes)
no label, UUID=8bf1d78d-0a8a-478b-a783-38c5935c362f

Created and turned on /swapfile.1498976162
Current swap ammount: 5.000000Do you want to turn on this file at boot?[y/n]
Y

 /swapfile.1498976162 added to /etc/fstab successfuly
 $


SYNA7501:00 06CB:12B8 , along with the Pen layer, is your touchscreen.

From https://www.x.org/wiki/XOrgInputDriverSpec/#index3h2:

  Virtual core devices are always available, but produce no independent events. All events come from extension devices. This is an excellent fit to a server that supports multiple core devices and device hot-plugging. With the recent integration of MPX, multiple virtual core devices may exist. They are also referred to as master devices.

Essentially, the Virtual Core Pointer/Keyboard can be delegated by software and hardware to perform certain tasks, like capturing your mouse, or enabling multiple mouse cursors.

As for changing the parameters, use this command:

xinput set-prop <device-id> <param-id> <values>

Note that values depend on the parameter. For example, flipping the the X-axis/Y-axis would need two values- 0 0 results in no inversion, 0 1 results in Y-axis inversion- the first value for the X-axis, and the second value for the Y-axis.

Edit, Documentation:

Evdev Man Page: ftp://www.x.org/pub/X11R7.5/doc/man/man4/evdev.4.html


My Samsung Galaxy J6 phone can't connect to my laptop (ubuntu 20.04) Wi-Fi hotspot (Ethernet connected)

I also had this same situation. Galaxy J6 unable to connect to hotspot while other phones could connect easily. As a quick workaround, try to change network's security type to either NONE or WEP (it worked for me).
This issue arises with WPA/WPA2-PSK security type (which is default) is used with this phone.


How do I control the upload/download bandwidth per user?

Mastershaper can do this. From their website:

MasterShaper is a network traffic shaper which provides a Web Interface for Quality of Servcie (QoS) functions of newer Linux 2.4- & 2.6-Kernel-Series.

It targets to let users learn and use the traffic shaping mechanism. This should be possible for everyone who has no deeper knowledge of Linux and the difficult syntax of the tc commands from the iproute2 package.

It provides a Web Interface which lets you define bandwidth pipes and filters (based on IP, MAC, ports, protocols, ipp2p, layer7-filter, ...). It also draws some graphs about the current bandwidth usage and distribution. There is no more need for any shell access or privileged users.

Image of the 'ruleset overview':

For downloading


17.10 - 100% CPU Load almost all the time

Just experienced this situation myself.  One of the comments above was instrumental in helping me understand the root cause of the issue; namely that the cause for systemd-journald and rsyslogd to eat CPU is typically because another process is going crazy with logging.

In my case, systemd-journald was burning 100% of one core but I couldn't even stop it (systemctl stop systemd-journald.service just hung and a kill -9 would just respawn a new instance, still eating up 100% of a core).  So I checked under /var/log and sure enough syslog had ballooned by over 600 MB in a matter of under 3 hours.  A quick tail -f revealed the culprit (gnome-software in this instance).  Killing that process immediately spun down the CPU.


How to mount my Linux partition in Windows 8?

Ubuntu is using another filesystem type by default called ext4 (resp. ext2 or ext3) which Windows cannot read by default. You need additional programms like Ext2Read to display the content of that partition in Windows. The other way around it is much easier because Linux kernel supports Microsofts NTFS by default. If you want to acces your Linux partition under Windows more frequently you might want to consider installing Ubuntu on a NTFS formatted drive.


Prevent admins from disabling bash history

TL;DR: No. There is no way to do this that cannot be worked around extremely easily. More generally, you cannot grant someone full control of a computer system and then succeed at preventing them from performing specific actions.

This answer is based on the following assumptions, which you appear to be indicating are the case. Note that although I've used a bit of legalistic-sounding wording here, what I'm talking about is technical and practical/social. This post is not about the law.

You are talking about a multi-user production system on which some users have been deliberately granted the ability to perform any action whatsoever, by running commands as root with sudo and/or Polkit. (Such an ability is what "administrator" or "admin" means in Ubuntu--and it is, in essence, what it means on any system.)
You are the actual and rightful owner of that system or systems. You are not obligated, contractually or otherwise, to refrain from imposing requirements on the way those users use their administrative powers. Really what I'm trying to capture here is that the problem is not you, it's them. If the problem is you, that's great, because it means you can address it directly by changing your own behavior. But I'm going to assume that this is unfortunately not the case.
You believe these users are using their administrative powers to perform actions that are not justified by their roles as administrators and that constitute a betrayal of your trust. Some or all of them have undertaken deliberate efforts to prevent you from knowing how they are using those powers.

If those assumptions hold, then the best possible situation is one in which you have not yet demanded that your administrators refrain from attempting to conceal their actions. In that scenario, it is imaginably possible that you could simply make this demand clear to them and that they would abide by it. If it turns out that this is feasible, then I recommend you ask your administrators why they have been concealing their actions. Perhaps they also use the system for non-administrative tasks that involve sensitive information about themselves or others that must be protected. If so, then either this is an inappropriate use of the system and you can tell them to stop doing it, or it's an appropriate use in which case that is something that can be solved with technical measures--specifically, they can be given separate non-admin accounts for such use.

Short of that, the only way to prevent them from continuing to conceal what actions they are performing with their elevated powers is to remove their elevated powers (as user535733 mentioned).

As you've described the situation, the system grants them the same technical abilities it grants you. Anything you could do to prevent bash from recording history is something they could easily undo. They could also make it hard for you to know they had undone it. As one example among many, they could let it record history but edit the history file, either automatically or manually. Also, they can use the history builtin to edit or delete history lines before they are written to a file.

Also, even when history is recorded, Bash is deliberately designed to permit the user to prevent any individual command from being recorded in the history. This is achieved by beginning the command with one or more spaces, and it is often useful for situations where one cannot avoid running a command whose arguments contain sensitive data, as well as to prevent commands that could easily cause harm under other circumstances (e.g., some rm -r commands) from being accidentally retrieved and run from the history.

Furthermore, users don't have to conceal or avoid writing to their Bash history to make it difficult or impossible to discover what actions they are performing. They don't need to use a shell, and if they do use a shell, it doesn't have to be bash, and if it is bash, it can be a separate instance of bash that is run with options like --norc to prevent it from reading configuration files. They can run a program like vim or emacs and use it to do just about whatever they want, including but not limited to starting a new shell, an interpreter like python3, or other powerful program like mc.

Looking at a user's ~/.history file is not a good way of auditing their administrative actions, since all of the techniques described above that can be used to circumvent this also have fairly frequent other uses. For example, many users perform non-trivial tasks outside of a shell. Shell history, when it is recorded at all, is recorded for the convenience of the user. It is not reliably useful for any other purpose.

There are logs you can look in to see what administrative actions have been performed, such as /var/log/auth.log. (See also man journalctl.) But any administrator can delete or modify logs. If you have administrators doing bad things, and telling them to stop doesn't work, you have no technical measure to prevent or even significantly mitigate this short of removing them as administrators. (If they are truly malicious, they may even have set up backdoors in the system to get back in even after their administrative powers are removed. Hopefully your situation is not this extreme.)

Finally, although this is not specifically about bash, shell history, or logging, I think it's worthwhile to take a moment to really think about what kinds of actions an administrator can perform. As I wrote in this answer to What stops someone from setting root password?:

  You are a member of the sudo group. You can delete all the files on the system. You can write raw data to the hard disk, overwriting what is there irrecoverably. You can access other users' files, even if they have set restrictive permissions. You can install new firmware to your physical devices. You can dump users' passwords from the shadow database and attempt to crack them, or just reset them. You can install malware that infringes users' privacy or destroys data, including keyloggers and ransomware. You can do some really weird stuff with your network interfaces. You can make the system misinform users about the security of their communications. You can cover your tracks. You can hand all these powers, and others I haven't listed, over to people who will use them for evil. When it comes to misusing sudo or Polkit, those are the kinds of things you should be concerned about.

See also Panther's answer to that question.


Command line you should be able to control this option with...

gsettings set org.gnome.desktop.lockdown disable-lock-screen 'false'

This will lock the screen from command line

gnome-screensaver-command -l

If it says command not found you found your answer: you probably removed gnome-screensaver so the option became invalid. (sudo apt-get install gnome-screensaver to re-install).


How do I change to a theme not listed in the Appearance screen?

It's not a problem of where they are located. It is a matter of how 11.10 and GNOME 3 have changed.
For some reason (I don't know why) the GNOME developers have removed appearance properties from the system settings, under the impression that users should not have the power to choose their own theme.

The Ubuntu developers where kind enough to patch the control centre to allow for us to use Ambiance and Radiance, but if you want to use other GTK+ 3 themes you will need to install gnome-tweak-tool . After installing, you can find it by opening "Advanced Settings" from the Dash.


Ubuntu 14.04 won't power off after I run update-rc.d ccpd defaults 99

The hanging of UBUNTU at shutdown (or reboot) is caused by the script /etc/init.d/ccdp. The first if-statement looks for a running cups. But in case of shutdown cups is already terminated and the if-statement will never succeed!
Move this statement in the start section or use the slightly modified Script from Radu Cotescu for UBUNTU instead. (https://radu.cotescu.com/how-to-install-canon-lbp-printers-in-ubuntu/). In my case it works fine.

#!/bin/sh
# startup script for Canon Printer Daemon for CUPS (ccpd)
# Modified for Debian GNU/Linux by Radu Cotescu
# Slightly modified for UBUNTU with Upstart by Gerhard Kraus
### BEGIN INIT INFO
# Provides:       ccpd
# Required-Start:
# Required-Stop:
# Default-Start:  2 3 4 5
# Default-Stop:   1
# Short-Description: Canon Printer Daemon for CUPS
### END INIT INFO

DAEMON=/usr/sbin/ccpd
LOCKFILE=/var/lock/subsys/ccpd
NAME=ccpd
DESC="Canon Printer Daemon for CUPS"

test -f $DAEMON || exit 0

. /lib/lsb/init-functions

export PATH=$PATH:/usr/local/sbin:/usr/local/bin

ccpd_start ()
{
    if [ `ps awx | grep cupsd | grep -v grep | wc -l` -eq 0 ]; then
        while [ `ps awx | grep cupsd | grep -v grep | wc -l` -eq 0 ]
        do
            sleep 3
        done
        sleep 5
    fi

    log_begin_msg "Starting $DESC: $NAME"
    start-stop-daemon --start --quiet --oknodo --exec ${DAEMON}
    log_end_msg $?
}

ccpd_stop ()
{
    log_begin_msg "Stopping $DESC: $NAME"
    start-stop-daemon --stop --quiet --oknodo --signal 15 --exec ${DAEMON}
    log_end_msg $?
}

case $1 in

    start)
        ccpd_start
        ;;

    stop)
        ccpd_stop
        ;;

    status)
        echo "$DESC: $NAME:" `pidof $NAME`
        ;;

    restart)
        log_begin_msg "Restarting $DESC: $NAME"
        ccpd_stop
        sleep 2
        ccpd_start
        log_end_msg $?
        ;;

    *)
        echo "Usage: ccpd {start|stop|restart|status}"
        exit 1
        ;;
esac
exit 0


Ubuntu grub boot manager eep missing (Boot-info summary)

The files that the message claims are missing are present, according to the Boot Repair output. This type of inconsistency can result from use of FAT16 or an undersized FAT32 on some computers with not-so-great FAT filesystem drivers. Most such EFIs are fairly old (from 2012 or before, at a guess). More often, though, the cause is a failure to disable Fast Startup and Hibernate in Windows. When active, these Windows features cause filesystem damage on shared partitions, including the EFI System Partition (ESP), where boot loaders reside. Disabling these features (as described in the preceding links) and rebooting to Windows a couple of times may fix the problem. Note that the Windows Fast Startup feature is not the same as a feature with a similar name in many EFIs; the EFI feature takes shortcuts on hardware initialization but does not affect how Windows handles its shutdown operations (which is what Fast Startup and Hibernate do; they turn shutdown operations into suspend-to-disk operations, which speeds up the boot process at the cost of making dual-boot configurations much riskier).

If the problem persists, then you may need to take more radical corrective measures. As a first step, I recommend you back up the ESP (/dev/sda2 in your case). You can do this in Windows or in Ubuntu, but I describe only the Ubuntu procedures, because I'm more familiar with them and I want to minimize clutter in this answer. You can boot to Ubuntu by either using my rEFInd boot manager on a USB flash drive or CD-R to boot your existing installation or boot the Ubuntu installer in its "try before installing" mode. In the former case, the ESP should be mounted at /boot/efi; in the latter, you'll need to mount the ESP manually. However you do this, a file-level backup (using cp, zip, tar, or similar file-level tools) should be adequate -- but be sure the files noted in your boot failure are backed up.

With the backup in place, the first-level repair attempt is to do a filesystem check and repair. You'd do this with dosfsck in Ubuntu. The filesystem must be unmounted and you must pass the -a option, as in sudo dosfsck -a /dev/sda2. This should fix the problem, but in rare cases it may do further damage, which would necessitate going further; and if it doesn't work, you may need to go further, too....

If a filesystem repair doesn't work, then the next thing to try is to create a new filesystem and restore the backups to it. In Ubuntu, the partition must be unmounted, and you'd use sudo mkdosfs -F32 /dev/sda2 to create a filesystem. (Be very careful with this command; if you specify the wrong device filename, you could wipe out your Windows or Ubuntu installation!) Once the filesystem is re-created, you'd then restore the backup you created earlier. Note that if you do this and it works, you should edit /etc/fstab in Ubuntu: Locate the /boot/efi line and change the UUID= value for the new filesystem. (You can discover this value by typing sudo blkid /dev/sda2.) If you don't make this change, the ESP won't be automatically mounted, which means that future updates to GRUB may not be installed.

Using Boot Repair, as oldfred suggested, is another approach; but if you do this without first disabling the Windows Fast Startup and Hibernate features, the problem may recur. Worse, any attempt to write to the ESP from Ubuntu before those features are disabled could result in further filesystem corruption, which could cause even worse problems (maybe nothing will boot, for instance). If the filesystem already has serious problems, using Boot Repair might make matters worse. Thus, no approach to fixing the problem is entirely risk-free and easy. IMHO, it's probably best to start with disabling Fast Startup and Hibernate (that part is relatively safe) and doing a filesystem check (also relatively safe). If that's not enough, you'll have to decide which risks to take -- backing up and re-creating the ESP or using Boot Repair. Having a backup of your user files is a good idea; although the chances of damaging them are pretty slim, the consequences if you do would obviously be devastating.


You can manually download XPDF from 19.10 repository and install it with commands below:
cd ~/Downloads

wget http://security.ubuntu.com/ubuntu/pool/main/p/poppler/libpoppler73_0.62.0-2ubuntu2.12_amd64.deb
sudo apt-get install ./libpoppler73_0.62.0-2ubuntu2.12_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/x/xpdf/xpdf_3.04-7_amd64.deb
sudo apt-get install ./xpdf_3.04-7_amd64.deb


If it were me, as someone who likes to test things, I would do it differently.

Install virtualbox in windows, and install Ubuntu in a VM where you can easily back it up in total, and make copies or bookmarks.  You can create a clean install, then copy the disk image to have a 2nd clean install (or even make 3 copies if you have room).

This has the advantage of eliminating any grub issues, since each VM has its own grub, it's easy to back up, and can even be moved to a different computer easily.

Another advantage is to avoid WUBI, which is sometimes problematic.

Or, the way I do it is to simply create several partitions on my disk, and install things directly.  But that requires understanding how GRUB works, and possibly solving problems now and then.  Good way to learn, if you're in to that, but stressful if you're not (or even if you are, until you learn.).


Eclipse Neon freezes and crashes computer on Ubuntu 16.04

try add this to eclipse.ini:

-XX:MaxPermSize=768m -Dorg.eclipse.swt.browser.DefaultType=mozilla

work for me!


Why does XSensors produce only one value?

Try running the following command in the terminal:

sudo sensors-detect


Slow shutdown(2 minutes) for ubuntu 16.04 LTS

Two years late is better than at all :p

Coincidentally, this was solved for me after I'd configured my GPU (Graphics card), try it, it might work.


The server that handles those packages is down, likely until next week. If you can't wait then you can get a .deb from deb multimedia

Just download the one for your arch & install with either software-center, gdebi or dpkg from cli

For i386, -

cd Downloads && \
wget http://www.deb-multimedia.org/pool/main/libd/libdvdcss/libdvdcss2_1.3.0-dmo1_i386.deb

For amd64

cd Downloads && \
wget http://www.deb-multimedia.org/pool/main/libd/libdvdcss/libdvdcss2_1.3.0-dmo1_amd64.deb

Then r. click on the .deb > choose install action of choice


How Can I Run An Appimage from Anywhere?

Please take a look at this https://github.com/AppImage/AppImageKit, it mentions installation on Debian-based systems. It installs in these locations:

$HOME/Downloads (or its localized equivalent, as determined by XDG_USER_DIRECTORY_DOWNLOAD in glib)
$HOME/.local/bin
$HOME/bin
$HOME/Applications
/Applications
/isodevice/Applications
/isofrom/Applications
/run/archiso/img_dev/Applications
/lib/live/mount/findiso/Applications
/opt
/usr/local/bin

The last line there should make it run from any location, as I know that is in your path. So to check if that is the case run this command from the terminal:

which appimaged

Or simply

appimaged -v

The first will give the location of the program and the second will show the version installed, so in any case either should tell you if yours is setup as said in that link I provided.

I got this from that link, please take a look at it for more help:

  NOTE: It may be necessary to restart (or xkill) dash, nautilus, to recognize new directories that didn't exist prior to the first run of appimaged. Alternatively, it should be sufficient to log out of the session and log in again after having run appimaged once.

  If you have AppImageUpdate on your $PATH, then it can also do this neat trick:

Image source:https://github.com/AppImage/AppImageKit

  Download AppImageUpdate from https://github.com/AppImage/AppImageUpdate/releases/tag/continuous and put on your $PATH:

sudo mv "Downloads/AppImageUpdate-*.AppImage" /usr/local/bin/AppImageUpdate
chmod a+x /usr/local/bin/AppImageUpdate


So it seems you have a firewall rule to open port 80, but you don't have any process listening on it. Did you actually installed nginx, apache or some other webserver?. We assume webserver because 80 is default port for http connections.

After installing it, run

sudo netstat -tulpn | grep :80

and you will see the port being used by nginx, and will also get a responde in the browser when reaching the ip.


How do I get XFCE to show the Desktop directory on the desktop instead of the home directory?

Found it... it's in the file ~/.config/user-dirs.dirs. Change the line

XDG_DESKTOP_DIR="$HOME/"

to

XDG_DESKTOP_DIR="$HOME/Desktop"

Did a full reboot (relog might have sufficed) and my desktop is back. I also had to change a few more lines in that file, as I had similarly linked a couple of the other "special" directories.


What programs/distro are being run in these screenshots?

The command you want that is shown in the bottom left of this screenshot is top


What is meant by "no password set" for root account (and otthers)?

What is meant by an unset password? Is it blank? Is it null? Or something else more cryptic?

Is just inexistent. Root account is disabled by default, hence it doesn't need password. So, what most resemblance has is undefined (in JavaScript) or (null) (other languages). It is just unset.

  How does the account becomes enabled once I set password for it?

Actually, setting the password is just part of it, but doesn't enable the account. You need to enable the account using:

sudo usermod -U root

and then set the password with passwd.

  what does an ! in password field mean?

Extracted from man shadow:

    A password field which starts with a exclamation mark means that
               the password is locked. The remaining characters on the line
               represent the password field before the password was locked.

It could mean that the account is locked. But also:

    If the password field contains some string that is not a valid
               result of crypt(3), for instance ! or *, the user will not be able
               to use a unix password to log in (but the user may log in the
               system by other means).

Either way, any account with ! can't log in with applications that use the shadow file.

  How come this encrypted form is only one character long?

Is not encrypted. See above.

  And does an account become disabled if I put an ! in the (encrypted) password field?

See above too.


Two computers on my home network. One is 10x slower to respond when I SSH in. Why?

Try investigating the system load averages on both machines. You can see them when you run uptime. It might also be worth running something like htop or glances to investigate what, if anything, is hogging resources. This type of lag is normally caused by an overloaded server, or networking issues.


OK thank you for your latest comments!

I would bet that CRON is here not the culprit. But just in case could you provide the content of /etc/cron.hourly?

I would try to remove the option acpi=off on boot and see if this happen again.

Is your computer a laptop or not? In case it is not a laptop, does it has a screen attached to it or is it headless? If you have a screen what Video card (GPU) do you have and which video driver are you using?

Finally, you are probably experiencing a kernel crash. Could you enable Kernel crash dump by following the following official Ubuntu guide: https://help.ubuntu.com/12.04/serverguide/kernel-crash-dump.html
We could then try to see a reason. For this use the link http://www.dedoimedo.com/computers/crash-analyze.html. Mainly execute the command crash using sudo and type bt once prompted. Put all the output on pastebin (you can remove sensitive information if there are any).


couchdb : Depends: couchdb-bin (>= 1.6.1-0ubuntu4) broken packages

Updating my Ubuntu release worked (I upgraded it from 14 to 15.10 doing do-release-upgrade).
Now I was able to install 1.6.0 couchdb version. Still have to look for installing the 1.6.1.


Prove programs without installing ubuntu? only running with the cd?

I am answering as far as I understand your Question like " Is it possible to install programs/Applications in Ubuntu in live mode ?"

If it is your question then We say YES. You can install programs at live mode also.

Simply , start the live mode. Open Terminal and type as

sudo apt-get update

After this either from Terminal or from Software center you can go for installing your Application.

Hope that helps.


Booting Problem - Ubuntu GNOME 18.04 LTS

To access the virtual console press Ctrl+Alt+F2. If you are able to login, try to see if there are package dependencies issues.

You can do this by:

sudo apt-get install -f


ffDiaporama Movie Creator seems to be another excellent option for your needs.

From the site:

  ffDiaporama is an application for creating video sequences consisting
  of

  titles, fixed or animated.
  images or photos, fixed or animated.
  movie clips
  music

  These sequences are assembled into a slide show by means of
  transitions of sequence to produce complete videos

  The following options are available:

  Refocusing of images and photos
  Cutting of video clips
  Notes (addition of text) for images, photos, sequences and animations
  Graphical filters on the images and the videos (conversion into black    and white, dust removal, equalization of colors, etc.)
  Creation of animation by zoom, rotation or Ken Burns Effect on images    or photos
  Correction of the images and the videos during animations    (luminosity, contrast, gamma, colors, etc.)
  Transitions between sequences with definition of the transition type,    sequence by sequence.
  Addition of a background sound (wav, mp3 or ogg) with customizable    effects for volume, fade in/out and passage in pause, sequence by
  sequence.
  Generation of usable videos for most current video equipment (DVD    player/smartphone, multimedia box, hard drive, etc.) but also
  publishable on the main video-sharing Websites (YouTube, Dailymotion,
  etc.)
  Video formats from QVGA (320×240) to Full HD (1920×1080) by way of    the DVD and HD 720 formats.
  Image geometry (aspect ratio) : 4:3, 16:9 or 2.35:1 (cinema)
  Possible formats for rendering : avi, mpg, mp4, mkv

Here are a couple of screenshots from my desktop:

This is the main GUI with the timeline and all the toolbars shown.

This is the "Slide Properties" Window, on which you can define certain parameters, such as the slide duration, pan, crop and other properties. You can access this feature by double-clicking on the slide when in the timeline.

You may also wish to take a look at this answer: https://askubuntu.com/a/124848/9598 on which I explain a way to do some pro-style videos with kdenlive

Good luck!


How do I set ufw to allow internal network connections?

It looks like you may have "default deny outgoing" turned on. Can you do a "sudo ufw status verbose" for us please? I'm assuming that you're server IP address is not 91.189.94.156. Are you using your server as a gateway? If so, check out this link, which shows hot to set it up (or close to what you need).


Create iso instalation image of configured Ubuntu

You must include the installer packages into your ISO image. It is called Ubiquity on Ubuntu ISO images for Desktop releases (I assume your Ubuntu is Desktop version).

The reason you can't find these packages on already installed system, is because these packages are only needed on Live images (Live CD/DVD/USB). In fact, the installer packages will be removed from the local system, where Ubuntu had been installed.

Additionally, you can also read the difference (also mentioned different installers) used for the Desktop, Server and Alternate installs on this post instead.


What is the difference between fglrx and fglrx-updates?

I have tried both on Ubuntu 14.04, They were the same driver.  The "updates" version might be updated regularly, while the the non-"update" version will stay the same through out the release.


MySQL Workbench 6.17 error Ubuntu 12.04 x64

mysql_options4 was only added on mysql 5.6.6. You will need a newer version of libmysqlclient.

i would suggest installing it from ppa:ondrej/mysql-5.6


I want the same thing, and... there's an alternative to that and works pretty well, explained by Mark in his answer here, using xbindkeys & wmctrl.

Just install them both packages:

sudo apt-get install xbindkeys
sudo apt-get install wmctrl

Then create .xbindkeysrc in your home directory and put your desired programs like this:

"wmctrl -xa Nautilus || nautilus"
    Alt + 1

"wmctrl -xa Chrome || google-chrome"
    Alt + 2

"wmctrl -xa SublimeText2 || sublime-text-2"
    Alt + 3

"wmctrl -xa Filezilla || filezilla"
    Alt + 4

"wmctrl -xa Firefox || firefox"
    Alt + 5

Then log off your account and login back again.

Using ALT+# open an instance of the defined program on .xbindkeysrc, or if that app it's already running then the shortcut will focus on that app.
Sadly you have to manually put what programs you need on your .xbindkeysrc file, but it  works superb ;)


Ubuntu Software Center Unable to Install Updates to Installed Software

I encountered a similar problem with Audacity, which I had installed via flatpak. In my case, I did not get an error message more specific than "Unable to update Audacity," and I never got the misleading "Software is up to date" message. It would always fail the same way.

Here's how I resolved it:

run flatpak list
identify the name of the affected app from that list; for Audacity, which is listed as org.audacityteam.Audacity/x86_64/stable, the name is org.audacityteam.Audacity
run flatpak update NAME for each app


I've installed Ubuntu 13.04 (using something else) and now I cannot boot windows 8

You could try grub-install and then grub-update to have GRUB check for currently installed operating systems.

I'm not sure I can be much help without knowing what you did in the partitioner when you installed Ubuntu, but try those two commands and see if it works.


What type of sequences are escape sequences starting with "\033]"

The string is actually \033[ and that's not the whole thing.

After that opening bracket comes a series of numbers and symbols. This string is known as an escape sequence and is used to control the console's cursor and text color, among other things.

  non-printing escape sequences have to be enclosed in \[\033[ and \]

If the escape sequence is controlling text color, then it will be followed by an m.

Here's a table for the color sequences:

Black       0;30     Dark Gray     1;30
Blue        0;34     Light Blue    1;34
Green       0;32     Light Green   1;32
Cyan        0;36     Light Cyan    1;36
Red         0;31     Light Red     1;31
Purple      0;35     Light Purple  1;35
Brown       0;33     Yellow        1;33
Light Gray  0;37     White         1;37

So, if you want your console prompt to be blue, you would use the following escape sequence (in the filename I'm forgetting):

\[\033[34m\]

(Notice the m)

This escape sequence doesn't only control color, however. It can also control cursor movement. Here's a table/list with the movement codes and how they work:

Position the Cursor:

\033[<L>;<C>H

Or

\033[<L>;<C>f

puts the cursor at line L and column C.
Move the cursor up N lines:

\033[<N>A

Move the cursor down N lines:

\033[<N>B

Move the cursor forward N columns:

\033[<N>C

Move the cursor backward N columns:

\033[<N>D

Clear the screen, move to (0,0):

\033[2J

Erase to end of line:

\033[K

Save cursor position:

\033[s

Restore cursor position:

\033[u

Just be aware that the last two may not work in the terminal emulator you use. Apparently, only xterm and nxterm use those two sequences.

And example using one of these escape sequences: say I want to position my cursor at line 3, column (character) 9. For that, I would use

\[033\[3;9H]

(I am assuming that column 0 is the first position, so that would be the 8th character).

Source: http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html (also read 6.2)

More general reading: http://ascii-table.com/ansi-escape-sequences.php

Wikipedia: https://en.wikipedia.org/wiki/ANSI_escape_code


" g++ not installed " even after installing it " sudo apt-get install g++ "

What solved this problem for me was simply uninstalling then reinstalling in 2 steps:

sudo apt-get remove g++
sudo apt-get install g++


I found solution:

cd /etc/fonts/conf.d
ln -s ../conf.avail/70-yes-bitmaps.conf .

then:

fc-cache -f -v

and after reboot all works as expect.


Unfortunately, you are going to have issues with this one as the code appears to be buggy. Your kernel most likely would have the "CONFIG_FORTIFY_SOURCE" option enabled. To verify this, run this command from a terminal:

cat /boot/config-`uname -r` | grep CONFIG_FORTIFY_SOURCE

Here is the output I got from mine:

CONFIG_FORTIFY_SOURCE=y

If you get the same output as mine, you won't be able to compile it that driver "as it is" due to buggy code:

In function ‘memcpy’,
    inlined from ‘rt_ioctl_iwaplist’ at /home/marko/Desktop/Netgear-A6210/os/linux/../../os/linux/sta_ioctl.c:549:2:
./include/linux/string.h:340:4: error: call to ‘__read_overflow2’ declared with attribute error: detected read beyond size of object passed as 2nd parameter
    __read_overflow2();

According to a user called genodeftest here:

  This issue is a result of the new config option CONFIG_FORTIFY_SOURCE,
  which acts like glibc’s FORTIFY_SOURCE in trying to detect some bugs
  with memcpy at compile-time. As a very dirty workaround, you could
  disable that config option.

and here:

  Thanks to CONFIG_FORTIFY_SOURCE, the compiler refused to compile this
  buggy code.

To disable that option, it would require you to recompile the kernel and this is not a simple task for novices. I do not advise you to disable that option.

My suggestion is to keep an eye until someone fixes the error.


Do as Mitch Said:

then type this command in the Terminal:

do-release-upgrade


I was assisted on IRC for this, when I moved owncloud from /var/www/owncloud to /var/www/html there's a reference in config.php which is  located in owncloud/config/config.php that still had a reference(datadirectory) to the previous path.

When you change this to the updated path this then worked.


About Removing the automatically installed packages

those packages all belong to the Mate desktop. I assume since you upgraded to 17.10 that it installed the gnome-desktop.

Unless you want to keep the mate desktop, they can be safely removed.


How do I add folder to Ubuntu 18.04.1 Nautilus Bookmark list?

To add a folder to the bookmarks in Files (aka nautilus), either

Press Ctrl+d to add the folder you are currently in to the bookmarks list in the left pane (under the horizontal line separating the "special" folders, e.g. "Recent", "Home", etc.
Drag a selected folder to the left pane.

You can see all defined hotkeys in Files when you press Shift+?


How to set up Ubuntu 11.10 to automatically turn NumLock on when boot-up?

Try to add "greeter-setup-script=/usr/bin/numlockx on"
at the end in /etc/lightdm/lightdm.conf

Hope it helps.


Understanding what a MAAS cluster can do and cant do

1) It depends on whether you need that cluster to be open to the world.  If that is the case, you can either make the switch your "uplink" (plug you r outside network into the switch), or you can set up the MAAS server as a proxy for the other machines.  The simplest way to only connect your maas server to the outside world and make it a proxy for the internal network.  Then you can handle the IP addresses by making the cluster network managed by maas, and have maas serve as the dns and dhcp.  Since the

2) Again, it depends.  You can either then configure them by hand, or use juju to do the provisioning with various "charms" - I think there are a few threads, if you do a search with maas, juju and openstack.

3) If you use juju, you are able to define the requirements for the machines that run each of your services,  You can also force a charm to deploy to a particular machine.

4) You can start from a loaded ubuntu machine, server or desktop (I've done both).  The MAAS server machine is not run very hard, other than when it is pushing the OS out across the network, which only happens when you allocate a machine to a juju service (if you are using juju).


how to deploy ssl certification with Odoo12 ubuntu server?

There is no way to have custom domain with SSL cert for it in pure self-service Odoo Online.

The documentation only refers to using external CDN with SSL certs. Some Odoo.com forum posts say that you can ask for this from Odoo support by email. You can try that.

Another option is to have separate reverse proxy for your domain with ssl cert and route traffic to yourdomain.odoo.com from there.


It could be leading to the solution that a domain member should not have more than 5 minutes clock skew. See http://download1.beyondtrust.com/Technical-Support/Downloads/files/pbiso/Manuals/likewise-open-54-guide.html#id2944830
I suggest the settings of Likewise make sure that this time difference cannot occur.
A windows domain member would normally sync with the PDC but it could be possible that your client syncs with an out-of-sync DC. Just a thought.


Circle with line through it keeps popping up randomly

I'm facing this problem too. I'm a noob in these technological things. Please don't mind me if I'm telling something stupid.
When I diagnosed the problem using xprop | grep "wm\_name" -i, I got WM_NAME(STRING) = "mutter guard window"
which told me the problem was with mutter guard window. After some googling, I reached here https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/1751593
which I think is the bug. I can find many similarities. But I can't understand what they are saying.
According to my experience when I press the - key while using libre office writer, the cross appears and I am not able to type anything. The whole keyboard is stuck and the cross keeps popping.
I was able to find temporary solutions to this problem: if I hold down my dedicated mic on/off key, I can type the letters. If I release it, then the error comes again.
Also if I go to the application search bar and type something and then come back to writer, I can type letters. But the icon always pops up.
Even though it occurs randomly the app search bar is not affected by the error, I can type anything. But the writer application is affected and I can't type a thing except the key that caused this problem.
According to my experience, the music play/pause, next music, previous music and music stop button caused the icon to pop up, but didn't affect the writing and I was able to type. But the - key caused the problem along with the keyboard error. Sometimes the ctrl key also causes this. Then I also found that the terminal was also affected by the keyboard error just like writer.
Also I'm dual booting with two ubuntus. Ubuntu 20.04 and ubuntu 18.04. Both OS are facing the issue. I thought it may be a hardware problem. But when I installed windows, I didn't find such error.
Then I thought that the keyboard drivers may be broken. I tried to update all the packages, but nothing improved.  The shape and size of the icons are a bit different in both versions of Ubuntu. This issue was quite rare at the beginning but it became more frequent and is very irritating as I sometimes lose my control over the keyboard.
In conclusion I think that there is a problem with some software called mutter. I don't know a thing about it, can anyone help me ? I hope my info help someone.


How do I solve Error 13: Invalid or unsupported executable format when I try to install Ubuntu

The bootloader that is supposed to load the Ubuntu live USB that was created with UNetbootin is not loading correctly. I recommend scrapping the UNetbootin Ubuntu live USB and trying again with the Ubuntu USB creator application for your operating system that is recommended at the official Ubuntu website. See this question: What is the proper way of creating installation media from Ubuntu iso?.

If you are making the Ubuntu live USB on windows with Rufus, which is the recommended application, there are detailed step-by-step instructions accompanied by several screenshots at this answer.


Where is the network manager docklet in Docky in Meerkat?

You should be able to find it in Docky Settings -> Docklets -> Network Manager. If it isn't mentioned there, then I would assume you need a newer version. You can try this stable PPA:
https://launchpad.net/~docky-core/+archive/stable

Or use the development PPA:
https://launchpad.net/~docky-core/+archive/ppa

The development PPA would be the most up-to-date one, but there's a higher risk of bugs.


You have conflicting directives in your .Xresources. Try removing one of the two lines:

Xft.hintstyle: hintfull
Xft.hintstyle: slight

And see if that works. I used exactly your .gtkrc-2.0 and .Xresources on a relatively unmodified Xmonad setup on Ubuntu 12.04, and the setting worked correctly once I removed one of those lines.


This could be https://bugs.launchpad.net/ubuntu/+source/samba/+bug/1849859 or https://bugs.launchpad.net/ubuntu/+source/samba/+bug/1853743. In fact, they look like duplicates of each other at the moment.


When creating a deb package, can I have it depend on a file instead of on a package

No, there is no such mechanism for Debian packages. Users of Debian-based systems have to work around this, there's nothing the package maintainer can do. See How to fake a package version installed? - also checkinstall can be used by the user to fill the package database.


How to share internet from one pc to other one?

Is your switch able to act as a router? This would be the easiest way: plug your mobile phone on the dedicated port (most of them have one, or you'll have to configure it using your router software).

An other way is to plug your phone using USB on a PC and use this PC as a router. You'll have to use IPTables to do so. The interface on this PC connected to your phone (just tried: identified here by the name enp0s20u6 ) will be the gateway to access the Internet. The ethernet interface on this PC will be the default gateway on the other one.

Just for the record: you can use your phone as a router too. Android is just another Linux flavour.


Warning message about destroying data on all partitions for dual boot install with Windows 10

This will destroy all data on any parttions you have removed
as well as on the partitions that are going to be formatted.

Only partitions you have marked for deletion and/or formatting will be destroyed. If you haven't marked your Windows partition(s) they will not be touched when installing Ubuntu.

That said, it is always a good idea to make a backup of all important data before doing major work like installing Ubuntu in dual boot.


Specify different snapcraft output folder

You can't really instruct snapcraft to create folders in a specific place, but if you use Snapcraft 3 and specify a base in your snapcraft.yaml (such as base: core18), builds will be executed in a segregated environment and those folders won't be created on your host environment (the one you run snapcraft from). If you just need them out of the way, this should solve your problem.

Edit: there's a forum post detailing a patch proposal that might do exactly what you want.


Wireless internet connection not working following update

You can use this command to unblock all wireless devices:

sudo rfkill unblock all


How can I encrypt Google Chrome passwords?

You can use an external password safe with strong encryption. I use keepass2 for that. It has plugins for firefox and chrome/chromium.

To install keepass2 you can use

sudo apt-get install keepass2 keepass2-plugin-keepasshttp keepass2-plugin-rpc keepass2-plugin-application-menu keepass2-plugin-application-indicator

ChromeIPass is installed from the chrome webstore:

https://chrome.google.com/webstore/detail/chromeipass/ompiailgknfdndiefoaoiligalphfdae


Ubuntu 14.04 uses upstart, so you can write a small config file saying
how you want upstart to manage your service, which, for example, you
name "myweb".  Using sudo create a file called /etc/init/myweb.conf (a
symbolic link from there to a real file will not work) with contents
something like:

description "run webSocket server when network ready"
start on static-network-up
respawn
exec ruby websocket_server.rb

You can test this out with

sudo start myweb
status myweb
sudo stop myweb

The status command will show if the process is still running. respawn says  you
would like it automatically restarted if it dies. The start, stop, and status commands are all just links to initctl.
See man initctl, man 5 init for the conf file format, and the upstart cookbook.


Reinstall apt-show-versions

sudo apt-get install --reinstall apt-show-versions

or start

apt-show-versions -i

Explanation

The folder /var/cache/apt-show-versions was probably deleted. Why do I think that? That's why:

I have tested this with

sudo rm -r /var/cache/apt-show-versions

and when I start

sudo apt-get update

I have this problem

can't create /var/cache/apt-show-versions/files: No such file or directory at /usr/bin/apt-show-versions line 199.
E: Problem executing scripts APT::Update::Post-Invoke-Success 'test -x /usr/bin/apt-show-versions || exit 0 ; apt-show-versions -i

and the command

apt-show-versions -i

fixes the problem.


How can I delete an administrator account from the guest login?

You can reset password of any account by booting into the Recovery Console and using passwd command there:

passwd john

after which you should be able to log in.

Alternatively, you can boot from an Ubuntu LiveUSB and use chroot command to access to passwd command on the laptop's hard drive as root.

HOWEVER, if you bought the laptop on ebay, I would strongly advice you to perform a full re-install of the system - using it as-is is just not safe, nobody knows what the original owner installed there.

To perform a fresh install you don't need admin permissions on the laptop - you simply put a CD in the tray or plug in a USB flash drive and reboot the system. You may need to go into laptop's BIOS settings and make sure CD drive or USB comes before the hard drive in the list of boot devices.


Access workstations without public IP - maybe with VPN

Any computer on the internet can be addressed by its IP address. Those IP address are commonly called "public IP address".
Internet servers have public IP addresses.

Nowadays, desktop or laptop computers are typically not connected to the internet directly. They have internet access through a router using a technique called IP masquerading (or NAT). Using this scheme, computers get assigned a "local IP address" such as 192.168.., 172.16.. or 10...*. Those addresses are invalid on the internet. Only the router has a valid public IP address.

A client with a local IP address (behind a router) can always establish an connection with a server using a public address (directly connected to the internet). That's why web browsing works perfectly.

However, if both parties are behind such a router, i.e. none of the computers has a public IP address , establishing a connection is impossible.

You have several options:

Establish the connection through a server (as it is done with TeamViewer)
Configure one of the routers to make incoming connections possible (port fowarding)
Establish a VPN. Minimum requirement is that one of the routers allows either port forwarding or supports some VPN (or connect through a third party server).

Please research the network situation of your office. Find out, whether your IP address is public and, if not, who controls the router. Then, ask whether port forwarding or a VPN is an option they can provide (or consult the manual if you have access to the router).


How can I remove a package and its dependencies?

In short:
sudo bash -c 'echo "Apt::AutoRemove::SuggestsImportant false;" > /etc/apt/apt.conf.d/01autoremove-suggested'
This behavior is controlled by the option Apt::AutoRemove::SuggestsImportant.

Option: Apt::AutoRemove::SuggestsImportant
Default: true
Description: If this option is true, then aptitude will
not consider packages to be unused (and thus will not automatically
remove them) as long as any installed package suggests them. For more
information, see the section called “Managing automatically installed
packages”.

Source:
Aptitude doesn't remove automatically installed packages


Pro Evolution Soccer 2013 via Wine on Ubuntu 12.10

Instead of letting wine detect the amount of video card memory available, you can explicitly set it with winetricks. This can sometimes work, and is a possibility, as is investigating the other graphical tweaks available with winetricks.

You can run the following, for example, to set the videomemory to 512, rather than let wine try to detect the video memory available:

winetricks videomemorysize=512

It is important to note that this will affect the default WINEPREFIX ($HOME/.wine) only. If you have other wineprefixes, you will have to specify your particular WINEPREFIX; for example:

env WINEPREFIX=$HOME/.otherprefix winetricks videomemorysize=512

You can also use the gui version of winetricks from the applications menu and select the wineprefix and then select change settings. Other options available for setting video memory are:

There is no way to tell whether these settings will work with your system, and you may have to tweak other settings such as shaders, etc. I should refer to the wine appdb page and the winetricks wiki and wine FAQ. You may have to investigate how wine and wined3d is detecting your video card and its capabilities.

It also might be worth reinstalling and using a fresh WINEPREFIX, as that can sometimes solve problems (see my answer here for how to do that), as well as using the current development version of wine from the official Ubuntu wine team ppa.


I have been experiencing the same issue with Ubuntu 13.10. My research seems to suggest it is caused by the way Ubuntu handles encrypted swap space. Ubuntu generates a random key each time you boot your computer. This link provides an explanation of encrypted swap: EncryptedSwap. I do not know if the encrypted swap file gets corrupted after three or four system suspends. At least for me, disabling encrypted swap has resulted in normal resume from suspend. This article provides the steps necessary for disabling encrypted swap, if you choose to do so. Enable/Disable encrypted swap.


You need to install the certificate in /etc/ssl/certs/ manually. Additionally, you will want to add it to /etc/ssl/certs/ca-certificates.crt for applications that cannot deal with the directory format. For this, you first need to convert it from DER to PEM:

openssl x509 -in foo.der -inform der -out foo.pem

Then you install it into the system-wide certificate storage:

sudo openssl x509 -in foo.pem -out /etc/ssl/certs/$(openssl x509 -in foo.pem -noout -hash).0
sudo sh -c 'cat foo.pem >>/etc/ssl/certs/ca-certificates.crt'


How to change "Hide all normal windows" shortcut?

For some reason, Settings (unity-control-center) can't be used to change this shortcut. You have to use CompizConfig Settings Manager (CCSM).

Install CCSM. Run in terminal:

sudo apt-get install compizconfig-settings-manager

Open CCSM
Go to Desktop section → Ubuntu Unity Plugin → General tab
Change the Show Desktop shortcut

This is based on Prime624's answer on a related question.


If the USB works fine elsewhere, then it’s usually a driver. You can try tail -f /var/log/syslog then insert the USB and see if Ubuntu even attempts to read it.
Each manufacturer can create a driver for Linux. If they don’t then the community would do it. This can take time. And I guess no guarantee that someone actually will create a driver for it..


Getting icon of window, and then changing icon

Where the icon is defined
The representation of an application in Dash and the the Unity launcher  is defined in a .desktop file. Such a .desktop files includes a line to set the command to run the application, a line to set the icon of the application and a varying number of possible lines to set additional properties.
To see the current Unity launcher's content by command:
gsettings get com.canonical.Unity.Launcher favorites

If you run this command, you will (a.o.) get a list of references to .desktop files, in the order like they appear in the launcher. An application's mention in the list looks like: application://thunderbird.desktop. It refers (in this example) to the file, thunderbird.desktop.
When Unity gathers its information on login, it first looks into the local directory for .desktop files, (~/.local/share/applications), and secondly in /usr/share/applications.  If a .desktop file exists in both directory, the local one has preference. Normally, during your session, the launcher's icon stays linked to the .desktop file in either one of these directories.
When the content of the linked desktop file is edited during your session, the result is applied immediately. However, the icon as it appears in the Unity launcher does not change until you either:

log out / login
remove the icon from the launcher and lock it again

Since you cannot remove the icon of a running application from the launcher, changing the icon of a running application is not possible.
To change the icon of an application in the launcher which is not running however, you can use the two scripts below.
The first one copies the .desktop file to the local directory and edits the Icon= line in the local copy. The second one refreshes the icon in the launcher (and relinks it if necessary).

Script 1; change the icon
how to use
Copy the script below into an empty file, save it as change_icon.py, run it by the command:
python3 change_icon.py <applicationnamme.desktop> </path/to/new/icon>

for example:
python3 change_icon.py thunderbird.desktop </path/to/new/icon>

for smoother use:
create a directory ~/bin, copy the script into the directory, remove the language extension from the script, make it executable and (after logout / login), you can simly use the script by the command:
change_icon <applicationnamme.desktop> </path/to/new/icon>

More info on where to store and how to define icons, you can find here
The script
#!/usr/bin/env python3

import os
import shutil
import sys

file = sys.argv[1]
new_icon = sys.argv[2]

user_home = os.environ["HOME"]
dir_1 = user_home+"/.local/share/applications/"
dir_2 = "/usr/share/applications/"
dtfile_list1 = os.listdir(dir_1)
dtfile_list2 = os.listdir(dir_2)

subject = dir_1+file

if not os.path.exists(subject):
    try:
        shutil.copyfile(dir_2+file, dir_1+file)
    except FileNotFoundError:
        print("the file "+file+" does not exist")

def read_file(file):
    with open(file) as edit:
        return edit.readlines()

def write_file(file, linelist):
    with open(file, "wt") as edit:
        for line in linelist:
            edit.write(line)

subject_lines = read_file(subject)
index = [i for i in range(len(subject_lines)) \
         if subject_lines[i].startswith("Icon=")][0]
subject_lines[index] = "Icon="+new_icon+"\n"
write_file(subject, subject_lines)

Script 2; refresh the icon in the launcher
how to use
Copy the script below into an empty file, save it as refresh.py, run it by the command:
python3 refresh.py <applicationnamme.desktop>

for smoother use:
Like in the script above, copy the script into ~/bin, remove the language extension, make it executable and (after logout / login), you can simly use the script by the command:
refresh <applicationnamme.desktop>

for example:
refresh thunderbird.desktop

The script
#!/usr/bin/env python3

import subprocess
import time
import sys

desktopfile = sys.argv[-1]

def read_currentlauncher():
    # reads the current launcher contents
    return subprocess.check_output([
        "gsettings", "get", "com.canonical.Unity.Launcher", "favorites"
        ]).decode("utf-8")

def set_launcher(llist):
    # sets a defined unity launcher list
    current_launcher = str(llist).replace(", ", ",")
    subprocess.Popen([
        "gsettings", "set", "com.canonical.Unity.Launcher", "favorites",
        current_launcher,
        ])

def refresh_icon(desktopfile):
    current_launcher = read_currentlauncher()
    current_launcher_temp = eval(current_launcher)
    item = [item for item in current_launcher_temp if desktopfile in item][0]
    index = current_launcher_temp.index(item)
    current_launcher_temp.pop(index)
    set_launcher(current_launcher_temp)
    time.sleep(2)
    set_launcher(current_launcher)

refresh_icon(desktopfile)


Here's the official process from https://tutorials.ubuntu.com

Download Ubuntu's ISO file at https://ubuntu.com/download , or for a supported lighter and faster 'flavour' with a different Desktop Environment, download from https://ubuntu.com/download/flavours .

Check for download errors by https://tutorials.ubuntu.com/tutorial/tutorial-how-to-verify-ubuntu#0 .

Make a LiveUSB following these instructions on another Linux PC https://tutorials.ubuntu.com/tutorial/tutorial-create-a-usb-stick-on-ubuntu#0

or on a Windows PC https://tutorials.ubuntu.com/tutorial/tutorial-create-a-usb-stick-on-windows#0 .

Once you make a LiveUSB, install it following these steps https://tutorials.ubuntu.com/tutorial/tutorial-install-ubuntu-desktop#0.


How do I set IDLE as the default editor for Python scripts?

You didn't mention which idle package you are using, let's assume "Idle". If using "Idle3" then use idle3.desktop below. If using "Idle(using Python-2.7)" then use idle-python2.7.desktop

There are 2 things preventing you from finding idle in the context menus -

First none of the idle .desktops have a MimeType= line in them, that's why Idle doesn't show in the r. click > open with ... menu

Additionally  - only .desktops whose Exec= line ends with a  %letter will show in the r. click > properties context menu, even if they show up in the above 'open with' menu

So in this case easiest to just do this - first add to the open with menu

gedit ~/.local/share/applications/mimeapps.list

In the [Added Associations] section look for this line

text/x-python=

If there then add this to the end

idle.desktop;

If not there then just add

text/x-python=idle.desktop;

Idle should now be available in the open with menu, if not log out/in

While there, in the [Default Applications] section look for the same line & replace the .desktop as such, if not there just add the line ( no ; is used in the Defaults section

text/x-python=idle.desktop

If Idle doesn't show up as the default, even after a restart then you'll need to 'force' it. I'd prefer this way rather than messing with defaults.list

open the .desktop in a root editor

 gksudo gedit /usr/share/applications/idle.desktop

Add a  %f to the end of the line, save - like

Exec=/usr/bin/idle -n %f

Then ck. again & see if Idle is now the default, do a log out/in if needed.
Once it's added then you can reopen idle.desktop & remove the %f, it should stay as default.
I'm not sure if %f is appropriate for idle, otherwise I'd say you could leave  it


Please read the mentioned manual more carefully. Under step 5 is written:

  If your connection is working, you are good to go and can stop
  reading. ...

  Ports that are often open include 80 (general web traffic) and 443
  (SSL web traffic).

  If your SSH server isn't serving web content, we can tell
  SSH to use one of these web ports to communicate over instead of the
  default port 22. 443 is the best choice ...

In your case the output of the command sudo lsof -i -n -P | grep www-data is:

nginx   26965 www-data    6u  IPv4 2603510992      0t0  TCP *:80 (LISTEN)
nginx   26965 www-data    7u  IPv6 2603510993      0t0  TCP *:80 (LISTEN)
nginx   26965 www-data    8u  IPv4 2603510994      0t0  TCP *:443 (LISTEN)

That means Nginx web server is serving web content and it uses port 80 and port 443.

Also the output of sudo systemctl status sshd reports the following error:

error: Bind to port 443 on 0.0.0.0 failed: Address already in use.

Everything is okay, just the web server Nginx listen on Port 443. If you want to use SSH connection on this port you should disable or reconfigure the web server.

One port could be used as server's port only from one service. Two services can communicate through common port and within this relationship one of the services plays role as server and the another plays role as client.

If you want to use different SSH port, choice something above 10 000, usually it takes a long time to scan large range of ports, so hacker's bots usually scans the range 1-1000, or some specific ports as 22, 25, 80, 443. Don't forgot to open this port into the firewall, and if your connection is working on the new port, you can disable the default - 22.

References:

How to find the running network services and the port and user


Launchpad: Build package on utopic, but release for older versions

No, this is not possible.

You can theoretically build on utopic, and then manually sync only the binary packages to the older releases, but you cannot configure Launchpad to do so automatically.

You could also just backport the newer dependencies to the older versions of Ubuntu (trusty and precise) so that you can build the source on all of them, which would be a better solution, as it will catch other possible failures in the future more reliably.


Not sure why you're using quotes like that. Here's how I use rename:

rename 's/search/replace/' *

And here's it in action:

oli@bert:~/Desktop/rawr$ ls
pie\u333.sh
oli@bert:~/Desktop/rawr$ rename 's/\\u333/PIE/' *
oli@bert:~/Desktop/rawr$ ls
piePIE.sh

Your quotes seem to be throwing it off.


E: The package poppler-utils needs to be reinstalled, but I can't find an archive for it

The problem was that some files had been moved to another partition on another disk while dual booting after removing the other disk I was able to Install stuff.


I haven't tried it, but i am pretty sure it will work just fine.

Just remember that installing Windows 8 while having Ubuntu will override the grub and install the Windows boot manager. But you can re-install grub by booting from Ubuntu live cd/usb.

I've heard that Microsoft will work on making it hard to dual-boot with other OSs in future computers, but for now you are safe :)


chmod: changing permissions of file system

The source of the problem is that you tried to write to a CD which is a read-only system.

You should first copy the file to a write-able folder (e.g. another folder in your VM which is located on HDD).

Afterwards if you want to extract filename.tar.gz file You can extract it using:

tar -xzvf filename.tar.gz

or by using:

tar xf filename.tar.gz


Youtube says "This video is currently unavailable"

I'm using Chromium Version 28.0.1500.52 Ubuntu 12.10 (28.0.1500.52-0ubuntu1.12.10.3) and faced with same issue. To solve issue you need to remove current set of chromium codecs:

sudo apt-get remove chromium-codecs-ffmpeg

And them install similar, but extra package:

sudo apt-get install chromium-codecs-ffmpeg-extra

YouTube trouble will be removed and video will be played.

So, common solution leads to update chrome/chromium codecs.

You can also be faced with proposition to install chromium-codecs-ffmpeg-extra while removing chromium-codecs-ffmpeg. Just apply suggestion to install package with extra version.

Additionally, will be useful to update current version of chromium browser to take newest version:

sudo apt-get install chromium-browser

Thanks


The recent problem with BCM4313 cards seems to be related to an upgraded version of the bcmwl-kernel-source package. As a workaround, I suggest downgrading it to the previous version, by using the following steps.

Run sudo apt-get remove bcmwl-kernel-source to remove the package.
Install the older version

sudo apt-get install bcmwl-kernel-source=5.100.82.38+bdcom-0ubuntu6

Manual deb downloads are available from here: 32bit, 64bit. Install the downloaded file by double clicking.

Lock the packages version to prevent updates.

gksu gedit /etc/apt/preferences.d/bcmwl-kernel-source

and paste in the pollowing

Package: bcmwl-kernel-source
Pin: version 5.100.82.38+bdcom*
Pin-Priority: 1001

PS: The workaround has been adapted from here. Unfortunately, I've no way of testing it, so please, let me know if it works, ... or not.


Keeping only the necessary desktop environment after upgrading to ubuntu 20.04.1

You are able to view other gnome.desktop lines because may be when you tried to solve your previous problem of cursor got stuck, these other supported desktop too got installed.
They all seem to be of gnome.desktop. So I think that those are supportive one.


What is the difference between iface eth0 inet manual and iface eth0 inet static?

iface eth0 inet static: Defines a static IP address for eth0

iface eth0 inet manual :To create a network interface without an IP address at all. Usually used by interfaces that are bridge or aggregation members, or have a VLAN device configured on them

For more information read:

https://wiki.debian.org/NetworkConfiguration

Take a look on the file /usr/share/doc/ifupdown/examples/network-interfaces.gz, you can know more about manual and some cases to use:

# Set up an interface to read all the traffic on the network. This
# configuration can be useful to setup Network Intrusion Detection
# sensors in 'stealth'-type configuration. This prevents the NIDS
# system to be a direct target in a hostile network since they have
# no IP address on the network. Notice, however, that there have been
# known bugs over time in sensors part of NIDS (for example see
# DSA-297 related to Snort) and remote buffer overflows might even be
# triggered by network packet processing.
#
# auto eth0
# iface eth0 inet manual
#   up ifconfig $IFACE 0.0.0.0 up
#       up ip link set $IFACE promisc on
#       down ip link set $IFACE promisc off
#       down ifconfig $IFACE down

# Set up an interface which will not be allocated an IP address by
# ifupdown but will be configured through external programs. This
# can be useful to setup interfaces configured through other programs,
# like, for example, PPPOE scripts.
#
# auto eth0
# iface eth0 inet manual
#       up ifconfig $IFACE 0.0.0.0 up
#       up /usr/local/bin/myconfigscript
#       down ifconfig $IFACE down


A footer is defined in it's page style. If you want a different footer for each page, you also need to have a style for every page. See this help page for more information.

Note that you can also insert fields that vary based on, let's say, current page number or current chapter title. Creating a page style for each page seems a bit cumbersome.


What is the Ubuntu Server's relationship to LAMP?

The Ubuntu Server is the 'L' in 'LAMP'; that is to say, Ubuntu Server is a Linux-based Operating System (L) on which people run the Apache HTTP Server (A) with MySQL or MariaDB for data storage (M) and Python, Perl, or PHP for scripting (P).

People also run Debian, CentOS, and RedHat as their L. Ubuntu is growing pretty popular as a LAMP OS because of its quick installation and deployment, as well as five years of free LTS (Long Term Supported) support from Canonical.


Apt was not the issue here. I was able to find the issue using an application called FileLight. I had to run it with sudo so that it could access all of my root partition.
This showed that Docker was taking up almost 8 Gigabytes with images and containers.


How to enable Hardware Encryption on SSDs like Samsung 840 EVO?

There are different kinds of hardware encryption on SSDs, see SSDs with usable built-in hardware-based full disk encryption for an in-depth explanation.

You asked about the Samsung 840 EVO in particular. It is always encrypting your data and is unlocked by the ATA HDD password set in the BIOS, which defaults to blank. Later you can move the SSD to a new machine and enter the the ATA HDD password via the BIOS there to unlock it. Nothing involved in unlocking is stored outside of the drive itself.

As a Linux user, I prefer this solution over software-based drive encryption. There is no performance penalty and it is simple to setup and use.


Trusty - whole disc copy using sudo dd .. of=/dev/disk/by-id/xx does not write

I found the reason. My mistake:

I did note disk path and prepared dd command first, and THEN moved the target disc, from sata enclosure to usb3. To avoid sharing single esata line by both data paths. That move was the reason why I tried to use id of the disc rather than some unsure /dev/sdi, thinking that id will remain same in new place...

But the physical move from esata to usb, did change /dev/disk/by-id/ of the disc completely, and past the move it was simply non-existant.

That is why dd did CREATE new file using given name, regardless of it was under directory of /dev/disk/by-id. And THE FILE was written upto 4.0GB and no space left.
ls -l is telling that all, but I would never find that without Your help.

Thank You for helping me, this error was between screen and the chair.


Applications in Ubuntu's installation environment

You can build a custom livecd easily with UCK. http://uck.sourceforge.net/

I've done it several times for different needs and it works perfectly.


Unable to create new folder on external drive due to I/O error (at the main HDD)

You did not properly shutdown windows 10.

I get same error when I don't properly shutdown, the partition opens as read only file-system. any attempt to write Say's its a read-only file-system.


Have you tried this?

Quit Dropbox from running.

dropbox stop

Delete ~/.dropbox-dist.

rm -r ~/.dropbox-dist

Now just run the two commands under the "Dropbox Headless Install via command line" option here https://www.dropbox.com/install?os=lnx. Select whether you have a 64 or 32 bit machine.

This will preserve the Dropbox cache so it won't re-sync everything. If this does not work, you may want to consider a complete uninstall and purge, and reinstall of the Dropbox program. (There is of course no need to remove the files in your Dropbox folder as all of this pertains to the program.)


Is there a way to reduce performance once a temperature threshold is reached

The hardware is supposed to do this if it absolutely must, and is really not supposed to overheat in the first place.  If it does then it is defective and you should complain to the manufacturer and return it for a refund if you still can.


It looks like the packager of woeusb omitted some dependencies. You could specify them by hand:

sudo apt install woeusb p7zip-full libwxbase3.0-0v5 libwxgtk3.0-0v5


Wifi doesn't work after fresh install of 16.04

It sounds like you may need to install drivers for your wireless card.

First, can you please go into the terminal and type

lspci -nn -d 14e4:

and tell me what it returns to you?

Also run this: iwconfig after and post the results, too.

Reference: Installing Broadcom Wireless Drivers

EDIT:

It appears that this wifi card is not yet supported according to other users and its not listed in the package install table in the previous link.

Get Broadcom Wifi Card [14e4:43ae] to work

https://ubuntuforums.org/showthread.php?t=2296434


Unable to update hostname on ubuntu 14.04

The system hostname goes in /etc/hostname.

/etc/hosts is for performing local name to IP address mapping.  It may contain your local hostname as a convenience, but it is not the location to set your local hostname.


Installation problem, not showing partitions

You  should have two choices...install and keep present OS, or Install Ubuntu ie ( format and wipe windows and install Ubuntu as only OS....I did not install from usb, I downloaded and installed from cd-rom, so I don't know if there is a difference.


Okay, so it seems to be a problem with GRUB. I found this info in the official Ubuntu documentation. I know you already know how to get going with boot repair, but I will include it in case you forgot, or someone else is having the same issue.

You can either download the boot repair ISO, burn it to a CD and boot from that, or you can use a regular Ubuntu Live CD. When using a regular Ubuntu Live CD you will need to:

  boot your computer on a Ubuntu live-CD or live-USB.
  choose "Try Ubuntu"
  connect internet
  open a new Terminal (Ctrl+Alt+T), then type:

  sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get
  update
  - Press Enter.

  Then type:

  sudo apt-get install -y boot-repair && boot-repair
  - Press Enter

The information on getting boot repair also came from the Ubuntu documentation.

Now, fire up boot repair, click the Advanced options -> GRUB options tab, and check the ATA disk support (solves the [out-of-disk] error) option, then Apply. Reboot, and hopefully that will take care of the issue.

If still not good, create a separate /boot partition at the start of the disk: https://help.ubuntu.com/community/BootPartition


CUPS: duplex printing crops page (same results via lpr and system dialog)

Apparently it was a driver-related issue. After installing official printer drivers from the manufacturer it started working.


what is the command to restart firefox from the command line?

At least in my version, Firefox doesn't have a restart option. You can kill the process and then start it again. For example:

killall firefox
firefox

If killall doesn't cut it, you can use pkill instead. Just keep in mind that pkill would kill any process with firefox in its name, though probably that's not a big concern.


How to get removed a broken package (in this case "click")?

After that was not successful, I have tested this "the hard way" ... and ... it works!

sudo rm /usr/bin/click
sudo apt-get autoremove -f click

The file has a problem when importing a Python module and you want to remove the package anyway. Therefore the file can be removed manually.


I was also facing the error. It was showing many things missing like:

autoconf
automake
makeinfo

and many others

I didn't know what to do so I started installing the missing things one by one.

But makeinfo was not there in the repository. I used makeinfo as a command in the terminal though I knew it was not installed. I knew that if an uninstalled command is given then system itself suggests for proper package installation. So I installed texinfo as suggested by the system for missing makeinfo. Still I was getting errors and I decided to install libcurl. I got this hint from @steeldriver's comment.

I just installed libcurl4-gnutls-dev and everything worked fine for me.


I wrote a Python/QT app that downloads files. How can I stop it from 'greying out' after few seconds?

The problem is most likely that while your download functions are running, your application can't respond to events - control doesn't return to the main loop.

I think the simplest mechanism is to do the downloads in separate threads, and use Qt's signals and slots mechanism to update the progress bars (threads can't interact directly with the user interface).

Also, rather than opening files to write the HTTP response out, you might find it more efficient to use a function like urllib.urlretrieve to write the files directly.


Ubuntu 16.04 only works with Private Internet Access now - can't connect without

Open a Terminal and run this command:

rm -rf ~/.pia_manager/

If the command is successful, there will be no confirmation, it will
simply go to a new line in the Terminal window.
This next command removes the start or application menu icon (useful if
you're just uninstalling the PIA app and not reinstalling it):

rm ~/.local/share/applications/pia_manager.desktop

Reboot


Ubuntu Server 14.04 using 2 net adaptors in VMWare Workstation

I can't tell from the formatting in the question... But are the lines in /etc/network/interfaces

Primary adaptor internet
and
Secondary adaptor private network
 Commented out with '#'?

Here's an example for static:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
    address 10.110.2.9
    netmask 255.255.0.0
    network 10.110.0.0
    broadcast 10.110.255.255
  <snip>


Have to run modprobe every time I want to use my webcam on MacBook Air

You've compiled a kernel module facetimehd but it apparently conflicts with a module included in the Ubuntu kernel, bdc_pci. This command removes that driver from the kernel:

sudo modprobe -r bdc_pci

According to the repository's wiki we can blacklist that module to overcome possible issues.

To do this, create a file in /etc/modprobe.d with the suffix .conf. You can also simply add a line to the main blacklist /etc/modprobe.d/blacklist.conf, but making an individual file for each module you want to blacklist makes it easier to manage them. Global updates may replace the master blacklist with a new version from time to time, and you will have to edit it again.

To create and edit the file you'll need root permission. Do not use chmod or chown, just use sudo. For example, use:

sudoedit /etc/modprobe.d/blacklist-bdc_pci.conf

This calls the default editor, usually nano, but you can use sudo nano sudo vim etc according to your preference. If you're calling a graphical text editor like gedit, use the -H flag to get a clean environment: sudo -H gedit /etc...

Add one line to the file

blacklist bdc_pci

Or if you want, add two lines, one a comment (starts with # so the line will be ignored) so future you and other folks will know the reason for blacklisting, for example

# conflicts with facetimehd webcam driver
blacklist bdc_pci

Save and exit, all done.

This might be sufficient, but if the new module is still not getting loaded automatically, the easiest way to made that happen is to make systemd load it by adding it to the file /etc/modules. You can also create a file in the directory /etc/modules-load.d with the extension .conf, and as with the blacklist, that would be marginally better practice.

sudoedit /etc/modules-load.d/facetimehd.conf

(or sudoedit /etc/modules, or call your favourite text editor as above...)

Add one line:

facetimehd

Or two:

# webcam driver, doesn't load itself
facetimehd

Save and exit, and the module should be loaded at the next boot.


It sounds like a common bug, it was missing on my machine too so I'm betting a bad upgrade has done something and I think it'll be fixed soon too. In the mean time you can get it back by using the following instructions:

Press Alt+F2, in the box that pops up type: killall nm-applet and press Run. This will shutdown any existing network manager icons that aren't showing up. Then

Press Alt+F2 again and this time type: nm-applet This will launch a fresh network manager applet and on my machine this worked to bring it back.


Yes, you can do it.

If your computational program supports AMD OpenCL, then typically you can select a device or it will default to your AMD card.

However, as far as I know, games use the card with the monitor plugged into it. I think it is only possible with SLI or Crossfire.


How can I upgrade my device to Apple iOS 5?

I'm not sure if it is possible to execute an upgrade on a Linux machine, but you can always create an instance Windows 7/xp/whatever on say VirtualBox and upgrade from there.


Should I install the nvidia drivers for my computer after I've installed bumblebee?

No, the drivers are already installed as a dependency of Bumblebee, no more drivers should be installed after that.


I can change the setting options in dconf-editor, but the changes I make don't take effect.

Are you making sure to run dconf-editor as the user you wish to apply these changes to?

As in -- if you want to run these changes during your normal, every-day use of Ubuntu, just run dconf-editor as that user (so without running it as sudo).


Installing phpMyAdmin from repository, 403 Forbidden error

Ok, I got it to work. I hope it helps someone by putting it here.

I had to change the /etc/apache2/mods-enabled/fcgid.conf to tell it to use php5-cgi (done already when I asked the question):

root@srvr-test:/etc/apache2/mods-enabled# cat fcgid.conf
<IfModule mod_fcgid.c>
  AddHandler fcgid-script .fcgi .php

  FcgidConnectTimeout 20

  # Where to look for the php.ini file?
  # Maximum requests a process handles before it is terminated
  MaxRequestsPerProcess       1000
  # Maximum number of PHP processes
  MaxProcessCount             10
  # Number of seconds of idle time before a process is terminated
  IPCCommTimeout              240
  IdleTimeout                 240
  #Or use this if you use the file above
  FCGIWrapper /usr/bin/php5-cgi .php

  ServerLimit           500
  StartServers            3
  MinSpareThreads         3
  MaxSpareThreads        10
  ThreadsPerChild        10
  MaxClients            300
  MaxRequestsPerChild  1000

  PHP_Fix_Pathinfo_Enable 1
</IfModule>

Then I had to edit /etc/phpmyadmin/apache.conf to add +ExecCGI in the  section:

root@srvr-sandbox1:/etc/phpmyadmin# cat apache.conf
# phpMyAdmin default Apache configuration

Alias /phpmyadmin /usr/share/phpmyadmin

<Directory /usr/share/phpmyadmin>
        Options FollowSymLinks +ExecCGI
        DirectoryIndex index.php
....


What is the difference between "ifconfig interface down" and "rfkill block"?

ifconfig is used to configure your network interface. You can use it for many things such as Changing your machine's IP address.

  Ifconfig is used to configure the kernel-resident network interfaces.
  It is used at boot time to set up interfaces as necessary. After that,
  it is usually only needed when debugging or when system tuning is
  needed.  Mark an interface "down".  When an interface is marked
  "down", the system will not attempt to transmit messages through that
  interface.  If possible, the interface will be reset to disable
  reception as well.1

  rfkill is a small tool to query the state of the rfkill switches,
  buttons and subsystem interfaces.  It is a command-line tool with
  which you can query and change RFKill-enabled devices on the system.
  To obtain the tool, install the rfkill package.2

1Source:manpagez

2Source:Red hat


Removing Ubuntu to install Arch Linux dual booting with pre installed Windows 8

You do not need to “uninstall” an operating system. Simply replace it with the new one. Launch the Arch Linux installer and select to overwrite the Ubuntu partition. Arch’s GRUB should detect Windows just like Ubuntu does.


Set up PHP and Django Virtualhosts on a single Apache2 Server

It depends on how you want to deploy Django, what version you want to deploy, and how you want your website to work, there is no real answer for this. There are a lot of tutorials on how to deploy Django X.X.X on Apache2, follow the one that fits you the best.

I did it using mod_wsgi. You can add a virtual host for the website or an WSGI allias on httpd.conf and /etc/apache2/sites-available/default. Remember to configure your wsgi.py if your Django version doesn't do it for you.

By the way serverfault might be a better place to ask.


Microsoft Office Windows 7 style on ubuntu (with Wine?)

So like GreyscaleImag3s and Naveen said, it probably isn't realy on Ubuntu, but just launched with vnc remote connection or whatever but it is not installed on Ubuntu.
thanks to  Naveen and GreyscaleImag3s for the help!


For older releases like 12.10:

(This release is End of Lifed, consider upgrading!)

I have prepared PPA with MySQL 5.6 packages based on MySQL 5.5 Debian packages.  No guarantee that it will work right away, but I would be grateful if you can try it and report back success (or failure).

There are PPAs for MySQL 5.5 and MySQL 5.6, both with latest upstream source.

MySQL 5.5: https://launchpad.net/~ondrej/+archive/mysql-5.5

MySQL 5.6: https://launchpad.net/~ondrej/+archive/mysql-5.6

Update: The MySQL 5.6 packages failed on clean install and that has been fixed.  If you find more errors please contact me directly via launchpad, or on https://github.com/oerdnj/deb.sury.org/issues


extracting particular numbers from text file and conversion to year month and day

You can use a combination of sed, xargs and date:

$ sed -r 's/.{4}([0-9]{3}).*/\1/' input | xargs -i date -d '2014-01-01 + {} days - 1 day' '+%Y %m %d'
2014 03 08
2014 03 09
2014 03 10

Then you can read the values into variables:

sed -r 's/.{4}([0-9]{3}).*/\1/' input | xargs -i date -d '2014-01-01 + {} days - 1 day' '+%Y %m %d' |
  while read year month day
  do
     echo "Year: $year"
     echo "Month: $month"
     echo "Day: $day"
  done

References:

How to convert from day of year and year to a date YYYYMMDD?

The previous code used a fixed year. To use the year given by the extension, we can tell sed to create a complete date string for date:

sed -r 's/.{4}([0-9]{3}).\.([0-9]{2}).*/20\2-01-01 + \1 days - 1 day/' input | xargs -i date -d {} '+%Y %m %d'


Icon themes does not apply to GNOME launcher

when you install the Icon theme in this way

sudo apt-add-repository ppa:numix/ppa
sudo apt-get update
sudo apt-get install numix-icon-theme-circle

select Numix-Circle Icon theme..


Why does "apt-get .update" increase memory usage significantly?

Memory use by apt is a combination of what it's doing, and how it's doing that job.

The apt update (or apt-get update on older systems) downloads not a mere list of the available packages, but a complete database of packages, versions, descriptions, and assorted information. It downloads this database from each repository.

You can see the size of each file using the command ls -lh /var/lib/apt/lists

Here's an example from 17.04. The files loaded downloaded in an update, and reloaded every time you run apt are close to 10 MB:

-rw-r--r-- 1 root root  88K Oct 24 06:41 security.ubuntu.com_ubuntu_dists_zesty-security_InRelease
-rw-r--r-- 1 root root  15K Oct 24 04:56 security.ubuntu.com_ubuntu_dists_zesty-security_main_dep11_Components-amd64.yml.gz
-rw-r--r-- 1 root root  18K Oct 24 04:56 security.ubuntu.com_ubuntu_dists_zesty-security_main_dep11_icons-64x64.tar.gz
-rw-r--r-- 1 root root  156 Oct 24 05:02 security.ubuntu.com_ubuntu_dists_zesty-security_multiverse_dep11_Components-amd64.yml.gz
-rw-r--r-- 1 root root  27K Oct 24 04:59 security.ubuntu.com_ubuntu_dists_zesty-security_universe_dep11_Components-amd64.yml.gz
-rw-r--r-- 1 root root  41K Oct 24 04:59 security.ubuntu.com_ubuntu_dists_zesty-security_universe_dep11_icons-64x64.tar.gz
-rw-r--r-- 1 root root  88K Oct 24 06:37 us.archive.ubuntu.com_ubuntu_dists_zesty-backports_InRelease
-rw-r--r-- 1 root root 4.8K Oct 24 04:42 us.archive.ubuntu.com_ubuntu_dists_zesty-backports_universe_dep11_Components-amd64.yml.gz
-rw-r--r-- 1 root root  88K Oct 24 06:37 us.archive.ubuntu.com_ubuntu_dists_zesty-updates_InRelease
-rw-r--r-- 1 root root 1.4M Oct 24 01:55 us.archive.ubuntu.com_ubuntu_dists_zesty-updates_main_binary-amd64_Packages
-rw-r--r-- 1 root root 1.3M Oct 24 01:55 us.archive.ubuntu.com_ubuntu_dists_zesty-updates_main_binary-i386_Packages
-rw-r--r-- 1 root root  63K Oct 24 05:06 us.archive.ubuntu.com_ubuntu_dists_zesty-updates_main_dep11_Components-amd64.yml.gz
-rw-r--r-- 1 root root  32K Oct 24 05:06 us.archive.ubuntu.com_ubuntu_dists_zesty-updates_main_dep11_icons-64x64.tar.gz
-rw-r--r-- 1 root root 6.2K Oct 24 05:12 us.archive.ubuntu.com_ubuntu_dists_zesty-updates_multiverse_dep11_Components-amd64.yml.gz
-rw-r--r-- 1 root root 879K Oct 24 01:55 us.archive.ubuntu.com_ubuntu_dists_zesty-updates_universe_binary-amd64_Packages
-rw-r--r-- 1 root root 877K Oct 24 01:55 us.archive.ubuntu.com_ubuntu_dists_zesty-updates_universe_binary-i386_Packages
-rw-r--r-- 1 root root 221K Oct 24 05:09 us.archive.ubuntu.com_ubuntu_dists_zesty-updates_universe_dep11_Components-amd64.yml.gz
-rw-r--r-- 1 root root 242K Oct 24 05:09 us.archive.ubuntu.com_ubuntu_dists_zesty-updates_universe_dep11_icons-64x64.tar.gz

The reason apt takes 200 MB instead of 10 MB is that apt must then merge all those databases into one, and then sort and filter that enormous database to actually calculate a package action. Each action takes more and more memory.

Most apt functions are written in Python3, which makes them easy to maintain but relies upon Python3's garbage collection and memory management. Python is not a memory-hog by any means, but it's also memory-efficient when, say, merging databases. Try it: Write a set of databases, and see hum much memory it takes for Python3 to merge them. If this bothers you, then feel free to contribute a better algorithm to Python3.

Finally, apt (and Python3) free their used memory upon completion. If you discover a memory leak in apt, please file a bug report!


ERROR: Packet source 'wlan0' failed to set channel 2: mac80211_setchannel() in Kismet and Ubuntu 12.10

I believe ncsource=wlan0 is correct.

Some cards have trouble switching to monitor mode seamlessly at the command of Kismet.

I have to do:

sudo ifconfig wlan0 down
sudo iwconfig wlan0 mode monitor
sudo kismet

I also notice the channel lists include 802.11a channels; if you know your card doesn't do 802.11a, you might comment out those lines in kismet.conf.