Unable to 'apt-get dist-upgrade' due to appstreamcli database error

This also happened to me using 16.04.1 live Ubuntu persistent USB stick.

uncledave's solution didn't work at first, but as suggested, changing the rights was the final solution.

Then I've found answer #11 from daniel-gimpelevich for bug 1601971
The following commands helped me repair apt-get update

sudo chmod -R a+rX,u+w /var/cache/app-info/xapian/default

How did I guess that 755 is the right mask? The difference between

ls -ld /var/cache/app-info/xapian
drwxr-xr-x 1 root root 4096 Nov 19 20:35 /var/cache/app-info/xapian/

and

ls -ld /var/cache/app-info/xapian/default
drw-r--r-- 2 root root 4096 Jul 19 20:54 /var/cache/app-info/xapian/default

After this apt-get update ran fine.

sudo apt-get update
Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [94.5 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [95.7 kB]
Fetched 190 kB in 0s (312 kB/s)
Reading package lists... Done

Note1 Upgrading a live persistent USB stick this way is not suggested it will cause issues if too many packages are installed/upgraded.

Note2 It's a better idea to install Ubuntu directly to the USB stick if you want to use it as a bootable "Swiss Army Knife".


How to make sed work with break lines in a file?

It sounds like you want the r command:

sed "1r $1" "$2"

You might be able to do this with GNU sed:

cat "$1" | sed '2r /dev/stdin' "$2"


Boot with a USB - DVD in rescue mode.
Mount the file system.
Make a copy of your data. Backup it.
Create new user, reboot again and try to login with this new user.
If nothing work. Reinstall.


Problems installing Java 8 onto Ubuntu 18.04 - Errors on oracle-java8-installer and java-common

Why is it such a PITA? The Oracle version of Java is not able to be distributed the same way as other Ubuntu packages.  The best solution to this is to use the openJDK version of Java.

If you absolutely need to use Oracle Java 8, you'll need to add a PPA to your repository list:

$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt update

And then install Oracle Java 8 (I'm assuming you also want it to be set as default)

$ sudo apt install oracle-java8-set-default

This should begin the installation, and you should get a prompt asking to accept the license.  Use the keyboard to accept it, and it should begin downloading Oracle Java 8.  You should see a progress indicator that scrolls up your screen.

It should install Oracle Java 8 update 181.


It seems to be that you are mixing repositories or using a ppa. The cairo-dock-plug-ins package in precise depends of libglib2.0-0 (>= 2.24.0) not 2.35.9 and you have installed already a supported version 2.32.3-0ubuntu1. You should disable all repositories except Ubuntu's and install again.


Unable to install specific package version with apt-get

Older Packages are pruned from ubuntu repo's and not kept around. You can either install from the debs directly, but if you want to do this in an apt-aware way your best bet is to create a local repository  in a folder on your system, place your deb's there, make your apt sources aware of the local repo, and then install the specific version.

The other option is to create your own ppa on launchpad servers and then you will be able to pull that directly from any computer (Warning: Debian packaging is relatively straightforward, but still requires knowledge of linux and a little bit about coding/building software).

It is also possible to add to your sources the repos for most recent version of ubuntu (or debian) that has the package you want, install it, and then remove the source. The disadvantage of this is that the package may be replaced in a future apt-get unless you take advantage of pinning


Three things:

the client may not have send the http string, so grep for '" 408 ' instead: grep '" 408 ' *access.log
you're not grepping .gz files, zo use something like: zcat *access.log.*.gz | grep '" 408 '.
You don't search subdirectories, so try adding -r or -R to grep.


You've got unused disk space. it's like having a 100G disk with a single 10G NTFS partition.
Your whole disk size is 30G. Your main partition is /dev/sda1 where Ubuntu has been installed on which is 12G.
You can create a new partition from your unused disk space and use it as your home to free-up some space. Or use partitioning tools like gparted to resize your root partition size.
sda       8:0    0    30G  0 disk     <---- Your virtual DISK
├─sda1    8:1    0  11.9G  0 part /   <---- Your first partition where ubuntu
├                                           is installed. (12G)
├─sda14   8:14   0     4M  0 part
└─sda15   8:15   0   106M  0 part /boot/efi


How can I Switch from Ubuntu back to Windows after installing Ubuntu on dual mode?

If you really did install it in dual mode, then you should be able to easily switch back without completely deleting Linux. Just reboot your computer and when you get to this screen:

Use the up and down arrow keys to select the option that says Windows. It might be at the bottom or mixed in the middle. Then press enter and you should boot into windows.

If that doesn't work then you may have accidentally erased your Windows install and replaced it with Ubuntu. If you think this might be the case then add a comment and I can help with confirming that is the issue and what to do next.


How do I create a cube effect for PDF presentation transitions?

I think it might have helped to tell us what packages you've already tried, so we're not duplicating bad suggestions...

But perhaps you want either pdfcube or Impressive? (There was also another form of keyjnote called Accentuate, but the website for that seems to be down. I think there was some copyright issue with Apple with keyjnote.)

But word to the wise: I think such transitions are nothing but distractions to the content of your presentation, and can come off a little childish. The LaTeX beamer user's guide contains a ton of advice on how to create effective presentations, even if you're not using beamer to create these presentations, I think it's worth reading the first half of the guide.


There is an open source terminal emulator with embedded virtual keyboard. You can test it. Download and compile source code from  here
It's installed in /usr/local/bin by default.

And run it like

kterm -k 1 -l /usr/local/etc/kterm/layouts/keyboard.xml

EDIT: You will also need  mouse support in tty mode to use kterm.

Try this

sudo apt-get install gpm


Ubuntu 18.04 LTS installer Ubiquity crashes when scale factor > 100%

I finally found after many attempts that the scaling factor is what caused the crash on my machine. By default it is 200 % and this makes Ubiquity crash. Changing to 100 % (even just before validating last input panel) prevents it from crashing.

Obviously this a bug.


Command to release the best amount of Memory Ram

When a program terminates, RAM used by that program is freed. Memory used by shared libraries will be released if no other program uses that library.

If the data reads and writes data to disk, it will be cached if there's free RAM available. This cache will be kept until new data replaces it, or it is needed for programs and not caching.

To view the information, free -m will give you information.

$ free  -m
              total        used        free      shared  buff/cache   available
Mem:           5950        2292        1444           9        2213        3358
Swap:          4084         350        3734

In this case, the total amount of RAM is 5950MiB, 2292MiB is *actually in use, and 1444MiB is not in use in any sense. Additionally, 2213MiB is used for caching. The cache and free is available for immediate use, for a total available memory of 3358MiB.

When you exit your program, you will see that used drops, but the buff/cache column does not change. However, this doesn't matter, as memory used for cache is available for use whenever you need it.

So in short: Let Linux manage your memory. There's no need to do it manually.


Ubuntu 16.04- Annoying .Ink Files -> Leading to shortcuts in Windows: How to Fix?

Sounds like there is a Windows virus on the flash drive.
Simply format it, and it should get wiped out.
Warning: this will erase all data on the flash drive!
Open the included Disks application in Ubuntu, select your USB drive, click the gear icon, and then format:

Tell it to use DOS/MBR partition style.
Then, create a new FAT32 partition that spans the entire disk. Then you should be good to go.
You should probably reinstall Windows though...


So far, I found the only way to read those old books: install Foxit Reader.
https://www.itsmarttricks.com/how-to-install-foxit-pdf-reader-in-ubuntu-18-04/
However, all commands recommended by this link are to be preceded by "sudo."
At least, that works on my Ubuntu 18.04.2.


How to enter punctuation symbols using Chewing (zhuyin) on Ubuntu 18.04 LTS?

Shift +  < = ，

Shift +  > = 。

Shift +  ! = ！

Shift +  ? = ？

Shift +  : = ：

Shift +  ( = （

Shift +  ) = ）

[  = 「

] = 」

..... etc.


My bash script doesn't work when triggered by crontab, but works when i trigger it manually?

Remove the dot in your crontab entry like this:

*/1 * * * * /home/usr/automation/check_rejected_files.sh > /home/usr/automation/cronout


Lost connectivity after configuring multiple network adapters on separate networks

You have two default routes. It's possible that your "192.168.101.254" box is not configured to route your traffic out, since you said that that network it's strictly for internal access.

Remove the "gateway" entry from the eth1 network and it should work.


Install VLC media player...it has the most codecs for audio and video

sudo apt-get install vlc

OR

look for it on the software center

Hope it helps


You have two network cards adapers:

enp0s3
enp0s8

The error message you are getting is indication that the one you have listed in your /etc/network/interfaces file (enp0s25) doesn't exist.

You won't get the error message if you change the enp0s25 references in the configuration to one of the ones that you have, listed above.

i dont want to mess up existing networks and would like to add another one for static ip (host only) purposes.

At present you are not using either of the network card detected on your computer.  You can comment out what you currently have and add the new configuration to the way you want it.  By commented out the current configuration, you can have it as a reference for editing your new configuration.

Change from:

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

auto enp0s25
iface enp0s25 inet static
address 192.168.127.1
netmask 255.255.255.0

Change to:

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

# auto enp0s25
# iface enp0s25 inet static
# address 192.168.127.1
# netmask 255.255.255.0

auto enp0s3
iface enp0s3 inet static
address 192.168.127.1
netmask 255.255.255.0

# A new Virtual Network Interface:

auto enp0s3:1
iface enp0s3:1 inet static
address 192.168.127.100
netmask 255.255.255.0

If configuring the enp0s3 is not the adapter you want as your static change it to enp0s8

Also, if you don't have an entry for the adapter card, NetManager, is handling the default... providing you with the connectivity that you currently have.


Windows 7 Computer won't boot after Ubuntu dualboot installation

Your first Boot Repair output shows three disks:

/dev/sda: A ~2GB disk (probably a USB flash drive)
/dev/sdb: A ~9MB (yes, MB) disk (I don't know what this is -- maybe a very old CF card or something)
/dev/sdc: A ~320GB disk (presumably your main hard disk)

Your second Boot Repair output shows /dev/sda and /dev/sdb, but there's no sign of /dev/sdc. This leads me to think that you may have some failing hardware. If you're lucky, it could be that the hard disk has worked itself loose, and that pulling it out and re-seating it will fix the problem. If you're unlucky, it could be that the hard disk itself is failing and needs to be replaced. If you're very unlucky, it could be that a trace on the motherboard or the circuit that controls the hard disk on the motherboard is failing, in which case the computer has become more-or-less useless. The fact that Windows is sometimes reporting disk problems makes a hardware problem seem even more likely, since you'd need similar bugs in both OSes to explain this problem on the software level.

It's conceivable that an examination of the Linux kernel ring buffer (obtained by typing dmesg soon after booting) will provide some clues -- there might be a message about a failure to initialize /dev/sdc (possibly without that name, but the disk's manufacturer's name or "ATA" might appear in the message). Unfortunately, dmesg output is rather long and can be difficult for novices to interpret. You could redirect it to a file (dmesg > foo.txt) and post it to a pastebin site if you want to show it to us.

You could also try running a SMART utility on the disk, like smartctl, GSmartControl, or the Palimpsest Disk Utility's SMART tests (in increasing order of user-friendliness). This will be helpful only if the disk is accessible when you boot the computer, and it will return useful results only if the disk itself is failing in certain ways. A SMART test won't reveal problems with the motherboard.

Moving the disk to another computer is another good diagnostic procedure -- if it works fine in another computer, then you know the problem is on the motherboard or is a result of a bad connection between the disk and the computer.


My printer Canon Pixma Ip1800 doesn't work

Canon lP1800 Series

You can try the following ppa however it seems it hasn't been updated in ubuntu 14.04 first make sure you have the correct ppa. Check at least twice.Then....

Open the terminal under Ubuntu and run these commands to install printer drivers:

    sudo apt-add-repository ppa:michael-gruz/canon-trunk

sudo apt-get update

sudo apt-get install cnijfilter-lp1800series

    sudo apt-get update

Now open "printing" options in the unity or system settings-> drivers->printing

Click add and select the printer.

Ok so if that busted remove the ppa in settings-> software updates and then open a terminal and type:

cd /tmp && wget http://www.bagbit.pl/download/canon_ip1800_deb.tar.gz && tar xzf canon_ip1800_deb.tar.gz && sudo canon_ip1800_deb/install.sh

This is going to take awhile.... like you might want to go to a movie and done.


Hardware noise (coil whine?) after launching application

My dell laptop makes a similar buzzing sound, and on mine it's a known problem caused by the design of the processor (https://www.dell.com/support/article/en-us/sln84348/my-laptop-makes-a-high-pitched-buzzing-noise?lang=en). As electricity runs through it, the processor vibrates slightly, creating a sound pitched in proportion to the current processor frequency. I don't notice it while my laptop is plugged into the wall, but when I remove it from power and it goes into battery saving mode, the sound the processor makes drops into my hearing range, resulting in high-pitched buzzing.
It's possible that some new power saving feature in the beta is now bringing the operating frequency of your processor down into a range that you can hear, and if that's the case it will likely go away if you set the minimum processor usage to something higher (How to set "Performance" instead of "Powersave" as default?). Unless it seriously bothers you, I wouldn't recommend this, as it increases battery usage.
If you tried what I suggested above and it didn't work, what I'd personally do in your situation is take the bottom off, put my ear against each component, try to isolate the source and work from there towards a solution (this is how I figured it out with my dell). If you're not comfortable doing that, then I'd let sleeping dogs lie. Unless you have a hard disk drive that's tearing itself to shreds (in which case I'd think you'd have noticed a larger problem by now), it's unlikely that a little buzzing is going to cause any issues with the functionality of your laptop, even if it is a little annoying.


How to run dos [ent.exe] and [fp8.exe] on Ubuntu?

The way would be to specify the full path to the executable and prepending wine before it.  Basically using file paths like this with the wine program, on the Terminal / command line:

wine /path/to/executable.exe [argument argument ...] PATH_TO_FILE_TO_USE

Note that not all CLI programs for Windows will correctly run in Wine - Wine may be a compatibility layer but there are many things which will not run under Wine.

This isn't really that hard.  The three example commands from above but with Wine formatting and such:

wine /path/to/ent.exe /path/to/{this file}

wine /path/to/ent.exe -b /path/to/{that file}

wine /path/to/fp8.exe -8 /path/to/{another}


xfce4-indicator-plugin shows "No indicators"

This appears to be due to this bug: Long message when all indicators are hidden.

Evidently xfce4-indicator-plugin will show this message whenever no packages are installed that make use of it. In my case I hit the bug after uninstalling indicator-messages, which comes preinstalled with Xubuntu 18.04 but I didn't want, so I uninstalled xfce4-indicator-plugin and restarted the panel:

sudo apt remove xfce4-indicator-plugin
xfce4-panel -r

A couple alternative solutions:

Remove Indicator Plugin from the panel

Right-click in the panel > Panel > Panel Preferences > Items > select Indicator Plugin > Remove
Or install at least one package which uses xfce4-indicator-plugin, for example:

indicator-application
indicator-messages
indicator-power
indicator-printers
indicator-sound

Source: https://bugs.launchpad.net/ubuntu/+source/xfce4-indicator-plugin/+bug/1801724/comments/7


Ubuntu runs real slow, then crashes installing nvidia driver

:-( I've had all sorts of problems with nvidia drivers and Ubuntu 13.10 ... In the end (and you won't like this answer) after bricking my laptop several times and trying PCLinuxOS, Mint, and others I resorted to nouveau drivers on Ubuntu 13.10 .. the trick is NOT to click the "Allow install of updates and 3rd Party Software" on installation ... other things encapsulated here from my journey of Linux Ubuntu install discovery ... https://askubuntu.com/a/406426/234481

Hope this helps in some way ... also stick with nouveau ... don't install nvidia .. a waste of processing capability I know but I'm hoping a comprehensive fix will come soon .. I've tried up to 331.16 (new 334 out but I've a project to finish first ..)


Fix partition tables - Dual Boot Ubuntu and Leopard

I can't be positive, but my hunch is that you're seeing two BIOS boot options for Linux, one based off the MBR and one based off the boot partition. If they both work, then deleting the MBR code should eliminate the duplicate; however, there is a risk that if you do this, it'll backfire and Linux won't work at all. If you care to try, do this from Linux:

sudo dd if=/dev/sda of=/path/to/external/medium/backup.mbr bs=512 count=1
sudo dd if=/dev/zero of=/dev/sda bs=440 count=1

Be very very careful with these commands! If you mistype either of the dd commands, you could end up wiping out critical data. Note in particular that the second command uses a bs=440 option, not bs=512 as in the first command. Also be sure to include the count=1 option for both commands, but especially for the second. Change /path/to/external/medium to a directory where you've got a removable disk mounted. That will provide you with a recovery option, should something go badly wrong; you'll be able to boot with an emergency system and re-issue the first command, but reverse the if= and of= options, to restore the disk to its original state.

Another option is to switch from rEFIt to its more recent fork, rEFInd, and to convert from a BIOS-booting option to boot in EFI mode, as described here. You'll then be able to disable scanning for BIOS boot loaders and limit the boot list to however many EFI boot loaders you care to install. This will give you more flexibility, but it will take some effort to set it up, and there's also a risk that it won't work right -- some Macs still have hardware that Linux can't properly initialize when booted in EFI mode, although that problem is much less significant than it was in the past.


Can I download Ubuntu 12.04 on a notebook/laptop?

The designation of "Desktop Edition" in this case isn't meant in contrast to "Laptop", but in contrast to "Server Edition".


differences between locked administrator account and unlocked one

To prevent other users from making changes to your account. In order to edit anything, you need to unlock access. It locks automatically when you exit/close the window.


Problems logging into windows after installing Ubuntu

I find it odd that it gives you the windows boot manager, instead of windows itself. Try updating grub from ubuntu. A tutorial can be found here: https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows

The boot-repair tool can also give a "Bootinfo" summary to help us dig deeper into the issue if the repair tool does nothing.


You should use the r-cran-multicore package to enable multiple cpu processing:

sudo apt-get install r-cran-multicore

See details about this functionality here: http://www.rforge.net/multicore but as a warning, your 'R' code will probably have to be updated to take advantage of multiple core technology. unless you are already using pre-made code which supports the multicore extensions.


Problem setting up static IP ubuntu 16.04

I think that your file /etc/network.interfaces is wrong.

You have set your machine's IP address as 192.168.0.101, and the gateway as 192.168.1.1.

Your netmask is 255.255.255.0, which means that the first three dotted decimals in the IP address define the network and the last one defines the machine.

This means that your gateway is on network 192.168.0. and your machine is on network 192.168.1., so in effect the gateway and your computer are on different networks.

Guessing on your network setup, I think that you should change the address line to read address 192.168.1.101


How can I stop Ubuntu Dock from extending to the edges?

Open Terminal and run

gsettings set org.gnome.shell.extensions.dash-to-dock extend-height false

To revert to the "panel mode" run

gsettings set org.gnome.shell.extensions.dash-to-dock extend-height true


How can I find the ProgID of a Windows program to use in Wine?

The ProgIDs are listed in $WINEPREFIX/system.reg, which by default is at ~/.wine/system.reg. They are of the format.

[Software\\Classes\\FoxitReader.FDFDoc] 1382350649

Although there are additional semi-duplicate lines such as

[Software\\Classes\\FoxitReader.FDFDoc\\DefaultIcon] 1382350649

To list all ProgIDs, use the following command (in the terminal).

sed -rn 's/^\[Software\\\\Classes\\\\([^\]*)\].*/\1/p' system.reg | less

For those unfamiliar with less: to search, press /, type a phrase then Enter ; to exit, press q.


This kernel requires an x86-64 CPU but detected an i686 CPU when installing on netbook with 32bit image

I forgot to select the format option on the Ubuntu Ubiquity Installer (UUI). So it left some of the x64 from earlier installation.


Re-enable secure boot [ MOK secure boot ]

I found a solution in this thread: Ubuntu: "Booting in insecure mode" with SecureBoot enabled

Basically this issue pertains to the validation in module MOK (Machine Owner Key).

To get rid of the message it is sufficient to type:

sudo mokutil --enable-validation

There is a chance that in Ubuntu 16 the driver might stop working. But I can confirm that in ubuntu 14.04 - cuda functionality is unaffected. I was not using the driver for rendering anyway.

>>> sess = tensorflow.Session()
I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:900] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
I tensorflow/core/common_runtime/gpu/gpu_init.cc:102] Found device 0 with properties:
name: GeForce 940M
major: 5 minor: 0 memoryClockRate (GHz) 1.176
pciBusID 0000:04:00.0
Total memory: 1.96GiB
Free memory: 1.94GiB
I tensorflow/core/common_runtime/gpu/gpu_init.cc:126] DMA: 0
I tensorflow/core/common_runtime/gpu/gpu_init.cc:136] 0:   Y
I tensorflow/core/common_runtime/gpu/gpu_device.cc:755] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce 940M, pci bus id: 0000:04:00.0)


You can use the terminal and execute the script.

Open the terminal by Ctrl+Alt+t, then
you can change directory (using cd to go to the directory where your script is, for example,

cd /path to /DVD drive

then

./script.sh to execute the script.

Or you can just execute by

./full path/to/DVD drive/script.sh to run the script.

One simple way to open the folder (in which your script is) is to right-click that folder and select Open in terminal. Then the terminal will open up and you can just run script as ./script.sh

If you just cannot access your DVD disk using terminal or file-manager then you need to create a mount point (a folder in your file-system) where the contents of the disk is shown.

To do that:
You first decide where you want to mount the DVD drive.
/mnt or /media are appropriate.
Then create a folder under the /mnt or /media like following.

sudo mkdir /mnt/dvdrw

Next, you need to find out the location of the dvd-drive under /dev ,

sudo lsblk -f

It may give output as /dev/CD-ROM drive or /dev/DVD-RW drive or /dev/dvdrw etc...

Finally, mount the DVD rom drive on the file-system by by entering the location under /dev and the path of the newly created folder ( for example, under /mnt) :

    sudo mount </dev/path to cd dvd disk>  <path to the folder for mounting>

for example,

sudo mount /dev/dvdrw /mnt/dvdrw


How do I install matplotlib dependencies?

This is an easy way to install all non-Python dependencies before doing a pip installation:

Install dependencies of the system version – this does not install the system version itself.

sudo apt-get build-dep python-matplotlib

Enter your virtualenv as usual (you may use a different tool to do this):

pew workon your_virtualenv

Install matplotlib (and all python dependencies like numpy) from pypi:

pip install matplotlib

Note this installs all dependencies (for all matplotlib components, including optional components that you may not use). The benefit is: easy installation, future-proofing. The cost is: download time/bandwidth. This method doesn't account for: brand new dependencies (if pip version > system version and very new dependencies have been introduced) — in this case you'll need to do it the traditional way (find what's breaking and consult documentation/support).

References: http://matplotlib.org/users/installing.html#building-on-linux


GRUB Bootloader not loading with Software RAID1 on Fresh 14.04 Server Install

You need to select the actual disk drives ( /dev/sda, /dev/sdb, etc ) for where to install grub to.


How to upgrade to a newer version of a package than is available in the repository?

In this particular case then the GRAMPS website provides a download link for a Ubuntu .deb package of version 3.2.5.

On this listing page select gramps_3.2.5-1_ubuntu10.deb which should be easily installable by double clicking on the downloaded file.


Hibernation inside Ubuntu in WUBI would mess up your Windows system, so its disabled, but hibernation in Windows should stay the same unless you explicitly disable it.


Clementine appears in two PPAs. How can I specify which one to use?

Much more helpful than locking would be pinning Clementine to the PPA.  This would do exactly what you want - ensure that apt always prefers the version of Clementine that's in the PPA.  Pinning is awesome if you do it correctly.
https://help.ubuntu.com/community/PinningHowto


You should NOT trust unsigned packages.  From a security standpoint, a signed package means that the person who made it used a PGP key that is owned by them to say "I created this package, and I verify its authenticity!"  Unsigned packages are risky because you have no idea who the developer is (while you do with signed packages).

The other issue with updating is that if you use a PPA, it may be reading packages as unsigned if the PGP keys that originally signed them are not being downloaded, in which case you should make sure that you can connect to keyservers and make sure that the signee of the package has a key in the Ubuntu keyservers.


Maybe you didn't correctly set library path. To verity that, run ldconfig -v | grep nvidia and see if outputs contain many libnvidia*.so.

Here are my outputs:

    libnvidia-glcore.so.410.104 -> libnvidia-glcore.so.410.104
    libnvidia-rtcore.so.410.104 -> libnvidia-rtcore.so.410.104
    libEGL_nvidia.so.0 -> libEGL_nvidia.so.410.104
    libnvidia-ifr.so.1 -> libnvidia-ifr.so.410.104
    libGLX_nvidia.so.0 -> libGLX_nvidia.so.410.104
    libGLESv2_nvidia.so.2 -> libGLESv2_nvidia.so.410.104
    libnvidia-tls.so.410.104 -> libnvidia-tls.so.410.104
    libnvidia-compiler.so.410.104 -> libnvidia-compiler.so.410.104
    libnvidia-egl-wayland.so.1 -> libnvidia-egl-wayland.so.1.1.0
    libGLESv1_CM_nvidia.so.1 -> libGLESv1_CM_nvidia.so.410.104
    libnvidia-glsi.so.410.104 -> libnvidia-glsi.so.410.104
    libnvidia-eglcore.so.410.104 -> libnvidia-eglcore.so.410.104
    libnvidia-opencl.so.1 -> libnvidia-opencl.so.410.104
    libnvidia-fatbinaryloader.so.410.104 -> libnvidia-fatbinaryloader.so.410.104
    libnvidia-cbl.so.410.104 -> libnvidia-cbl.so.410.104
    libnvidia-container.so.1 -> libnvidia-container.so.1.0.2
    libnvidia-encode.so.1 -> libnvidia-encode.so.410.104
    libnvidia-ml.so.1 -> libnvidia-ml.so.410.104
    libnvidia-ptxjitcompiler.so.1 -> libnvidia-ptxjitcompiler.so.410.104
    libnvidia-glvkspirv.so.410.104 -> libnvidia-glvkspirv.so.410.104
    libnvidia-fbc.so.1 -> libnvidia-fbc.so.410.104
    libnvidia-cfg.so.1 -> libnvidia-cfg.so.410.104

    libnvidia-gtk2.so.418.40.04 -> libnvidia-gtk2.so.418.40.04
    libnvidia-gtk3.so.418.40.04 -> libnvidia-gtk3.so.418.40.04
    libnvidia-tls.so.410.104 -> libnvidia-tls.so.410.104

To fix that, create a new file /etc/ld.so.conf.d/nvidia.conf and edit:

/usr/local/cuda-10.1/targets/x86_64-linux/lib

Make sure /usr/local/cuda-10.1/targets/x86_64-linux/lib contains nvidia shared libraries. Execute ldconfig -v | grep nvidia again.


Hide Title Bar When Maximized in GNOME 3.16

To get to the core of why the metacity theme tweak no longer works we have to look at the gnome blog itself where gnome developer where Florian Müllner explains that when drawing the title bars gnome no longer uses metacity at all and they are always drawn by Gtk+

This means that a css answer is the only one that will work and I believe you are most of the way there. I read on this commit page that the css you want is somewhat like this:

.maximized .header-bar.default-decoration {
  padding: 0;
  font-size: 0.7em;
}

.maximized .header-bar.default-decoration .button.titlebutton {
  padding: 0;
  border-width: 0;
}

The reason the css can't hide or remove the element like it can with html (or svg) is that the css applies to gtk properties and the visibility of an object isn't a property in the typical Gtk way. You actually have to call widget.hide() from code. Similar to how Gimp themes have to hide widgets by making them the same colour as the background as a hack.


Finding correct input of FN+F11 to use as shortcut

In your case you could create a file named .Xmodmap in your home directory. (Note the "dot" in the beginning).
So I tested with xev the combination of Fn+F11 and got this info:
KeyPress event, serial 42, synthetic NO, window 0x5e00001,
root 0x1b6, subw 0x0, time 4047518, (14,98), root:(5045,739),
state 0x0, keycode 128 (keysym 0x1008ff4a, XF86LaunchA), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

You can see that the keycode of this combination is 128 on my device (yours may be a different one)
Next I want to change that combination to -say XF86AudioMute (or whatever you want) and test it:
xmodmap -e "keycode 128 = XF86AudioMute NoSymbol XF86AudioMute"
If I press the combination Fn+F11 my audio toggles. To persist this behaviour add it to the .Xmodmapfile in you home directory. Create it if is doesn't exist:
keycode 128 = XF86AudioMute NoSymbol XF86AudioMute

Instead of using XF86AudioMute you could also use XF86Launch1 or anything else that you can find in this list:
xmodmap -pke
Last not least use your chosen value to connect this event with an executable.
More infos on Xmodmap
An alternative would be Xbindkeys which might also work to tackle your problem. A more elaborate documentation can be found here


Access, from Windows, files copied from Ubuntu to a media partition

There is an issue with writing data to ntfs partitions while windows 8 is suspended and not shut down (see http://www.h-online.com/open/features/Linux-and-Windows-8-Fast-Startup-puts-data-at-risk-1780640.html or Unable to mount Windows (NTFS) filesystem due to hibernation).

From your question I don't really know if this is what's happening, but when it is, the solution is properly shutting down windows 8 instead of hibernating it.


I couldn't get Windows to boot from a USB thumb drive using Unetbootin.  I had to use Rufus to create the USB drive instead.
https://rufus.ie/


I found the problem. Now my GPU Rendering is working with one exception. The problem was the Blender package in ppa. I installed directly from the Blender website and now it works, exception is that it's not fast enough. CPU is faster.


Strange rsync behaviour I don't understand throught SMB/CIFS

In this specific case, it appears that the destination filesystem is some kind of FAT, or vfat, so the creation of temporary file with the format .filename-tmpnumber used by rsync seems to be impossible. So the use of --inplace option of rsync helped me  for this. There were a second issue that seems to come from the delta algorithm that is inefficient on such a mount. I finally were able to overcome with the help of --whole-file or short -W

In the end, this works for me:

rsync -avWP --inplace --size-only --no-perms path/*  /run/user/<user ID>/gvfs/dest/


Changing as below seemed to do the trick.

LABEL PreSeed
      MENU LABEL Preseed
      TEXT HELP
      Ubuntu x86_64 18.04.1 Physical Machine Preseed (not ks)
      ENDTEXT
      KERNEL Ubuntu-18.04.1/linux
      IPAPPEND 1
      APPEND hostname=unassigned locale=en_US.UTF-8 keyboard-
configuration/layoutcode=us url=http://netinstall/ks/ks/Ubuntu/preseed/preseed.cfg
vga=normal initrd=Ubuntu-18.04.1/initrd.gz live-installer/net-
image=http://netinstall/ks/Ubuntu-18.04.1-x86_64/install/filesystem.squashfs
ramdisk_size=16432 root=/dev/rd/0 rw --`


Software for using EasyCAP USB video capture device

Using VLC I was able to get video to work on Ubuntu 16.04 by opening VLC and then choosing:

Media -> Open Capture Device... Set Capture Mode to "TV - analog"
Device name to /dev/video1 Video standard to PAL (but will vary
depending on your output device)

I can't get the audio to work with VLC but can record it in Audacity by choosing the "usbtv:" device.


what if i remove .config file from the linux source

If you delete the .config file then you'll have to start the kernel configuration from total scratch (selecting the architecture and so on). There is also the possibility to start with a "default configuration" by using the

  make XXXX_defconfig

Where XXXX is the system you are working on (for example i386). This default configurations are found in arch/XXX/configs directories (with XXX being the architecture).

Also some environment/Makefile settings are used from the kernel to assist you in this process (for example the ARCH variable is used to filter out the architectures proposed)


install and uninstall tensorflow from environment

You probably had confusion between tensorflow-gpu and tensorflow.
Try the following process:

Change to your environment source activate tensorflow.
Run pip freeze to check which packages are installed.
If you find tensorflow-gpu (or tensorflow) installed, run pip uninstall tensorflow-gpu and conda remove tensorflow-gpu.

If it does not work, deactivate your environment and do the same process again.


Shut down your computer.
Remove your USB stick.
Now start your computer.
I hope this will work for you.


Help me to install ppp server on Ubuntu 12.04 server

First, you should change the access settings for your /etc/ppp/pap-secrets file

  Warning - secret file /etc/ppp/pap-secrets has world and/or group

Second, there seems to be a Configuration Problem. You have multiple LCP ConfNak (LCP Configuration not Acknowledged) Packets, some are ok, but you need at least one LCP ConfAck(LCP Configuration Acknowledgement)


Ubuntu Dock: "unread mail" indicator disappeared

I have meanwhile asked the same question over at MozillaZine. There I received a reply, stating that the "disappearing red bubble" is caused by a Thunderbird add-on which isn't functional anymore. This change in Thunderbird occurred at the same time as when I changed my monitor setup.
Link to that forum message:

http://forums.mozillazine.org/viewtopic.php?f=39&t=3057157


Language Support is the easiest tool for adding languages. Do you see a Language Support icon in the System Settings menu? If not, you can do

sudo apt-get install language-selector-gnome

After that you should be able to add the desired language(s) using Language Support.


On my installations the directory /etc/usb_modeswitch.d does not exist by default, so it must be created first:

sudo mkdir /etc/usb_modeswitch.d

To create the file, you could use the simple text editor nano to achieve this, using the following command:

sudo nano /etc/usb_modeswitch.d/HuaweiE3531s-2.conf

This will open the editor, where you can type in those required lines.

TargetVendor=0x12d1
TargetProduct=0x15ce
MessageContent="55534243123456780000000000000011062000000100000000000000000000"

When you're finished carefully typing those lines, press Ctrl+X followed by Y, then Enter to write and save the file. One word of warning however, the 'MessageContent' line should not have a double quote before it, as shown in your question, though the double quotes around the number string are correct.


Not allowed to close a window after clicking the icon on the laucher

Press Alt+F2, and then type "xkill" ... it will give you a cursor to force whatever window you want closed. Especially useful when "sudo kill " does nothing from the command line. If this is common problem for you (i've never seen firefox behave that way), then there might be something wrong with your installation.


How does the fstab 'defaults' option work? Is relatime recommended?

I believe you need to have something in the "options" column in /etc/fstab, or the mount command will try using the next column and probably won't work. So if you have no specific changes, then "defaults" should be put there.

Relatime is recommended on laptops and desktops with solid-state drives - it avoids a lot of extra hard drive writes, thereby improving battery and SSD life.  'relatime' has been included in the linux kernel defaults since linux version 2.6.30, so there is no reason to specify it unless you are running a very old kernel.  Having it specifically listed as 'defaults,relatime' won't break anything though.


Suggestion wanted for the following scenario ---

2 of them only running some sort of text based chat program

install a server version for those 2 machines.
create a normal user on each machine.
change the .profile of those users to start your chat program.

Besides this you will need to tell them how to shutdown/reboot. But that can be done from a bash script  to make it as easy as possible.


TL;DR:

Always remove PPAs with ppa-purge

Whole story:

Yesterday I wanted to try KDE Plasma and I installed it with following commands:

sudo add-apt-repository ppa:kubuntu-ppa/backports
sudo apt-get update && sudo apt-get dist-upgrade
sudo apt-get install kubuntu-desktop

After hour I decided to switch back to Unity and remove KDE:

sudo add-apt-repository --remove ppa:kubuntu-ppa/backports
sudo apt-get update && sudo apt-get dist-upgrade
sudo apt-get remove --purge kubuntu-desktop

After login I was facing few problems, so I tried reinstalling ubuntu-desktop and unity, but I was getting error:

The following packages have unmet dependencies:
 ubuntu-desktop : Depends: checkbox-gui but it is not going to be installed
                  Recommends: python3-aptdaemon.pkcompat but it is not going to be installed
                  Recommends: unity-webapps-common but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Some digging and I found out what cause it: removing PPA does not downgrade packages. The solution was to add it again and execute:

sudo apt-get install ppa-purge
sudo ppa-purge ppa:kubuntu-ppa/backports

And then I was able to reinstall ubuntu-desktop :)


dnsmasq: failed to create listening socket for port 53: Address already in use

Check what's listening on port 53 (domain) with:
sudo ss -lp "sport = :domain"

Disable any service that is running on this port. It's usually systemd-resolved.
I'm going to also mask it so it doesn't auto start on reboot.
sudo systemctl disable systemd-resolved
sudo systemctl mask systemd-resolved

Also, make sure that you have stopped the systemd-resolved service. Run:
sudo systemctl stop systemd-resolved

To undo what you did:
sudo systemctl unmask systemd-resolved
sudo systemctl enable systemd-resolved

Also sudo update-rc.d systemd-resolved disable might also stop it from auto starting on boot but I haven't tested it. Use defaults instead of disable to undo the command.

Or you can change what port dnsmasq listens on, by editing the config file:
sudo nano /etc/dnsmasq.conf

Hit Ctrl+W and type listen-address= and hit enter.
Uncomment the line and add 127.0.0.1 with a different port than 53 like:
listen-address=127.0.0.1#5300


How to install VMWare Workstation from dvd - but do it from the command line?

I am not geek but I'll tell you what I know

cd /{Your DVD Direcrory Path}
chmod 755 ./VMware-Workstation-Full-8.0.4-744019.x86_64.bundle
./VMware-Workstation-Full-8.0.4-744019.x86_64.bundle

And then follow the instructions of the installation. Good Luck.


Ubuntu 9.10 reached end of life on April 30th 2011. It is now November 2012, 1 1/2 year later.

You most likely are affected by a bug in the 9.10 release or have a media that is somewhat damaged where either the install did not get finished correctly or some other issue prevents the system to boot.

You should download a newer version of Ubuntu. Bugs tend to get fixed with newer releases (well we sure hope a newer release never regresses ;) ).

The 2 options would be either Ubuntu 12.04 (LTS) or Ubuntu 12.10. If the install still have problemens please create a new question with as much detail as possible. If you do not like Unity 3D you could also try Ubuntu with Gnome 3 or any of the official alternatives, like Xubuntu or Lubuntu.


usr/bin/x11 replication is eating up space, how do I correct this?

You won't save more than a few bytes by removing /usr/bin/X11 because it is a symbolic link to the /usr/bin directory:

$ ls -l X11
lrwxrwxrwx 1 root root 1 Sep  9  2011 X11 -> .
$ readlink -f X11
/usr/bin

In order to actually free up some space, see also How do I free up disk space?


This script will add a grey dashed line with the date and time at the end of the line, then it will change to red if you run as a root user:

Add the following lines to the bottom of both /home/<username>/.bashrc and /root/.bashrc files (NOTE: /root/.bashrc has to be edited with root capabilities like sudo gedit /root/.bashrc):

if [ -f "$HOME/.bash_ps1" ]; then
    . "$HOME/.bash_ps1"
fi

Copy and paste the following code to a new file called  /home/<username>/.bash_ps1:

# Fill with minuses
# (this is recalculated every time the prompt is shown in function prompt_command):
fill="--- "

reset_style='\[\033[00m\]'

# determine if root or not
a=$(id -u)
if [ "$a" = 0 ]
then
    # for root
    status_style=$reset_style'\[\033[1;31m\]' # bold red; use 0;37m for lighter color
    command_style=$reset_style'\[\033[1;31m\]' # bold red
else
    # for other users
    status_style=$reset_style'\[\033[0;90m\]' # gray color; use 0;37m for lighter color
    command_style=$reset_style'\[\033[1;29m\]' # bold black
fi
prompt_style=$reset_style

# Prompt variable:

PS1="$status_style"'$fill $(date +"%m/%d/%y ")\t\n'"$prompt_style"'${debian_chroot:+($debian_chroot)}\u@\h:\w\$'"$command_style "

# Reset color for command output
# (this one is invoked every time before a command is executed):
trap 'echo -ne "\033[00m"' DEBUG

function prompt_command {
# create a $fill of all screen width minus the time string and a space:
let fillsize=${COLUMNS}-18
fill=""
while [ "$fillsize" -gt "0" ]
do
    fill="-${fill}" # fill with underscores to work on
    let fillsize=${fillsize}-1
done

# If this is an xterm set the title to user@host:dir
case "$TERM" in
    xterm*|rxvt*)
    bname=$(basename "${PWD/$HOME/~}")
    echo -ne "\033]0;${bname}: ${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"
    ;;
    *)
    ;;
esac
}

PROMPT_COMMAND=prompt_command

Next, create a link in the /root folder so that it calls this when switching to the root user:

sudo -s
cd /root
ln -s /home/<username>/.bash_ps1

After all is saved, now every time you open a new terminal window it should look like the image above.  The timestamps appear after you press enter on each command you type into the terminal making it easier to scroll back and see when you ran that specific command.

Hope this helps!


When renaming files in Ubuntu 13.1, the label is too dark until edit is complete

A bug that's been around since start of 13.10 dev

https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/1236601


Installing driver for USB wifi adapter - completely lost

For the ASUS BCM43526 try:

In terminal...

sudo apt-get update

sudo apt-get install broadcom-sta-dkms

For the D-Link DWA-192:

In terminal...

sudo apt-get install build-essential git

sudo git clone https://github.com/zebulon2/rtl8814au.git

create dkms.conf in the rt8814au folder, and add these lines...

# rtl8814AU-4.3.21_17997.20160531
#
#
PACKAGE_NAME="rtl8814au"
PACKAGE_VERSION="4.3.21_17997.20160531"
MAKE[0]="'make' all KVER=${kernelver}"
BUILT_MODULE_NAME[0]="8814au"
DEST_MODULE_LOCATION[0]="/updates/dkms"
AUTOINSTALL="YES"
REMAKE_INITRD="NO"

then...

sudo cp -r rtl8814au /usr/src/rtl8814au-4.3.21
sudo dkms add rtl8814au/4.3.21
sudo dkms build rtl8814au/4.3.21
sudo dkms install rtl8814au/4.3.21
dkms status

note: you may have to adjust the version numbers if a newer release exists


iptables -A INPUT -p icmp --icmp-type echo-request -j DROP

This Will Block The Ping

I'm using This Script For Iptables in Our Server's

#!/bin/bash

#This Script was Used for Only Setting up Iptables in ubuntu 12.04 server
#uncomment the Lines With # Which u don't need to use
#if u going to use this script in remote VPS Test it in local systems before applying it in remote VPS .
#final line will be commented with # cos it will save the iptables if its not commented with #

#0. Flush every Rules what ever there already

iptables -F

#1. This enable traffic for (lo) loopback interface(-i)

iptables -A INPUT -i lo -j ACCEPT

#2. This Will Keep the rules for Which service currently Established  eg : ssh

iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

#3. This Will Enable the Port Number 22 for ssh which i we have defined

iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT

#4.This Will Enable the Port Number 80 for http

iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT

#5.This Will Enable the Port Number 443 for httpd

iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT

#6. Allow rsync from a specific network

iptables -A INPUT -i eth0 -p tcp --dport 873 -m state --state NEW,ESTABLISHED -j ACCEPT

iptables -A OUTPUT -o eth0 -p tcp --sport 873 -m state --state ESTABLISHED -j ACCEPT

#7. Blow ICMP PING Request

iptables -A INPUT -p icmp --icmp-type echo-request -j DROP

#11. This Will Block Other connections

iptables -A INPUT -j DROP

#saving the iptables

#sudo apt-get install iptables-persistent
#sudo service iptables-persistent save
#sudo service iptables-persistent restart


Ubuntu not going in full screen mode in virtualbox after update

Even though it is still 12.04, you have probably upgraded the kernel version.

You will need to re-install the Virtualbox Guest Additions - mounting the additions disk is not enough (or needed after installation), it needs to be installed.


Problem with installation of ubuntu after after changing my video card with an amd hd 6570

OK, did this using Linux Mint so should also work with Ubuntu. I used the compatibility mode to install Linux Mint and then installed the latest driver from AMD. So download these first onto an USB stick.

You need to switch to the console after the install pressing CTRL-ALT-F1. Now the console will also flicker now and then so you will need to concentrate when you type. Easy way out is probably installing the ssh-common package and to do it remote via ssh from another box or tablet even.

Now I'm not 100% sure if this was needed but I also ran "sudo apt-get remove fglrx" to remove any drivers which might be used. After that you'll need to reboot. Then switch to the console again and mount the USB drive "sudo mount /dev/sdb1 /mnt", unzip the zip file on the USB stick "unzip amd-driver-installer-catalyst-13.1-linux-x86.x86_64.zip" and to run the file as root "sudo bash ./amd-driver-installer-catalyst-13.1-linux-x86.x86_64.run". It'll ask you a few questions, select the default answers and then reboot. Now the card should be working fine.


Accidently have one linux folder inside other one - what happend to my partitions?

The reason you have not been able to resize sda7 is that it is tightly sandwiched between sda4 and sda5. What I would do to increase sda7 is the following:

Backup any data you cannot afford to lose
Using your Ubuntu install media boot into a live environment (Try Ubuntu not install Ubuntu)
Using GParted move sda6 to the end of the drive. That will move the unused space between sda5 and sda6
Boot into Windows and using disk manager move your programs partition to the end of the drive next to sda6 (remember Windows will not use the sda naming). That will move the unused space between sda 5 and sda7
Boot back into the Ubuntu live environment. Using GParted resize sda7

Good luck.


File ownership changes when uploading files to a Apache server using WebDAV

That you see your own username and group in Nautilus on your Ubuntu laptop is working as intended. This is only locally, these permissions are not carried over to the webDAV server. As per the man page of davfs2:

   FILE OWNER AND PERMISSIONS

   davfs2  implements  Unix  permissions  for access control. But changing
   owner and permissions of a file is only local.  It  is  intended  as  a
   means for the owner of the file system, to control whether other local
   users may access this file system.

   The server does not know about this. From the  servers  point  of  view
   there  is  just  one  user  (identified  by the credentials) connected.
   Another WebDAV-client, connected to the same server, is not affected by
   this local changes.

Maybe you could elaborate on the issues you are facing, because it's not due to the file ownership being set to your local user.


Can't run init script on boot after another init script

I got it to work. I made the Broker a background process because it constantly runs until I shutdown the computer or call the script with the shutdown parameter. I also made the Consumer a background process.

Broker Init Script

su user1 -c 'qpid-server &'

Consumer Init Script

su user1 -c 'java -jar foo.jar &'


How to get permissions for all users for new drive added to the system - 12.10

One option would be to create a group with read/write permissions on that folder and then add each one of the users to that group.

First, you need to create a new group:

groupadd my_media_group

Then change the permissions of your files. Supposing /dev/sdd1 is mounted in /media/nick/Media Store

sudo chgrp /media/nick/Media\ Store my_media_group
sudo chmod -R 2770 /media/nick/Media Store

The first command will change the group of that folder. The second will set rwx permissions to owner and group (770) and make new created files have the group of the parent folder (2). If you already have files in that folder, it may be needed to change their group also (it can be made with chgrp -R)

Lastly, for each one of the users in the system add it to that group:

sudo usermod -a -G my_media_group <username>

I haven't tried this, and it may not be the best way to do it, but if it doesn't work you should be able to go back using chgrp and chmod.

Hope this helps.


Wired connection takes a long time to connect on startup

TX packets:6774 errors:105

You're getting errros on the interface. Try replacing a cable and using another port on the router/switch


wordpress error ZipArchive is not installed on your server, but is required if you need to import demo content

I think you should try reloading php.

sudo systemctl reload  php7.0 reload

or

sudo systemctl reload php7.0-fpm  # if you use php7.0-fpm mode


Capslock started to switch the language, but is not set to do so. How to disable it?

"Out of the blue" sounds odd. Anyway, on Ubuntu you can probably fix it using this command:
gsettings reset org.gnome.desktop.input-sources xkb-options


The brightness of my laptop reset every reboot?

edit /etc/rc.local to insert your preffered value:

sudo gedit /etc/rc.local

and add the following

echo X > /sys/class/backlight/intel_backlight/brightness

replace X by the value of your need


Ubuntu 15.10 Can't change output source from HDMI to wireless Blutooth Headset

I have no real answer, but I have made good expiriance to use pulseaudio.
If you want you can give it a try with

sudo apt-get install pulseaudio

Hope that helps you.

Regards,
   Kai


How to install Ubuntu to a Mac Mini i7 2011 with AMD graphics?

The default EFI and bootloader on macOS will not allow booting without modification by a third party bootloader, or an arduous manual booting process every time you restart.

Moreover, since you report that the text-based installer works, I would argue that there is no conflict with the graphics card. Overall, I would recommend using the third party option, and specifically refind.

Here is what I do step by step:

Prepare the Mini with macOS first.

Reboot the machine, hold down command-R, and restore macOS (it may say OS X).
Once restored, let it update fully and then reboot patient and update everything on macOS first. In your case, it will probably restore to OS X Lion. That's fine - refind works on that.
Upon reboot, run Disk Utility, and add only one partition to the drive for your Linux OS. This is processor-intensive and slow. Be patient.

Prepare the bootloader refind

In macOS, navigate to reind download page and download refind to your Downloads folder.
Reboot the mac and hold down command-R for restore.
Open Terminal, and run the following commands:

cd ~/Downloads/refind-bin-0.10.4
./refind install
exit

Quit Terminal and reboot the machine.

Install guest OS

Power up the machine - it will now use refind bootloader - pick the Mac OS X option with arrow keys. Once you log in, enter the CD, or the flash drive for the Linux distribution you are choosing.
Reboot the machine. The refind bootloader will recognize the grub bootloader. You may see more than one - choose the one with the EFI naming convention.
Install guest OS and be careful to select the partition correctly. This will require you to set up your partitions manually in the text based installer. There are numerous tutorials on this, but I recommend setting up a minimum of 4 partitions for boot, root, home, and var.

Re-run refind and remove original config and create new config

Reboot machine and hold down command-R.
Open Terminal and do the following:

cd ~/Downloads/refind-bin-0.10.4
./mountesp
cd /Volumes/ESP/EFI/refind
rm -rf ._refind.conf
rm -rf refind.conf
cd ~/Downloads/refind-bin-0.10.4
./refind-install

Reboot the machine. Select the Linux OS distribution at the refind bootloader menu.

That's it; you are done. Other considerations below.

Alternate Step 3. Different way of booting install CD / drive / etc.

A few times, I have booted into Linux using the alt key instead of refind. However, I have only had success with this as a last resort and when refind was already preinstalled onto the macOS volume. But, it has worked more than once. Essentially, you are preserving every other step, but using the native macOS bootloader one last time before you install the Linux OS, and merely to boot the install disk. I have even done this alternate method by holding down c on the keyboard. But, it only works if every other step remains the same.

A word on partitioning:

Use your judgment on partitioning. I have three dual-boot Macs. For my 500GB drive, I keep 60GB for OS X, 128, 128, 128, and swap for three different Linux flavors. On another machine, which I use in production, I keep 468GB for the macOS volume, and keep a skinny 32GB Ubuntu-MATE partition. Each machine and purpose is different.

Why keep OS X or macOS?

Keeping a small macOS or OS X boot volume is important for stability of booting and administering the Linux OS. If Linux crashes, you can easily boot into macOS and nuke and pave the partition from Terminal. Also, I have found the distributions are more stable with the refind bootloader. I have attempted to create Linux only intel Macs but they always crashed and or involved tedious steps to boot the Linux OS. Lastly, I am pretty sure your machine's firmware is fully up to date, but maybe not. Having macOS or OS X will allow you to easily upgrade and check for firmware upgrades. I have a 2010 laptop that I run Linux on primarily and recently booted back into OS X and received a firmware update that had somehow been missed.


It appears that your disk has a some bad blocks, at the very least.  I would run fsck -y  /dev/sda6 at the prompt, as the message suggests.


Software centre gone after updating to 16.10

I managed to solve the problem using Synaptic Manager (as suggested by David Thefan), I found the package software-center and installed it, so Ubuntu Software is back. Thank you for your replies and suggestions.


Is it possible to get an HP Media remote to work with Ubuntu?

There are two main ways LIRC supports remotes.

One is just via a generic IR receiver. It's possible to "train" these to get a config file, or download one. These just list the pulse timings for each button.

The other means is via an event device - which is the likely mechanism of the remote you've got, since it already has an effect on your machine. This is where the kernel has a driver for this remote, and translates it's pulses into events.

The device is effectively plumbed in as an extra keyboard with some odd keys, some of which have bindings in X. You can use LIRC to add extra bindings to such a device via it's evdev (event device) module.

do

lsmod | grep evdev

And see if the evdev module is loaded - this is often in response to one of these remote receivers. The kernel drivers for these modules usually map the events to the standard set of key codes. Some of the keys might even be in the usual keymap - the remotes I have produce the correct keycodes for numerics, enter, etc - and you can see them inputting keys into applications like any other HID keyboard.

try working out which /dev/input/eventN device your remote is - try looking through your dmesg output ; e/g/

dmesg | grep event

Then run one of the LIRC debug tools, irw

irw /dev/input/eventN  # should produce a list of button identifiers when you point and shoot. Once you have this working ...

From here you can configure LIRC to receive certain button presses and send other keys to applications. I have a mixed setup for MythTV - some of the buttons are the values I'd want anyway (OK == ENTER, 0-9, etc) some of them I remap in LIRC (STOP == d for delete).


Why is sysinfo reporting Gnome 2 rather than Gnome 3

a very very easy solution (even for Ubuntu-dulls or my mother in law...who is using also ubuntu) if Ubuntu is not upgrading properly, just download 11.10, burn it on a CD and install it!!! It will detect a previous failed installation and will correct it. All installed programs and most settings are keep as original. I was surprised how well it worked when I run into a problem while upgrading. My upgrade got stuck after rebooting at 'checking battery state' due to interruption of my wireless Internet while upgrading. Hope this helps for others as well!!!


How to increase limits for processes created from fstab?

Interpose your own mount helper. Edit the 3rd field of the /etc/fstab entry from ciopfs to myciopfs then create the file /sbin/mount.myciopfs and do chmod a+rx on it.  This script will be executed by mount when you manually or automatically mount the entry.  It will pass most of the fstab line options to the script.

Write a shell script in the helper file to set a new ulimit and then execute the real mount.ciopfs helper. Eg:

#!/bin/bash
ulimit -n 5000       # maximum open files
exec /sbin/mount.ciopfs "$@"


I am not sure what you are using to install Ubuntu whether it is a cd or usb, but what I have found easiest is to download rufus while in windows 8.1 with whatever flavor of Ubuntu is your favorite.  I recommend Ubuntu 14.04 LTS x64. A quick google search will help you find rufus. But here it is just to be nice (click on this orange text)

Once you have rufus up and running, insert your usb stick.  Remember your usb stick will lose EVERYTHING on it, so make sure you get anything important off of it first.  I think the smallest you can use is 4 GB but I recommend 8 GB just to be safe.

Select your Ubuntu image down in the middle right portion of the rufus window.

THIS IS THE MOST CRUCIAL PART:
AFTER selecting your image, then go back to the top of the rufus window and make sure you select GPT style with uefi.  After that is done, click the create or okay button at the bottom of the window and answer yes to formatting the usb disk.  It will only take rufus about 2 minutes to create your Ubuntu install disk.

Exit rufus and windows...leave all your bios settings the same (uefi mode) and make sure you find out which f button to press on your keyboard from your manufacturer to select the usb disk as the boot device.

Install Ubuntu as you normally would. Then after installing, to access your Ubuntu install press that same button you pressed to boot from the usb disk but Ubuntu should have updated your efi files in your bios so the boot disk menu will now list Ubuntu with whatever drive description after it.

Ex: ubuntu (Samsung 840 evo 500 GB)

select that disk and Ubuntu will load.

Not as great as the old way of having grub or windows boot loader let you choose without pressing a bunch of buttons but it works.  I am sure someone has a better solution, but I am kind of a noob.  Hope I helped!


Seeing the I/O error in the pictures I would suggest:

If possible try another memory stick
Re download the iso as it may be corrupt download


On your Ubuntu machine, you will need to have a file under /home/user/.ssh called authorized_keys
This will need to have the permissions set to -rw-r--r--. You can set this via chmod 644 authorized keys via the command line on the virtual machine.
Once the file is there, you will now need to edit the authorized_keys file and place the text of your openSSH public key inside. Ensure that there is no whitespace added to the text when copying it in. (You can edit this file via notepad, or notepad++)
Save this file on the Ubuntu VM.
Now that you have the authorized_keys file created, you should now be able to connect via PuTTy with your PRIVATE key.
To do so, ensure that you have the .ppk file setup for your connection.
You will navigate PuTTy into the Connections part of the tree, and then click on SSH
Click on auth and at the bottom of the right side, you can see the section to browse for your .ppk.
Once you have this selected, you should now be able to try connecting to the Ubuntu virtual machine via key auth.


Missing operating system single boot Ubuntu on Mac

If you don't have anything valuable on your computer (anymore, haha), just grab the USB and boot it up again. At the install, select "Custom / Something else".

Delete all the partitions from your SSD/HDD.
You will need two partitions.
One Swap, which should be at least 4-8gb,
(the less mem you have, the more swap you may need.)
and One root.
One root: ext4, "/".

People often make a "/home" as well. It basically stores your files. Like Downloads, Pictures, Videos. So if Ubuntu decides to die one day, your files are still safe, and the system can be replaced in minutes.

It's up to you. (If you decide to have a /home too, then make the "root" partition ~30-40GB or so. Swap is again 4-8gb, and the rest goes for /home.)


shell script to insert line into /etc/passwd , /etc/shadow ,/etc/group and save it

Unless extraordinary circumstances make this unsuitable, it is preferable to make your script use utilities like passwd, usermod, groupmod, useradd, groupadd, adduser, and addgroup. (Check out the manual pages for those utilities, which are available on your Ubuntu system via the man commands and in yelp, and also on the web at http://manpages.ubuntu.com.)


PFB fonts are broken in certain applications and missing in others (Kubuntu 20.04)

Many programs have explicitly dropped support for Type 1 fonts, years ago. While fontconfig and FreeType do support Type 1 fonts, many other libraries and programs don't. In most cases, fontconfig just passes font locations to the program, which can either use another library or render them itself. That's why the fonts render inconsistently across programs.
Cross-platform applications, such as LibreOffice, Inkscape, and Firefox, in particular are likely to have dropped Type 1 support because they are working with the least common denominator. According to Wikipedia, "[Type 1 fonts] are not supported in the Windows GDI+, WPF or DirectWrite APIs." Other issues with Type 1 fonts are limited character set and absent unicode support.
Going forward, the trend is to see less and less Type 1 use. Ultimately, the only programs that will support it are the ones that have to, namely PDF/PS viewers and font editors. Once this happens, there's no easy way to recover Type 1 support except to go back to using software from five or more years ago, when Type 1 support was more prevalent.

To avoid seeing "broken" Type 1 fonts, you can configure fontconfig to hide them. This is basically jumping forward to where Type 1 support is heading.
Create the file /etc/fonts/conf.d/00-reject-type1.conf with the following contents:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "/etc/fonts/conf.d/fonts.dtd">
<fontconfig>

<selectfont>
   <rejectfont>
      <pattern><patelt name="fontformat">
         <string>Type 1</string>
      </patelt></pattern>
   </rejectfont>
</selectfont>

</fontconfig>

Then refresh the font cache with sudo fc-cache -r.
Font viewers and editors should continue to work as expected, as long as they access the font files directly.
PDFs with embedded fonts should display correctly. When external fonts are referenced, they should use the OpenType or TrueType font that fontconfig specifies. (I use Okular. Other Poppler based viewers should behave similarly.)

TrueType and OpenType versions of most Type 1 fonts are available. Many converted fonts have been extended with unicode support. Here are a few packages:

fonts-urw-base35
fonts-texgyre
fonts-lmodern

Some typefaces will have different names. If the fonts are installed via the package manager, fontconfig should be configured to substitute the correct fonts. If you install fonts by copying font files, you'll have to configure font substitution yourself or manually change font names in documents.

Avant Garde Gothic ~ TeX Gyre Adventor ~ URW Gothic
Bookman ~ TeX Gyre Bonum
Century Schoolbook ~ TeX Gyre Schola ~ C059
Chancery ~ TeX Gyre Chorus ~ Z003
Courier ~ TeX Gyre Cursor ~ Nimbus Mono
Dingbats ~ D050000L
Helvetica ~ TeX Gyre Heros ~ Nimbus Sans
Palatino ~ Palladio ~ TeX Gyre Pagella ~ P052
Times ~ TeX Gyre Termes ~ Nimus Roman

The behavior of TeX Live with Type 1 fonts hidden in fontconfig is as follows...

latex + dvipdf embeds Type 1C fonts.
pdflatex embeds Type 1 fonts.
xelatex and luatex embed Type 1C and CID Type 0C fonts.

TrueType and OpenType fonts can also be specified and embedded.

This is the test document I used:
\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}

\usepackage{lipsum}
%%\usepackage{fontspec}
%\usepackage{mathspec}

%\setmainfont{Noto Serif}
%\setmonofont[Scale=0.8]{Noto Sans Mono}

%\setmathsfont(Digits,Latin,Greek){Noto Serif}
%\setmathrm{Noto Serif}

\begin{document}

\lipsum[1]

\[ \int_0^\infty \frac{1}{x} \;\mathrm{d}x \]

\raggedright
\tt{\lipsum[2]}

\end{document}


scale monitors differently without everything becoming blurry?

Ubuntu (and most linux distrost) come with xrandr command. Bellow you can see the sample output of xrandr where I have one internal laptop LVDS screen, and external VGA-0 screen

$ xrandr
Screen 0: minimum 320 x 200, current 2390 x 768, maximum 8192 x 8192
VGA-0 connected primary 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1024x768       60.0*
   800x600        60.3     56.2
   848x480        60.0
   640x480        59.9
LVDS connected 1366x768+1024+0 (normal left inverted right x axis y axis) 344mm x 193mm
   1366x768       60.0*+
   1280x720       59.9
   1152x768       59.8
   1024x768       59.9
   800x600        59.9
   848x480        59.7
   720x480        59.7
   640x480        59.4

As you can see there is several resolutions to chose from.

One could use xrandr --output VGA-0 --mode 1024x768 --output LVDS --mode 1024x768 to bring them both to the same resolution. The point is - this can be scripted and used as autostart command on every GUI login.

There are ways to also add new modes. For instance, here's an example from man xrandr

Forces to use a 1024x768 mode on an output called VGA:
              xrandr --newmode "1024x768" 63.50  1024 1072 1176 1328  768 771 775 798  -hsync
              +vsync
              xrandr --addmode VGA 1024x768
              xrandr --output VGA --mode 1024x768

Refer to Arch Wiki for detailed explanation on that

However, GUI is quite capable of doing that same task - review System Settings -> Displays settings


From man grep (emphasis mine):

grep  searches the named input FILEs (or standard input if no files are
named, or if a single hyphen-minus (-) is given as file name) for lines
containing  a  match to the given PATTERN.  By default, grep prints the
matching lines.

If you ran grep without a filename, or a pipe (the | in ls | grep):

grep foo

The standard input is the terminal - i.e., you. You have to provide the input which grep will search.

$ grep foo
this is me typing stuff
now I'm typing foo, which will get printed again because grep matched foo
now I'm typing foo, which will get printed again because grep matched foo


What are directories, if everything on Linux is a file?

Note: originally this was written to support my answer for Why is the current directory in the ls command identified as linked to itself? but I felt that this is a topic that deserves to stand on its own, and hence this Q&A.

Understanding Unix/Linux filesystem and files: Everything is an inode

Essentially, a directory is just a special file, which contains list of entries and their ID.

Before we begin the discussion, it's important to make a distinction between a few terms and understand what directories and files really represent. You may have heard the expression "Everything is a file" for Unix/Linux. Well, what users often understand as file is this: /etc/passwd - An object with a path and a name. In reality, a name (be it a directory or file, or whatever else) is just a string of text - a property of the actual object. That object is called inode or I-number, and stored on disk in the inode table. Open programs also have inode tables, but that's not our concern for now.

Unix's notion of a directory is as Ken Thompson put it in a 1989 interview:

  ...And then some of those files, were directories which just contained name and I-number.

An interesting observation can be made from Dennis Ritchie's talk in 1972 that

  "...directory is actually no more than a file, but its contents are controlled by the system, and the contents are names of other files. (A directory is sometimes called a catalog in other systems.)"

...but there's no mention of inodes anywhere in the talk. However,
the 1971 manual on format of directories states:

  The fact that a file is a directory is indicated by a bit in the flag word of its i—node entry.

  Directory entries are 10 bytes long. The first word is the i—node of the file represented by the entry, if non—zero; if zero, the entry is empty.

So it has been there since the beginning.

Directory and inode pairing is also explained in How are directory structures stored in UNIX filesystem?. a directory itself is a data structure, more specifically: a list of objects (files and inode numbers) pointing to lists about those objects (permissions, type, owner, size, etc.). So each directory contains its own inode number, and then filenames and their inode numbers. Most famous is the inode #2 which is / directory. (Note, though that /dev and /run are virtual filesystems, so since they are root folders for their filesystem, they also have inode 2; i.e. an inode is unique on its own fileystem, but with multiple filesystems attached, you have non-unique inodes ). the  diagram borrowed from the linked question probably explains it more succinctly:

All that information stored in the inode can be accessed via stat() system calls, as per Linux man 7 inode:

  Each file has an inode containing metadata about the file.  An
  application can retrieve this metadata using stat(2) (or related calls), which returns a stat structure, or statx(2), which returns a statx structure.

Is it possible to access a file only knowing its inode number ( ref1 , ref2 )? On some Unix implementations it is possible but it bypasses permission and access checks, so on Linux it's not implemented, and you have to traverse the filesystem tree (via find <DIR> -inum 1234 for example) to get a filename and its corresponding inode.

On the source code level, it's defined in the Linux kernel source and is also adopted by many filesystems that work on Unix/Linux operating systems, including ext3 and ext4 filesystems (Ubuntu default). Interesting thing: with data being just blocks of information, Linux actually has inode_init_always function that can determine if an inode is a pipe (inode->i_pipe). Yes, sockets and pipes are technically also files - anonymous files, which may not have a filename on disk. FIFOs and Unix-Domain sockets do have filenames on filesystem.

Data itself may be unique, but inode numbers aren't unique. If we have a hard link to foo called foobar, that will point to inode 123 as well. This inode itself contains information as to what actual blocks of disk space are occupied by that inode. And that's technically how you can have . being linked to the directory filename. Well,almost: you can't create hardlinks to directories on Linux yourself, but filesystems can allow hard links to directories in a very disciplined way, which makes a constraint of having only . and .. as hard links.

Directory Tree

Filesystems implement a directory tree as one of the tree datastructures. In particular,

ext3 and ext4 use HTree
xfs uses B+ Tree
zfs uses hash tree

Key point here is that directories themselves are nodes in a tree, and subdirectories are child nodes, with each child having a link back to the parent node. Thus, for a directory link the inode count is minimum 2 for a bare directory (link to directory name /home/example/ and link to self /home/example/.), and each additional subdirectory is an extra link/node:

# new directory has link count of 2
$ stat --format=%h .
2
# Adding subdirectories increases link count
$ mkdir subdir1
$ stat --format=%h .
3
$ mkdir subdir2
$ stat --format=%h .
4
# Count of links for root
$ stat --format=%h /
25
# Count of subdirectories, minus .
$ find / -maxdepth 1 -type d | wc -l
24

The diagram found on Ian D. Allen's course page shows a simplified very clear diagram:

WRONG - names on things      RIGHT - names above things
=======================      ==========================

    R O O T            --->         [etc,bin,home]   <-- ROOT directory
   /   |   \                         /    |      \
etc   bin   home       --->  [passwd]  [ls,rm]  [abcd0001]
 |   /   \    \                 |      /    \       |
 |  ls   rm  abcd0001  --->     |  <data>  <data>  [.bashrc]
 |               |              |                   |
passwd       .bashrc   --->  <data>                <data>

The only thing in the RIGHT diagram that's incorrect is that files aren't technically considered being on the directory tree itself: Adding a file has no effects on the links count:

$ mkdir subdir2
$ stat --format=%h .
4
# Adding files doesn't make difference
$ cp /etc/passwd passwd.copy
$ stat --format=%h .
4

Accessing directories as if they're file

To quote Linus Torvalds:

  The whole point with "everything is a file" is not that you have some random filename (indeed, sockets and pipes show that "file" and "filename" have nothing to do with each other), but the fact that you can use common tools to operate on different things.

Considering that a directory is just a special case of a file, naturally there have to be APIs that allow us to open/read/write/close them in a similar fashion to regular files.

That's where dirent.h C library comes into place, which defines the dirent structure, which you can find in man 3 readdir:

   struct dirent {
       ino_t          d_ino;       /* Inode number */
       off_t          d_off;       /* Not an offset; see below */
       unsigned short d_reclen;    /* Length of this record */
       unsigned char  d_type;      /* Type of file; not supported
                                      by all filesystem types */
       char           d_name[256]; /* Null-terminated filename */
   };

Thus, in your C code you have to define struct dirent *entry_p, and when we open a directory with opendir() and start reading it with readdir(), we'll be storing each item into that entry_p structure. Of course, each item will contain the fields defined in the template for dirent shown above.

The practical example of how this works can be found in my answer on How to list files and their inode numbers in the current working directory.

Note that the POSIX manual on fdopen states that "[t]he directory entries for dot and dot-dot are optional" and readdir manual states struct dirent is only required to have d_name and d_ino fields.

Note on "writing" to directories: writing to a directory is modifying its "list" of entries. Hence, creating or removing a file is directly associated with directory write permissions, and adding/removing files is the writing operation on said directory.


ext4 is new but also holds compatibility with other programs that are old and restrict themselves to ext2/3 a lot of times (depending on the application).  Either way, formatting with any of these three should not give this error.

You need to go into console and mount it to a folder your user has full access to like this (and we're going to assume your partition is /dev/sdc1 and this is going to start from the beginning - aka GParted never happened here)

user@host:~$ mkdir mntDCP
user@host:~$ sudo mkfs -t ext3 /dev/sdc1
user@host:~$ sudo mount /dev/sdc1 mntDCP/
user@host:~$ sudo chown user:user -R mntDCP/

If this doesn't work let me know so we can try other options.

Also if you could explain why Ext4 is such blasphemy it may help find the solution quicker as well.


What exactly is generic version of ubuntu ? how it differes from other versions?

There are several different flavours of the kernel available, but -generic is very likely what you want.

The specialised versions are:

linux-image-server: tuned to respond to lots of requests rather than handle real-time interaction with a user. EDIT: This appears to have been discontinued and just points to -generic.
linux-image-virtual: I think this mostly just involves removing hardware drivers that are unlikely to be encountered in a virtual machine to save space.
linux-image-lowlatency: I think this is intended for eg, audio editing where low latency is important (see Why choose a low latency kernel over a generic or realtime one? ).

As to the folders in /usr/src, all these different kernels are actually very similar except for a few options, so most the the headers are stored in the non-specific /usr/src/linux-headers-x.y.z. The specific folder /usr/src/linux-headers-x.y.z-generic (or -server, -lowlatency) etc consists mostly of links to /usr/src/linux-headers-x.y.z, plus any files (eg .config) changed compared to the non-specific version (to avoid duplication if you have multiple flavours of the same kernel version installed).


How to return to stock Android after installing Ubuntu Touch

First, place your Nexus into fastboot mode.  To do this, turn the nexus off, and then turn it back on while holding the volume down button.  You should see a green android guy in the center.  Plug this into your laptop/desktop via USB.

Now, run these commands in a terminal one at a time:

wget https://dl.google.com/dl/android/aosp/nakasi-jro03d-factory-e102ba72.tgz
tar zxvf nakasi-jro03d-factory-e102ba72.tgz
cd nakasi-jro03d/
sudo ./flash-all.sh

This should do the trick.


How to schedule a DVB-T stream record for VLC?

Faster than expected I found an answer! For this example I have to run:

echo 'cvlc dvb-t://frequency=594000000 :program=514 :run-time=2700 --sout Videos/Aufnahmen/heute-show-120330.mpg vlc://quit' | at 22:25

What to adjust for other scheduled recordings:

frequency: this number after the channel-name in the channels.conf
program: the last number of the line in the channels.conf
run-time: for how long should be recorded (time in seconds)
sout: place and filename for the output
at: start time for the record


Looking at your error message, your system is attempting to mount the device but the device is either drawing to much power from your system, or is wired wrong. If you have bought the device recently I would return it and try to get a new one. If you have made it, check your wiring. This problem has happened to me a few times, my logs looked pretty much the same.


How to install .deb file in ubuntu using terminal?

Either you can install using terminal as previous answers say,

sudo dpkg -i google-chrome-stable_current_i386.deb

Or else, You can double click the downloaded .deb file and it will be opened in Ubuntu Software Center(If you are using ubuntu). Then you can install it clicking on install button.


Enable natural scrolling on ubuntu 17.04 with gnome-shell

I'm running Ubuntu Gnome 17.04 on a Dell XPS 15 9530, and here's what worked for me:

The solution was to leave xserver-xorg-input-libinput installed, and instead remove xserver-xorg-input-synaptics, then reboot.  It seems as if the upgrade installed both and was choosing synaptic by default, which doesn't seem to have a natural scrolling option.


Gnome Shell installed not working in Ubuntu 12.04

You may try opening the Additional Drivers tool in order to install the Nvidia drivers. If they are not installed, or Additional Drivers fails, open a terminal(Also under System) and type sudo apt-get install nvidia-current and allow it to finish. It won't let you paste the command, so type it, and press Y whan it asks if you want to continue.


How to bring back system bar in kubuntu 16.04

Plasma 5 - Add panel

Right click the desktop - Unlock Widgets.

Right click the desktop - Add Panel > Default Panel.


GNOME Shell crashing on enabling Extensons from GNOME Tweak Tool on Ubuntu 20.04

This is most likely due to incompatibility of some extension(s) with the current version. It seems as soon as you're enabling extensions, the incompatible extension(s) is/are causing the crash.

To fix it you remove all the extensions and then manually reinstall them one by one.


Howto fix "Please insert volume 'OFFICE12' (needed for package 'office2007pro')" on winetricks office2007pro?

Problem solved using the following steps:

Create iso-file named OFFICE12.iso with label OFFICE12 with your MSO 2007 setup files (folder with setup.exe and autorun.inf). And then mount it with Disk Image Mounter or from terminal. It should mount to /media/$USER/OFFICE12.
Run winetricks again with

WINEPREFIX=~/.local/share/wineprefixes/office2007pro winetricks office2007pro

The setup.exe will launch. Wait it to finish.

Installation SP3 (office2007sp3-kb2526086-fullfile-XX-XX.exe) is recommended too.


Merge split terminal tab back into one terminal

I don't think that's possible.

What you can do: create a new tab in the window that you want to merge into the first one, then choose the first tab and drag it to that window and close the other window.

The process would look like:

  [window] → [[tab][tab]] → [window] [window] → [window] [[tab][tab]] → [[tab][tab]] [window] → [[tab][tab]].

Confused? - Here is a clip showing the process. ;-)


can sftp and ssh share same default port?

Broken pipe occurs when your SSH connection was cut off due to a long period of inactivity. To prevent it from happening, do the following.

On the server,(in your case, 192.168.1.110) add the two lines to /etc/ssh/sshd_config

ClientAliveInterval 300
ClientAliveCountMax 2

Save the file and restart the sshd using

sudo systemctl restart sshd


x11vnc Becomes Unresponsive After a While

I finally figured it out!  Thanks to this thread about a different VNC server on a different machine and some happenstance playing with the Pi:

https://forum.ultravnc.net/viewtopic.php?f=3&t=31898

Basically the problem is that the VNC server continues to read a display buffer that is no longer updated because the video stuff has shut down.  In the thread above, that's because I closed the lid of a laptop running that server; in the case of this question, it's because the default screen blanking time was still there.  Once it timed out, the Pi's graphics chip shut down, no longer updating the buffer, and so the VNC server appeared to have frozen.

Why it didn't come back on a VNC'ed mouse event, I don't know, but setting the Pi to never turn the screen off fixed the dropout in the first place.

(It's headless anyway, so it's not like I'm wasting power on a screen by doing this.  Maybe a little bit on a graphics chip, but that's negligible in my application.)


I also prefer to listen my music by folder and use VLC media player for this purpose.  To select a folder to play you simply press Ctrl+F - nothing fancy, but works great for this purpose.


How do I add a repository from behind a proxy?

Your issue is described on this following bug report, It seems that the proper fix is described at commment #11:

Set the variable https_proxy to your proxy
Edit /etc/sudoers or the correct file in /etc/sudoers.d/ so it contains:

Defaults env_keep = https_proxy


How to pin a note in Tomboy app indicator?

It seems to be a limitation of Appindicator.

See Launchpad bug #738200.

  in previous ubuntu version there was a pin icon by each note in the
  drop down menu. clicking it would pin that note into the menu.

and

  Yup, this is a bug with ubuntu's appindicator patch. Last time I
  checked the appindicator infrastructure did not have support for
  pinned items.


Problem installing reader software for Estonian ID card

These instructions are for 12.04 and 12.10. As you have 12.10, the best option is to get the developers to add a PPA for 12.10; but in the short term, I have included a workaround here.

Go to the guide page that you indicated.
Download the installation script for Ubuntu. (If you just click the link, you may get a text file in your browser, which is no good. Rather right-click the link and select Save Link As…)
For 12.10 only, do these additional steps:

Edit the file that you downloaded. The easiest way is to open Text Editor and open the downloaded install-esteid-ubuntu.sh from there.
Line 5 starts with OPSYS=.
Underneath line 5, add the following line:
OPSYS=precise
Save the file and close the text editor.

Open a Terminal by pressing Ctrl+Alt+T.
Change to the folder where you saved the file; for example, cd Downloads.

Enter the following commands into the terminal (i.e. type the first command, press Enter, then type the second command, press Enter. You can use the mouse to cut-and-paste the commands to save typing errors). The second command will prompt for your password.

chmod +x install-esteid-ubuntu.sh
sudo ./install-esteid-ubuntu.sh

When prompted, Do you want to continue [Y/n]?, type y and press Enter.

Once the script has finished running, press Ctrl+D to close the window. The application is installed, and you will find it in your menu.


What tool to use to cut audio at specific times via cli interactively?

This really stupid and ugly bash script does exactly what I want:
#!/bin/bash

ScreenName=VlcScreen
LogFile=TESTLOG
FileName=$1

if [[ ! -e ${FileName} ]]; then
    echo "The file ${FileName} does not exist"
    exit
fi

if [[ -e ${LogFile} ]]; then
    rm ${LogFile}
fi

function start_rvlc_screen {
    screen -d -m -S ${ScreenName} sh -c "rvlc $1 > ${LogFile}"
}

function pause_vlc {
    screen -S ${ScreenName} -p 0 -X stuff "pause^M"
}

function get_time {
    screen -S ${ScreenName} -p 0 -X stuff "get_time^M"
    #currentTimestamp=$(cat ${LogFile} | tail -n2 | head -n1 | sed -e 's/\r//' | sed -e 's/^(> )*//')
    currentTimestamp=$(cat ${LogFile} | tail -n2 | head -n1 | sed -e 's/\r//' | sed -e 's/^\(> \)*//')
    currentTimestamp=$(($currentTimestamp + 1))
    echo "${currentTimestamp}"
}

function seek {
    seek_value=$1
    if [ "${seek_value}" -lt "0" ]; then
        seek_value=0
    fi
    echo "Seeking ${seek_value}"
    screen -S ${ScreenName} -p 0 -X stuff "seek ${seek_value}^M"
}

function quit {
    screen -S ${ScreenName} -p 0 -X stuff "quit^M"
}

function kill_screens {
    screen -XS $(screen -ls | grep ${ScreenName} | sed -e 's/^\s*//' | sed -e 's/\..*//') quit
}

function exit_program {
    kill_screens
    stty sane
    exit
}

function cut_part_from_file {
    FROM=$1
    TO=$2

    FROM=$(($FROM - 1))
    TO=$(($TO - 1))

    LENGTH=$(($TO - $FROM))

    mkdir -p parts

    tmp="$RANDOM.mp3"
    while [[ -e $tmp ]]; do
        tmp="$RANDOM.mp3"
    done

    ffmpeg -ss $FROM -i $FileName -t $LENGTH -c copy $tmp

    exitstatus=1
    while [[ "$exitstatus" -ne "0" ]]; do
        play $tmp > /dev/null 2> /dev/null &
        TEXT=$(whiptail --inputbox "Was wurde gesagt?" 8 39 "" --title "Example Dialog" 3>&1 1>&2 2>&3)
        exitstatus=$?
    done

    mv $tmp "parts/${TEXT}.mp3"
}

trap exit_program SIGINT
trap exit_program 0

start_rvlc_screen $1

CUT_START=
CUT_END=

while true; do
    read -n1 -p "[q]uit, [p]ause, go [b]ack 10 sec, [B]ack 60s, [f]orward 10s, [F]orward 60s, [c]ut start/end, [k]ancel recording: " input
    echo ""

    if [ "$input" = "p" ]; then
        pause_vlc
        get_time
    elif [ "$input" = "q" ]; then
        exit_program

    elif [ "$input" = "f" ]; then
        CURRENT_TIME=$(get_time)
        SEEK_TIME=$(($CURRENT_TIME + 10))
        seek $SEEK_TIME
    elif [ "$input" = "F" ]; then
        CURRENT_TIME=$(get_time)
        SEEK_TIME=$(($CURRENT_TIME + 60))
        seek $SEEK_TIME

    elif [ "$input" = "b" ]; then
        CURRENT_TIME=$(get_time)
        SEEK_TIME=$(($CURRENT_TIME - 10))
        seek $SEEK_TIME
    elif [ "$input" = "B" ]; then
        CURRENT_TIME=$(get_time)
        SEEK_TIME=$(($CURRENT_TIME - 60))
        seek $SEEK_TIME

    elif [ "$input" = "k" ]; then
        CUT_START=
        CUT_END=
    elif [ "$input" = "c" ]; then
        if [[ ! -z ${CUT_START} ]]; then
            pause_vlc
            CUT_END=$(get_time)
            echo "CUT FROM $CUT_START TO $CUT_END"
            cut_part_from_file $CUT_START $CUT_END
            CUT_START=
            CUT_END=
            pause_vlc
        else
            CUT_START=$(get_time)
        fi
    fi
done

exit_program


Why do I get unmet dependencies installing spotify on 12.10?

I had the exact same problem. What's wrong here is that Spotify cannot run without the package libgconf2-4. This is because Spotify depends on that package. It would be like running an application like Minecraft without previously installing the package libgconf2-4. You can download libgconf2-4 from here.

Get the package according to what version of Ubuntu you have. After you install libgconf2-4, Spotify should install, and you can get to your music!


Ubuntu Kickstart/seed file - weak password

An Ubuntu Preseed file

# The installer will warn about weak passwords. If you are sure you know
# what you're doing and want to override it, uncomment this.
d-i user-setup/allow-password-weak boolean true

You need to expressly answer that installer question.  The last line is what you need.  The source documentation is here: Link to Ubuntu Preseed documentation and examples


With luks, when is the actual encryption or decryption performed, within the luksFormat, luksOpen, or during the filesystem creation on /dev/mapper?

The reason why you can successfully open a LUKS volume with a wrong detached header is probably that your passphrase does not decrypt the actual data on the volume, it only decrypts the master key which is contained in the header, which is in turn used to decrypt the volume. The master key is 256 bit long in LUKS1, much stronger than the average passphrase a human can memorize.
So when you do a luksOpen, it actually only checks if the passphrase is correct (or exists in one of the keyslots), then uses it to decrypt the master key. The actual data volume is, as far as I understand, just encrypted in "plain" mode with the master key as passphrase. That means it does not "know" if the key used to decrypt it is correct or not.
That's also why it is usually sufficient to overwrite the header part to destroy a LUKS-encrypted volume, since it is next to impossible to brute-force it with a 256 bit passphrase.
You probably found it already, but here is some valuable information about how LUKS works.


How do I set gvim as my default text editor instead of gedit?

Right click the file you want to open, select "Open With other application". A Window will pop-up containing a list of all the installed programs. Select gvim from the list, and make sure "Remember this application..." is selected. That will open all files of that type in gvim. However, that is only half the story, since there are many more file types. Another way is to edit or create this file:

~/.local/share/applications/defaults.list

and make sure it contains

[Default Applications]
text/plain=gvim.desktop

A recommnded way of doing it is to type this command in a terminal:

sudo update-alternatives --config editor

to update the command line editor, and

sudo update-alternatives --config gnome-text-editor

to update the GUI editor. Enter the number corresponding to the editor that you want to set as you editor, and press enter. That will update all you system references.

That should about do it.


12.10: unable to upgrade/install softwares

As Charles has said, you need to remove the "in." at the start of your source URL. Open a Terminal and enter this command:  sudo nano /etc/apt/sources.list

Then find the url thrown by APT in the error message and remove the "in." so that the url changes from  http://in.old-releases.ubuntu.com/ubuntu/dists/quantal-backports/multiverse/binary-i386/Packages to http://old-releases.ubuntu.com/ubuntu/dists/quantal-backports/multiverse/binary-i386/Packages

Once the change has been made, press Ctrl + O to save the changes, answer 'y' when prompted, and press Ctrl + X to exit nano.

Once that's saved, run sudo apt-get update and try to install your software after that's finished.


Ubuntu won't boot after installing alongside windows 7

try using Boot-Repair, it's a simple tool to repair frequent boot issues.


Why does Toshiba C50-C stay hot while suspended

It's probably a driver problem. Have you tried to install NVidia proprietary driver? Have you tried to install power management app like TLP?


How can I read printer's data from a COM port?

I've found a very easy solution to read serial data with Python and PySerial on Ubuntu, here's the script:

# simply change COM9 with /dev/ttyS0 or the COM port you need to use
import serial
ser = serial.Serial("COM9", 9600)

while True:
   line = ser.readline()
   print line

I can read data from the input and now I can build a parser using python-escpos to turn it into readable text


Disable gnome-software from loading at startup

Go to /etc/xdg/autostart/ and remove the
NoDisplay=true

line in gnome-software-service.desktop file (or change true to false). Then GNOME Software should appear in your Startup Applications list. You can disable it from there.
If GNOME Software still doesn't appear in Startup Applications list following the suggestion above, follow the steps below.

Copy of the /etc/xdg/autostart/gnome-software-service.desktop file to the ~/.config/autostart/ directory.

Open the copied .desktop file with a text editor and remove the
NoDisplay=true

line in (or change true to false).

Now GNOME Software should appear in your Startup Applications list. Disable it. Alternatively, you may append an
X-GNOME-Autostart-enabled=false

line to the copied .desktop file.


Have a look at Plymouth Manager a GUI tool: http://handytutorial.com/change-the-boot-splash-screen-theme-in-ubuntu-12-10-12-04/


You may need to restart X or reboot after setting up ibus etc.

Depending on the program you are writing in, there may be an entry in the context menu on right mouse click in the text area or field you write to, where input method can be changed.


Wireless network card is dectected but not working

Please run:

lspci -nn

Is your wireless device 168c:0036? If so, it is not covered in 12.04 by the default driver ath9k, so install the compat-wireless suite. First, determine your kernel version:

uname -r

If your kernel is -pae, then do:

sudo apt-get install linux-backports-modules-cw-3.10-precise-generic-pae

If not, then do:

sudo apt-get install linux-backports-modules-cw-3.10-precise-generic

Then do:

sudo modprobe ath9k

Detach the ethernet and your wireless should be working.