How do you make Ubuntu Server accept files sent over bluetooth?

A quick look in dconf-editor and...

gsettings set org.gnome.desktop.file-sharing bluetooth-obexpush-enabled VALUE

Is the equivalent to 'Receive files in Downloads folder over Bluetooth', VALUE can be true or false

gsettings set org.gnome.desktop.file-sharing bluetooth-obexpush-enabled VALUE

Is the same as 'Notify about received files', VALUE of true or false again.

gsettings set org.gnome.desktop.file-sharing bluetooth-accept-files

is the same as the 'Accept files:' selection box, VALUE can be always, bonded (Only work for set-up devices) and ask.

Here is the picture from the other question in case you need it.

You can find what the current values are using get in place of set, To reset, use reset instead.

To list the available options:

$ gsettings list-keys org.gnome.desktop.file-sharing
bluetooth-accept-files
bluetooth-allow-write
bluetooth-enabled
bluetooth-notify
bluetooth-obexpush-enabled
bluetooth-require-pairing
enabled
require-password

Here also is a list with possible values in bold

  org.gnome.desktop.file-sharing bluetooth-accept-files always bonded ask
  org.gnome.desktop.file-sharing bluetooth-allow-write true false
  org.gnome.desktop.file-sharing bluetooth-enabled true false
  org.gnome.desktop.file-sharing bluetooth-notify true false
  org.gnome.desktop.file-sharing bluetooth-obexpush-enabled true false
  org.gnome.desktop.file-sharing bluetooth-require-pairing true false
  org.gnome.desktop.file-sharing enabled true false
  org.gnome.desktop.file-sharing require-password never on_write always

More can be found using man gsettings

Hope this helps ;D - Not as though I am doing this just because I use a netbook with a broken display for file sharing, for which this could be rather helpful...

As the above answer will probably only work if you have a graphical Gnome-based desktop installed, a simpler thing may be to use bluez as in the answer here.


It seems like your actual problem is that you chose some other keyboard layout than the one you actually want.
When typing French you need to be able to type accented letters, which means that you should not use the Belgian (no dead keys) keyboard layout. With that layout, "t^ete" is the expected result if you use the key to the right of the P key.
When you run setxkbmap be you actually switch from Belgian (no dead keys) to the basic Belgian layout, and then you can successfully type "tête".
So in summary: Open /etc/default/keyboard for editing and change the line
XKBVARIANT="nodeadkeys"

to
XKBVARIANT=""

Then, after next reboot, it ought to work as expected.


Error on "make get-monolite-latest" for Mono3

You can override the URL with command line argument:

make monolite_url=http://storage.bos.xamarin.com/mono-dist-master/latest/monolite-111-latest.tar.gz get-monolite-latest


Try this
sudo apt-get install libglu1-mesa-dev


I can't install or remove any software from software center?

You should still be able to use synaptic or apt (apt-get specifically) I don't think they use the policy kit that's having problems, in case the answers in the (older) possible-dup-Q don't work.


For my Epson XP 231 for Ubuntu 16.04, I did the following steps:

Windows

I configured with a Windows 10 the printer (to enter my wifi and upgrade firmware).

On Ubuntu

I installed driver package with:

sudo apt install printer-driver-escpr

I entered "System Settings -> Printers -> Add"
In Network Printer it appeared, I selected it and selected the recommended driver

P.S: I tried to install the drivers mentioned from Epson, but only a scanner driver appeared on the official page (and it didn't work).


ubuntu shows my partitions on the launcher but it cant find my hardrive while trying to install the OS

You cannot install to a fat32 filesystem.  Delete one and leave free space for the Ubuntu installer.  The installer will make a root and a swap by default, and if you want, you may select a fourth partition for /home.


The supported formats are those documented in man date. So instead of

   %r     locale's 12-hour clock time (e.g., 11:11:04 PM)

you can use

   %I     hour (01..12)
   %M     minute (00..59)
   %p     locale's equivalent of either AM or PM; blank if not known

So change \D{%r} to \D{%I:%M%p}


Logitech k350 keyboard and m510 mouse not working unless I unplug and replug dongle 20 times

This issue seems often to occur on USB 3.0 ports, so try a USB 2.0 before continuing.

If switching ports does not work, you can try my suggestions on Arch Linux forums, you can try to force a re-enumeration of Unified devices. This can be done by writing a special request to the receiver:

# should output /dev/hidrawN where N is usually 0
hidraw=/dev/$(cd /sys/bus/hid/drivers/logitech-djreceiver/*/hidraw && echo hidraw*)
printf '\x20\xff\x81\0\0\0\0\0\0\0\0\0\0\0\0' | sudo tee "$hidraw" >/dev/null

It has been confirmed to work. You only need to perform this action once in a boot, so a startup script should be fine.


If you want a complete fresh install of vim, try this:

apt purge vim

And watch the output of that command for warnings like: could not delete so-and-so directory because it was not empty. Then delete those yourself. Then reinstall vim and it will be a fresh install.


Can I write an alias that takes an argument?

TL;DR: Use command g++ in a shell function instead of g++ in an alias.

As 6.6 Aliases in the Bash reference manual says:

  There is no mechanism for using arguments in the replacement text, as
  in csh. If arguments are needed, a shell function should be used
  (see Shell Functions).

Although an alias will expand even when it appears in front of additional text, aliases do not themselves support positional parameters (i.e., command-line arguments), so you cannot use an alias to carry out your present task. That is, you cannot use an alias to run a command with user-specified arguments followed by additional arguments.

As you've found, you can use an alias to make g++ file.cpp -o file run:

g++ `pkg-config --cflags opencv --libs opencv` file.cpp -o file

But not to make g++ file.cpp -o file run this command:

g++ file.cpp -o file `pkg-config --cflags opencv --libs opencv`

So, if you want that, you will probably want to use a shell function:

g++ () {
    command g++ `pkg-config --cflags opencv --libs opencv` "$@"
}

You can:

Run that on the command-line, and it will be defined as long as the current shell is running, within that shell instance only, or
add it to your ~/.bashrc file, and start a new shell or run . ~/.bashrc.

This defines function called g++. Since, unlike aliases, functions can call themselves, I've used the command builtin to prevent undesired recursion. command g++ calls the external g++ command. "$@" expands to all the command-line arguments passed to the function.

In the very rare case that g++ really needed to be an alias, you could "cheat" and define it as an alias to a function (just as you may define an alias to any other command). You could do that either by defining the function first or by defining it each time in the alias (as George suggests). However, there is no need for you to do this; a function will work fine.

Of course, you might not always want g++ to have the output of pkg-config --cflags opencv --libs opencv passed to it. So you might want to put the alias definition in a file and source it only when you want it. If your definition is in g++-fn.sh in your home directory, then to enable the function you can run:

. ~/g++-fn.sh

And to disable the function (no matter how it was defined), you can run:

unset -f g++

I should add that, for anything but tiny or otherwise trivial programs, you should at least consider using make (instead of invoking g++ yourself with the output of pkg-config each time), as steeldriver has suggested.


A lot depends on what exactly you intend to tweak.

If what you want to change is contained in a casper file system embedded in the ISO I don't think you can do this without at least extracting the ISO.  I don't have your specific unnamed Xubuntu ISO so I can only speak in generalities. I would approach this by

1) Extracting the ISO.

2) if necessary,  loop mounting the casper file system read/write

3) tweaking as required

4) Replacing the changed files in the ISO with isomaster as suggested here.

Note that you will require at least sufficient storage space to contain both the source and the destination ISO files and if you need to modify the casper filesystem enough space to extract that also and modify it as well.

Sources:

How to extract iso images to the hard disk?

Device type "loop" in mount command

https://stackoverflow.com/questions/2566121/what-is-casper-rw-loop-file-and-why-do-i-need-it-to-make-saving-persistant-on-us/12982030#12982030

https://packages.ubuntu.com/search?keywords=isomaster&searchon=names&suite=all&section=all

How to edit ISO Images (Including Bootable ISOs)


Export 16.10 internal error reporting to a file

Following George hint, I executed this command:

sudo grep -r '/opt/java/bin/java' /var/log/*

then I found the error messages in /var/log/apport.log.1


Open a terminal (Ctrl+Alt+T) and type:

sudo apt-get install texinfo-doc-nonfree

Then hit Enter.

This will install the package with the info info documents.


Dutch dictionary in Evolution for Ubuntu

The package you are looking for is called aspell-nl.

To install from a command line, press Ctrl-Alt-t), and enter the command:

sudo apt-get install aspell-nl

To install from Synaptic, follow these instructions (adapted from here):

Open the Synaptic package manager and search for "aspell dutch". Check the box(Mark for installation) next to aspell-nl and click apply to install.
Restart Evolution.
Go to Edit -> Preferences -> Composer Preferences -> Spell
Checking

You should see the Dutch/Flemish language dictionary installed.
Finally, open a new message and verify that the spell check works correctly.


SSH via jump server and then use a command

Just before I posted my question, a stackoverflow recommendation for this pointed me to this answer
I changed my command according to that answer and this is now what I have and it works :)
ssh -t hopping "command; ssh -t lb3 'command; varnishadm -S /opt/varnish_secret -T 127.0.0.1:6082 ban \"req.url ~ .\"'"


Yes it is possible, but not recommended. The username root is not magical. The fact that it has a UID of 0 is what gives root its power. Tools like /bin/ls that translate between the UID value in a file's inode and a name (unless you /bin/ls -n) use the password database (See man nss;man nsswitch.conf) to do the translation. The getent command fetches entries:

 $ getent passwd root
 root:x:0:0:root:/root:/bin/bash

(See man 5 passwd;man shadow for info about the contents.)

So, you could edit /etc/passwd, find the line with the UID of zero, and change the user name of root to some other value.

What do you suppose you have gained? Do you know of any program dumb enough to check for $USERNAME = "root" rather than$UID = 0`? The system sure doesn't.


Is missing cockpit-docker no longer in the 20.04 repository?

Though they do not build cockpit-docker for Ubuntu 20.04 or later anymore, you can still install older versions according to this.

I downloaded cockpit-docker_215-1~ubuntu19.10.1_all.deb and installed manually.
It seems to be working now.


Install GNU Scientific library (GSL) on Ubuntu 14.04 via terminal

The GSL source package provides the following binary packages:

gsl-bin: GNU Scientific Library (GSL) -- binary package
libgsl0-dbg: GNU Scientific Library (GSL) -- debug symbols package
libgsl0-dev: GNU Scientific Library (GSL) -- development package
libgsl0ldbl: GNU Scientific Library (GSL) -- library package

To install the library package, open a Terminal and type:

sudo apt-get install libgsl0ldbl


Ubuntu 18.10 - Unattended-upgrades-shutdown --wait-for-signal

It's a safety feature. Leave it alone.

Apt data (packages and metadata) can be corrupted if apt happens to be running when the system halts (shuts down). The unattended-updates-shutdown script temporarily inhibits a shutdown signal until apt finishes.

The script cannot prevent corruption due to a sudden power loss, or holding the power button, while apt happens to be running. Another reason to avoid those, and to keep regular backups.

The script is in Python, including the developer's comments. Feel free to read it and see for yourself.


no root file system on ubuntu 16 packer install

I've had the same issue with the QEMU builder of Packer. The problem in my case was, that I defined the line

d-i partman-auto/disk string /dev/sda

in my preseed file, but Packer found no disk (same 'no file system' error as mentioned above). The line had to be changed to

d-i partman-auto/disk string /dev/vda

to work with QEMU.


troubles with a fresh install of Xubuntu 16.04 on my Lenovo X240

Ok I solved it :

I deleted the line : GRUB_CMD_LINE_LINUX="nomodeset" from /etc/default/grub : sudo nano /etc/default/grub
then I did a grub update : sudo update-grub

note : strange how nomodeset was so critical...


Can't connect to local MySQL server through socket '/tmp/mysql_2.sock' during manual installation of mysql

You should:

Add a user for your mysql server useradd -r -s /bin/false -m -d /mysql mysql
Write an upstart script for your server.
Check that the pid file and socket files can be created by your mysql user by executing the proper chmod's.


These are the complete steps you need to have Windows and Ubuntu on the boot menu, you will need a live disk to go into the terminal.
After it boots go into the terminal and enter the following command:
    sudo fdisk -l

This command will show you all the partitions on your HDD, you have to know which partition your Linux distro is installed on (Gparted can be a great help in that).

Use gparted to see where is Linux installed

and enter this command:

sudo mount /dev/sda1 /mnt

then this command:

sudo mount --bind /dev /mnt/dev

then this command

sudo chroot /mnt

then this command

grub-install /dev/sda

then this command

update-grub

If the computer boots directly into Ubuntu (or whatever Linux distro you have)
go to the terminal and enter:

sudo update-grub

Finally reboot and you will have the grub menu with Both Linux and Windows!


Changed account to auto login, now su password does not work

I had the same problem earlier, if you only have one user then chances are that the user password and root password are the same which was true in my case. enter:

passwd

into terminal and set a new password. Then sudo -i login again with that password. it worked for me...


Any command to change file names with only 4 digits after decimal point or rounded-off to nearest integer

There are probably other ways to do it, but Perl is the one that comes to me most easily.  To do so, go into the directory where the files are located and run the command perl -E 'rename $_, sprintf(q(%0.4f), $_) for @ARGV' *.

The following example demonstrates, by using touch to create files with the names specified in the question, runs the command to rename them, and then uses ls to show that they have been renamed as specified:

$ touch 2.01149, 2.1149 2.35698 2.545 2.95874566
$ perl -E 'rename $_, sprintf(q(%0.4f), $_) for @ARGV' *
$ ls
2.0115  2.1149  2.3570  2.5450  2.9587


Wireless is disabled after reboot, suspend, hibernate in 12.04

Try command

sudo rfkill unblock all

If you want this code to run every time when your system boots up, paste this command in the file

/etc/rc.local

and save it.


How to install gulp globally in current project?

Have you tried running it as with sudo?

sudo npm install --global gulp
sudo npm install -g gulp

The other command is when you try to default gulp file, you should install gulp first.

For gulp command version:

If you have previously installed a version of gulp globally, please run

$ npm rm --global gulp

to make sure your old version doesn't collide with gulp-cli.

$ npm install --global gulp-cli

Install gulp in your project devDependencies:

$ npm install --save-dev gulp

Create a gulpfile.js at the root of your project:

var gulp = require('gulp');

gulp.task('default', function() {
  // place code for your default task here
});

Run gulp:

$ gulp

If you have problems running gulp, consider nodejs tries to call it from bad location, so you can add:

sudo ln -s /usr/bin/nodejs /usr/bin/node


The Issue in the above scenario was with USB Emulation in BIOS.
After i switched the USB Emulation to 'Fixed Media', the installation was flawless.


How to set/change Resolution to '1280 x 1024' on 12.0 or 13.04?

This occurs because the monitor has not been recognised as one able to offer the higher resolution. xrandr and its gui counterpart arandr can allow you to address these problems.

Type xrandr at the command line and you will get a list of resolution the system thinks your monitor can handle. I get something like this:

$ xrandr
Screen 0: minimum 320 x 200, current 1680 x 1050, maximum 4096 x 4096
VGA1 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1680x1050_60.00   60.0*+
   1024x768       60.0
   800x600        60.3     56.2
   848x480        60.0
   640x480        59.9

if the resolution is not present three steps are reuired.
First you will need to get the information required to create a command to allow you to set your new resolution. (Notice the VGA1?  This is the name of the monitor...remember this for later) To do so use a command called cvt. e.g. in your case  cvt 1280 1024

I get something like this: -

$ cvt 1280 1024
# 1280x1024 59.89 Hz (CVT 1.31M4) hsync: 63.67 kHz; pclk: 109.00 MHz
Modeline "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync

Then you have to create a new mode for xrandr using above information...Copy and paste (Control C and Control V) sometimes does not work.  highlight and middle click seems to work better.

$xrandr --newmode "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync

and then allow this resolution to be used by VGA1 (or whatever your monitor was called) using

$ xrandr --addmode VGA1 1280x1024_60.00

To start using this newly added mode...

$ xrandr --output VGA1 --mode 1280x1024_60.00

Your computer will now be in the required resolution.  If this works then you can now think of incorporating this into xorg.conf.  you can also make a start up script to have the same effect.  Both are described in detail in this section


Set max power level of Nvidia PowerMizer to 1

Two comments,

One way to get what you ask is to create a file named /etc/modprobe.d/nvidia-user-registry.conf with the following single line ...

options nvidia NVreg_RegistryDwords="OverrideMaxPerf=0x2"

... then update your init ram disk and reboot

$ sudo update-initramfs -u
$ sudo shutdown -r now

Alternatively, use the following line for nvidia-user-registry.conf and the machine SHOULD use power level 0 when unplugged, and power level 1 when plugged in.

options nvidia NVreg_RegistryDwords="PowerMizerEnable=0x1;PerfLevelSrc=0x3322;PowerMizerDefault=0x3;PowerMizerDefaultAC=0x2"

Best of luck!


HP Pavillion 360. No wifi, trying to load wrong driver?

Run in a terminal

sudo tee /etc/modprobe.d/blacklist-acer.conf <<< "blacklist acer_wmi"
sudo modrobe -r acer_wmi
sudo rfkill unblock all


Searching the internet I found that the problem is with openjdk's support with the UI.

The solution is pretty simple.

Uninstall openjdk
Install oracle jdk
Reinstall Netbeans

Use the following commands:

sudo apt-get remove openjdk*
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
sudo apt-get install oracle-java7-set-default

And install* Netbeans again, this should fix the problem.

*Usually via bash, for example: bash netbeans-8.0


Try this:

Delete all package lists and download them again

sudo rm /var/lib/apt/lists/* -vf
sudo apt-get clean
sudo apt-get update

Edit: Finally, the solution from here worked.


https://launchpad.net/~stebbins/+archive/handbrake-releases shows there's some omitted portions of the required addition. It's gotta start with http://ppa.launchpad.net/ and there are different lines for different Ubuntu versions... and none yet for 13.10.


The Ctrl+Alt+F1 to Ctrl+Alt+F7 keys toggle between TTYs. Those are basically different consoles you can use to log in. In case there is a desktop running, it's normally on tty7, so just press Ctrl+Alt+F7 to go back to your desktop.


How to turn on fingerprint login in Ubuntu 20.04?

The Yoga 730 uses a "special" Synaptics fingerprint reader that does not work out of the box with either fprint or thinkfinger. There is a prototype driver being built by some talented people, but it's not 100% solid just yet.
For the moment the fingerprint reader on your Lenovo will likely sit idle. Hopefully there will be a compatible driver available by the time the next LTS rolls around.


There is a command "last" which tells you about the log in time of all users. It might be helpful for your scenario , you can know more about it by reading its man page.


Sony Vaio (SVE15129CAB) Built in SD Card Reader (RTS5116) Realtek NOT Working Ubuntu 12.04

Don't know if this will help or not, but I had a similar problem. SD Card recognixed if booted with it in, but not if put in after boot. Solved by checking BIOS settings for SD Card reader and found it set to "floppy" - changed to Auto and seems to work now....


Why is Thunderbird pegging a core at 100%?

Change the configuration key

  mail.db.idle_limit

to

  30000000

In Preferences->Advanced->General->Config-editor

Source: http://rainbow.chard.org/2013/02/19/thunderbird-high-cpu/


Kubuntu automatically mount USB in /media/usb0 as read-only

I remove usbmount (that I installed earlier) ;
configure removable devices dialog (see KDE Plasma 5 Missing Removable Devices Option ):

kcmshell4 device_automounter_kcm

Starting 'Removable Device Automounter' from the Service Manager using

kcmshell4 kcmkded

unplug, replug and voilà!


Virtualbox-5.1 - Shared Clipboard and Drag'n'Drop options not working

This is not the best answer to your question because it ignores the problem and accomplishes transfers another way. Nevertheless, I'm posting this answer anyway because I've been in your shoes, and I typically resort to using the virtual network between VM and host to transfer files. Instead of wasting time trying to get vbox features to work, I just use netcat to perform an insecure file transfer. The fact that it's insecure would only matter if your VM is visible to your host's local network. By default, it uses NAT, so that fact that it's an insecure transfer is likely inconsequential.

Assumptions:

Default network settings (NAT, no virtual network customization)
Guest VM can see host computer at 10.0.2.2 (typical default for VirtualBox)

Getting the hosts virtual network IP: (Added 2017-05-06)

You could use your host's IP for whatever non-virtual network it's connected to, but I would advise against that for security reasons. Use the IP from the virtual network. It's safer.

In the virtual machine guest OS, open a terminal and run the following command:

route -n | grep -P "^0.0.0.0" | tr -s ' ' | cut -f2 -d ' '

The IP address that is returned by this command is the IP address you'll substitute below in the nc commands. Mine is 10.0.2.2

Host -> Guest file transfer:

On your host, run cat /your/file/to/transfer | nc -l 21435. Here, 21435 is the port to use. You can subsitute any unused port.
On the guest machine run nc 10.0.2.2 21435 > /your/file/to/save.

Guest -> Host file transfer:

On your host, run nc -l 21435 > /your/file/to/save.
On the guest machine run cat /your/file/to/transfer | nc 10.0.2.2 21435.

Regardless of the direction of the transfer, make sure you run the commands above in the order listed (for the direction in question). This is important because the first command starts a listening service to which the second command connects. After running the first command, the terminal will appear to become unresponsive. The program is running and listening on that machine. Once the second command is run on the other machine and the transfer completes, the terminals on both machines will "become responsive" again (ie. nc will exit).

To transfer multiple files, it may be easier to compress them all into a single archive file first.

I would not advise doing sensitive file transfers like this over a network that other parties might be able to eavesdrop on unless you were to take other means to encrypt the data.


Wireless mouse temporarily freezes (sleeps) on battery power

I found a solution on this page:

http://ubuntuforums.org/showthread.php?t=1675277

here's what I did:

in /etc/laptop-mode/conf.d/usb-autosuspend.conf

CONTROL_USB_AUTOSUSPEND=0

And everything works normal now.


What does `cat passwd | awk -F':' '{printf $1}'` do?

cat passwd outputs the contents of a file named passwd in the current directory. The awk command then parses it, splits each line with : as the field separator and prints the first field.

If you don't get any output, either:

there is no file named passwd in the current directory
there is a file, but it is empty
there is a file, but the first fields of all lines in it are empty (the lines begin with :).

What the command presumably is meant to do is parse /etc/passwd. In which case, you can do:

awk -F: '{print $1}' /etc/passwd

Further, unless you want to restrict the command to local accounts, uses getent passwd instead of using the /etc/passwd file:

getent passwd | awk -F: '{print $1}'


Troubleshooting KVM's guest anaconda installer logs

The below solution worked for me.
Used below commands to start rsyslog on port 6080 on the host machine (Redhat7.8 Azure VM) and modified the virt-install script as below to direct anaconda logging to the host machine

yum install -y anaconda

mkdir -p /home/shaaga/remote_inst

eval `analog -p 6080 -o rsyslogd.conf -s /home/shaaga/remote_inst

virt-install --location /datadrive/iso_images/rhel7.9-dvd.iso
--disk /datadrive/rhel79-oracle-$1.img,size=40,format=raw
--os-variant rhel7.0
--initrd-inject ./ks-rhel79-oracle.cfg
--extra-args="ks=file:/ks-rhel79-oracle.cfg"
--vcpus 2
--memory 2048
--noreboot
--name rhel79-oracle-$1
--channel tcp,host=127.0.0.1:6080,mode=connect,target_type=virtio,name=org.fedoraproject.anaconda.log.0


Can't use apt AT ALL for installing or removing ANY package - 'could not load /boot/System.map-4.8.0-59-generic: No such file or directory'

It's an initramfs-tools bug opened in this link: https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1776652

In this specific case it was triggered by faulty line in /usr/share/initramfs-tools/hooks/kmod

#!/bin/sh -e
# Copy the compatibility symlinks until initramfs-tools will be converted
# to use the kmod program.

if [ "$1" = "prereqs" ]; then exit 0; fi

. /usr/share/initramfs-tools/hook-functions

copy_exec /bin/kmod
cp -a /sbin/modprobe /sbin/rmmod $DESTDIR/sbin/

mkdir -p $DESTDIR/lib/modprobe.d/
if [ "$(echo /lib/modprobe.d/*)" != "/lib/modprobe.d/*" ]; then
  cp -a /lib/modprobe.d/* $DESTDIR/lib/modprobe.d/
fi

Commenting the line

 #cp -a /sbin/modprobe /sbin/rmmod $DESTDIR/sbin/

tricks update-initramfs command to bypass the error.


sshd not listening on port 22 after upgrade to 18.04

It seems that the server goes into sleep state. The ping to the server is not a solid prove. The card itself could be active while the server is in sleep state (e.g. WAkeOverLan uses this method to start sleeping machines in the morning, if configured).

To test this behavior you could simply open a ssh connection in a terminal from another machine and keep the connection open with keepalive packets, which can be set under /etc/ssh/ssh_config. Add the following lines...

ServerAliveInterval 120

After that the connection to the server should stay open all the time. If it does not, then most probably your server suspended into sleep state.


Xubuntu: black screen after lock screen (light-locker, lightdm, logind, xfce4-power-manager)

The issue is due to lightlocker and XFCE no longer playing well.

I was able to fix this issue by upgrading to XFCE 4.14 from the Xubuntu staging PPA, removing light-locker and installing xfce4-screensaver. Please note I did this from a clean install of 18.04.3, so you might need to restore any changed settings.

sudo add-apt-repository ppa:xubuntu-dev/staging
sudo apt update
sudo apt upgrade
sudo apt remove light-locker
sudo apt install xfce4-screensaver


Installing customized GDM theme: Replacing ubuntu.css vs Using "update-alternatives --install .... gdm3.css"

In a fresh Install of Ubuntu 18.04,

If you observe the file /usr/share/gnome-shell/modes/ubuntu.json

{
    "parentMode": "user",
    "stylesheetName": "ubuntu.css",
    "enabledExtensions": ["ubuntu-dock@ubuntu.com", "ubuntu-appindicators@ubuntu.com"]
}

the line stylesheeName: ubuntu.css indicates that the default-shell theme (i.e when no user-theme gnome-shell-extension is installed) uses the theme file /usr/share/gnome-shell/theme/ubuntu.css

and the background you will have in this file, uses for the unlock-screen background

So when you use your "Approach B" you need to edit the line like this: sylesheetName: "mytheme/mytheme.css",


Is there any way to unformat an external hard drive?

Take a look at  testdisk. It should recover most of the data if the drive is formatted "quickly".


Install of VPN Unlimited fails on 16.04. How do I fix this please?

VPN Unlimited support replied to my email to them within a few minutes supplying the following information for Ubuntu 16.04.

Here is version for 64 bit CPUs and Ubuntu versions:
https://d3djt1islyfo23.cloudfront.net/vpn-unlimited_3.2-amd64.deb
This is for 32 bit Ubuntu 16.04 distro
https://d3djt1islyfo23.cloudfront.net/vpn-unlimited_3.2-i386.deb

You should download package for your distribution and install VPN Unlimited through Ubuntu package manager.
Or you can do this through root terminal application:

sudo apt-get update
sudo apt-get upgrade
sudo dpkg -i vpn-unlimited_3.2-i386.deb
sudo apt-get -f install


Pressing enter produces ^M instead of a newline

In case anybody else has this problem, it is most likely a problem with the stty terminal line setting rather than a TERM problem. If this happens to you again, try running stty sane and let us know if that fixes it.


Is a 40GB SSD practical to use for ' / '

I've used a 32gb one in the past and a 40gb SSD as / for some time now. I leave the swap on / and /home on my spinning disk. It's a great way to add some performance for about a hundred bucks.

I created a directory called /var/jorge (on the SSD) to hold things from /home that would benefit an SSD, so I moved and symlinked the following directories:

/home/jorge/.cache -> /var/jorge/.cache
/home/jorge/.config -> /var/jorge/.config
/home/jorge/.gconf -> /var/jorge/.gconf

This way your browser profiles and other things that matter are on the fast SSD. I've been using about ~15GB for my desktop install (with a bunch of -dev packages) and it doesn't seem to get larger than that. To answer your third question, yes, it's always possible to have different disks and partitions and split it up.

Look here for instructions on how to link them up and other directories to consider:

How do I symlink certain directories in /home to an SSD?
What in /home would benefit from being on an SSD?


Accidentally resized ext4fs over 16TB limit, how to rollback?

It seems that the weird behavior regarding lvresize using the --resizefs option together with ext filesystem and to-the-last-byte complete 16 TB large partition was first seen already back in 2009: (https://www.redhat.com/archives/ext3-users/2009-January/msg00003.html)

"We should probably make mkfs just silently lop off one block if it encounters a boundary condition like this ..."

The end credits?

We were able to fix the situation by hacking the superblock by hand. We took a LVM snapshot of the start situation first. Then we dumped the first 64k bytes of the partition to a file for a closer examination. The Inode Count and Block Count values at the very beginning of the Superblock were corrupted due to the bug listed above. (https://ext4.wiki.kernel.org/index.php/Ext4_Disk_Layout#Layout)

As per studying e2fsprogs source code we determined that by writing the Inode Count and Block Count values one Block Group smaller (32k) of the maximum to the Superblock could be a nice thing to try and it worked. The bytes were

00 80 ff ff 00 80 ff ff

and we just dd'ed them to the partition.

With newest version of self-compiled e2fsprogs' fsck was able to fix the rest of the errors. All seems ok now.


How to install Ubuntu on ASUS F556U, JournalError error?

Almost all systems need to have UEFI/BIOS updated to latest available from vendor.
So first thing to check is if UEFI/BIOS is latest version from vendor. Normally there is only one version and it may say Windows. But Microsoft requires vendors to allow users to turn off UEFI Secure Boot. But even if UEFI Secure boot is on, Ubuntu should install. But proprietary drivers may require you to turn off Secure Boot.

Many Asus models need a boot parameter pci=nomsi. On initial boot you can manually add it to grub menu. But if a parameter is always required you will want to make it permanent by editing this and then updating grub.

https://wiki.ubuntu.com/Kernel/KernelBootParameters

sudo nano /etc/default/grub
sudo update-grub

Change this in /etc/default/grub:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci=nomsi"

Similar systems with issue:
ASUS X540U pci=noaer instead of pci=nomsi and it also worked

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

Problems Installing on ASUS F555U   needed boot option pci=nomsi

http://ubuntuforums.org/showthread.php?t=2303665

Asus x555u w/o pci=nomsi - space issue on drive and runaway log files filling drive

https://ubuntuforums.org/showthread.php?t=2327103&page=3

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


AMD proprietary drivers can only use 2 monitors (ubuntu 13.04)

the new beta 13.8 drivers from AMD actually took care of the issue for me, and supported all monitors out of the box.  Just make sure when you access amdcccle that you use gksu instead of sudo.  thus far everything has been working great now.


Create a bootable Ubuntu disc and install using that http://www.ubuntu.com/download/desktop. It will work pretty much the same way as installing from a live USB.


Remaster Installation Image for Ubuntu 20.10

Much has changed in Ubuntu's ISO:
The BIOS boot image and MBR are now from GRUB.
The EFI System Partition is not a file in the ISO any more.
The partition table is now GPT. But the ISO keeps its old jackalope
style by an additional MBR partition of type 00 and size 1. This nearly
not existing partition holds the boot flag for some few old BIOS machines
which boot only if this flag is present in some MBR partition entry.
The protective MBR partition of type EE is not allowed to bear this flag.

$ /sbin/fdisk -l ubuntu-20.10-desktop-amd64.iso
...
Disklabel type: gpt
...
Device                            Start     End Sectors  Size Type
ubuntu-20.10-desktop-amd64.iso1      64 5735483 5735420  2.8G Microsoft basic da
ubuntu-20.10-desktop-amd64.iso2 5735484 5745435    9952  4.9M EFI System
ubuntu-20.10-desktop-amd64.iso3 5745436 5746035     600  300K Microsoft basic da

You may extract MBR and EFI partition image from the original ISO.

orig=ubuntu-20.10-desktop-amd64.iso
mbr=ubuntu-20.10-desktop-amd64.mbr
efi=ubuntu-20.10-desktop-amd64.efi

# Extract the MBR template
dd if="$orig" bs=1 count=446 of="$mbr"

# Extract EFI partition image
skip=$(/sbin/fdisk -l "$orig" | fgrep '.iso2 ' | awk '{print $2}')
size=$(/sbin/fdisk -l "$orig" | fgrep '.iso2 ' | awk '{print $4}')
dd if="$orig" bs=512 skip="$skip" count="$size" of="$efi"

Now you can pack up the new ISO:

new=Image.iso

xorriso -as mkisofs \
  -r -V "$disk_title" -J -joliet-long -l \
  -iso-level 3 \
  -partition_offset 16 \
  --grub2-mbr "$mbr" \
  --mbr-force-bootable \
  -append_partition 2 0xEF "$efi" \
  -appended_part_as_gpt \
  -c /boot.catalog \
  -b /boot/grub/i386-pc/eltorito.img \
    -no-emul-boot -boot-load-size 4 -boot-info-table --grub2-boot-info \
  -eltorito-alt-boot \
  -e '--interval:appended_partition_2:all::' \
    -no-emul-boot \
  -o "$new" \
  unpackedImageDirectory

I obtained the boot preparation options from a run of

xorriso -indev "$orig" -report_el_torito as_mkisofs

Regrettably xorriso <= 1.5.2 has a bug in the output of this command with
ISOs using --mbr-force-bootable, by also reporting -as mkisofs option

-part_like_isohybrid

which would spoil the ISO for booting from new Lenovo laptops.
The newest GNU xorriso-1.5.3 tarball has this bug fixed.
Have a nice day :)
Thomas

Edit on request:
About the new boot equipment.
The set of boot lures is as crammed as in the the old ISOs:
El Torito for BIOS and EFI from optical media, MBR x86 code for
BIOS from USB stick, a partition table with EFI partition for
EFI from USB stick.
Reason to give up SYSLINUX/ISOLINUX was probably its poor maintainance
state and the fact that one needs GRUB anyways for booting via EFI
from optical media.
The old partition layout mix of ISOLINUX and GRUB did not work
with GRUB+GRUB on some modern EFI laptops. My suspicion is that they
tolerate MBR partition table only if an ISOLINUX MBR is present.
That old layout was quite an abominality if seen from the UEFI specs.
So Ubuntu went to appended partitions and GPT as partition table.
Some old HP laptops bailed out and had to be dragged in by a boot flag
in the MBR partition table.
The change was laborsome and in part painful.
https://bugs.launchpad.net/ubuntu-cdimage/+bug/1886148
https://bugs.launchpad.net/ubuntu-cdimage/+bug/1899308


How Open Specific Part of .png Figure in Ubuntu's Terminal?

There's a powerful image suite called ImageMagick. Among its tools you can find a display utility, which is used, as it is obvious from its name, to display various graphic formats from the console. Here are several examples of its usage:

display -geometry 500x500 image.png

This will open your image in the window with the selected size. Moreover, a small window representing the full image will be opened nearby, so you can move the selection rectangle to show the desired parts of your image.

display -extract 300x300+50+50 image.png

This command will show you the part of your image with the size of 300x300 pixels and with the offset of 50 pixels from its top left corner.

You can find the full list of its options in man display. Also there's an extensive manual here.

ImageMagick also provides other useful tools. For example, this will show the info about the image (its type, dimensions, size):

identify "my image.png"

In order to display your image without the margins we should measure them to crop them later. I opened your dummy picture in Gimp to make things faster. So the margins are:

Left   - 1070px
Right  -  880px
Top    -   70px
Bottom -  100px

If the original size of you picture is 8640x960 then the image size without the margins will be: X=8640-1070-880=6690 and Y=960-70-100=790, i.e. 6690x790.
And now we'll combine -geometry and -extract options to produce the output:

display -geometry 500x500 -extract 6690x790+1070+70 raw.png

(set the size of output window to 500x500, crop the image to the new size 6690x790 and shift the crop area by 1070px horizontally and by 70px vertically from the top left corner of the image).

Here's what I've got (I moved the selection to the right for more clearness):

All these calculations are a bit tedious, but if you've got static margins (it seems that your images are produced automatically), then you can calculate them once and apply to all your images. Or even make some script to automate this (that's an improved version of the script - it calculates iteration using identify command of ImageMagick):

#!/bin/bash

if [ $# -lt 2 ] ; then echo "usage: reviewimage output_resolution image_name" ; exit ; fi

OUTRES=$1
IMAGE=$2

# Some sanity or error checks, change as you see fit
if [ $OUTRES -lt 100 ] || [ $OUTRES -gt 1000 ] ; then echo "error: Invalid resolution" ; exit ; fi
if ! [ -e "$IMAGE" ] ; then echo "error: Image doesn't exist" ; exit ; fi

SHIFT=50    # Relative position of output window from top left corner of the desktop
IMAGE_X=$(identify "$IMAGE" | grep -o '[0-9]*x960 ' | cut -d'x' -f1)
IMAGE_Y=960
ITER=$(( $IMAGE_X / 960 ))
MARGIN_T=70
MARGIN_B=100
MARGIN_L=$(( -5 + $ITER * 119 ))
MARGIN_R=$(( -40 + $ITER * 102 ))
EXTRACT_X=$(( $IMAGE_X - $MARGIN_L - $MARGIN_R ))
EXTRACT_Y=$(( $IMAGE_Y - $MARGIN_T - $MARGIN_B ))

display -geometry ${OUTRES}x${OUTRES}+${SHIFT}+${SHIFT} -extract ${EXTRACT_X}x${EXTRACT_Y}+${MARGIN_L}+${MARGIN_T} "$IMAGE"

Save this script under the name reviewimage somewhere. Then run the commands below:

sudo cp reviewimage /usr/local/bin/
sudo chmod 755 /usr/local/bin/reviewimage

Now you can call this command from every folder with your images. For example, to open a preview of your image raw10.png with the size of 700x700:

reviewimage 700 raw10.png

If the name have spaces in it, use quotes:

reviewimage 700 "raw 2.png"

If the margin calculation formula becomes imprecise with high iterations you can use array of margin values. Adjust each margin value as you see fit. Script below shows the principle. It is filled with the values for iterations 1-10, add more inside the brackets with the space as a divider:

#!/bin/bash

if [ $# -ne 1 ] ; then echo "usage: convertimage image_name" ; exit ; fi
if ! [ -e "$1" ] ; then echo "error: Image doesn't exist" ; exit ; fi

IMAGE=$1

IMAGE_X=$(identify "$IMAGE" | grep -o '[0-9]*x960 ' | cut -d'x' -f1)
IMAGE_Y=960
ITER=$(( $IMAGE_X / 960 ))
MARGIN_T=70
MARGIN_B=100
MARGIN_L=(0 114 233 352 471 590 709 828 947 1066 1185)
MARGIN_R=(0 80 180 280 380 480 580 680 780 880 980)
EXTRACT_X=$(( $IMAGE_X - ${MARGIN_L[$ITER]} - ${MARGIN_R[$ITER]} ))
EXTRACT_Y=$(( $IMAGE_Y - $MARGIN_T - $MARGIN_B ))

convert "$IMAGE" -crop ${EXTRACT_X}x${EXTRACT_Y}+${MARGIN_L[$ITER]}+${MARGIN_T} "${IMAGE%.png}_cropped.png"

This script performs cropping of the image instead of displaying it, so this converted image can be viewed in any program. It needs only one parameter - image name:

convertimage "raw 9.png"


How can I force terminal to always open in a specific desktop, regardless of which one I'm in when I press the shortcut

I used compizconfig-settings-manager to open specific programs in a specific workspace. You can refer to the answer here.

However this just opens the terminal and i have to move to that work space to get to the terminal, it doesn’t do that automatically.


What is the correct way to use g_signal_connect() in C++ for dynamic unity quicklists?

Edit: okay, after a fair amount of investigation (which involved running valgrind), I have finally managed to figure out what's going on here. Your callback's signature isn't correct.

The signature for the static method should be:

void MainWindow::fake_callback(DbusmenuMenuitem *, guint, gpointer data)
{
    //...
}

Notice the addition of DbusmenuMenuitem * and guint. The first is a pointer to the DBus menu item emitting the signal and the second is a timestamp. Both must be present in the signature even if you don't use them.

g_signal_connect is invoked at runtime and has no way of knowing what parameters your function accepts and blindly just pushes the parameters on the stack assuming that the signatures match. (This differs from what you are probably used to in Qt where the MOC (Meta Object Compiler) generates enough information to know when you are trying to connect a signal to a slot with an incompatible signature.)


How can I install my Xbox 360 wired controller?

it is not necessary to install the controller in 10.04. it should just work, though not for games running wine that use the xinput interface i.e. many newer titles


Your hardware most likely doesn't meet the requirements for Unity. However, up until Ubuntu 12.04 you have alternative of Unity 2D.

  Unity 2D’s main goal is to provide a Unity environment on hardware
  platforms that don’t  support Unity’s Open GL requirements.

It's installed by default and you can easily switch to using it instead of regular Unity.


Add unallocated space to extended partitions

Yes, you can easily add the unallocated space to the extended partition with GParted.  Just select the extended partition (not one of the logical partitions inside it) and then choose the resize action.

You can not create a new primary partition from it; max. 4 primary or 3 primary + 1 extended partitions are allowed in the old MS-DOS (also incorrectly known as "MBR") partitioning scheme.  So this has nothing to do with Windows OEM installations or whatever.


"ls" with one-digit pattern gives me strange results

The wildcards in ls /usr/include/*6* expand to whatever matches. In the first case, it matched specific regular files. However, if it matches directories such as /usr/include/x86_64-linux-gnu, it'll print out the contents of those directories instead (i.e. it would have expanded to ls /usr/include/x86_64-linux-gnu).

You can verify that the wildcard would have expanded to a directory with ls /usr/include | grep 6.


How can I kill a process with a phrase in its name?

If myName is the name of the process/executable which you want to kill, you can use:

pkill myName

pkill by default sends the SIGTERM signal (signal 15). If you want the SIGKILL or signal 9, use:

pkilll -9 myName

If myName is not the process name or for example, is an argument to another (long) command, pkill (or pgrep) might not work as expected. So you need to use the -f option. From man kill:

-f, --full
              The pattern is normally only matched against the  process  name.
              When -f is set, the full command line is used.
NOTES
The process name used for matching is limited to the 15 characters present
   in the output of /proc/pid/stat.  Use the -f option to match  against  the
   complete command line, /proc/pid/cmdline.

So:

pkill -f myName

or

kill -9 $(pgrep -f myName)


Why does Kate not work with Ubuntu 20.04

First remove the SNAP package, then install the apt version.

$ sudo snap remove kate
...
$ sudo apt install kate
...
$ kate --version
kate 19.12.3

This might not be the latest version, but it sure works (20.04)
To me snap packages are a nuisance due to not having "sane" security settings provided with/inside them, and most of all NOT adjusted to a home user's needs.


My solution is rather simple.

Simply open terminal and write

sudo gedit /etc/rc.local

And then add these 2 lines just before the last line

cd /opt/lampp/
sudo ./lampp start

And that's it. Simply save and restart the computer. Please note that these lines should be above the last line that says exit 0

I hope it helps someone else.


How do I generate a list of packages added since installation

See the answer to How to view a list of packages that were manually installed without their dependancies.

You can list the apt-get command-line commands you have typed since installation of Ubuntu with:

cat /var/log/apt/history.log | grep 'apt-get install '


Recover 1TB disk erased with startup disk creator

Try to recover the partition with TestDisk.
Careful: don't write on the drive.

Instructions step-by-step:

Install TestDisk
Mount the drive
Launch sudo testdisk (eventually enlarge the terminal)
Create a new log file
Select the drive
Select partition Table (usually Intel should be good)
Analyse
Quick Search (this should found only the actual partition)
[Enter]
Deeper Search (this should find your old partition, you can stop it after it found it) Once you found what you think it's your partition select it with up/down arrows
[P] for list files and look if it seems it
[q] to quit list files
[Enter]
Write to save new partition table to MBR.

Look carefully: this don't overwrite / recover any data, just the MBR of the disk.


Windows 8.1 doesn't recognize ubuntu 14.04 LTS

I always install Windows first, then Ubuntu.


GNOME Ubuntu 15.04 interchanging keyboard layouts

Solved in Question by OP

  Just noticed that I always use Alt+Shift to switch between layouts. But I now I've tried to use Alt+Space and everything works as expected!


5.1 audio via HDMI only plays on two channels

Ah, I figured it out!

tl;dr: the problem was the S/PDIF link between my TV and speakers, which can only carry two uncompressed audio channels.

What triggered my understanding and a very deep dive down the rabbit hole of various incompatible drivers, audio containers/codecs, and cable types was this forum post: http://www.tomsguide.com/forum/59518-6-working-connected-hdmi-optical#561415

Basically, the problem is that when I do that speaker test, Ubuntu is outputting uncompressed 5.1 audio over HDMI. My TV receives that and tries to transmit it to my speakers over S/PDIF, but S/PDIF only supports 2 channels of uncompressed audio! So, it gets downsampled to only 2 channels.

I was fooled into thinking this should work because I've obviously played 5.1 audio over S/PDIF prior to this, but what I didn't realize is that it was encoded via Dolby or DTS to work over S/PDIF.

It seems like my possible solutions are:

Continue to output 5.1 uncompressed audio and replace my S/PDIF cable with an HDMI cable.
Change PulseAudio to output 2 channel audio and enable DTS/AC3 passthru both in PulseAudio and Kodi, as described here: Enabling 7.1 audio passthru in 14.04 for Kodi

I'm not sure that either has a particular advantage. Option 2 involves fewer cables, but if I try to play a file with 5.1 channel PCM encoding (I imagine that's pretty rare) I'll be out of luck.

Another thing that wasn't obvious to me in setting up PAVU Control is that Dolby technically AC3, and Dolby Plus is EAC3.


no notifications from calendar and reminders apps on Aquaris E4.5 Ubuntu Editon

At this point in time the only thing that can be done to bring about a more feasible answer is to head over to launchpad and mark the the following bug as affecting you too and subscribe to it. Unless of course you feel like fixing the issue yourself. =) You may subscribe only to the notification mail when the bug is closed to avoid being flooded with technical details.

This will increase the 'heat' on this issue, so it may get fixed quicker:

[calendar] Reminder notifications are not integrated into system notifications


Laptop won't sleep when closing lid since upgrading to 18.04

For Ubuntu 18.04 install GNOME Tweaks, then open the program and in power section turn off "Suspend when laptop lid is closed". Thats it.


Nevermind, solved it. Turns out my MATLAB license was expired and it was trying to run the installation, which required root privileges, so sudo /usr/local/MATLAB/R2012a/bin/matlab allowed the installation to run correctly. Thanks!


MySQL Sandbox seems to be a viable solution in your case.


Chromium doesn't come with the flash player built in (only chrome). To get started installing Adobe flash player, press Ctrl+Alt+T on your keyboard to open the terminal.  When it opens, run the commands below to enable Ubuntu Partner’s repository. This repo contains important packages that are not installed by default.

sudo add-apt-repository "deb http://archive.canonical.com/ $(lsb_release -sc) partner"

Finally, run the commands below to install Flash Player Plugin

sudo apt-get update && sudo apt-get install flashplugin-installer


NFS share becomes unresponsive and prevents programs from functioning

This seems to mostly have been related to NFS protocol taking up a ton of CPU. Moving to local downloads, then transfering the complete file to the NFS share has fixed most of my issues


Is there an open source alternative to Vmware vSphere Server? Like a Ubuntu or similar Distro with virtualization hosting built in?

The Best Solution is http://www.proxmox.com/, It has pretty good web interface.

Proxmox VE

"Liberate your servers and move to an Open Virtualization Platform - Go Open Source!"


Download older minimal version of LTS Xubuntu (18.04.0)

You could always build it from the netboot ISO
http://archive.ubuntu.com/ubuntu/dists/bionic/main/installer-amd64/current/images/netboot/
You mention you want a minimal system :)
[ ] boot.img.gz 2018-04-25 21:23    52M
[ ] ldlinux.c32 2018-04-25 21:23    113K
[ ] mini.iso    2018-04-25 21:23    64M
[ ] netboot.tar.gz  2018-04-25 21:23    52M
[ ] pxelinux.0  2018-04-25 21:23    41K

Because of a grub flaw CVE-2020-10713; many older ISOs that won't boot on patched systems (ie. all 18.04 release before 18.04.5) were removed in clean up...


Do I need to install anything before playing Games in WINE

No, Normally you don't need to install DirectX or anything to run games in WINE which are well supported. The necessary libraries ( from DirectX ) are automatically installed with WINE.

This page from WINE website lists the names of applications and games which is supported very well under WINE.

But, sometimes you may need to override some specific libraries from newer version of DirectX in WINE for better performance.

We could give you more specific answer if you had posted the errors about the Counter Strike game.


I tried to install python package.Then some error is showing like "exeption....." why?

pip creates a directory for each package under /usr/local/lib/python2.7/dist-packages/ (replace 2.7 for other versions) to keep all the necessary files, so you need to have sufficient permission to create that directory.

In your case, you do not have sufficient permission to create /usr/local/lib/python2.7/dist-packages/ply directory thats why pip is failing.

To solve this, you can use sudo:

sudo pip install ply

Or better you can add yourself to the staff group as the relevant directories created by pip under /usr/local/lib/ is owned by user root and group staff (with setgid).

So you can do:

sudo usermod -a -G staff username

Now logout and log back in, now the following should work:

pip install ply


SSTP VPN on Ubuntu 20.04 - can't install sstp network-manager plugin

Maybe the functionality of these packages is already part of Ubuntu 20.04?
At my university, we were asked to install network-manager-sstp in order to connect to the university VPN.
Using Settings > Network > VPN > Add > Point-to-Point Tunneling Protocol (PPTP) worked just fine without installing anything and had all the settings described in the tutorial for setting up VPN with network-manager-sstp (tutorial was for Ubuntu 19.10 eoan).


HDMI sound turns off after screensaver is active

This is not a problem with Ubuntu, but an issue with the ATI graphics driver.
It happens when the driver detects the monitor going into standby, but does not detect the return.

Others have suggested running a beta version 12.7 of the driver.

You can find more of an answer from here:

HDMI audio stops after TV turned off.


You have to export the path variable for every start again. This could be done in the file .bashrc or .profile in the home folder.

By the way: this is not the right site for asking such questions, do it here: http://unix.stackexchange.com

Have a look:

https://unix.stackexchange.com/questions/14594/how-to-make-exported-shell-variables-permanent
http://www.cyberciti.biz/faq/linux-unix-set-java_home-path-variable/
http://www3.ntu.edu.sg/home/ehchua/programming/howto/Environment_Variables.html


You appear to have installed the 32 bit version of Ubuntu. You might want to see if you have flash installed directly in your profile:

find ~/.mozilla -name *flashplayer*.so

If you do, you might want to note where it is and move it out of the way (while Firefox is closed).  Then, reinstall the version from Software Center.


There is no sound come from video.Ubuntu 16.04.How to fix?

found a problem close to yours, see https://www.linuxliteos.com/forums/sound/i-have-to-run-alsactl-restore-in-the-terminal-at-every-boot/
Hope it will help !


Create or edit /etc/apt/apt.conf defining your proxy configuration_

Acquire::http::Proxy "http://username:password@proxy_name_or_ip:port/";
Acquire::https::Proxy "https://username:password@proxy_name_or_ip:port/";
Acquire::ftp::Proxy "ftp://username:password@proxy_name_or_ip:port/";

You could ignore the username and password if you make no use of they, and you could ignore https or ftp in the same way.

This is based on a comment in a ticket reporting this issue.


Kubuntu: how do I change an icon to .sage files which are plain text?

...if I do the usual way...all text files icons got changed...

What is the usual way at there ?

At here: KDE system Settings > File Assosiations > Add file type text/sage.

Only the files with the extension sage got the sage icon.


Not sure about desktop, but if you just click on the network icon in the system tray then you will see the section "VPN Connections" there and you should be able to just add them. Not sure if there is a way to get them to the desktop from there or not.


Ubuntu dock icons show as black and white, it doesn't look right

You are using the hight contrast theme, open your Apearence setting and change it back to Ambiance (or Radiance).


Command to know software version from terminal before installing

Try sudo apt-cache policy bibletime.

This command will also tell you which source ships what version. Additionally, you'll see the priorities of the sources.


It should allow you to mv once you've turned off swap (swapoff -a). That should have worked...

Instead, create the new swap disk under a different name e.g. newswap.disk and boot back to Windows before doing the rename/move.

PS you might want to run chkdsk on that Windows drive as well. Just in case. File system corruption does occur on Wubi installs, and sometimes a symptom like not being able to rename a file might be an indicator. (Although this time it's probably that the swap wasn't turned off).

So you would run:

sudo su
cd /host/ubuntu/disks/
dd if=/dev/zero of=newswap.disk bs=1024 count=2097152
mkswap newswap.disk

Then reboot to Windows and replace swap.disk with newswap.disk. (But first try the original instructions again and make sure you've run swapoff -a and it completed without errors.)

PS you can see if the swap file is still mounted with:

swapon -s


Unfortunately, according to DIGImend, your tablet is not yet supported. Here is a page describing collecting diagnostic information, which can help the DIGImend project support your tablet in the future.


I installed ubuntu MATE 15.10 without grub boot loader, now I want to use grub

It's easy to install grub.

Open a terminal with Ctrl+Alt+t.

All you need is two commands. Enter them one at a time and  press Enter after each one.

sudo grub-install /dev/sda
sudo update-grub

The first command will install grub. grub-install will automatically pick the correct version of grub. The second updates your grub menu.

This should be all that you need. The grub menu should show up when you reboot.

But if you do not see the grub menu when you reboot, you may need to enter your EFI (Bios) settings in order to choose Ubuntu to be first in the boot order. (This setting is not the same as the hardware boot order: usb, cd, hdd, etc.) How to enter the EFI setup (often esc during boot) and the location for the boot order setting varies for each manufacturer.


External monitor, scaled by xrandr, only shows 1/4 of what it's supposed to show

Wow , you have the same issue as me in that scale try's to work but only shows 1/4 of the final result on the screen .
Facts first
I can get it working just working with the nvidia chip by it self ,
It's when in Hybrid mode ,and try to  scale it starts to crumble to a pile of do do
Funny thing as the mouse pointer is able to work fine over the screen in the correct scale ,
It's only taking a 1920x1200 chuck in my case of a 3840x2400 of the upscale image and just displaying one 960x600 chunk on the 1920x1200 screen .
It's like it's selecting only 1920x1200 of the 3840x2400 scaled image. And passing that to the frame buffer to be displayed .


Create new file with template from terminal

Need a loop here:
for newfile in new1 new2 new3; do
  cp ~/Templates/cf_temp ~/Desktop/"$newfile"
done


What exactly is non-interactive program?

How can wget be used without user logged on?

By including the wget command in a daemon/service or a program where you as a user do no initiate the download.

  How does non-interactive programs work?

When you create a deamon and have this daemon active it can continue to probe a server and ask for a download. If the servers is dead the non-interactive program will continue when the server is back up without any need for the user to act.

Updating Ubuntu, for instance, can be done without any action from a user and even without logging in.


I've made a mistake. I was installing the client thinking it was the server. That's why it fails.

The correct command is:

sudo apt-get install tftpd-hpa

instead of

sudo apt-get install tftp-hpa

The "d" was missing; that's the solution.


To tell grub to use older kernal everytime you can refer to the official documentation or this link. In short, you need to change the value of GRUB_DEFAULT in the file /etc/default/grub. To know what value you should put in for GRUB_DEFAULT, you have to refer to the order of boot entries listed in the grub menu. This information comes from the file /boot/grub/grub.cfg. This basically involves counting the menuentries and matching it with the position of your old-kernal as listed in the grub menu.


Can't boot, no grub, "alloc magic is broken"

A Boot-Repair Live USB can be used to repair Grub. You can download the ISO from the Ubuntu Wiki. Then, use Unetbootin to create a Live USB from the ISO file you downloaded. After you boot from the USB, the Boot Repair utility will pop up. Just click on the Recommended Repair button, and Boot-Repair will repair Grub for you.


How to make the port free; already used by Drupal ?

In my opinion its easier to change the port that Tomcat is using. Locate the server.xml  in Tomcat installation folder.  Change the 8080-port to whatever you like. For example :

<Connector port="8181" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />


Cannot mount USB stick - errors out with "$MFTMirr does not match $MFT"

The error you are seeing indicates the filesystem is not clean and needs checked by Windows chkdsk.  There are components to NTFS filesystem ($MFT and $MFTMirr respectively in this case) which say what is where on the disk.  These files no longer match each other, which suggests there may be some type of filesystem corruption.

But because it is NTFS, the only way to truly repair NTFS is Windows' chkdsk utility.  (There is a ntfsfix command, but it is NOT going to be of the same quality of fix as Windows' utilities to check NTFS disks).

When you next have your drive connected to the Windows system, if it asks you to scan and fix the drive, allow Windows to scan and fix the drive.  It will try and fix the errors in the filesystem that prevent you from mounting in Linux safely.


How to bind function key char sequence to their respective button to be recognized by tty terminal?

My bad, it seems the problem is with the wineconsole not the terminal itself. The terminal accepted the keystroke all right but it seems not being recognized by the CUI application running in curses mode.


How do I get back the colours toolbar in Kolour Paint?

The KolourPaint is a KDE application: http://www.kolourpaint.org/.

The KDE applications are saving the settings to the ~/.kde/share/config/. That is: /home/UserName/.kde/share/config/.

Resetting to the defaults:

Rename or remove the ~/.kde/share/config/kolourpaintrc file, when the KolourPaint is not running.
Next time the KolourPaint will start with the default settings with the "Color Box".


Dependency Problems installing Google Chrome package due to xdg-utils error

I followed the instructions from here and finished with:

sudo apt-get -f install

I have no idea how or why, as I'm completely new to Linux, but it worked.


Configuring multiple monitors to use Custom EDIDs

Figured it out. So there are two problems that need to be solved to make this work.:

1) The second DVI-Dual-Link monitor needs the EDID file because the monitor has a corrupt EDID. (The EDID file I was using, as you can tell by the file-name, was originally sourced from a Shimian branded monitor, and I don't know how it was done, but I know that it works. If you are reading this, and need the file, let me know and I can upload it.)

2) The HDMI monitor has a valid EDID, but it's one that for some reason lists its max resolution as 1080p.

These problems are solved with the following entry in xorg.conf:

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24

    Option         "ModeValidation" "AllowNon60hzmodesDFPModes, NoEDIDDFPMaxSizeCheck, NoVertRefreshCheck, NoHorizSyncCheck, NoDFPNativeResolutionCheck, NoMaxSizeCheck, NoMaxPClkCheck, AllowNonEdidModes, NoEdidMaxPClkCheck"

    Option         "CustomEDID" "DFP-0: /etc/X11/edid-shimian.bin; DFP-3: /etc/X11/edid-shimian.bin"

    Option         "metamodes" "DFP-0: 2560x1440 +2560 +0, DFP-1: 2560x1440 +0+0, DFP-3: 2560x1440

    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

The whitespace between the Option lines is for clarity, and not necessary. Here's what each does:

The metamodes line specifies a screen resolution for each monitor. In this case, DFP-0 was the first DVI monitor, DFP-3 is the second, and DFP-1 is on HDMI. This metamodes line sets them all to 1440p and places the HDMI monitor on the left, with the second DVI monitor on the right. This line will not be enough on its own - the other two lines are necessary.

The CustomEDID line points the DVI monitors to the aforementioned binary EDID file. This line's presence convinces the Nvidia driver that they are capable of 1440p.

The ModeValidation line essentially disables a ton of safety mechanisms aimed at preventing you from putting the wrong resolution on screen. As such it's important to use caution when using these options! In this case though, I know for sure the monitors are all capable of the resolution I am demanding. This line is necessary for the HDMI monitor to work.

Hopefully this helps some other folks out!


The fix appears to be a combination of:

adding REGDOMAIN=CA to /etc/default/crda
adding COUNTRY=CA to /etc/environment

Now on bootup the world domain is set, followed by the Canadian limits.


It sounds like you did not save "tor-browser-linux32-3.6.2_enUS.tar.xz" in the folder where you are executing the tar command. If you are using a system with GUI, I would just recommend you to use file-roller, and to look for the right file and extract it in the GUI.


Unable to connect to the internet from freshly installed OS

I am not a guru, but, may I suggest two things that might help?

1) Perhaps trying to install an official variant of Ubuntu such as Lubuntu or Xubuntu (both carry the official Ubuntu software center) is an option. Ubuntu might require grander resources than your current machine can offer.

2) Plug into LAN from the beginning of the installation. Upon the start, make sure you select to have additional drivers and updates done while the progress takes place.

I sincerely hope this helps in some way.

Juan


Can't open luks encrypted drive with bash

I just figured out, when I change the order of the parameter in my command from:
sudo cryptsetup luksOpen /dev/sda1 myDisk --key-file /root/keyfile

to:
sudo cryptsetup luksOpen --key-file /root/keyfile /dev/sda1 myDisk

It works beautiful.


Cannot Connect to Wired Connection (MacOS / Lubuntu dual boot on Mac Mini)

I guess you can get IPv4 if you restart NIC and turn off IPv6.

sudo ifdown [interface name] && sudo ifup [interface neme]

For your case, the interface neme is enp3s0f0.

Please add

net.ipv6.conf.all.disable_ipv6 = 1

net.ipv6.conf.default.disable_ipv6 = 1

net.ipv6.conf.lo.disable_ipv6 = 1

to

/etc/sysctl.conf

and then type the following command and press Enter on a command line

sudo sysctl -p

Next, please create a new file /etc/rc.local and add these contents

#!/bin/bash
# /etc/rc.local

# Load kernel variables from /etc/sysctl.d
/etc/init.d/procps restart

exit 0

and give the permission to execute to the file

chmod 755 /etc/rc.local


I have found a temporary solution.

sudo apt-get install alsa-tools-gui
run hdajackretask
Select a codec: ALC668
Set "show unconnected pins"
Find pin 0x1a
Set "override" -> Internal speaker(LFE)
Click install boot override
In /etc/modprobe.d/alsa-base.conf add line options snd-hda-intel
model=asus-mode4. It allows you to control the volume of the
subwoofer via alsamixer
Reboot

I still have problems with audio profiles(no 4.0 and 2.1 configurations in kmixer), but the subwoofer works now. The only problem is that it is now muted when i plug in headphones.


Error appears while configuring apache2 server in ubuntu 12.04lts

According to the error this file /etc/apache2/sites-enabled/mysite doesn't exist (perhaps you have deleted or renamed it).

If that is not the problem check the messages in the error log (which should be located by default in /var/log/apache2/error.log)


I needed to switch from using a cron job, to adding a script to /etc/network/if-up.d/ as per this suggestion. Did some troubleshooting with ifup --all -v to get the details correct.


Different environment variables depending on gui or shell

The variables in your .bashrc are only set up by a bash shell, which, if the variables are exported, stores the vars and their values in its environment, and passes a copy this environment to any process it starts. Starting sublime text from the desktop does not invoke bash to read .bashrc. You could set the variables globally by defining (and exporting) them in a user.sh file in /etc/profile.d (you will have to create /etc/profile.d/user.sh). If you are on a multi-user system, you could surround the definitions with if [[ "$USER" = "me" ]] ; then ... fi, so that everybody else (if that's a non-empty set) doesn't suffer with your definitions. Look at the other scripts in /etc/profile.d for hints.

To see process relationships, and environment inheritance, one could

pstree -a -c -l -p -u 1

and, of course, man pstree.


Sound sometimes disappears, definitely when skype is installed

You could try doing VLC>extra>preferences>audio: choose alsa audio-output along with use S/PDIF if possible checked.


It has been a couple of years since I had to overcome some difficulty there, but I can give you several hints to push you in the right direction, as I was successful and so should you be.  I recall that using the DISPLAYS utility under the hardware section of systems settings was instrumental, but as it has been so long, I have forgotten exactly how.  I seem to recall you can designate one monitor as primary, but you will probably have to click around a bit in that window to figure out how.

Also it is possible your graphics chipset driver may need to be upgraded in some way to give you some increased control, but I doubt that since it sounds as though you have things working for the most part.

I am not aware of any inherent difference between monitors and TVs with hdmi input which would prevent you from succeeding, but it is possible that the computer associates the last known primary monitor (the one used without the other) for primary use.  You might try disconnecting your old primary monitor entirely to see if that resets matters.


Creating a Full install USB the Easy way

Download Image File: https://phillw.net/isos/linux-tools/uefi-n-bios/dd_unb_ubuntu-20.04_15GB_2020-06-26.img.xz

Download Rufus: https://github.com/pbatard/rufus/releases/download/v3.11/rufus-3.11.exe

Double click Rufus exe file. (No need to install it).

Select USB2 Target drive in Rufus.

Select Image File in Rufus.

Click Rufus start button.

Wait for flashing to complete... Done.

(Password is "changeme", change it)
Thanks to sudodus for the image file.
In Windows it may be necessary to install 7Zip before proceeding. Rufus will use it when working with the .xz image: https://www.7-zip.org/a/7z1900-x64.exe


"An error occured! Please check your internet connection"

Try PlayOnLinux to install the game. If this does not help, you need to remove every data remainders from your virtual wine drive:

1.Copy everything that you need (do not copy everything, this will result reappearing the problem) from your virtual wine drive (it's default location is /home/[user]/.wine/drive_c)

2.Go to Wine->winetricks, check the box Select the default prefix and click OK, after that check Delete ALL DATA AND APPLICATIONS INSIDE THIS WINEPREFIX and click OK and confirm that.

3.Then install Osu!. This should work.

Note: Use this solution as the last choice, because this will recreate your .wine folder and all program files inside .wine are deleted. So you need to Backup.


You probably meant 3.6.x, 3.6.17 is the latest version in the 3.6 branch.

Firefox 3.6.x can be downloaded from http://www.mozilla.com/firefox/all-older.html
Extract the compressed tarball by executing:

tar xjf firefox-3.6.17.tar.bz2 -C ~

The directory ~/firefox will be created. Note that the Cyberciti guide extracts it to /opt, which requires root permissions but breaks the Firefox updater.
To run firefox now, issue:

~/firefox/firefox

Only your account will be able to run Firefox 3.6.17 (since it's now installed in your Home directory). And if you haven't removed Firefox 4, then the latest latest version will be in the system and available to all users, including you.


Are LTS codenames specifically intended to imply reliability?

Yes, that is deliberate. All codenames are a hint to the features that are to be addressed in that release.
Reasoning on Oneiric:

What we want is something imaginative, something dreamy. Something sleek and neat, too. Something that has all the precision of T S Eliot’s poetry, matched with the “effable ineffability” of our shared values, friendship and expertise. Something that captures both the competence of ubuntu-devel with the imagination of ayatana.
Which leads us neatly to the Oneiric Ocelot.

And for Saucy Salamander:

Which is why, upon not very deep reflection, I would like to introduce you to our mascot for the next six months, the saucy salamander.
The salamander is one of nature’s most magical creatures; they are a strong indicator of a pristine environment, which is a fitting way to describe the new world emerging around Ubuntu Touch – new applications, a new SDK, a gorgeous clean interface. You’ll find salamanders swimming in clear, clean upstreams – which is exactly what’s forming around Ubuntu’s mobile ecosystem. It’s a way of saying ‘thank you’ to the tremendous community that has joined the effort to create a single unified experience from phone to PC, with tons of crisp and stylish core apps made by people from all over the world who want to build something fast, fresh and free. And we’re saucy too – life’s too short to be stodgy or stilted. Our work is our play – we make amazing things for a huge audience, we find space for pretty much every flavour of interface and do it with style.

Not all of the names got an elaborate introduction though.
Mark Shuttleworth's blog has a lot more on the codenames and reasoning.


Stuck during installation Ubuntu 14.04 LTS

I've encountered a similar issue when trying a relatively complex partitioning scheme involving encryption of more than one partition, I'm not sure if that's the case for you or not.

Regardless, one possible option which worked for me is to create the partitions in advance. For this:

Boot Ubuntu's live system
Run gparted - the graphic partition editor - and partition your disc any way you like. You can use parted or any other tool really.
If you need to set encryption or complex LVM you can do it at this stage
Start the installer (there's an icon on the desktop)
Choose the "Something else" option on the partitioning menu
You should see the partitions you've set up. For each partition, click it and then click change - then select the file system and/or mount point for that partition. Also, select whether to format the partition
Continue with the installation as usual

Hope that helps.


HP LaserJet printer doesn't have 2 sided option

In addition to lamcro and wdypdx22's answer (check that the hplip package is installed) you need to make sure your printer is set to using the right driver. In System->Administration->Printers you can select the printer:

Right click on your printer and select properties, then click on the Button next to Make and Model that is labeled "Change", then the system will go looking for a driver:

Since you have it installed this won't take long (it can fetch updated ones from openprinting.org so there's never a need to manually install drivers). After the search it will give you an option to use the driver, select the one with (HPIJS). Now the printer options should be available in the "Printer Options" section of the last screenshot.

As a bonus, HP provides a native tool for Linux users that provides even more features than the bundled generic tool. It's called the hplip toolbox, you can install it by installing the hplip-gui package or just search for it in the Software Center.

This is the tool I prefer to use to manager my hp printers. There is a wishlist request bug asking that when anyone with an hp printer plugs in it just installs all this automagically, which would be pretty great.


Ubuntu 14.04 drops into initramfs on boot after power loss

It was the encrypted partition /dev/sda5 that was the source of the issue.  My initial attempts to run fsck on it had been thwarted due to lack of understanding of cryptsetup and LVM.  I was able to get it "accessible enough" in a Live USB session by:

mounting the encrypted partition, then
exposing the contained LVM volumes

At this point, I attempted:

sudo mkdir /mnt/brokenVolume
sudo mount /dev/mapper/ubuntu--vg-root /mnt/brokenVolume

This gave a wrong fs type, bad option, bad superblock error.  However, I was now able to run:

fsck -fy /dev/mapper/ubuntu--vg-root

This fixed a number of issues, following which I was able to mount normally.  Rebooting brought me back into my normal working system.


How to send array elements to stdin of a command?

I prefer printf:

printf "%s\n" "${array[@]}" | ...

You can also use IFS to join array elements using a character:

(IFS=$'\n'; echo "${array[*]}") | ...

The difference between "${array[@]}" and "${array[*]}" is that the former expands to the array elements as separate words, the latter expands to a single word formed by joining the array elements using the first character of IFS.


Ubuntu turned into Kali GNU/linux desktop by Katoolin

I had the same problem after installing Kali via Katoolin on Ubuntu 16.04 and it took me some time to figure out a solution. In my case Katoolin changed the settings in the lsb_release file.

I could fix it with running:

sudo -i gedit /etc/lsb-release

There I had to change the Kali settings, which do not belong there to:

For 16.04:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu Xenial Xerus"

In case you have another distro you need to adapt the names (see Wikipedia e.g.).

In your case:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=15.10
DISTRIB_CODENAME=wily
DISTRIB_DESCRIPTION="Ubuntu Wily Werewolf"

For 17.04:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=17.04
DISTRIB_CODENAME=zesty
DISTRIB_DESCRIPTION="Ubuntu 17.04"

Then, run the following command to update grub:

sudo update-grub

After doing this everything worked fine again for me.

I hope this helps. Sorry, if the explanation is not perfect; it is my first answer here.


How do I launch Tor browser on specific web page from command line?

I assume you downloaded the tor browser from torproject.org and installed it following the Linux Instructions, then you can simply run the starter with a URL as an argument and it will open it:

./start-tor-browser.desktop google.com

If you don't want to use the .desktop file, run it directly with

./Browser/start-tor-browser --detach google.com

or using an absolute path (substitute LANG with your language code):

/path/to/tor-browser_LANG/Browser/start-tor-browser --detach google.com


hardware rendering issues with nvidia-304 in kubuntu 15.04

I think the problem is with the NVidia driver and the use of OpenGL.
When you experience the black screen login on to an other tty and try the following:
- sudo vi ~/.config/kwinrc
- Change Backend=OpenGL to Backend=XRender
- then restart with kill -9 -1

You should now be able to login using Plasma.
It is however very slow but you can sometimes switch back to OpenGL. If you can switch you'll have the performace you expect from Kubuntu.

Before shutting down don't forget to switch back to XRender or you will have to repeat the same steps.


I am also new to Linux. In the beginning I also had the same problem. The problem is due to some key is pressing automatically.

One way to sort out this problem is type the below command in a terminal,

xinput --set-prop 8 "Device Enabled" 0

You can keep this in your startup applications later.


Why do I have so many packages that are "newer than version in archive," and how do I downgrade them?

There's a script for downgrading Ubuntu packages that are marked as newer than version in archive. This script require you to install apt-show-versions.

sudo apt-get install apt-show-versions

Script :

!/bin/sh

TMP=/tmp/downgrade.$$

if [ $USER != "root" ]; then
         echo "downgrade: Only root can do this"
         exit 1
fi
apt-show-versions -i
apt-show-versions |
         fgrep 'newer than version in archive' |
         cut -d' ' -f 1 >$TMP
if [ -s $TMP ]; then
         apt-show-versions -a |
         fgrep -f $TMP |
         cut -d' ' -f 1-3 |
         grep quantal$ |
         cut -d' ' -f 1-2 |
         sed -e 's/ /=/' |
         xargs aptitude -y install
fi
rm $TMP

Source.


How do I add text to an animated .gif in gimp?

So, to make an Animated Gif you have to make layers and give them duration with renaming them and adding seconds like this : Layer 1(100s)

Are you sure you've added the Text to all layers already? I mean when you add a text, that will be on a single layer and you should Merge it with Layers like this :

1.You add text.

2.Right click on text's layer ~> Merge Down so it merges Text Layer with the layer that's at bottom of this.

3.Now you have one layer with text.

You should Merge your text with all layers to have it for the whole duration.

Also, for Script-fu Effects similar to outerglow, you should do this too, or to do this easier, when you're making effect, check up "Merge With Layer" and it's done!

Hope it helps.


How to convert VIDEO_TS folder to video format

FFmpeg also works quite well:

cat ./VIDEO_TS/*.VOB | ffmpeg -i - <out_name>.<out_format>

Source:

https://wiki.archlinux.org/index.php/FFmpeg#VOB_to_any_container


How can i ping a Computer or a Printer using its Mac address?

After some research i have succeeded in pinging  my printer by its mac-address by following these steps using arping tool :

First I tried arping that is installed by default in Ubuntu 12.04 , it state unknown host whenever I ping a Mac Address .

I search for the problem and found that newer version of arping stopped this feature .

I search for an old version i found Thomas habets arping. Download It from Herer  .

After Download extract it .

Before installation make sure you download libnet Here , and libcap-dev

sudo apt-get install libpcap-dev

Now it time to install arping 2.13 , open Terminal :

cd /path/to/arpingfolder

./configure

make

make install

Now  Navigate to :

cd /usr/local/sbin/

And run the following command :

arping -i (your network interface ) -c 3 11:22:33:44:55:66

For more options type man arping.


Can you try the following

Try the built in nouveau driver -> Works without hassle most of the times for me . I use this since I dont do a lot of gaming on my ubuntu and in general 2d it seems faster than Nvidia driver .
Try one or more of the drivers provided by  nvidia  under additonal drivers . There must 2 or 3 options here .
Try the nvidia driver from the nvidia site .

Additonally there are some settings in the XOrg config /etc/X11/xorg.conf which help you tweak parameters like refresh rate . You could try tweaking these before trying the driver changes


PPAs do not belong to the main Ubuntu archive, no. However, PPAs only have a main archive, as they are not part of the Ubuntu archive itself. They do not have universe or multiverse. Nothing in a PPA is supported by officially supported Ubuntu, generally speaking.

However, the Launchpad Terms of Service also prohibit you from uploading any proprietary binary software to a PPA. You can only upload debian source packages to a PPA. And you can only have private PPAs or PPAs with proprietary software, if you are paying for a Commercial subscription that enables you to host proprietary projects on Launchpad.


Install Nvidia drivers Full install USB flash drive

Description of the test
Installation
I did some testing and the result was quite interesting.
I installed a basic Lubuntu 18.04.1 LTS 64-bit system in a Sandisk Extreme 16 GB in BIOS mode in an old computer from 2008 with built-in nvidia graphics. This computer has an M2N-VM DV motherboard, an Athlon-64-X2-4400+ CPU and a GeForce 7050 PV / nForce 630a graphics chip.
I know that in Ubuntu 12.04 LTS it needed nvidia proprietary graphics to work well, and that in recent versions it works well with the free linux driver 'nouveau'.
I tested the oldest two available proprietary drivers in 18.04.1 LTS as well as the newest available proprietary driver. None of them worked but the system defaulted to a VGA screen, 640x480.
So I stayed with the newest driver,
apt-cache policy nvidia-384
nvidia-384:
  Installerad: 390.48-0ubuntu3
  Kandidat:    390.48-0ubuntu3
  Versionstabell:
 *** 390.48-0ubuntu3 500
        500 http://se.archive.ubuntu.com/ubuntu bionic/restricted amd64 Packages
        100 /var/lib/dpkg/status

which is good for my Dell Precision M4800 laptop.
Tests in other computers
Then I shut down, and moved the USB pendrive to some computers with Intel graphics and one computer with Radeon graphics. An Intel driver and a radeon driver were seleced automatically for the graphics in those cases.
Conclusion
The proprietary nvidia graphics driver caused problems only in a computer with an nvidia chip, that does not work with that driver. Other kinds of graphics chips/cards work well.
Details
I created small files when running in the different computers in order to keep record of the test data, for example
bash -c 'apt-cache policy nvidia-384;sudo lshw|head;sudo lshw -C display' > dell-m4800.txt

$ cat dell-m4800.txt
nvidia-384:
  Installerad: 390.48-0ubuntu3
  Kandidat:    390.48-0ubuntu3
  Versionstabell:
 *** 390.48-0ubuntu3 500
        500 http://se.archive.ubuntu.com/ubuntu bionic/restricted amd64 Packages
        100 /var/lib/dpkg/status
tester-system-product-name
    beskrivning: Bärbar dator
    produkt: Precision M4800 (Precision M4800)
    tillverkare: Dell Inc.
    version: 01
    serienummer: 6KH5Q12
    bredd: 64 bits
    förmågor: smbios-2.7 dmi-2.7 smp vsyscall32
    konfiguration: boot=normal chassis=laptop sku=Precision M4800 uuid=44454C4C-4B00-1048-8035-B6C04F513132
  *-core
  *-display
       beskrivning: VGA compatible controller
       produkt: GK107GLM [Quadro K1100M]
       tillverkare: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       version: a1
       bredd: 64 bits
       klocka: 33MHz
       förmågor: pm msi pciexpress vga_controller bus_master cap_list rom
       konfiguration: driver=nvidia latency=0
       resurser: irq:32 memory:f4000000-f4ffffff memory:e0000000-efffffff memory:f0000000-f1ffffff ioport:e000(storlek=128) memory:f5000000-f507ffff
  *-display
       beskrivning: VGA compatible controller
       produkt: 4th Gen Core Processor Integrated Graphics Controller
       tillverkare: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 06
       bredd: 64 bits
       klocka: 33MHz
       förmågor: msi pm vga_controller bus_master cap_list rom
       konfiguration: driver=i915 latency=0
       resurser: irq:29 memory:f5400000-f57fffff memory:d0000000-dfffffff ioport:f000(storlek=64) memory:c0000-dffff

You can see that this Dell can use the nvidia driver for the nvidia card and the intel i915 driver for the built-in graphics chip.
The corresponding results from all the tested computers can be extracted from the files via the following grep command line,
$ grep konfiguration *.txt|grep latency
dell-m4800.txt:       konfiguration: driver=nvidia latency=0
dell-m4800.txt:       konfiguration: driver=i915 latency=0
HP-Compaq-Pro-6305-SFF_AMD-A6-6400B-APU-w-Radeon.txt:       konfiguration: driver=radeon latency=0
lenovo-i3.txt:       konfiguration: driver=i915 latency=0
M2N-VM_DV_Athlon-64-X2-4400.txt:       konfiguration: latency=0
NUC6i3SYH-i5.txt:       konfiguration: driver=i915 latency=0
toshiba-i5.txt:       konfiguration: driver=i915 latency=0

You find no driver reported in the output for the computer with the M2N-VM DV motherboard and an old nvidia chip, that defaults to 640x480 VGA graphics with the proprietary driver. (In order to get good graphics in that computer, I must remove the proprietary driver, so that it can use the built-in nouveau driver and produce good graphics.)


Boot DVD not recognized on desktop - sony vaio

could it be that your DVD-drive doesn't recognise the DVD-R ?
Since you work with XP it could be possible.

I would try to burn the 12.04.2 (5 years support and kernel 3.5 included) on a CD-R and retry to install on your computer.
Let's keep our fingers crossed this will help you futher.

b.t.w. is your fysical RAM memory large enough (1Gb at least) for running Unity - Ubuntu ?


Where to find Ubuntu downloads for installing on a laptop with a formatted hard disk?

When your Sony Vaio is ready first:

1) Open a browser to: www.ubuntu.com > Click Download > and get the latest DVD version (14.10)

2) Burn the DVD to a disk. (Or use UNETBootIn to burn it to USB Memstick).

3) Turn on the VAIO and as soon as the VAIO screen comes on press F12 (or Delete, or F2 >> the one that allows you to select Boot device

4) Select the DVD Drive (or USB if you used memstick)

5) The Ubuntu dvd will load to a default ubuntu desktop. ON the desktop a shortcut to the installer is there. Double click this and use the Wizard to install Ubuntu from the DVD to your hdd drive as you like.

Enjoy!


There are 2 ways to use BitTorrent Sync , 1st Install it using PPA & 2nd Download

1st PPA

sudo add-apt-repository ppa:tuxpoldo/btsync
sudo apt-get update

For normal desktop use, you only need to install btsync-user:

sudo apt-get install btsync-user

Alternatively, if you're setting up your BTSync server, install btsync:

sudo apt-get install btsync

During the installation just use the default setting and set the administrative password as well ,You can access it by

127.0.0.1:8888     # This will redirect to the 2nd link

OR

http://127.0.0.1:8888/gui/

Username = admin , Password = ( Use have set during installation )

2nd Download

Download the BitTorrent Sync client

cd Downloads
tar xzpf btsync_glibc23_x64.tar.gz # I have downloaded 64 bit. So check your version
./btsync

The output will be

./btsync
BitTorrent Sync forked to background. pid = 5771  # some what like this pid will be change

Open any web browser & copy paste the following line

127.0.0.1:8888     # This will redirect to the 2nd link

OR

http://127.0.0.1:8888/gui/

If you type ./btsync --help you can also run it no deamon mode

./btsync --help
 BitTorrent Sync 1.0.132
 Usage:
 btsync [--config <path>] [--nodaemon] [--generate-secret] [--dump-sample-config] [--help] [--get-ro-secret <secret>]
 Options:
--config - location and name of configuration file
--nodaemon - do not use daemon mode
--generate-secret - generate shared secret
--get-ro-secret - get read only secret for existing master secret
--dump-sample-config - dump sample config file
--help - print this message and exit

  Help

forum.bittorrent.com

Video tutorial jupiterbroadcasting.com

Please also have look at Peer To Peer (P2P) Sync and Share Ubuntu


man tftp will fill you in on its peculiarities but for a simple connect, put and quit, here's a simple example:

$ tftp server
tftp> put file /remote/directory
tftp> quit

file refers to a file in the local current working directory. You can specify longer paths but I would recommending just cding to the right place before you connect.

If you're struggling with encoding issues, run binary before you put.


Xubuntu 13.10: wifi hard blocked on Lenovo T520

Maybe, the wireless switch got turned off. You can see the location of the switch here. It's component #7.


You don't install OpenMP. OpenMP is a feature of the compiler. Check that the compiler you are using implements OpenMP, which is an API for parallel programming in C/C++/Fortran.

Check with the OpenMP website, openmp.org for a list of compilers and platforms that support OpenMP programming.


You can use Boot Repair. It will regenerate your GRUB and boot installation for both Ubuntu and Windows 10.

1- You can install and run it from Ubuntu:

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt install --assume-yes boot-repair
boot-repair

2- Or you can create a live USB: https://help.ubuntu.com/community/Boot-Repair

Hope this helps.


How can I get my GRUB menu to be hidden, AND have the shift or esc keys show the hidden GRUB menu at boot time

OK folks, here's the answer... to obtain a hidden GRUB menu in dual-boot configurations... two edits... and a sudo update-grub...

Edit #1

To obtain a hidden GRUB menu in a multi-boot configuration, we first need to edit /etc/default/grub. Open this file using the below command:

sudo editor /etc/default/grub

Once the file is open, replace these lines

GRUB_HIDDEN_TIMEOUT_QUIET=true
#GRUB_HIDDEN_TIMEOUT=0
GRUB_TIMEOUT=10

with these:

GRUB_HIDDEN_TIMEOUT_QUIET=false
GRUB_TIMEOUT_STYLE=countdown
#GRUB_HIDDEN_TIMEOUT=0
GRUB_TIMEOUT=3

This will cause GRUB to display a 3 second countdown timer on the screen.  By doing this, a user can hit the Esc key to bring up the default menu. Otherwise, the default OS will boot.

If you wish that the default OS should be set to the last-booted OS, add the below two lines under the "GRUB_TIMEOUT=3" shown above:

GRUB_DEFAULT=saved    # change an existing line to this
GRUB_SAVEDEFAULT=true # add this line

Edit #2

Next, the OS prober needs to be updated to disable the quick_boot feature. To do this, open /etc/grub.d/30_os-prober in your favorite editor and change the below line (line 23 in 17.04) by replacing the 1 with a 0:

quick_boot="1"

When you're done, the line should read like:

quick_boot="0"

Save the files and then run the below command to reconfigure the bootloader and to apply your changes:

sudo update-grub


Why buf/cache take so much ram and do not chunk

Your compiler runs inside a Java VM, which is by default limited to 1GB, no matter how much free memory you have. Try to supply java command with -Xmx2G to make sure it can reclaim twice as much, and feel free to increase that number further if that's not enough. Note that going over 2GB won't help if you happen to use 32-bit version of Java (which is unlikely, considering the system you have).


Overwriting files when extracting from a tar archive

See this answer.

If you archive has one top level folder you can use --strip-components 1, to remove first folder from full files path.

Finaly, this should do what you want:

tar xf openttd-trunk-r26175.tar -C /usr/lib/games/openttd-trunk/ --strip-components 1


Help - Ubuntu in VirtualBox only upper left corner visible

OK, I've finally got to a normal view by doing:

Hitting Windows Key and typing terminal, clicking enter on the keyboard
then typing xrandr -q | less to get the monitor/output name and available resolutions
I ran xrandr --output Virtual1 --mode 1440x900

This helped me reset the view. Then I changed display scaling to 100% in display settings.
That trick with xrandr I found from this question:
How do I change the screen resolution using Ubuntu command line?
If anybody wants to enhance why this has happened in the first place and how to ensure this really never happens again - feel free.


Sorry, but it was in plain sight in the theme files.  all i need to do is delete the file with the indicator dot.  Silly me.


Unfortunately there is no syntax available for no_proxy which would cover a subnet. The only solution I am aware of is to generate the whole list with something like

export no_proxy=${no_proxy},$(echo 192.168.100.{1..255} | sed 's/ /,/g')


Saw this this morning, http://www.webupd8.org/2011/03/fix-pinkred-youtube-videos-bug-using.html

Which by the way this is a fantastic site to have in your feed reader.


Which program do I need to use for programming in C in ubuntu?

you need to have a gcc compiler installed on your box which even comes installed by default as its used to build the OS. To install the latest version of gcc, check the following link:
how to install gcc

To compile, simply open terminal (Ctrl+Alt+T) and navigate to the directory where your file is located.

For Example i have this file here:

 #include<stdio.h>
 int main(){
   int age;
   printf("How old are you?");
   scanf("%d", &age);
   printf("Your age is %d ", age);
   return 0;
 }

save this as say ager.c under the Desktop and open Terminal and compile this program like this

 cd ~/Desktop
 gcc -o ager ager.c

Produces an object (executable) file called ager as depicked from the -o prefix
Now run the executable like this

 ./ager

Should print something like this

  How old are you?
  23
  Your age is 23

To check which gcc version you have in your system, use the following command in your terminal:

gcc --version

Sorry but am answering from the stack exchange mobile app