So it seems to me that your Display Manager, which is xdm is not doing its job. I suggest you to remove xdm:

sudo apt remove xdm

Then try installing slim instead (it's more likely to work):

sudo apt install slim

Reboot your system or use:

systemctl start slim

to run slim's service. now use alt+f1 to change your session to lxqt.


Installing Ubuntu OpenStack: The Canonical distribution” failed : problem with juju bootstrap

I suggest you import an ssh key to your MAAS user and simply try to "deploy" a node. See if it comes up, transitions to "deployed" and if you can ssh into it with that key as the ubuntu user.


How to wipe RAM on shutdown (prevent Cold Boot Attacks)?

You could use sdmem.

sudo apt-get install secure-delete

To make it run at every shutdown, we'll create an Upstart job file called memory_wipe.conf.

Note: this is one command. Copy/paste it in its entirety!

echo '# upstart config - wipes memory on shutdown

description  "Wipes memory on shutdown"

start on (runlevel [016] and stopped gdm)

script
    sdmem
end script' > sudo tee /etc/init/memory_wipe.conf

Restart your computer and upon the next reboot, your RAM will be wiped securely!


This is a an extremely large topic but basically apparmor uses text files called profiles a set of predefined rules for processes.  Apparmor has access to files, network, mount, unmount, dbus,  ptrace, signal and sockets to monitor and control these process.  Basically if a process tries to break one of these rules it can be either restricted or killed along with logging everything.  Below is a link that will explain this in much better detail.
https://ubuntu.com/tutorials/beginning-apparmor-profile-development#1-overview


Are there a way to find an attempt in deletion of log?


How to use unallocated space in a triple-boot partition scheme?

I'm assuming the extended partition sda4 contains sda5 and sda6, since it is roughly the sum of their sizes.

Since Ubuntu (sda5) is inside the extended partition (sda4), you will not be able to modify the extended partition from your install of Ubuntu. You will need to boot from a LiveCD/USB and use GParted from there.

As far as I know you should just then be able to increase the extended partition (sda4) to fill the unallocated space, and then create a new NTFS partition within the extended space. It should not be necessary to change any existing installation, assuming they're all working at the moment.

Note that Ubuntu will work quite happily without swap space (providing you delete the UUID=xxxxxxx none swap sw 0 0 line in /etc/fstab so it doesn't get unhappy being unable to find it on boot), providing you have sufficient RAM.


Dual boot Win10 and Ubuntu 14.04: We couldn’t update system reserved partition

Yes. You can remove boot-repair from your SRP. It plays no part in the boot-up process. I'd do so from Windows if you know how to access the SRP.

I would not delete the Ubuntu folder from SRP if I were you.


Playing testmovie.wmv.
ASF file format detected.

Try using VLC Player. It plays almost all media files without any problem.
ASF is a container for WMA, WMV and MPEG4 file formats, and VLC helps in encoding and decoding this so that the file plays seamlessly on your system.
VLC and ASF File Format
The most relevant part of this page being the line on top, saying :

VLC can encode and decode this container.


Cannot log in to smb server from Linux, credentials are never asked

I can't comment as I don't have enough rep yet, but has your smb.conf got anything to allow Guest or Anonymous access to any SMB shares?

It sounds like your RHEL/Ubuntu client is automatically trying to login anonymously, which your server is letting it do.

You could try creating a new share and adding the line:

guest ok = yes

and see if your RHEL/Ubuntu client can see this share in the file manager (without having entered credentials). If this does appear, you know your client is authenticating as guest and can take the necessary steps to disallow (or restrict) that on your server. Alternatively, if you want to keep some shares available to guests (and therefore don't want to remove guest access) you could look into using /etc/fstab to mount your SMB shares using correct credentials.


Cannot connect using smartbro in ubuntu 12.10

first thing you should do is to plug in your usb modem. next is click the icon on the upper right corner of your unity desktop. the one thats beside the rythmbox player. click edit connections. click the mobile broadband tab. click add then follow the instructions.after setting that up, close the network connections window. wait for a few seconds then click again the icon beside the rythmbox player. you should be able to click smart bro to connect to internet. a more detailed instructions can be found here http://ramfree17.net/capsule/2011/11/using-smart-bro-plug-it-in-linux/


Converting and size reduction of .m2t video for Flickr?

For conversion and compression you can use HandBrake.

sudo apt-get install HandBrake

Or download it from the website.

To reduce the size use a good compression algorithm like H.264.


If you only want to see those connection that arouse your suspicion you can really use lsof.

sudo lsof -i | egrep -i "cloudfront|poneytelecom|dark"

lsof -i restricts the output to internet connections.
Use egrep (instead of grep) to be able to supply alternatives in the search string (separated by |), -i tells egrep to ignore case (DARK vs. dark).

If you have IP-addresses instead of hostnames use

sudo lsof -ni | egrep -i "10\.0\.8|193\.170"


Do I need any drivers for a ThinkPad L410 laptop?

Probably you do not need any further driver other than the ones already included in the Linux kernel that powers Ubuntu.

Go ahead a test all your system with the Ubuntu LiveCD, that is the best way of doing it. If you notice anything more specific missing (ie: wireless, or some buttons) create a new question about that, reboot the laptop, remove the CD and no changes will actually happen to it.

From all I see your system should not have any issues running Ubuntu, test it.


Changing the update server from india to main server: 404  Not Found

Here is a thread asking the same question in the ubuntuforums. Answer #13 is the way to go. You could also look at the answer another question asked here not so long ago. Next time use google.

Btw. if you have a graphical interface installed this is MUCH easier than editing the sources.list:

P.S.
Sorry. I overlooked the comments.


Identify X libs during installation from source without sudo

If xorg-dev is installed, you should have a file named /usr/lib/i386-linux-gnu/libX11.so (or /usr/lib/x86_64-linux-gnu/libX11.so on 64-bit, but HTK compiles in 32-bit even on 64-bit plateform, unless you patch it, so it's the i386-linux-gnu/libX11.so that is used anyway)

then you can use the option --x-libraries of ./configure

./configure --x-libraries=/usr/lib/i386-linux-gnu/

plus any other option for ./configure that you need (see ./configure --help for more options and informations about options)

Alternatively, this could work:

ln -s /usr/lib/i386-linux-gnu/libX11.so.6.3.0 ~/lib/libX11.so

if it's not enough rerun ./configure using the option --x-libraries

./configure --x-libraries=~/lib

As an anecdotal side note, I just downloaded htk-3.4.1 and ./configure && make worked without problem. I have libX11.so in both /usr/lib/i386-linux-gnu/libX11.so and /usr/lib/x86_64-linux-gnu/libX11.so but no symlink in /usr/lib32. I use gcc 4.6.3, and I'm on ubuntu 12.04 64-bit, but HTK compiled with -m32 option of gcc (i.e. compile in 32-bit mode)

./configure said:

  checking for main in -lX11... yes.

and file HTKTools/HInit returned:

  HTKTools/HInit: ELF 32-bit LSB executable


Any alternative for Microsoft OneNote in Ubuntu?

Take a look at this article. Although none is a 100% replacement of onenote functionality, you'll find there are some impressive apps. tl;dr Here's the  list:

BasKet is a note taking software that has a number of features for taking notes and organizing data.
Zim Wiki – a Desktop Wiki, is a wonderful tool for taking notes. It does not behave anything like any traditional note taking software or Microsoft OneNote. Rather, it works like a wiki.
Tomboy is a cool note taking software which is installed by default in many Linux distributions.
CherryTree is a cross platform hierarchical note taking software.
MyNotex is an upcoming note taking software in Linux that supports a number of features that are ideal for taking notes.
KeepNote is designed to be a general note taking software that can be used in many different ways depending on the user’s needs.
TuxCards is another note taking software which is quite impressive.
Kjots is a very good note taking software. Recently, it has been rewritten grounds up using Qt 4 libraries. It is very quick to start up in GNOME even though it is essentially a KDE application.
RedNotebook is more of a personal diary and journal than a note taking software.
A simple note taking software written primarily for GNOME/Gtk-2, GJots2 is quite lean in features.
Knowit is a note taking software catering to people who want to store text snippets as notes.
NoteCase is a hierarchical notes manager (Outliner). It supports rich text editing and image insertion.
Wixi – This is a multi-platform wiki application for the desktop. It is written in python/wxpython and uses txt2tags to generate text to many other formats. The goal is to provide a simple wiki tool around the txt2tags document generator and also be multi-platform.
Memoranda – This is a free personal diary and scheduling tool. However, it can be used to keep notes. It contains a notes tab which has a rich text editor built-in. You can insert images and use different styles of text as well.

If none of these covers your needs, there is the last resort of installing and running onenote through wine. I have read reports of success for the 2007 version but I have no idea about how the newer versions fare in that respect.


Getting a Brother HL-2250DN Printer to work over Ethernet

Got it working networked with Generic PCL6/PCL XL Printer Foomatic Even Duplex works - go to add printer, I click networked printer, with nothing in the search box I click 'find' and wait for it to appear. Then select it and when choosing the driver, choose Generic : PCL6/PCL XL Printer Foomatic pxlcolor - all works fine for me. Use the same procedure and driver for USB connected Printer


Have you tried setting up the connection manually
From

Network Manager->Add new connection->Mobile Broadband

Select your Provider name & APN and save it

After that connect it from the network applet

If u want to make "connect automatically" then check the option in the setting of your connection setting


After long hours of frustration, I managed to solve the problem.

The point is that the Thinkpad's BIOS does not recognize USB flash drives as a valid bootable option. It just does not!

Solution : use a USB Hard Drive instead. Make it bootable with the distro of your heart (I recommend Lubuntu, since the T61 is kinda out of the game), and voilà! It's the same as using a USB flash drive.

Added note : I had to use the 32bit version. Even if the 64bit installed properly, it refused to boot! The 32bit version runs like a charm!


last -t [date] not filtering results by date

last -t YYYYMMDDHHMMSS shows the status of the login files up to the date specified, rather than since the date specified.


How to uninstall kernel with its modules?

You could try to enter this in the terminal:

     sudo apt-get -y --force-yes purge linux-shim-efi shim-amd64 shim-amd64-generic

and it might work fine this way.


How do I change the colors of a Gedit theme?

You made some small mistakes:

<color name="moon_grey" value="#f7f7f7">

On this line, you missed the closing /

And you should not overwrite the steelblue3-definition, but just add the correct line, because steelblue is needed at other places as well.

<color name="moon_grey" value="#f7f7f7"/>

Basically, that’s it, now your brackets should be better viewable.

P.S. Posting this link to the source of the Twilight-Theme would have been helpful.


android is not running on my ububtu 16.04

I think, you are using android emulator which have less RAM size so that it showing this error. you should make new android emulator and during creating android emulator specify the RAM size means 512 MB and create it . it will work , its works me.


Batch rename, add extra "." character at position 3 in filename, recursively

One issue you are going to have to face when renaming files in directories recursively is separating the filename (which you want to modify) from the path. You can't simply remove the path component, because then your files will end up being moved rather than simply renamed.

To use your original method, I think you'd need to do something like

while read -r -d '' f; do
  file="${f##*/}"; path="${f%/*}"
  echo mv -- "$path/$file" "$path/${file:0:2}"."${file:2}"
done < <(find -type f -iname "*.wav" -print0)

Another option is to use the find command's -execdir instead of -exec. I think it's safe to assume that the results will get presented to your rename command (whether you use rename or mv) with just a leading ./ as the path, in which case you can do

find -type f -iname "*.wav" -execdir rename -nv -- 's|\./..|$&.|' {} +

or using a more perl-ish variant

find -type f -iname "*.wav" -execdir rename -nv -- 's|\./..\K|.|' {} +

or using something more equivalent to your original mv approach

find -type f -iname "*.wav" -execdir bash -c 'echo mv -- "$0" "${0:0:4}"."${0:4}"' {} \;

(note that the substring indices have been increased by 2 to allow for the leading ./ path component).

If your version of find doesn't have the -execdir option, you could modify the rename regex to skip the longest matching path prefix, e.g.

find -type f -iname "*.wav" -exec rename -nv -- 's|.*/..\K|.|' {} +

Note: these expressions all have "no-op" switches in them (either rename's -n option, or an echo command) so that you can verify what they would do before committing.


Darkening the terminal's window-shadow (or changing its color)

You should modify the unity.css file of the theme. Here is an example from a theme I modified.

UnityDecoration {
    -UnityDecoration-extents: 28px 0 0 0;
    -UnityDecoration-input-extents: 10px;

    -UnityDecoration-shadow-offset-x: 0px;
    -UnityDecoration-shadow-offset-y: 3px;
    -UnityDecoration-active-shadow-color: rgba(0, 0, 0, 0.3);
    -UnityDecoration-active-shadow-radius: 10px;
    -UnityDecoration-inactive-shadow-color: rgba(0, 0, 0, 0.1);
    -UnityDecoration-inactive-shadow-radius: 5px;

    -UnityDecoration-glow-size: 10px;
    -UnityDecoration-glow-color: rgb(221, 72, 20);

    -UnityDecoration-title-indent: 10px;
    -UnityDecoration-title-fade: 35px;
    -UnityDecoration-title-alignment: 0.0;
}

There you see the shaddow properties which are pretty human readable, at least developer readable. Everybody should know CSS. :-)


How do I change default settings Of Ubuntu?

create a text file named 20_my-settings.gschema.override with below content..
# My Default Settings #

[org.gnome.desktop.interface]
gtk-theme = 'Nordic-darker-standard-buttons'

[org.gnome.shell.extensions.user-theme]
name = 'Nordic-darker-standard-buttons'

[org.gnome.shell.extensions.dash-to-dock]
dock-position = 'BOTTOM'
dash-max-icon-size = 64

Change the values as per your wish..
save the file & close..
Note: Since shell-theme is involved.. you need to install the extension user-theme and enable it..also make sure its gschemas are compiled..
copy the above file to /usr/share/glib-2.0/schemas/
sudo cp 20_my-settings.gschema.override /usr/share/glib-2.0/schemas/

and compile the schemas
sudo glib-compile-schemas /usr/share/glib-2.0/schemas/

This will not change the settings if you already made different choices..
you need to reset the keys for above four choices..
gsettings reset org.gnome.desktop.interface gtk-theme
gsettings reset org.gnome.shell.extensions.user-theme name
gsettings reset org.gnome.shell.extensions.dash-to-dock dock-position
gsettings reset org.gnome.shell.extensions.dash-to-dock dash-max-icon-size

When ever you want to revert back above changes..
remove the file and compile..
sudo rm /usr/share/glib-2.0/schemas/20_my-settings.gschema.override
sudo glib-compile-schemas /usr/share/glib-2.0/schemas/


GRUB failed to install. can't boot neither windows nor Ubuntu

So when you reboot you always get that limited grub terminal?
And guessing even thoigh windoze7 is old your PC is UEFI...
Full notes are here but below are the basics from rohiths answer (your disk probably isn't gpt btw);
At the grub console; grub> ls

(memdisk) (hd0) (hd0,msdos) (hd1) (hd2) (hd2,gpt3) (hd2,gpt2) (hd2,gpt1)

You may not get exactly the same results as this, but you’ll have some similar options.
Now, find the partition which contains your user's home directory.
ls (hd2,gpt2)/home

rohith/

Keep trying until you find it.
The result from the last step has two parts: (hdX,gptY). You need to keep the hdX part, but go through all the gptY options looking for a /boot/grub directory.
ls (hd2,gpt2)/boot/grub

unicode.pf2 [...] grub.cfg

Now you want to set this as your root for further commands.
set root=(hd2,gpt2)
The only way to boot properly was to use the UUID of the drive. To get it
ls -l (hd2,gpt2)
Note down the UUID. You'll have to type it manually in the next step.
linux /boot/vmlinuz〈...tab here!...〉.efi.signed root=UUID=〈the UUID from above〉
 The GRUB console can do tab completion, so if you just type out the vmlinuz part and hit tab, then hit . and tab again, you won't have to type the whole file name. make sure that the efi.signed part is present
 Now, set the initial RAM disk.
 initrd /boot/initrd〈...tab here!...〉
 You should be able to boot with the command
 boot`
This will reboot and get you to the login screen as if you had a perfect install and rebooted. If you have an internet connection you can get the system up-to-date at this point but do NOT reboot untill you fix grub. NOTE the boot partition is probably incorrect, the boot loader may need to be reformatted as FAT32 with mount point /boot/efi with flags (boot,esp) which can be checked and if needed fixed simply using gparted.


Folder Permissions for External Hard drives

You need to change owner and group of the folder/HDD using next command.

sudo chown user:user -R /path/to/hdd/folder/

Replace the: user:user with your own user and group that you need it.

The option -R it will change owner/group across files, folder and sub-folders

Replace the: /path/to/hdd/folder/ with path that you want to change owner/group (Permissions)


Not able to boot into Windows after error in installing ubuntu

After reading many posts I was able to solve this problem with basic boot-repair tool of Ubuntu.
Using a Ubuntu Live DVD and Boot Repair

Boot from a Ubuntu Live DVD or USB
Type these lines in the terminal one line at a time.

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install boot-repair

Search for Boot-Repair in the Dash and launch it.

To fix your computer with Boot-repair, simply click the "Recommended Repair" button. Then follow the steps. It will fix all the problems and then After you will be booted to ubuntu and then run following command to fix the grub menu
sudo update-grub

It worked for me.


Can Ubuntu/Linux machines be infected by the Shylock trojan?

No, no Linux system can be affected. Please see:

http://www.symantec.com/security_response/writeup.jsp?docid=2012-082310-2840-99

"Systems Affected: Windows 98, Windows 95, Windows XP, Windows 7, Windows Me, Windows Vista, Windows NT, Windows 2000"

Wine cannot affect Linux, because it is a virtual XP, meaning that the "Windows" folder (made by wine, because some Win applications need resources from there) is fake. Even if the virus does change things in the fake "Windows" folder, it does not affect Linux.


If I understand you correctly, you installed Ubuntu to a "folder"? This might mean one of two things:

1) You used wubi to install Ubuntu (i never tried wubi so I cant help in this)
2) you mean a partition instead of a folder? (though this is unlikely since you mentioned "in C")

If you are attempting to install Ubuntu side by side to Windows (i.e; dual boot) then  you need to restart your computer & boot from the disk (or usb) & use the Ubuntu installer which guides you (note that there's a step where you need to create a partition for Ubuntu!)

Lots of resources are available online about this!


If you step through your commands and the output these are your problems.

The file *.txt is located in batman's home directory.

Switch to ABC user: sudo login ABC.
You just made ABC and it doesn't have a home directory so you got thrown into the root directory
You try chmod 777 *.txt, but you are in the root dir and the file is not there.
You exit back into batman and try to chmod the file, but now it belongs to ABC and batman can't change it.

To Solve:

login as batman

su ABC

cd /home/batman

chown 777 *.txt


Please explain to me what a kernel is and how to load it on grub

I don't think that it is possible to help you understand Linux, Ubuntu an the especialy the Kernel by typing some lines here. I know, this is not what you want to hear, but you should start by reading to get the knowledge you want. Something about the Kernel and GRUB2: http://en.wikipedia.org/wiki/Linux_kernel
http://en.wikipedia.org/wiki/GNU_GRUB

I would recommend to install Ubuntu on a separate, not-used computer or in a VM unter Windwos for the first time, so you can't damage your files and your productive Windows System.

Furthermore, problems and making your own research, are the best way to learn anything about Linux.


USB drive install of Ubuntu 12.04 Server fails - can't find components from CD-ROM

This was my solution with a Ubuntu 12.04 LTS server installation from a USB Pendrive:

Run the installer.
Open a shell (ALT + F2).
Create the directory cdrom directly on the root of the file system:

mkdir /cdrom

(If you got problems making the directory /cdrom, disable the CD-rom player in BOIS or disconnect the cable)
Mount the USB as if it is a CD-ROM:

mount -t vfat /dev/sdb1 /cdrom

Where sdb1 is your USB device.

That's all.


Here is your answer :

http://www.webupd8.org/2014/10/fix-brightness-getting-reset-to-very.html

Check it..


Best audio drivers for xps 15 and ubuntu12.04

...welcome to AskUbuntu.

It may sound unusual, but there aren't any special audio drivers for XPS15 and Ubuntu 12.04. Ubuntu is a Linux distro, and as such, it uses Advanced Linux Sound Architecture, aka ALSA, which is preinstalled.

I rather doubt there is anything to troubleshoot in your particular case. Most laptop speakers can only produce mediocre quality sound, and to improve the quality substantially would most certainly require external hardware. Simply plugging in a decent pair of headphones would probably be sufficient.


ubuntu 12.10 won't see my external hard drive

I had a similar problem. I posted a question, which wasn't answered. But I've just found some info - its a bug that has been reported - see https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1048059

This page gives an answer which seems to be working for me.


Atheros AR3011 bluetooth disconnects, when wireless LAN is heavily loaded

This probably happens because of wireless and bluetooth interference. Wi-Fi and bluetooth share same radio frequency. With some bluetooth chips it is possible to turn on "btcoexist" parameter, which helps to avoid this problem.

Your wireless/bluetooth combo chip supports it. You can turn this option on by running

sudo modprobe ath9k btcoex_enable=1

To make this option permanent you can do this:

echo "options ath9k btcoex_enable=1" | sudo tee /etc/modprobe.d/ath9k.conf

This solution should work for Atheros AR3011 and AR3012 combo chips. But USB chip names are not always shown correctly in lsusb.

But if wireless chip is handled by ath9k, there is a good chance that it will work.


I am trying to boot an old windows xp computer without any working hard drives from my Ubuntu USB

It is very possible that it being an old XP system that you dont have proper USB boot support from the motherboard. I have an old system like that. It has options like boot from USB FDD/CD/HDD but those dont detect modern "flash drives" for one reason or another.

What I use for this is the Plop Boot Manager burnt on to a CD which will load in just about anything. Since it is a CD.

https://www.plop.at/en/bootmanagers.html


Installing Ubuntu 14.04 LTS on Dell Inspiron 5537 leads to low graphics mode error

This problem might be occurring because of the graphic driver. So you must consider using proprietary graphic drivers(i.e graphic driver provided by AMD) instead of the default open source driver. But since you are in the live USB mode(i.e in 'Try Ubuntu without installing') if you install the driver and reboot(so that the driver might work) you won't get the driver working, as(going by your question) you haven't set up any persistence. So first thing: you must set up persistence. I will explain how to do this below:

Step 1 - Set up persistence :-

First, partition your USB device into two partitions from your Windows OS. Keep at least a 1 GB or so partition for the Ubuntu installation files(make this a FAT32 partition). Make another ext4 partition of the remaining space and remember to name it casper-rw. Use a GParted Live CD for this purpose(or any other partitioning software you like. I am recommending this because it worked for me). I am providing a few screen shots below(but these are not of the Gparted Live CD, I used):-

(Creating the FAT32 partition mentioned below)

(Creating the casper-rw(ext4) partition)

(How it looks after partitioning)

Now put the installation files into the FAT32 partition. For this you must use  UNetbootin. See the screen shot below of UNetbootin :-

Note see what all I have selected and select exactly the same in your UNetbootin too. Also compare this image with the image before it. I have selected /dev/sdb1 since that is my FAT32 partition. You should accordingly in your PC.

Now, after the UNetbootin process is over, get into the FAT32 partition and delete the file named casper-rw so that Ubuntu will use the casper-rw partition instead of that file to store your data. It will be around 10MB (as we selected in UNetbootin).
Now you have successfully created a live USB with persistence! Just boot in with the USB device and select 'Try ubuntu without installing'.

Now that we have created a live USB with persistence we can install AMD driver.

Step 2 - Installing AMD driver :-

Now when you boot in with the USB device and select "Try Ubuntu without installing" you will get "Low graphics mode error" as you have mentioned in your question. Now press Ctrl+Alt+F1. You will get a terminal window. From there connect to the internet.
Now type:

sudo apt-get install fglrx fglrx-amdcccle

Now restart with:

sudo reboot

Now boot again and press "Try Ubuntu without installing" and it must work properly now.

Install Ubuntu and enjoy now!!

PS :- Credits for Step 1 go to this answer. Refer it for some extra info on step 1 .


How to check available webcams from the command line?

v4l2-ctl --list-devices
sudo apt-get install v4l-utils
v4l2-ctl --list-devices

Sample output with a single camera:
Integrated Camera (usb-0000:00:1a.0-1.6):
        /dev/video0

Tested on Ubuntu 16.04.
video1 metadata device
On Ubuntu 19.10 Lenovo Thinkpad P51 however, it lists two such devices, video0 and video1, but I only have one camera, and can only see images from video0 with ffplay. This has been asked at:

Four /dev/video entries but just one camera
https://unix.stackexchange.com/questions/512759/multiple-dev-video-for-one-physical-device

What happens is that /dev/video1 contains some kind of video metadata only and not the images as can been seen from:
sudo v4l2-ctl --device=/dev/video0 --all
sudo v4l2-ctl --device=/dev/video1 --all

which shows respectively:
        Device Caps      : 0x04200001
                Video Capture

        Device Caps      : 0x04a00000
                Metadata Capture

How to see the camera image live

https://unix.stackexchange.com/questions/3304/how-do-i-watch-my-webcams-feed-in-linux
What webcam apps are available and how to check if your webcam is working?

My favorite:
sudo apt install ffmpeg
ffplay /dev/video0

Take a single picture from the command line
Take a picture from terminal
ffmpeg -f v4l2 -video_size 1280x720 -i /dev/video0 -frames 1 out.jpg

Record a video from the command line

Webcam video recorder
capturing video from webcam and saving to a file
Anything better than Cheese for video capture?

Parameters chosen based on "How to get camera parameters like resolution" below:
ffmpeg -f v4l2 -framerate 30 -video_size 1280x720 -input_format mjpeg -i /dev/video0 -c copy out.mkv

Then:
ffprobe out.mkv

contains as expected:
Stream #0:0: Video: mjpeg (Baseline), yuvj422p(pc, bt470bg/unknown/unknown), 1280x720, 30 fps, 30 tbr, 1k tbn, 1k tbc (default)

If you choose wrong parameters, the resolution might be slow. The camera already outputs a specific encoded format, and the simplest way to record is to just copy that format as above:

https://stackoverflow.com/questions/47292785/recording-from-webcam-using-ffmpeg-at-high-framerate
https://superuser.com/questions/1021899/what-ffmpeg-settings-to-get-the-best-possible-video-resolution-framerate-that-my

TODO If I replace -c copy out.mkv with out.ogv to try and record directly to an open format (unlike MJPEG), I got a low resolution video.
Interactive image/video capture with preview
Picture/Video capture programs
Until I learn how to run ffplay preview on one shell and capture at the same time from another shell with ffmpeg (they fight over the video device), I'll have to lower myself to this amazing GUI program:
sudo apt install cheese

Read camera data from C/C++
https://stackoverflow.com/questions/4290834/how-to-get-a-list-of-video-capture-devices-web-cameras-on-linux-ubuntu-c
A concrete C++ example that processes images from the camera on the GPU with OpenGL and shows it live: https://stackoverflow.com/questions/13693946/image-processing-with-glsl-shaders/40641014#40641014

How to get camera parameters like resolution

How can I find out the supported webcam resolutions?
https://superuser.com/questions/639738/how-can-i-list-the-available-video-modes-for-a-usb-webcam-in-linux

v4l2-ctl --list-formats-ext

produces some good information:
ioctl: VIDIOC_ENUM_FMT
    Type: Video Capture

    [0]: 'YUYV' (YUYV 4:2:2)
        Size: Discrete 640x480
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
        Size: Discrete 320x180
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
        Size: Discrete 320x240
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
        Size: Discrete 352x288
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
        Size: Discrete 424x240
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
        Size: Discrete 640x360
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
        Size: Discrete 848x480
            Interval: Discrete 0.050s (20.000 fps)
        Size: Discrete 960x540
            Interval: Discrete 0.067s (15.000 fps)
        Size: Discrete 1280x720
            Interval: Discrete 0.100s (10.000 fps)
    [1]: 'MJPG' (Motion-JPEG, compressed)
        Size: Discrete 640x480
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
        Size: Discrete 320x180
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
        Size: Discrete 320x240
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
        Size: Discrete 352x288
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
        Size: Discrete 424x240
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
        Size: Discrete 640x360
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
        Size: Discrete 848x480
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
        Size: Discrete 960x540
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)
        Size: Discrete 1280x720
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.067s (15.000 fps)

How to get the corresponding ffmpeg encodings
v4l2-ctl --list-formats-ext gives the Linux kernel name of things, e.g . YUYV 4:2:2. But to do stuff with ffmpeg, you need to know the ffmpeg nama sometimes. You can do it like this:
ffmpeg -f v4l2 -list_formats all -i /dev/video0

sample output:
[video4linux2,v4l2 @ 0x555ba7267240] Raw       :     yuyv422 :           YUYV 4:2:2 : 640x480 320x180 320x240 352x288 424x240 640x360 848x480 960x540 1280x720
[video4linux2,v4l2 @ 0x555ba7267240] Compressed:       mjpeg :          Motion-JPEG : 640x480 320x180 320x240 352x288 424x240 640x360 848x480 960x540 1280x720

This for example told us that the ffmpeg name for YUYV 4:2:2 is yuyv422.


possible to move windows between x-displays? Hopes lifted because bin/gimp can do this

I have just answered a similiar question here:
https://bbs.archlinux.org/viewtopic.php?pid=1264401#p1264401

In short, this can be done at least in GTK. Although it depends on the application itself to do so, as written in Arch's wiki:
https://wiki.archlinux.org/index.php/Multihead#Separate_screens

  With this configuration it is not possible to move windows between screens, apart from a few special programs like GIMP and Emacs which have multi-screen support.


You'll first need to make sure update-manager-core is present (it may already be installed):

sudo apt-get install update-manager-core

Next, run:

sudo do-release-upgrade

You may need to check /etc/update-manager/release-upgrades and change the line:

Prompt=lts

to:

Prompt=normal

for the release to show up.

Upgrade Documentation
Upgrade Notes


In Ubuntu 20.04, can I format an unallocated partition of an NTFS hard drive as ext4 without corrupting my drive?

You're safe to make partitions in unallocated space.
It looks like the hard drive is using GUID Partition Tables (GPT) which no longer uses the primary/extended/logical partition scheme.  Is something prompting you for that choice or are you just doing research ahead of time?


Follow the below steps:

In the command-line: $ sudo apt-get install r-cran-rgtk2 r-cran-cairodevice
In rstudio: install.packages("RQDA",dependencies=c("Depends", "Imports"))
In rstudio: library(RQDA)


How to share folders that are on a partition on a secondary hard drive?

Link to filesystem

One way would be to make a link to the filesystem, which should be in /media/directoryName.
Maybe you got to switch the 'write-bit' of the directory on. This usually should work.

A problem could be, if you can't make a link to the filesystem, read

$ man ln

That works when I use it.

Or try

$ sudo mount partitionName /home/yourUserName/folder


Some icons/symbols in TeXstudio are missing

Solution found via google on here:

 sudo apt-get install libqt4-svg

It actually was a re-installation but it worked anyway.


The package is still in the Proposed repository. Meaning, that if you don't have the proposed repository activated you can not install these packages. To activate the proposed repository you can either use the GUI or the command line:

Command Line

Manual addition

With root permissions edit your /etc/apt/sources.list:

sudo vim /etc/apt/sources.list

Then look for the following line or add it yourself:

deb http://archive.ubuntu.com/ubuntu/ precise-proposed restricted main multiverse universe

(If you are not using precise, you can replace it with your current version)

Save your file. Then run sudo apt-get update and install the package you want to use sudo apt-get install package/precise-proposed or sudo apt-get -t precise-proposed install package.

One liners

sudo sh -c "echo 'deb http://archive.ubuntu.com/ubuntu/ $(lsb_release -cs)-proposed restricted main multiverse universe'" >> /etc/apt/sources.list
sudo apt-get update
sudo apt-get -t precise-proposed install adobe-flash-properties-gtk

Done.

Using the gui

From the wiki page on the -proposed repository:

  To enable the proposed archive for Ubuntu 11.04 go to Applications→Ubuntu Software Center→Edit→Software Sources→Updates and ensure that natty-proposed is ticked.

Update your cache, and install the desired package.


Dual boot with Win10 Legacy - SSD/HDD - Swap Partition

Should the swap partition be allocated on the SSD or the HDD?

I doesn't matter nowadays. Avoiding write operations in a SSD was an advice given years ago when the SSDs where somehow more fragile and could wear out faster than traditional HDDs. The current generation have an expected lifespan similar to HDDs so that shouldn't be a problem.

However, in your case, given the space available I still suggest creating swap in the HDD. But the "default=RAM" isn't needed. With 16GB RAM I would have 2-4GB swap, no more, and even that is likely to be seldom used.

  I will be mainly working on Ubuntu and not on Win10, how much of the
  SSD should be allocated for ubuntu if I aim to save everything on the
  HDD except the OS?

Assuming you will create a separated /home partition in the HDD then 20-25GB for the root partition in the SSD is plenty for the OS and user installed software you may want but feel free to use more if you can afford it.

  Is there a tutorial to help make the partitions for the OS on SSD and
  /home on HDD and the swap wherever is better?

There's no tutorial per se and there are different opinions. Here's mine: /home (as much as available) and a small swap in the HDD.

You can start by shrinking the Windows partitions in Windows. Reboot a few times (to Windows) and make sure everything is working fine with the new partitions sizes. Once you have unallocated space in the drives you can proceed with the Ubuntu installation. Choose "Something Else" to manually create the different partitions in the different drives.

As a final comment, are you sure the installed Windows is in Legacy mode? Otherwise please read How do I install Ubuntu alongside a pre-installed Windows with UEFI? . The only additional step for UEFI would be, at "Something Else", to select (not format) the EFI partition which should be at the beginning of the SSD.


How to disable the WiFi using network-manager permanently?

It sounds like you want to right click on the network manager applet and select disable wireless, if this isn't being saved over your session then please report it as a bug:

https://help.ubuntu.com/community/ReportingBugs

If on the other hand you want to prevent your computer from automatically joining networks, then you must go into the network editing and either remove and uncheck the use automatically option for each network.

If you want to save power, then please use the advice in the guide mentioned by Mussnoon above, shutting off with rfkill will be most effective:

How can I keep a wireless card's radio powered off by default?

By running sudo nano /etc/rc.local add this:

rfkill block wifi

before the line exit 0


You may need to repair your grub loader, using a few simple steps from the official ubuntu wiki

https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows


How can I compress my local file and copy to remote machine and the uncompress?

Why don't you use rsync to do that? From the computer were you want to get the file

rsync myuser@192.168.0.1:/home/myuser/mydir/myfile myfile

will move the file over the two computers, taking care of the transportation. You can even pass recursively (-r) if you want to sync the whole directory.

Regarding compressing the data, you can obtain it via -z option, but keep in mind that if your connection is fast and your CPU is slow (mobile devices) you will have better performances just transferring the data without compressing them.

--

Following the comment below, I suggested to look into fabric (http://www.fabfile.org/), which will give you the ability to operate on a server by remote.

so for example as a template you could:

```

from fabric.api import run

def kill_and_replace():
    run('killall myserverprocess')
    run('cp mynewfile myoldfile')

```


Try installing gnome-user-share and see if that helps.

If Nautilus still doesn't start try this solution:

Open a terminal (in Unity or Gnome)
Then type sudo mkdir /usr/share/nautilus-scripts
Enter your password and then hit Enter


How to setup squid-deb-proxy and squid-deb-proxy-client to be more autonomous (to work without internet)?

It won't work without an Internet connection if the specific .deb package that your client is trying to fetch is in a repository that wasn't cached before. Could also be new dependencies that needs fetching. You should be able to check this file /etc/squid-deb-proxy/mirror-dstdomain.acl for cached repos/domains.


No Netflix on Firefox 77.0.1, Raspberry Pi4 with Ubuntu 20.04 Server/Mate Desktop

Looks like this person did a very good writeup on the issue with DRM and included a fix but it looks like you'll have to use chromium and not firefox.


Computer boots automatically into GNU GRUB, no other options

Here's what worked for me. First of all, to quit GRUB2, if I ran exit twice, my computer would finally boot into Windows.

I then had to go to my UEFI settings:

Open charms bar (swipe from the right in)
Click Settings
Change PC settings (located at the bottom)
Update and Recovery
Recovery
Under Advanced Start Up, click Restart now

Once there, I was able to open the Boot menu from under the advanced options and I deleted the ubuntu entries.

Afterwards, I reinstalled Windows, though I don't think that's necessary. If you want to reinstall, that option is also under the PC Settings -> Update and Recovery -> Recovery.


There are two reasons for GRUB not loading Windows 8.

Reason 1:

If your laptop supports UEFI boot and Windows, install with UEFI, then you have to create swap area + boot partition + Linux drive during installation of Ubuntu without deleting UEFI and boot partition of Windows.

Solution: if you delete the UEFI partition then you have to install both systems again for dual boot.
OR
Run windows 8 in VirtualBox. It works perfectly for me.

Reason 2: During installation of Ubuntu you didn't install GRUB properly.

Solution: Install GRUB again.

Reason 3: GRUB is not detecting Windows 8 because of damage of the UEFI or boot partition during installation

Solution: format and again installation.


12.04 LTS: fstab mount fails, but udisks mount works

use the line

UUID=c1e4fe5a-df6b-4910-811d-a6f5d76d59c2 /media          ext4    defaults 0       1

in /etc/fstab instead of the one you have and reboot

you don't have to do anything else; the volume will be mounted in the folder /media as the system will read fstab automatically when you boot


I had the similar problem and on my research found that it's intel new graphic update problem. I was able to solve my issue by issuing following commands on my terminal.

sudo apt purge xserver-xorg-video-intel

After issuing the command, it is recommended that you restart your pc but logout and log back in may also work fine. I hope this will be able to solve your problem. If you face any issue please let me know.


Birdfont is just the application for you then! Install it with:

sudo apt-get install birdfont

You can do all of what you have requested and more with it!

Description:

Font editor that lets you create outline vector graphics and export fonts
Birdfont is a free, open source font editor that lets you create outline
vector graphics and export ttf, eot & svg fonts.

Screenshots (but please don't judge the program by my bad drawing of the letter A where I should have drawn the letter B ;P):


Is there a way to get terminal sessions to persist across reboot?

No, at least in gnome-terminal and other VTE-based emulators it's not possible in an implicit and convenient way.

(You can, of course, explicitly go through all your tabs before the reboot, "Select All" and copy-paste the contents into files, and view those files with some viewer after the reboot. If I understand you, this is not what you're looking for. Also, colors and other formatting would be lost.)

VTE, the terminal emulation widget behind gnome-terminal and many other terminal emulators stores most of the scrollback contents (not the latest bits, though) in temporary files under /tmp by default. The major design decisions that prevent doing what you're looking for are:

These files are unlinked right after being created. This is so that they are automatically removed (and the disk space is freed up) even if the terminal emulator exits uncleanly for whatever reason. In order to preserve them, they should be linked back to the filesystem tree (I don't know if it's possible) or copied into another file (which is a slow action if the scrollback is large, let alone properly handling potentially running out of disk space).
The files are under /tmp which is wiped out by many distros upon a reboot. A different, persistent location should be chosen instead, or some cooperation is needed with the boot scripts.
These files are encrypted (as of VTE version 0.40) to overcome the privacy issue of data leakage in case someone gets access to the disk. The encryption key is only available in gnome-terminal's memory. In order for these files to persist, either the encryption layer should be skipped (bringing back the old privacy concerns), or the keys should be placed on the disk at least temporarily for the duration of the reboot (... er, until that user logs in again and starts up gnome-terminal again... doesn't sound too much better). Feasible only if you don't care about privacy, or if the filesystem is guaranteed to be encrypted.

There are other smaller issues to be addressed as well, e.g. flushing incomplete blocks of these files that contain the last bits of the scrollback data.

I hope I could outline some of the design decisions VTE took that prevent doing what you're looking for. I can't see how your request could be addressed while keeping the current design goals as well. Maybe there's another terminal emulator that does what you're looking for, presumably sacrificing some of VTE's features; I don't know.


There's no need to run Matlab as a superuser. What you do need though is the -desktop option:

Exec=/media/d/usr/local/MATLAB/R2014b/bin/matlab -desktop


How to fit YouTube player to available browser window?

You have to install Youtube Enhancer it is available for Firefox as well. For Chrome just click this link

You'll see extra buttons like Cinema Mode, Fill In, etc.


How to get IMDb info in Nautilus properties?

So for starters in Ubuntu 18.04 it works this way:

Install package python-nautilus
Get Test Extension from here and save as TestExtension.py
Copy TestExtension.py to /usr/share/nautilus-python/extensions (with sudo)
Change to that directory and adapt permissions: sudo chmod u+x TestExtension.py
Restart Nautilus: killall nautilus
Klick with the right mouse button on some file and you will see Showing <Filename> in the context menu.
Adapt this imdb script to your environment.


Make Ubuntu's Night Light look like Manjaro KDE's Night Color

Standard (vanilla) Ubuntu nowadays uses the GNOME desktop environment (DE) which provides the "Night Light" feature whereas the "Night Colour" option is from KDE (you've also mentioned the screenshots are from KDE version of Manjaro). Different DEs are not always like-for-like replacements of each other.

However, you can control the colour temperature of Night Light following this Q&A: "How do I adjust the hue (intensity) of GNOME Night Light?". The Night Light Slider GNOME Shell extension (as mentioned in this answer) also offers options to always enable the Night Light feature, sync the brightness slider with the Night light slider etc.

But if you want an identical GUI, you may switch to the Kubuntu flavour of Ubuntu which uses KDE instead of GNOME.


open System Settings > Network
now click on Wired network > Options
A small window will open. now choose IPv4 Settings tab
search for Routes button
now check Use this connection only for resources on its network
now restart your network manager to get the settings to work. sudo service network-manager restart


I found my solution again.

When I was finding through various links and finally found in this link.

Just have to reinstall the python3 version and enter hash -r to restore the version back, by the following commands.

cd "to the directory where downloaded python is"
./configure
make
make test
sudo make install
hash -r


Can Evolution be configured to delete invitations when I click Accept?

I recently discovered how to do this. I am not sure whether this option was there before, or if it came with an update. Anyhow for version 3.18.5.2 it is as simple as:

Open Evolution Preferences (Edit → Preferences or Shift+Ctrl+S).
Select Calendar and Tasks on the left.
Select the Meeting Invitations tab.
Tick the Delete message after acting checkbox.


Zip files into weekly archive with week number

This should be enough for your case:

 find . -name '*.txt' -ctime +7 | zip archive-$(date +%Y%U).zip -@

example:

find . -name '*.txt' -ctime +7 | zip archive-$(date +%Y%U).zip -@

output:

  adding: a.txt (stored 0%)
  adding: b.txt (stored 0%)

Now to make sure of naming:

 ls

output is:

archive-201525.zip  a.txt  b.txt  c


Tensorboard using Python 2.7, how to change it to Python 3?

Personally, I use miniconda to create an environment in which I have control over the python (etc.) versions used.  There is also a python specific environment manager pipenv.

If you create an environment which only has python3 and which has your version of tensorflow & tensorboard, you may find it easier, especially as new software versions come out and you want to be able to control the versions in your environment.


How do I distinguish folders with the same name in Unity?

I would say that this problem is more a design flaw, than an actual error. This is the intended behaviour, even if it is confusing.

My recommendation would be to explain your problem to the developing team, and either let them come up with a solution (or you can suggest one if you have a good idea) and hope that they might implement it at any point.


Disable the HUD history storage:

gsettings set com.canonical.indicator.appmenu.hud store-usage-data false

Disable all scopes, use the launcher as an application drawer only:

gsettings set com.canonical.Unity.Dash scopes "['home.scope', 'applications.scope', 'files.scope']"
gsettings set com.canonical.Unity.Lenses always-search "['applications.scope', 'files.scope']"
gsettings set com.canonical.Unity.Lenses home-lens-default-view "['applications.scope', 'files.scope']"
gsettings set com.canonical.Unity.Lenses home-lens-priority "['applications.scope', 'files.scope']"
gsettings set com.canonical.Unity.Lenses remote-content-search none

Via here (more tips as well)


How to copy packages from an online machine to an offline machine

I wrote a simple python util to use apt list --installed and apt download <pkg> to create the "cache" folder i need to use with aptoncd.   It will also update the cache folder without re-downloading anything.

USAGE: <cmd> <cache_dir> [optional_regex_pkgs_to_ignore|...]

cmd --> the filename where you save this script
cache dir --> folder to save the cached output in.  If it contains existing .debs, they will not be re-downloaded.  A good location is /var/cache/apt/archive on ubuntu16.04 (if you have sudo)
pkgs_to_ignore --> space-separated list of packages to ignore, in regex format.  Eg, 'google.*' will skip googleearth and googleearth-package.  Note the ' versus " - this prevents bash from expanding the .* in the regex.

Necessary because this apt approach won't work for the rare program installed fully outside apt, eg Google-Earth for me.

Hope this helps someone.  Seemed a little different than the existing (numerous) questions.  Note, this does not try to re-invent the package-manager wheel; it does not care about package version updates if the name is unchanged.  If that matters, just point it to a different cache folder and it will re-download everything.

 #!/usr/bin/python3

'''
program to make a flat folder of all packages your system uses:
    - pulls all installed packages:
        -`apt list --installed`
    - downloads any packages/.deb's that are not in your cache folder
        - `apt download <package>`

This was created to facilitate setting up / updating an off-line
machine based on an existing machine (presumably online) where you
have the programs you need set up.

the easiest way to get the packages over to the offline machine is via
tool `aptoncd`  ("sudo apt install aptoncd"), which will make an iso of
your packages, and optionally auto-launch a CD writer.

--- USAGE ---
<cmd> <working_dir> [ignore-pkg-globs|...]
'''

import sys
from os import path
from glob import glob
import os
import subprocess
import re

NARGS=2
DEBUG=0

def get_all_installed_packages():
    print("==== asking apt for a list of all installed packaged ====")
    result = subprocess.run(["apt", "list", "--installed"],
                            stdout=subprocess.PIPE,
                            stderr=subprocess.STDOUT,
                            universal_newlines=True)
    if not 0 == result.returncode:
        msg = "apt list call failed with " + str(result.returncode)
        print(msg)
        raise RuntimeError(msg)

    split_re = re.compile(r"(.*)/(.*)(\[.*\])")
    packages = []
    for line in result.stdout.split(os.linesep):
        contents = split_re.match(line)
        if contents:
            groups = [item.strip() for item in contents.groups()]
            if DEBUG:
                print("found pkg: <{0}>  -- {1}|{2}".format(*groups))
            packages.append(groups[0])
        else:
            print("IGNORING <" + line + ">:")

    if len(packages) < 20:
        msg = "ERROR: you only found <{0}> packages, this seems wrong!".format(len(packages))
        print(msg)
        raise RuntimeError(msg)

    print("==== found {0} installed packages! ====".format(len(packages)))

    return packages

def download_packages(pkg_list, ignore_pkgs):
    if not pkg_list:
        print(" ==== nothing to download! ====")
        return
    print("==== downloading the following (missing) packages: ====")
    print(" | ".join(pkg_list))

    for pkg in pkg_list:
        if DEBUG:
            print("processing package <{0}>".format(pkg))
        ignore = 0
        for pattern in ignore_pkgs:
            if pattern.match(pkg):
                if DEBUG:
                    print("matched <{0}> to ignore pattern <{1}>".format(
                           pkg, pattern.pattern))
                ignore += 1

        if ignore:
            print("---- ignoring {0} {1} ----".format(pkg, ignore))
        else:
            print("---- downloading {0} ----".format(pkg))
            result = subprocess.run(["apt", "download", pkg],
                                stdout=subprocess.PIPE,
                                stderr=subprocess.STDOUT,
                                universal_newlines=True)
            if 0 != result.returncode:
                msg = "ERROR: run apt download failed with <{0}>. "
                msg += "output=\n{1}\n------\n\n".format(
                    result.returncode, result.stdout)
                raise RuntimeError(msg)

    print("==== DONE DOWNLOADING ====")

def main():
    if len(sys.argv) < NARGS:
        print(__doc__)
        msg = "ERROR, requires >= {0} args!".format(NARGS-1)
        print(msg)
        sys.exit(1)

    print("args=" + ";".join(sys.argv))

    ignore_pkgs_re = [re.compile(x) for x in sys.argv[2:]]
    package_dir = path.abspath(path.normpath(sys.argv[1]))

    if not path.isdir(package_dir):
        msg = "ERROR: path <{0}> is not a dir!".format(package_dir)
        print(msg)
        raise ValueError(msg)

    save_cwd = os.getcwd()
    try:
        os.chdir(package_dir)
        existing_debs = glob("*deb")
        for deb in existing_debs:
            if DEBUG > 1:
                print("found deb = " + deb)
            pass

        installed_packages = get_all_installed_packages()

        to_download = []
        for pkg in installed_packages:
            matching_deb = [x for x in existing_debs if x.startswith(pkg)]
            if matching_deb:
                if DEBUG:
                    print("found existing match for <{0}> with <{1}>".format(
                          pkg, "|".join(matching_deb)))
            else:
                if DEBUG:
                    print("no existing cache deb found for pkg <" + pkg + ">")
                to_download.append(pkg)

        download_packages(to_download, ignore_pkgs_re)

    finally:
        os.chdir(save_cwd)

if __name__ == "__main__":
    print("running as main")
    main()


Still asking whether I want to boot into Ubuntu although there is no Ubuntu partition any more

Even if you delete the Ubuntu partition, the Grub boot loader will still be there. So in order to repair your boot loader you need a windows 7 repair disk. After booting from repair disk.

Open the command prompt
Type following at command prompt
bootrec.exe/fixboot and hit enter
bootrec.exe/fixmbr and hit enter
Then reboot your system and you will boot directly into windows 7.


how can i install ubuntu from one computer to other one? (in my computer there is no internet connection)

Official "Creating a bootable Ubuntu USB flash drive from Windows" howto is here:
https://help.ubuntu.com/community/Installation/FromUSBStick#Creating_a_bootable_Ubuntu_USB_flash_drive_from_Windows


"sudo iptables -L" takes a long time to load

iptables -L by default will try to resolve IP addresses to hostnames.

I have a small iptables ruleset on this one system here, but it does take a while to get through even that small list because of the rules.

By using iptables -L -n, it displays everything numerically and skips IP resolution and port service common name display. It should also display faster.  (The -n option tells it to show numerical entries for everything and will NOT try and resolve IPs. The downside is, ports will also be displayed numerically, rather than http for port 80 for example.)


Fresh install of Ubuntu 18.04 install giving black screen on reboot

Have you tried to boot with the LiveCD version to see if you can mount the partitions and check the disk?

Did you removed the USB stick when the message "Remove the installation media and press ENTER to continue" shows? I had a problem once when i forgot to remove the USB stick and the installation started again. I removed the stick in the middle of the process and somehow the previous installation was corrupted.


Rearranging Custom-Installed Panel Indicators

There is no user friendly way of doing that in upstream Unity, so I guess it's not available in the plugin you're using either.


md5sum check fails for every iso download and errno5 error during install everytime

It is very possible that you have defective RAM on that machine. The behaviour of faulty desktop RAM in unexplainable.
You should download any linux image with memtest86+ on it and run the test.


cryptsetup: WARNING: failed to detect canonical device of

First, you can remove you "I" message by looking in /etc/initramfs-tools/conf.d/resume file and check that the UUID noted in there is the same as your UUID of your swap-partition. You can always determine all UUIDs by running sudo blkid command. So, it seems in your case in resume file noted wrong UUID that is not matching your swap UUID. Just correct it and that info message will disappeared.

And regarding cryptsetup message. If you're not using any encryption on any of your medias, just remove cryptsetup package by sudo apt remove cryptsetup command from your system and no such message you will get ever.


Note the error when apt-get tries to install the software.

ERROR 404: Not Found.

Oracle has moved the JDK 8 download page to the Java Archive and the installer does not work. Probably, the webup8 repository may be fixed in the future

Workarounds

You may

Download the self-extracting installer from the Archive Page for Java 8 and run that files, or
Install Java 9 instead.

NOTE:  Oracle has published notes about the End of Life (EOL) of Java 8. Public updates notifications have ended and the updates will end at September of 2018.


how does exactly suspend works in ubuntu?

When a machine goes into the suspend state the kernel freezes (stops) user space programs and kernel threads. Then the kernel will traverse all the devices and calls the suspend methods on each driver. Each driver has the know-how to put the hardware into a deep sleep state (or even power it off) (and the converse to bring it back to a sane running state when the resume occurs).  At this point the hardware should be in a low power state (and hence the Hard Disk will be powered off).

The Kernel wakeup code address is written to an address as specified by an ACPI FADT table, then x86 Power Management Control registers are written to; this effectively powers off the processor but keeps memory in a self-refresh mode.

When resume occurs, the CPU is restarted and after a short time in the firmware (BIOS/UEFI) jumps to the wake up address provided by the kernel and the kernel jumps back into protected mode and restores its state. It then traverses the drivers and these resume all the devices. Then frozen processes are thawed and the kernel returns back to user space.

So to answer your questions:

1 and 2: Devices drivers try to put devices into the deepest sleep state, some devices can be powered down, some may be just in the deep sleep state consuming very little power. It depends on the hardware and the device driver.

Memory is being refreshed, it is never powered off. The CPU is effectively stopped, but it depends on the CPU model on how much of the package is actually fully powered off.

One way to determine how much power is being uses is using the Firmware Test Suite s3power tests; I recommend putting the machine into deep sleep for 30 minutes and measuring battery power drain to get an estimate of power usage during suspend:

remove AC power supply, then run:

sudo apt-get install fwts
sudo fwts s3power --s3power-sleep-delay=1800

..wait 1800 seconds (30 minutes) and it should power back on and give an estimate.

The hard disk is power off, so the machine is safe to be carried.


Is there an application i can use to fix the bad blocks?

No. The drive already does this on its own.  It will detect broken of failing sectors and remaps them until it runs out of spare sectors to remap them to.

Long before that happens you should ditch the HDD (keep the rest of the laptop. Optionally install a cheap second hand drive or even an SSD).

Technically: you could boot from USB pendrives or CD or the network and see if the failed sectors are all clustered around a single spot. Then partition around it. But if the drive already has run out of spares then it is very likely to die soon. Best not try work around that unless you have very good (daily?) backups and do not care abouyt replacing the drive when (when, not if) it completely dies.


You should not add the script itself to $PATH. Instead, you should add the directory containing the script to $PATH:

export PATH=$PATH:/opt/scripts


If you have usbguard and it blocks devices that you want to use, you can use the usbguard tool to add them to allowed list. Run usbguard and you should get some fairly clear instructions.
$ usbguard list-devices
Should give you a listing of connected devices and whether they are allowed or blocked. You can pick an id and run e.g.
$ usbguard allow-device -p 04b0:0428
and should see the change in journal:
 kernel: usb 1-1: authorized to connect
Usbguard is meant to block all devices hotplugged after system boot. To make persistent changes, you can add rules to /etc/usbguard/rules.conf. You can generate config from current rules with usbguard generate-policy.
So, to see what's changed between them, you can:
$ usbguard generate-policy | sudo diff - /etc/usbguard/rules.conf
And to overwrite the rules file with current run:
$ usbguard generate-policy | sudo tee /etc/usbguard/rules.conf
You can also edit the rules manually and copy across machines etc.


The requested URL /drupal/admin/reports was not found on this server

Solved this issue by adding the following code in apache2.conf
what I did is go to /etc/apache2/apache2.conf and paste this code in a file

  <Directory /var/www/html/>
     AllowOverride All
  </Directory>


ConVirt Open Source provides the core functionality for centrally managing your open source KVM or Xen virtualized environment, including monitoring, configuration management, templates-based provisioning, and live migration.

for more information and download check here


tr takes input from STDIN (standard input). Try this:

$ tr '\n' ':' > output_file  < input_file

You have used a syntax for Bash's parameter expansion but you are using a file as a parameter which is not correct as the parameter can only be variable or a special shell parameter.

To do what you are trying using only bash:

$ var="$(<bash_list)"
$ echo "${var//$'\n'/:}" > bash_PATH

Now bash_PATH file will contain:

/bin:/usr/bin:/usr/local/bin:.:/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/bin:/usr/java/default/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin

Also note that you have duplicate directory names in "$PATH" (hope those are intentional for the sake of example), to remove the duplicates without changing the ordering you can try this.


This doesn't answer why we get the problem but to fix it I ended up writing a Python script that uses amixer and alsactl to programatically tell ALSA to reduce volume to 0% and set mute for 'PC Beep', 'Beep' and 'PC Speaker'. It's not bullet proof, as I've found machines with PC speakers that have slightly different names, but it resolved the bulk of the problem.


Solved, by adding the following to my /etc/apt/sources.list:

deb http://us.archive.ubuntu.com/ubuntu/ xenial main


Can't install VLC throgh software center

The software center has always had problems.
Try using the command line:
Activities(up left corner) -> Terminal -> type in the terminal sudo apt-get update -> sudo apt-get upgrade -> sudo snap install vlc

NOTE:
using the following commands is possible, but they are different and can also install a different version and extension packs of VLC.
sudo apt install vlc
sudo apt-get install vlc

As pointed by guiverc, you must use vlc not VLC. Small and big letters matter.


In /boot/grub.cfg is defined wich partition is used as root partition for the (unix-like)OSs.

Here in my case Arch is not booting, if his root partition is called by the name /dev/sdXY. I changed this using vim (vi should do it as well)
using the command

:%s/\/dev\/sdXY/UUID=my-uuid/g

this substitutes every /dev/sdXY with my-uuid


Is it possible to register Docker containers in Landscape?

You can certainly try (I expect you could get something working), but it is not officially supported.  Docker containers are meant to be immutable containers that run single applications.  Landscape is a full machine system management tool.  Look at LXD for a supported container environment that presents full manageable "system-like" containers.

Official service description of Ubuntu Advantage from Canonical, of which Landscape is a piece:

  Excludes: ...
  - Landscape seats for Docker containers.


Best way to sync music to Galaxy Nexus (MTP)?

You're right, MTP is a real pain under Linux. (Years ago) I used to update my Creative ZEN Mozaic with Gnomad2 but it was far from perfect.

My personal advice is to root your phone and install Samba Filesharing to have traditional Samba shares on your phone.

If you really don't want to root your phone, you can take a look to this thread. It seems that ASTRO File Manager plus its SMB Module can work even without root access (not tested by me, can't confirm). AirDroid could be another alternative to test.


How to Check remaining files of Windows 7 from Ubuntu?

Since you selected the option Erase Disk and Install Ubuntu, the hard drive was formatted as an ext4 partition and hence no Windows related files are on it.

However, data can still be recovered using tools such as photorec and hence if you want to completely get rid of your previous data, it is recommended to zero the hard drive, ie overwriting with zeros.


Is `chown user:user lost+found` harmful?

Good advice comes with a rationale so that you can tell when it becomes bad advice.

The purpose of lost+found being owned by root is so that no matter whose file it was that was lost it's not suddenly exposed to everybody. However, in this case, there shouldn't be a single file in the entire filesystem* not owned by pduck; therefore there is no downside to lost+found not being owned by pduck.

*barring exotic situations like pduck suing to root and running an X application. But if pduck can use sudo or su than we're talking about nothing because pduck can break system security outright.


Firefox Browser (Ubuntu) converting all my downloads to /tmp/ files

In Firefox there is Preferences under menu tab. Go to there and check to which folder go the downloaded files.

Is this your problem? Does it happed only for video files or for every downloaded file?


You have to enable trusty-updates. Open Software & Updates and set a thick for trusty-updates in the tab Updates

After that

sudo apt-get update
sudo apt-get install --reinstall g++


CodeLite installation missing dependencies

This is strange.
If you take a look at the packages file

http://repos.codelite.org/ubuntu/dists/trusty/universe/binary-amd64/Packages

you will find, that the repository offers codelite-8.1-1 for trusty. It depends on libglib2.0-0 (>= 2.24.0), which is perfectly fine.

Please make sure you have no other codelite repos in your sources.
Either check under "Software sources" in the Update manager, or issue

apt-cache policy | grep codelite

Deactivate any other repo than the trusty one and run

apt-get update
apt-get install codelite wxcrafter

again.


Installing Ubuntu On Dell Precision 5510

How to Install Ubuntu 16.04 LTS on the Dell Precision 5510

[edit: Aside from the "Allow Linux to see your storage device" step, on newer install media, this guide is no longer necessary. Just install normally, everything works.]

I was able to get Ubuntu 16.04 LTS installed over the last few days. These are my notes from the installation. Multi-monitor connections via HDMI work. The thunderbolt 3 port also works for Ethernet and Display Port. Please feel feel to revise this, and read carefully, as there are almost certainly some errors. I'm not a Linux expert by any measure.

Disable nouveau in order to boot from the Linux live disk

Do this at grub before booting from Ubuntu install media to avoid crashes due misbehaving video card drivers.

  Symptoms are random freezes and infinite errors, something like the
  following: nouveau PFIFO SCHED_ERROR. Fix by pressing 'e' on grub menu
  during boot and add "nouveau.modeset=0" to the end of the line
  starting with "linux". Now boot the live disk by pressing F10.

Allow Linux to see your storage device

When booting, press F2 or CTRL+p to access the UEFI configuration menu. Navigate to SATA Operation on the left, and set it on the right to either AHCI if you have a hard drive, or Disabled if you have only the NVMe drive. The reason that the setting SATA Operation > RAID 0 hides the NVMe drive from Linux is that it turns on a proprietary RAID + AHCI driver, stored in firmware, called Intel RST. Linux has a difficult time communicating with the Intel RST driver without a lot of tinkering.

Once you've booted in, and with no external monitor connected, install
normally. The following should be done only after you've rebooted into your newly installed system.

Install kernel 4.6 for Ubuntu

On newer install media this step isn't necessary. Run uname -a to see what kernel is running on your Ubuntu live cd. If it's version 4.6 or later, skip this step.

mkdir -p ~/Downloads/Precision_5510_install/kernel
cd ~/Downloads/Precision_5510_install/kernel
BASE_URL="http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.6.2-yakkety"
wget "$BASE_URL"/CHECKSUMS
wget "$BASE_URL"/CHECKSUMS.gpg
wget "$BASE_URL"/linux-headers-4.6.2-040602_4.6.2-040602.201606100516_all.deb
wget "$BASE_URL"/linux-headers-4.6.2-040602-generic_4.6.2-040602.201606100516_amd64.deb
wget "$BASE_URL"/linux-image-4.6.2-040602-generic_4.6.2-040602.201606100516_amd64.deb
gpg --keyserver keyserver.ubuntu.com --recv 17C622B0 # Import the gpg keys from Ubuntu's mainline kernel team.
gpg --verify CHEKSUMS.gpg CHECKSUMS # Verify that the list of checksums is from Ubuntu.
sha256sum -c CHECKSUMS | grep 'OK' # Check the integrity of the downloaded files.
sudo dpkg -i *.deb

You can find the gpg keys to verify the files haven't been tampered with here.

Enable hibernation

First test to see if hibernation works:

sudo pm-hibernate

If you're able to resume, create a file to allow hibernation from the GUI.

cat <<EOF | sudo tee /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
[Re-enable hibernate by default]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes

[Re-enable hibernate by default in logind]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate;org.freedesktop.login1.hibernate-multiple-sessions
ResultActive=yes
EOF

Install Dell drivers from the Ubuntu Driver Support Pack

This step can be problematic, since you're installing .debs intended for an older version of Ubuntu. There is probably a better solution for this, but I haven't figured it out yet.

Starting the laptop with a monitor plugged in via HDMI caused my machine to crash until I did this. It may require some troubleshooting on your end.

cd ../
wget http://downloads.dell.com/FOLDER01797540M/1/xps13_ult_x03.fish.tar.gz
tar xf xps13_ult_x03.fish.tar.gz
cd debs
sudo apt-get install libxdo3 xdotool
sudo dpkg -if workaround-screen-lock-malfunction_1_all.deb

ALSA defaults to sending sound to HDMI even if there's nothing plugged in. Fix it with this:

echo "options snd-hda-intel model=dell-headset-multi,dell-headset-multi" >> /etc/modprobe.d/alsa-base.conf

Set up Nvidia Optimus

First install bumblebee

sudo apt-get install bumblebee bumblebee-nvidia primus

Next, remove any exising nvidia packages and install newer ones.

sudo apt-get purge nvida-*
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-current nvidia-prime
sudo service lightdm restart

Add an indicator so you can tell whether Intel or Nvidia is being used.

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install prime-indicator
nohup prime-indicator &

Increase the text size on TTY consoles (for 4k screens)

On the 4k screen variety of this laptop, the font size is nearly unreadable when switching to a TTY ( for example, when pressing CTRL+ALT+F1 from Unity ). You can change it like so:

sudo dpkg-reconfigure console-setup
Choose UTF-8
Choose the default Combined - Latin, ... option ("Latin" includes the English alphabet)
Select the terminus font
Select 16x32

Hope it helps!


How do I make a conditional search and replace that will add a line between two lines with different match criteria?

Using awk:

awk '1; ! /^[\x01-\x7F]*$/ {next} {getline} !/[\x01-\x7F]/ {print "+Aあ+"} 1'

Print the input line unconditionally - 1 is a true condition, and the default action in that case is to print.
Then, if it isn't (!) entirely ASCII (/^[\x01-\x7F]*$/), skip processing more rules (proceeding to the next line, but processing rules from 1).
If it is entirely ASCII, we get the next line {getline}, and if that doesn't ! have any ASCII characters /[\x01-\x7F]/ in it, print your placeholder.
Finally print the line we read using getline.

I'm assuming that your 日本語のみ lines don't have half-width spaces or punctuation (. ! vs 。　！).


I had problem with slow upload speed on this card

For fix, reinstall realtek drivers

sudo apt-get install linux-headers-generic build-essential git
git clone http://github.com/lwfinger/rtlwifi_new.git
cd rtlwifi_new
make
sudo make install
sudo modprobe -rfv rtl8821ae
sudo modprobe rtl8821ae


Can you Ctrl+Alt+F3 to enter a TTY console after it "freezes"? Try going into one and going back with Ctrl+Alt+F1 or Ctrl+Alt+F7


Installed 32-bit by accident, want to upgrade to 64 and keep W7

Yes, if you attempt to install the 64 bit image it should give you the option to overwrite the 32 bit one. If memory serves me correctly, it is pretty friendly and you get presented with the option to keep windows and overwrite the ubuntu installation. But if not, you can just choose the linux partition to overwrite.

Personally I would avoid recovering the whole PC if you can help it. This sounds like a "nuclear" last resort kind of thing to do if you screw up somehow and blow the windows partition away altogether.


Ubuntu get stuck at "/dev/sda6: clean" message with some number on bootup. Help!

When you use sudo apt autoremove you are attempting to remove an apt package and all it's dependencies.
I would attempt pressing the [enter] key to try and push the OS past the block/clean also you could try to open a new terminal ALT + F2 and login that way.


In most cases, deleting a partition doesn't actually destroy filesystem data; it just deletes the pointers to the data. (Partition table data consists mostly of pointers to where filesystems start and stop.) Thus, when you deleted a partition and re-created it in exactly the same way, the original filesystem data became available again.

Instead of trying to delete and re-create the partition, you should be able to use the "Something Else" screens to re-install over the existing system. Be sure to select the check box to "format" the Ubuntu root (/) filesystem. This will quickly delete all the important filesystem data structures. Alternatively, you could use GParted or text-mode tools like mkfs to wipe the original Ubuntu 14.04 partition before launching Ubiquity (the Ubuntu installer). You'd need to boot into the installation medium's "try before installing" mode or use some other emergency tool in order to do this, though.

As a side note, I recommend taking this opportunity to upgrade to Ubuntu 16.04. Although 14.04 is still supported, it's over halfway through its supported period; it will enter unsupported status in less than two years. Ubuntu 16.04 also offers a number of updates and improvements over 14.04.


Screenshot only active monitor (gnome-screenshot)

To only shoot the current screen is not the default behaviour, nor is it an option in gnome-screenshot, nor any other screenshot application as far as I know.

Like practically anything however, it can be scripted.

An example

The script further below will:

take a screenshot
automatically create a (numbered) image in an arbitrary directory
automatically crop the image to the section of the screen you are currently on (retrieved from the mouse position), and create a cropped image named:

cropped_<image>.png

To prevent overwriting earlier screenshots, these cropped images are numbered like their oroginals.

screenshot

if I am on the left screen:

if I am on the right screen:

The script

#!/usr/bin/env python3
import os
from PIL import Image
import subprocess

# ---set the name of your (automatically numbered) screenshots (no extension)
imagename = "screenshot"
# ---set the path to where you (want to) save your screenshots
savepath = "/home/jacob/Bureaublad"

def get(cmd):
    return subprocess.check_output(cmd).decode("utf-8")

n = 1
while True:
    name = imagename+"_"+str(n)+".png"
    path = os.path.join(savepath, name)
    if os.path.exists(path):
        n += 1
    else:
        break

# make the shot
subprocess.call(["gnome-screenshot", "-f", path])
# get the width of the left screen
screenborder = [int(n) for n in [s for s in get("xrandr").split()\
                if "+0+0" in s][0].split("+")[0].split("x")]
# read the screenshot
im = Image.open(path)
width, height = im.size
# get the mouse position
mousepos = int(get(["xdotool", "getmouselocation"]).split()[0].split(":")[1])
top = 0
bottom = height

if mousepos <= screenborder[0]:
    left = 0
    right = screenborder[0]
else:
    left = screenborder[0]
    right = width
# create the image
im.crop((left, top, right, bottom)).save(os.path.join(savepath, "cropped_"+name))

How to use

The script needs xdotool, to get the mouse position:

sudo apt-get install xdotool

Furthermore, not sure if python3-pil is installed by default:

sudo apt-get install python3-pil

Copy the script above into an empty file, save it as crop_screenshot.py
In the head section of the script, set the desired name of the screenshot and the directory you use for your screenshots:

# ---set the name of your (automatically numbered) screenshots (no extension)
imagename = "screenshot"
# ---set the path to where you (want to) save your screenshots
savepath = "/home/jacob/Bureaublad"

Test- run the script from a terminal:

python3 /path/to/crop_screenshot.py

The result:

If all works fine, add it to a shortcut. Choose: System Settings > "Keyboard" > "Shortcuts" > "Custom Shortcuts". Click the "+" and add the command:

python3 /path/to/crop_screenshot.py

Note

The script, as it is, simply splits the image on the width of your left screen. This is sufficient, because your screens are of the same y-resolution and aligned.

The script can however very well be edited to work with any screen arrangement, with any number of screens, as long as the screens are arranged in a non-overlapping arrangement. The math is a bit more complicated in that case however.

If anyone is interested, I will add it later.


Ubuntu 16.04 LTS GUI (Unity?) Files has 5 directories I don't understand

These are actual directories in your home folder. By default I believe it is:

Home
Desktop
Documents
Downloads
Music
Pictures
Videos
Trash

The sidebar Has them laid out as shortcuts. All of these are inside of /home/youruser

So for example you CAN access these from the terminal by either doing

cd /home/youruser/Documents

(or Pictures, Download,etc...) or by simply

cd ~/Documents

To hide the sidebar

The simple way to get rid of them is to hide them. When you open files, if you move your mouse to the top bar and click "files" You can uncheck "Sidebar" and the sidebar will disappear.

That should make it look like this.

If you want to actually remove items from the sidebar you have to edit the user-dirs.dirs file.

Editing the file

Open a terminal and use your go-to file editing program, since I use nano my commands will be based on it.

nano ~/.config/user-dirs.dirs

You will see lines containing

XDG_DESKTOP_DIR="$HOME/Desktop"

and so on for every directory (Documents, Pictures, etc.)
For the directories you would like to "remove" you have to change it to point simply at $HOME

XDG_DESKTOP_DIR="$HOME"

After finishing changing whichever directories you want gone, use ctrl-o to "write out" which means save, hit enter to save it, then ctrl-x to exit the editor. After this, logout and log back in After you open files the directories should be gone. (In my test on 17.04 they showed up again as another category underneath where they were previously in the sidebar, simply right clicking and removing them seemed to work across multiple logouts)

I hope this helps.


3D- controller says that the kernel driver is both Nvidia and Nouveau

It seems that your system is not finding any information about any Intel graphics. Maybe there is no such chip/card. Maybe there is such information, but you did not find it yet. Please check again, maybe with the help of grep.

My corresponding output from lspci in a Dell Precision M4800 is

$ lspci -k|grep -A4 VGA
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
    Subsystem: Dell 4th Gen Core Processor Integrated Graphics Controller
    Kernel driver in use: i915
    Kernel modules: i915
00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06)
--
01:00.0 VGA compatible controller: NVIDIA Corporation GK107GLM [Quadro K1100M] (rev a1)
    Subsystem: Dell GK107GLM [Quadro K1100M]
    Kernel driver in use: nouveau
    Kernel modules: nvidiafb, nouveau
03:00.0 Network controller: Broadcom Limited BCM4352 802.11ac Wireless Network Adapter (rev 03)

In order to add details, you can also check the output of lshw. My corresponding output is

$ LANG=C sudo lshw -C display
  *-display
       description: VGA compatible controller
       product: GK107GLM [Quadro K1100M]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nouveau latency=0
       resources: irq:29 memory:f4000000-f4ffffff memory:e0000000-efffffff memory:f0000000-f1ffffff ioport:e000(size=128) memory:f5000000-f507ffff
  *-display
       description: VGA compatible controller
       product: 4th Gen Core Processor Integrated Graphics Controller
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 06
       width: 64 bits
       clock: 33MHz
       capabilities: msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: irq:30 memory:f5400000-f57fffff memory:d0000000-dfffffff ioport:f000(size=64) memory:c0000-dffff


3D acceleration not working in VirtualBox

You are doing exactly the opposite of what you should be doing when your guest OS has limited virtual hardware resources. Enabling 3D acceleration will give the guest OS better performance only if both the host OS and the guest OS have the hardware resources to support it.

Instead of enabling 3D acceleration you should allocate additional virtual hardware resources to the Ubuntu guest OS if it is possible to do so without depriving the Windows 10 host OS of the physical hardware resources that it needs to run properly.

Uncheck Enable 3D Acceleration.

In the left pane of VirtualBox click the Ubuntu 16.04 guest OS.
Click the Settings icon which looks like a yellow gear.
In the Ubuntu 16.04 - Settings window select Display -> Video tab.
Uncheck Enable 3D Acceleration (see below screenshot).

Increase the amount of available virtual RAM in the VirtualBox Ubuntu 16.04 guest OS.

In the left pane of VirtualBox click the Ubuntu 16.04 guest OS.
Click the Settings icon which looks like a yellow gear.
In the Ubuntu 16.04 - Settings window select System -> Motherboard tab.
Move the Base Memory slider to the right to increase the amount of virtual RAM to 4GB.

Increase the number of virtual processors from the default of 1 to 2.

Same as step 2 until you reach the Ubuntu 16.04 - Settings window and then select System -> Processor tab.
Move the Processor(s) slider to the right to increase the number of virtual processors from the default of 1 to 2.

Increase VirtualBox video RAM to the maximum amount of 256MB. From the Windows command line run:

cd "C:\Program Files\Oracle\Virtualbox"
vboxmanage modifyvm "Name of virtual machine" --vram 256

If you run VirtualBox and go to Display in the Settings window, you would see:

Click the OK button in the lower right corner of the Ubuntu 16.04 - Settings window to apply the changes in the Ubuntu 16.04 guest OS settings.
Another thing to take into account is X11 vs Wayland. Wayland may not work that well in a virtual machine environment, so you may want to test the desktop behavior by editing the necessary gdm configuration, and enabling/disabling Wayland. This is done through the /etc/gdm/custom.conf file. In there look for the following line and comment/uncomment as needed: source

#WaylandEnable=false


It's the picture you are using as your desktop background, scaled to your 1600x1200 px. If you delete it it will be recreated the next time you log in or change your desktop background.


If you are using Minecraft, it is far better to stream using the built-in Twitch streamer. You can find settings for this by going into the Streaming settings by entering the Pause menu and selecting the Options menu. In this, you will see a Streaming Settings button. Click that.

Also note that you need to link your Mojang account to your Twitch account by going to their web site.

Also, most importantly, don't steal my subs!


In the help of libreoffice, you can find in the index under "colors:adding" a description of how to add a new color to the color pallets.


How to install Gnash SWF player in ubuntu?

Press the Windows Key on your keyboard, also known as the "Super".
Type the word "soft" without quotes and press enter.
After the Ubuntu software center has completed loading.
Type the word "gnash" without quotes and look at the screen.

There are two choices.  Unless you are using Kubuntu, don't install the one designed for KDE.


installing Clamav-0.98.3 on ubuntu 12.04 for the first time

Open Terminal Ctl-Alt-T and enter this

sudo apt-get update
sudo apt-get install clamav clamtk

It should install any dependencies needed to complete the installation.


could you possibly install a malicious program using apt-get?

Is it possible to install a malicious program using apt-get? Sure, but that requires there to be malicious software in your computer's listed repositories. That can happen:

If you have added a malicious repository, it can provide malicious packages. PPAs, for example could contain malicious code. They can also provide any package (they could provide an ubuntu-minimal replacement that would infect everybody.

But not just PPAs. Software in the main repositories could be infected, either because the Ubuntu maintainer is hacked or disgruntled, or because the Debian upstream maintainer is hacked or disgruntled, or that the original developer is hacked or disgruntled and that bad code filters through uncaught.

Somebody has somehow managed to intercept your network traffic and has also somehow managed to either sign a packages' manifest or alter a binary package without altering the package checksum.
Both are incredibly unlikely unless you've been adding random keys, but even then it's hard to do without being at least partially on-site. It's a pretty complicated hack to pull off.

But is any of that it likely here? Is it telling you to install malicious software?
No. It's just asking you to install 32bit versions of these libraries because it uses them but was compiled against their 32bit versions.
But what are they? libcurl3 is used for downloading things within an application and  libvorbisfile3 is for decoding Vorbis-encoded audio.
The :i386 on the end of the package name means. It's specifying the architecture. In Ubuntu's case, we use i386 to mean 32bit, it's actually compiled with i686 processor instructions.

If you're going to be paranoid about anything, downloading and running a closed source binary from a random website is the real danger here.


Generally Google services will not respond to ping requests. It would be better to ping a less-trafficked server.
Regardless, let's see if we can't fix your resolv.conf issue:

Open Terminal (if it's not already open)
Remove the symbolic link:
sudo rm /etc/resolv.conf

Note: If the system says the file doesn't exist, just carry on to the next step.
Create a symbolic link:
sudo ln -s /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf

Reboot.

If you continue to have problems, update your question to include any errors that are reported


Try jsonlint:

sudo apt install jsonlint

The basic usage syntax is

jsonlint YOUR-FILE.JSON

You find its manual by typing man jsonlint or visiting its online manpage:

An excerpt:

NAME
       jsonlint - A JSON syntax validator and formatter tool

SYNOPSIS
       jsonlint [-v][-s|-S][-f|-F][-ecodec]inputfile.json...

[...]

OPTIONS
       The  return  status  will  be  0 if the file is legal JSON, or non-zero
       otherwise.  Use -v to see the warning details.

       [...]

       -v, --verbose
              Show details of lint checking
       -s, --strict
              Be strict in what is considered legal JSON (the default)
       -S, --nonstrict
              Be loose in what is considered legal JSON
       -f, --format
              Reformat the JSON (if legal) to stdout

[...]

So you can see whether your JSON is valid by checking the return code of jsonlint. You can see it by running echo $? right afterwards (0=OK, 1=invalid), or by evaluating it using &&, || or if.


NetworkManager is the program which (via the resolvconf utility) inserts address 127.0.1.1 into resolv.conf. NM inserts that address if and only if it is configured to start an instance of the dnsmasq program to serve as a local forwarding nameserver. That dnsmasq instance listens for queries at address 127.0.1.1.

If you do not want to use a local forwarding nameserver, then configure NetworkManager so it doesn't start a dnsmasq instance nor inserts that address. In /etc/NetworkManager/NetworkManager.conf comment out the line dns=dnsmasq

sudo nano /etc/NetworkManager/NetworkManager.conf

[main]
plugins=ifupdown,keyfile,ofono
#dns=dnsmasq

and restart the NetworkManager service.

sudo restart network-manager

In this mode, NetworkManager updates /etc/resolv.conf (still via resolvconf) to include the nameserver addresses NetworkManager has for active connections.

If you want to disable the resolvconf mechanism for updating resolv.conf and just use a static resolv.conf file, do the following.

sudo rm -f /etc/resolv.conf  # Delete the symbolic link
sudo nano /etc/resolv.conf   # Create static file

# Content of static resolv.conf
nameserver 208.67.220.220
nameserver 208.67.220.222


click this http://ubuntuone.com/6iTsUm8xqX7rXDf3S6yfeM

open it with software center to install .


Elgato Wave 3 only as input or output but not both

I had the same issue. Solved this and tested through Zoom recordings.
Currently on Pop Os - 20.10 Using Generic Pulse Mixer

Open Pulse Audio Volume Mixer
Go to Configuration Tab
Elgato Wave 3 device DropSelect -> "Analog Stereo Output + Multichannel Input"
Input Devices Tab > Elgato Wave 3 Multichannel -> Port: Select Multichannel Input
Output Tab > Elgato Wave:3 Analog Stereo -> Port:  Analog Output.
Adjust controls physical on the device to suit input gain, output and Crossover to taste.

You may need to select "Show : All devices" if not showing up the first time, at the bottom of the mixer window.
You may need to restart Pulse Audio via the terminal with
systemctl --user restart pulseaudio.service
If your device is not seen.
Have a test call and record it. Hope it helps others.


How do I "Reload" Ubuntu Software Center?

Open a terminal (you can do ALT+F2 and type gnome-terminal) then type :

sudo apt-get update

Then type your password and wait until it is finished. Once it is finished you can close the terminal and reopen the Ubuntu Software Center.

There should be a way to do it without opening a terminal but I don't have 11.10 so I can't search for it.


What is the program that suggests installable packages?

command-not-found is the package you are looking for.


This happens when - while installing - upstart tries to start mysqld and fails for some reason.

Please check the /var/log/syslog or mysql logs in /var/log/mysql for errors while starting mysqld. That should help you debugging, what problem is blocking mysqld from starting correctly.

Others had successfully purged and reinstalled mysqld but that's only applicable if that is a new installation.


open terminal in the installation folder of Copy and type:

sudo ./CopyCmd overlay remove

This should uninstall the overlay.


How do I keep Empathy new message notifications after a disconnect?

I assume this is rather a bug, meaning this is poor behaviour by empathy. Maybe you find a bug that is already filed on launchpad


From the image you posted I would say is the sda4 of 19.3GB.


What are the features in Snappy Ubuntu that make it more secure than the normal Ubuntu?

I don't think there is a huge differences in security model of all Ubuntu versions. Indeed according to this wiki:

  Snappy confinement is an evolution of the security model for Ubuntu
  Touch. The basic concepts for confined applications and the AppStore
  model pertain to snappy applications as well. In short, applications
  are confined by default through the use of various technologies and
  this is achieved through a simple template-based system where policy
  is extended through the use of caps (aka policy groups).

I think the most important will ran through the package system using click and the core itself, plus the filesystem capabilities.

I think you should read those:

ApplicationConfinement
SnappyConfinement


Tasks are currently not supported in Evolution due to missing support for Google Tasks in underlying library (libgdata).

There's a bug entry in Gnome's Bugzilla for that: https://bugzilla.gnome.org/show_bug.cgi?id=652132


How to upgrade MongoDB from 2.6 to 3.4 on Ubuntu 16.04

You can do as following

$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6

$ echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list

$ sudo apt-get update
$ sudo apt-get install -y mongodb-org

after upgrading your service will be masked. To unmask it

sudo systemctl unmask mongodb

for more detail see:

How to Upgrade MongoDB to Latest Stable Version – Mongoaudit — the mongoaudit guides – Medium -> https://medium.com/mongoaudit/how-to-upgrade-mongodb-to-latest-stable-version-9607266834cf
error: Unit mongodb.service is masked when starting mongodb - Ask Ubuntu -> error: Unit mongodb.service is masked when starting mongodb

update:

If you use different ubuntu version, you should update <UBUNTU VERSION> in this command:

$ echo "deb http://repo.mongodb.org/apt/ubuntu <UBUNTU VERSION>/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list

For example, if you use 18.10, change it to cosmic
You can find your version with this command

$ lsb_release -a


If it is gdm and lightdm then do 'sudo apt-get remove --purge" to one of them, depending on the one you prefer


Can't connect to Samsung GT-B2710 via usb

The answer is here:

  This is a problem with the usb-modeswitch, if you disable it in /etc/usb_modeswitch.conf => DisableSwitching=1 then it works.