How can I convert all video files in nested folders? (batch conversion)

You can use ffmpeg to convert video formats. If it isn't installed yet, get it using:

sudo apt install ffmpeg

I successfully tried the following command for converting a sample video to an AVI-based DivX 5.0 format:

ffmpeg -i sample.mp4 -f avi -vtag DX50 sample.divx

First you specify the input video file as e.g. -i Videos/sample.mts, then we say we want the output format to be AVI with an DivX 5.0 tag using -f avi -vtag: DX50. The last argument is the output file to generate, here Videos/sample.divx.

I recommend you to try with one small video first and verify that everything worked as expected and both the format is recognized by your player as well as the video quality and file size is okay. You can tweak the latter with an additional argument -q:v N, where N is a number and lower numbers mean higher quality and file size. Good values are probably in the range 2-8, maybe try 5:

ffmpeg -i sample.mp4 -f avi -vtag DX50 -q:v 5 sample.divx

Then once the test was successful and both format and quality are okay, you can batch-convert all your .mts video files inside a specific source directory recursively with a Bash script like this:

#!/bin/bash

# Change the directories and quality level (lower=better) below accordingly:
inputfolder="/path/to/somewhere"
outputfolder="/path/to/elsewhere"
videoquality=5

shopt -s globstar nocaseglob nocasematch  # enable ** and globs case-insensitivity

for inputfile in "$inputfolder"/**/*.mts ; do
    outputfile="$outputfolder/$(basename "${inputfile%.mts}").divx"
    ffmpeg -i "$inputfile" -f avi -vtag DX50 -q:v "$videoquality" "$outputfile"
done

Or if you want the output files in the same directory as the input, here's a shorter version:

#!/bin/bash

# Change the directory and quality level (lower=better) below accordingly:
folder="/path/to/somewhere"
videoquality=5

shopt -s globstar nocaseglob nocasematch  # enable ** and globs case-insensitivity

for inputfile in "$folder"/**/*.mts ; do
    ffmpeg -i "$inputfile" -f avi -vtag DX50 -q:v "$videoquality" "${inputfile%.mts}.divx"
done


Does my charm need both a relation-changed and relation-joined hook?

This depends on the use case for the charm. Here's a good way to think of what each relation hook does and when it's executed:
relation-joined
This is always the first hook to be executed, it's also only executed once during the lifespan of that specific service to service relation. There's now guarantee on which of the two services hook will fire first, but it will always be the first of the set of relation hooks to fire off. A lot of charms don't need this, but some charms this is very important. If you have any set-up details you need to execute first, then this is where they will happen. Take a database server for example: Most database server charms use the relation-joined hook to create the database, user, password, and other details that the other service will be waiting on. It could do this during the relation-changed hook, but it would add more complexity to make sure it didn't recreate the database and user over and over again (more on why that would happen in a second).
relation-changed
This gets run once right after a successful relation-joined execution. Then every time data is sent on the wire between the services this hook is executed again. As such, it really needs to be idempotent as it will likely be executed more than once. So a lot of charms will gather the expected relation-get data and make sure it exists before continuing. As to why both the relation-joined AND relation-changed hooks fire one after the other on the joined event is likely to allow for ease of use and not require a relation-joined hook explicitly.
As to what should your charm include, that's entirely up to you and the use case for your charm. Not every charm has a relation-joined, in fact few do considering the size of the store. It's really only used when there's an explicit need to do something only once during the lifecycle of that relation. Just so we're clear, when I mean "only once", I'm speaking about executing of the juju add-relation. If you add another relation to another service the relation-joined hook and the whole lifecycle starts over again. (since you can theoretically connect multiple services to one relation on one service)


Try running sudo apt-get install python-wxversion.


Copy all folders with name "ABC" to another location

I'd use a find command something like this to target the deeper ABC directory, then mkdir -p to handle the directory structure, and finally rsync to mirror the contents (especially useful if you want to sync this up in the future).

find . -mindepth 2 -maxdepth 2 -type d -name ABC \
-exec mkdir -p ../target/{} \; \
-exec rsync -a {}/ ../target/{}/ \;

Here's a test:

$ mkdir -p input/dir{1,2,3}/{ABC,DEF} target
$ touch input/dir{1,2,3}/{ABC,DEF}/file
$ tree
.
├── input
│   ├── dir1
│   │   ├── ABC
│   │   │   └── file
│   │   └── DEF
│   │       └── file
│   ├── dir2
│   │   ├── ABC
│   │   │   └── file
│   │   └── DEF
│   │       └── file
│   └── dir3
│       ├── ABC
│       │   └── file
│       └── DEF
│           └── file
└── target

$ cd input # we need to be in the parent dir for this to work
$ find . -mindepth 2 -maxdepth 2 -type d -name ABC -exec mkdir -p ../target/{} \; -exec rsync -a {}/ ../target/{}/ \;

$ tree ../target/
../target/
├── dir1
│   └── ABC
│       └── file
├── dir2
│   └── ABC
│       └── file
└── dir3
    └── ABC
        └── file

You can also do this with a single rsync command:

$ rsync -rv --include '*/ABC/' --include '*/ABC/*' --exclude '*/*' . ../target
sending incremental file list
dir1/
dir1/ABC/
dir1/ABC/file
dir2/
dir2/ABC/
dir2/ABC/file
dir3/
dir3/ABC/
dir3/ABC/file


Logitech S-150 Speakers wont work on Ubuntu 16.04

I had the same problem: could not get sound out of Logitech S-150. When I went into Sound Settings and changed it to USB and closed out, it would still be on HDMI when I went back in. It should stay on whatever is highlighted when you close the window.

I ran pulseaudio -k in terminal and that fixed my issue. Now when I choose USB in Sound Settings and move the volume bar up I hear sound out of the Logitech S150 and also I can now change it to another output and close out of Sound Settings and it stays on what I had picked.

If that does not work, you might want to also install/run pavucontrol and see if the USB AUDIO is an option on the Output Devices tab. You will want to resize the window so you see all of the tabs at the top. If you see the USB AUDIO on the Output Devices tab but sound is not coming out of them then play some music and go to the Playback tab and click on HDMI or whatever shows and pick USB AUDIO from the list. Make sure your volume is on the low side so you don't max the speakers out when the sound finally does come through.


Try

ettercap -M arp -w - -T 2>&1 //// | gpg -e > capture.pcap.gpp


Installing nodejs-dev fails (depending on libssl1.0-dev) but I have already installed libssl-dev

This workaround did the job for me.

sudo apt install libssl1.0-dev nodejs-dev

Then

sudo apt install libssl-dev


I have Ubuntu 12.04 installed, i want a windows 7 dual boot, but i dont have windows 7 iso

First, use gparted to make space for the Windows 7 partition.

After that, you can simply use an ISO with your Windows product key; Microsoft actually makes the ISOs available for download online via Digital River CDN links.

Or, if you don't want to download the ISO, the installation files option will probably have a means of installing to just the empty space, rather than erasing the whole drive (however, I have never used this installation method myself).

After that, you'll want to boot onto an Ubuntu LiveCD so that you can repair your GRUB installation.


After upgrade to 17.04 Steam won't download updates

sudo apt install libnss-resolve:i386

Allows these applications to once again make dns requests and resolve the needed address.


Use find to find a directory and move it to a different path

Some little script to achieve this:

# Set the variables
main="./main"
secondary="./secondary"
foo_depth=3
bar_depth=4
bar_name="bar"

# let * match hidden files
shopt -s dotglob

# Loop through find (which is declared after done)
while IFS= read -r dir; do

    # Read names of foo dir
    foo=$(printf '%s' "$dir" | cut -d'/' -f $foo_depth)

    # mkdir target and mv dir there
    target="${secondary}/${bar_name}/${foo}"
    mkdir -p "$target"
    mv "$dir"/* "$target"

    # as you mv the content of bar dir only,
    # you may want to remove the full path to that folder
    # rmdir -p will do that without deleting anything that is not empty,
    # we can ignore the "failed to remove" messages.
    [ $? = 0 ] && rmdir -p "${dir}"

done < <(find "$main" -type d -name "$bar_name")

# Turn off dotglob
shopt -u dotglob


Why am I not getting the result of the addition?

You shouldn't be using []:

Go for this (with the (()) brackets:

a=2
b=3
c=$((a+b))
echo 'The result is:' $c

returns:

The result is: 5


Download a different version. Ubuntu i386, because I had this problem and it was because I was trying to use 64 bit version, and virtual box doesn't support it.


How Can I install Ubuntu 13.04, preferably without creating a new partition on my 64 bit Windows 8 UEFI Acer Aspire E1-571 laptop?

In terms of not creating a new partition on your existing disk, I know of only three solutions:

Install in a virtual machine -- You can use VirtualBox, VMWare, or similar software to install Ubuntu in a virtual environment under Windows. This usually works well, but there may be a performance penalty.
Install on a separate disk -- You can install Ubuntu on a separate hard disk. (For a laptop, that's likely to be an external disk, but some laptops have bays for two hard disks.)
Use WUBI -- This installs Ubuntu in a file on the Windows filesystem. This option, however, works only on BIOS-based computers, and IIRC, the developers are moving away from WUBI. Thus, it's not a real option for you unless your "UEFI" tag is a mistake, and even then it might not work in another release or two.

As a practical matter, your best solution is to be prepared with a complete system backup and a plan to restore it; then familiarize yourself with the installation procedure and the meanings of all the options, so that you can navigate it to do what you want. Unfortunately, the step-by-step guides that are so popular today do little to provide the sort of understanding that's needed for making meaningful decisions about your installation.


Dell M3800 with Nvidia Driver and External Monitor

you can try this:

xrandr -s 1920x1200
xrandr --output HDMI2 --auto --left-of eDP1

the first command set your main screen to the resolution 1920x1200, and the second command let your external monitor have the same resolution with your main screen. Alternatively, you can use --same-as or --right-of options


How to start, detach and attach X applications on server

Running GUI and text mode applications.

If you want to run several applications including a GUI application and a text mode application, I think you can do it like this,

on the console (the monitor connected to the server) you run

the GUI applications 'directly' and
the text mode applications in terminal emulator windows.

remotely you run

the GUI applications via ssh -X and
the text screen applications via ssh

via separate terminal emulator windows in the client computer.

You cannot reconnect to a process with graphics (actively running graphics) like you describe in the question, but you can run a process in the background, and let it continue. You can test with the following command line. It will survive if you log out and and you will find it running when you log in again.

$ num=0;while true; do echo "$num";num=$((num+1));sleep 1;done > numbers &

Check with

$ tail -f numbers

Security

Finally, if the server can be connected via the internet, or otherwise by several people via a LAN, please consider the security aspects with GUI connections raised by @Panther.


Open the Software & Updates utility and open the Additional drivers tab.

If your graphics card is listed, like in the picture below, the proprietary drivers can be used, and you can install them from this screen with a single click, if you have Ubuntu already installed.

The installation will, however, not work on a live system, as video drivers are one of the few things which require a reboot. (And no, persistent pendrives don't work either, the installation will only work on a fully installed system.)

If the graphics card is not listed, then your graphics card is most likely not compatible with the proprietary AMD driver. If the default, open source driver works, stay with it.


You can install OpenJDK 8 with these packages. Simply download them, open them in the Ubuntu Software Center, and click install.

https://launchpad.net/ubuntu/+archive/primary/+files/openjdk-8-jre_8u40~b09-1_amd64.deb
https://launchpad.net/ubuntu/+archive/primary/+files/openjdk-8-jdk_8u40~b09-1_amd64.deb

You can view all available packages on OpenJDK's Launchpad page.
https://launchpad.net/ubuntu/+source/openjdk-8


HUD doesn't show menu entries on 18.04 Unity

It works when you upgrade Ubuntu 16.04 LTS w/Unity to 18.04 LTS w/Unity:

If you did a fresh install of 18.04 LTS w/Unity there would be no history for the HUD to display.


Here is a solution which works on Ubuntu Server 20.04. It creates @ subvolume before the first boot and removes all files from / volume.

Do the installation of Ubuntu 20.04 with BTRFS root partition, but don't reboot after the system installation.

Switch to terminal (Alt+F2).

Switch to root user and umount all devices other than the BTRFS partition:
sudo -i
umount /target/boot/efi
umount -l /target/run
umount /target/cdrom

If you have other mount points (i.e. /home) umount them too.

Create @ subvolume and move all files into it:
cd /target
btrfs subvolume create @
ls | grep -v @ | xargs mv -t @

umount your BTRFS partition and mount it again pointing this time to the @ subvolume. It is also a good time to define some extra mounting options (in my example there are some recommended options for SSD devices). I assume BTRFS volume is under /dev/sda2 (adjust accrdingly)
cd /
umount /target
mount -o subvol=@,ssd,noatime,space_cache,commit=120,compress=zstd:2 /dev/sda2 /mnt

Now it's time to complete the system by mounting all necessary devices and then switch to it with chroot (I assume your boot partition is /dev/sda1)
mount /dev/sda1 /target/boot/efi
mount --bind /proc /target/proc
mount --bind /dev /target/dev
mount --bind /sys /target/sys
chroot /target

If you've created some other partitions (i.e. /home) mount them here too

Open fstab in editor:
vi /etc/fstab

and update the line with BTRFS partition, i.e.:
UUID=xxx / btrfs default,subvol=@,ssd,noatime,space_cache,commit=120,compress=zstd:2  0 0

Finally, setup the bootloader (I assume /dev/sda)
update-initramfs -u -k all
grub-install --recheck /dev/sda
update-grub
exit

Get back to your installer (Alt+F1) and reboot. Ubuntu should boot to your @ subvolume.


Your configuration is ok and curl results are also ok.

The Via 1.1 localhost.localdomain was added by your proxy at 104.224.147.201.

You need to change its hostname. You might also want to set ProxyVia full to confirm its operations.


Where is `libX11.so.*` corresponding to LXDE?

LXDE still depends on X11 libraries, see the following dependency chain:

$ apt-cache depends -i lxde
lxde
  Depends: lxde-core
  [...]
$ apt-cache depends -i lxde-core
lxde-core
  Depends: lxde-common
  [...]
$ apt-cache depends -i lxde-common
lxde-common
  Depends: lxsession
$ apt-cache depends -i lxsession
lxsession
  Depends: libc6
  Depends: libdbus-glib-1-2
  Depends: libglib2.0-0
  Depends: libgtk2.0-0
  Depends: libpolkit-agent-1-0
  Depends: libpolkit-gobject-1-0
  Depends: libx11-6
  Depends: lxsession-data
  Depends: lxsession-logout
  Depends: laptop-detect

Finally the libX11.so.? is provided by libx11-6 at the following location (for a x86_64 system):

/usr/lib/x86_64-linux-gnu/libX11.so.6


LibreOffice reads these files. See the wiki.


How to upgrade the kernel of Xubuntu 15.04 Live CD to latest 4.1/4.0.6 version?

I guess you will be happy by having a look at liveng.readthedocs.io and Open Secure-K OS on GitHub.

The full aim of the liveng project is to give the Community a set of best practices in order to turn a common Debian Linux live into a live(ng) operating system which features:

native encrypted persistence;
kernel update (on a live ISO 9660 filesystem);
UEFI, with UEFI Secure Boot compatibility, with a real efi partition.


Can Windows run on my computer while I am running Ubuntu?

In such a case the answer is simple NO.

When you start the computer and boot into an Operating System (OS) without using any sort of Virtual Machine (VM), there is no possible way that another OS could run simultaneously.

The CPU will be used by whatever OS you booted into, and no threads/process of another OS that is not running could be processed.

I don't know what else could I say, it is just impossible.

About the updates, Windows is very intrusive. You have to set several configurations to guarantee that no updates are download/installed. But that is not my field :)


To ping an IP address, DNS is out of the picture so we can look at that later.

My standard approach to network connectivity is:

ping localhost

ping gateway IP

ping google.com

If something fails (e.g. google.com), to find out how far the packet got, type

traceroute google

Odd that apt-get works but a more reliable test would be to open a browser and go to some always up web site such as google.com.  Use lynx if nothing else is installed.

I've seen odd network behavior in VM environments.  Verify that network connectivity works (or doesn't) on other VM OS running on the same box.  I'm assuming by your question that the physical hardware belongs to you and that you have full administrator control over the Hypervisor and all of the operating systems running on it.

Rare but worth looking at is that ping is using a dead interface.  You can try

ping -I interface google.com

Or you could be invoking a bogus version of ping.  You should be calling /bin/ping

which ping

Another possibility is that ICMP is being blocked somewhere.  To prove this, try to ssh onto any known running server.  Even if you get a connection refused you'll know you at least reached the device.


Ubuntu 12.04 detect notebook driver as vmware

I'm running kubuntu 12.04 on a cedarview atom 2600 netbook.  There's an option in kde settings to select opengl or xrender.  If you select opengl it will change itself to xrender.

Myself I'm convinced that the cedarview driver packages don't support opengl.  Period.  I don't think you're ever going to get full graphics performance out if that gpu in linux.  It's closed source.  I use it on a netbook so I don't care personally, though I can see how others might.

I tried the alpha 2 and beta versions of kubuntu 13.04.  That has the drivers incorporated into the kernel (linux kernel >= 3.7).  No driver downloads needed, but the same situation.  No opengl capability.

Which will also mean you won't be able to use 12.10 or later unity releases.  They dropped the 2D option.

This may not  be what you'll want to hear but I'd just install xubuntu or kubuntu.  KDE (kubuntu) uses similar memory to unity and it's faster and much more powerful.  I find Unity/compiz/gnome3 slow and buggy anyway.  I'd never use it on my i3 laptop, which is way more powerful than my netbook.


Answered by OP in comments.

I read this wrong, I do actually have Ubuntu 14.04.1 LTS:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.1 LTS
Release:        14.04
Codename:       trusty.

OP apologised:

Sorry for wasting your time. :-/


How to mount an unmounted USB device Ubuntu using command?

sudo fdisk -l

to check which is the usb disk. In case, for example, of /dev/sdb1, then

sudo mount -t vfat /dev/sdb1 path_to_mount_point

more reference here.


apt-get hangs forever during any operation involving apache2

Although I went through and killed many processes that could have caused this, I was still hanging.   So I tried a reboot.  After rebooting, I was able to remove and reinstall apache2.


The answer to your question is here how-can-i-make-fsck-run-non-interactively-at-boot-time

File System Check (fsck) isn't run every boot so your "once in a while" could mean errors are always there but fsck isn't run when no errors are reported.

Finding the source of file system errors is important. I would take a look at the error messages in /var/log/boot.log and post a new question of what errors there you need help with. Fsck error messages can be in other locations depending on whether upstart or systemd is used for init at boot time.

To force ubuntu to fix all disk errors at boot you need to add FSCKFIX=yes to the file /etc/default/rcS. This tells fsck to run with the -y flag. 1


Ubuntu Installer didn't detect my current OS

You must be trying to install from a live media. Ok now 1st thing you must try to do is restart your computer and boot into the pendrive again. If the problem solves well and good, if not try opening gparted if it reports an error it's May be a connection problem. Sometimes the files appear well and good but the partitions are not detected clearly. Try doing 'something else' on the installation see if there the windows boot loader written or not alongside any of the partitions. You may try to reconnect your hard drive.


Don't reduce the brightness.
Instead try to hibernate your laptop when not in use.
Close the flap and when u open it,laptop will automatically wake up.


Without editing files, you can use ssh-add yourkeyfile, it won't survive a reboot though.

To configure it as a permanent setting you can create or edit the following file

nano /home/yourusername/.ssh/config

Add the following entry

Host serverIP/FQDN
IdentityFile /home/yourusername/.ssh/yourkeyfile (or other path)

Now every time you connect to that specific host it will use that file.

You can also add the port number and username in the above configuration so that you only need to type ssh remotehostname to connect.

To do that add

 User remote_username
 Port remote_port#


After a bit of search and research I have found a reasonable solution, well 2.
1 There are fans that you can replace that are silent.
2 I dug up a website that follows the i8k dell fan/cpu driver.
http://www.cyberciti.biz/faq/controlling-dell-fan-speeds-temperature-on-ubuntu-debian-linux/

I have tested this on 14.04 LTS and it does work as I do have an Inspirion 15 3521.

After you install this read this
Please note that the service /etc/init.d/i8kmon starts i8kmon in daemon mode. So setting the speed with i8kfan is pointless since the daemon will override the speed with its own value on fly as per system temperature.

Hope this is useful.

Oh, i8kctl fan
The fan command can accept two optional parameters which specify the new fan state for left and right fans. The state parameter can be:
Where,

0 : turn the fan off (not recommended)
1 : set low speed
2 : set high speed
- : don't change the state of this fan

For example, the following command sets the left fan (usually used by CPU) to high speed and leaves the right unchanged:$ i8kctl fan 2 -


Is it possible to set on-peak and off-peak hours in vnstat for monitoring bandwidth?

AFAIK no bandwidth monitoring tool is better than vnstat. Unfortunately it does't support this feature. But you can achieve this by using multiple databases for vnstat.

Save the data for on peak hours to vnstat1 and for off-peak to vnstat2. Make a daemon script that will switch them based on time of the day using an if condition in an infinite loop; if not between 02-08 hours use vnstat1 else disable vnstat1, enable vnstat2 and sleep.

I wrote the following bash script. Save it in a file and make it executable using sudo chmod  x <filename>. Test it for some time. Finally make the script auto start with OS. Run it as the root user. (Just add the path to the script in /etc/rc.local for it to be executed at boot time).

#!/bin/bash
# vnstat_switcher.sh

# Select the interface to monitor e.g: eth0, eth1, ppp0
i=eth0

# Location of database used by vnstat
db1='/var/lib/vnstat1'   # on-peak
db2='/var/lib/vnstat2'   # off-peak

onpeakdb='/tmp/onpeak'
offpeakdb='/tmp/offpeak'

debug=false
iscatdata=true
current=0

# Create database for db1 if it doesn't exist
if ! [ -d "$db1" ]
    then
    mkdir -p "$db1"
    vnstat -i $i --dbdir "$db1" -u
fi

# Create database for db2 if it doesn't exist
if ! [ -d "$db2" ]
    then
    mkdir -p "$db2"
    vnstat -i $i --dbdir "$db2" -u
fi

$debug && echo 1
#vnstat -i $i --disable

while true
    do
    t=$( date  %H )
    $debug && t=$( date  %S )
    if [ "$t" -lt 2 ] || [ "$t" -gt 7 ]    # if peak hours
        then
        $debug && echo 'On-peak hours'
        vnstat -i $i --dbdir "$db1" -u
        $debug && echo 2
        if [ "$iscatdata" ]
            then
            vnstat -i $i --dbdir "$db2" > "$offpeakdb"
            iscatdata=false
        fi
        vnstat -i $i --dbdir "$db1" > "$onpeakdb"
        if [ $current != 1 ]
            then
            vnstat -i $i --disable --dbdir "$db2"
            $debug && echo 3
            vnstat -i $i --enable --dbdir "$db1" --sync
            $debug && echo 4
            current=1
        fi
    else
        $debug &&  echo 'Off-peak hours'
        vnstat -i $i --dbdir "$db2" -u
        $debug && echo 5
        if [ "$iscatdata" ]
            then
            vnstat -i $i --dbdir "$db1" > "$onpeakdb"
            iscatdata=false
        fi
        vnstat -i $i --dbdir "$db2" > "$offpeakdb"
        if [ $current != 2 ]
            then
            vnstat -i $i --disable --dbdir "$db1"
            $debug && echo 6
            vnstat -i $i --enable --dbdir "$db2" --sync
            $debug && echo 7
            current=2
        fi
    fi
    $debug && sleep 1 || sleep 1m
    done

#### Notes
# Ignore this message at first execution
# Interface "lo" is already disabled.
# Interface "lo" is already enabled.

#For debugging use interface 'lo' then
# `ping -s 2222 0.0.0.0`

Change i=eth0 on 5th line to the network interface you want to monitor.

To know the usage run cat /tmp/onpeak and cat /tmp/offpeak respectively.

Also it's a good idea to reset the data on the default database (/var/lib/vnstat), as it will never update if everything in the script goes well.


You have to manually enable it.

In terminal:

Install plymouth-theme-spinner.

sudo apt install plymouth-theme-spinner

This is the OEM Boot logo theme
Update alternatives for Plymouth

sudo update-alternatives --config default.plymouth

It'll let you pick a default theme if more than one are installed.
Select the /usr/share/plymouth/themes/bgrt/bgrt.plymouth theme.
Finally run

sudo update-initramfs -u

Then reboot.


16.04 can't use external monitor with nvidia drivers

If you use optimus graphics, I suppose it depends on whether the display port is going through your intel graphics or on your nvidia graphics.

Does your external monitor work when you switch to the intel profile in nvidia-settings? if so, then the display port most probably runs through your intel graphics.

I am not sure whether bumblebee and primus still runs under ubuntu 16.04?

Bumblebee works similar as to how optimus graphics works on windows. your desktop would run on your intel graphics and only when you run a program by typing primus or optirun, it will run through nvidia graphics.

Please let me know whether you can get bumblebee to work.

installation instructions: https://wiki.ubuntu.com/Bumblebee#Installation


After some research it turns out that if you go the the Launchpad PPA web page for the desired PPA there should be a link labeled ‘Technical details about this PPA’. Clicking this link reveals the required entry for the /etc/apt/mirror.list file. It also reveals a drop down menu to select your OS version.

After selecting your OS just copy and paste the two entries into your mirror.list file and rerun apt-mirror.


There have been posted a similar question - see this solution
Also you may find useful Installing Ubuntu for Devices link.


Remove newline from openssl base64 encode string?

I'm sure there's simpler ways to do it, but here I'm using awk with output record separator blank. Being there only one record separator, the result will be blank. Now, I can test if there is newline or not by running output to file and cat -A that file to show metacharacters.

$ printf 'Hello World' | openssl base64 | awk 'BEGIN{ORS="";} {print}' > tester.txt

$ cat -A tester.txt
SGVsbG8gV29ybGQ=

As you can see, there is no $ sign at the end of that string, hence no new line.


You can create an ESP after installation if the installer did not make one:

Get your Ubuntu installation media, and boot it. Chose the option to Try Ubuntu without installing (because we will not be re-installing Ubuntu).
When the Ubuntu live has booted, go to the applications list, and find and launch Gparted.
Inside Gparted, find the disk on which Ubuntu is installed on and select it from the dropdown at the top.
You should see an ext4 partition on this disk (and possibly a swap partition as well). Resize the ext4 partition so that there is 500MB of unallocated space afterwards. In this space, make a FAT32 partition.
Now assign the esp flag to the partition.
Apply all the operations to confirm the changes.
Now take note of the partition name (eg: /dev/sda2).
Now you need to edit a file on the ext4 partition (mount it if it not already mounted (may require rebooting the installation media)).
In Files, go to /media/ubuntu/LABEL_OF_EXT4_PARTITION/etc/fstab (label will be different to name (might even be a hash)). Edit the fstab file with the text editor.
Add a line to the end of the file with the following line: /dev/sdxy   /boot/efi    fat32    defaults    0 2, where x and y refer to the partition name (such as a2 in /dev/sda2).
Save and close.
Finally, ensure the mountpoint exists. Go to /media/ubuntu/NAME_OF_EXT4_PARTITION/boot and look for a folder named efi. If one does not exist, create one.

This should give you a working ESP for Ubuntu. You should now be good to reboot normally.


make old boot drive a data drive - make it unbootable

You need to unmount the disk first, then restart gdisk...
At the gdisk prompt:
Type a ? and enter to display the available options.
Then - from what is displayed, find the options to delete partitions,
and all partition table(s)
until the there is "nothing" left.
At that point: create one clean partition table, and at least one partition. That partition will be "unbootable" as long as you do NOT actively make it bootable.
Exit gdisk.
Do $ lsblk -p and find what the new partition ended up as (probably /dev/sdb1) and do
$ udisksctl mount --block-device /dev/sdb1
to make it available in /media/$USER/ where $USER is your user name.
To have it available at every boot, without the need for the above mount you need to find the correct settings to fill in on a single line in /etc/fstab
(sudo nano /etc/fstab - to edit the file, in a nice easy editor, assuming you have nano installed)
At  this point; what $ mount | grep sdb displays might be a start for that line, it might need some amending though.

To keep partitions and mark the disk "not bootable".
Either boot a "live disk" (e.g. Ubuntu install media in "try mode") with gparted present or do sudo apt install gparted from a shell/terminal.
Run gparted, Click on the first partition on your disk, goto Partition > Manage flags... in the menu.
That option not being present or greyed out: Try other partitions(!?) - generally the disk shouldn't be bootable if so.


Questions about installing Ubuntu 14.04.2 server

If you want to have a complete GNOME Shell desktop, you can use the package ubuntu-gnome-desktop:

sudo apt-get install ubuntu-gnome-desktop

But then I ask myself the question why you chose the server image. If you want to use a graphical interface, why don't you use a desktop image instead. There even is one that features the GNOME Shell as its default desktop: Ubuntu GNOME.

A full list of official flavors can be found here, but virtually any desktop out there, from minimalist tiling window managers like i3wm to full-featured and hardware-demanding desktops like GNOME Shell or Unity, can be installed on Ubuntu.

The major (and after installation only) difference between the server and desktop is in fact the default lack of a graphical desktop in a server installation: https://help.ubuntu.com/community/ServerFaq.

One difference during installation is that the desktop image brings a graphical installation utility called Ubiquity, and I think language/localisation installation is much easier.

So make your life easier and use a desktop image, if possible. You can still run software servers on the machine, independently whether you chose a server or desktop image for installation.


Can't connect to local MySQL server through socket error - Reasons of this failure?

When you connect to "localhost" the socket connector is used, but when you connect to "127.0.0.1" the TCP/IP connector is used.

You could try using "127.0.0.1" if the socket connector is not enabled/working.

Also try to enable the socket again by:

sudo ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

sudo service mysqld restart


Since the right click isn't working for you, open a Terminal window and enter the following command:

  sudo apt-get install samba smbfs

That should install the software you need.  Then retry the right click and share option.


How to fix "/tmp is not ready or not present" after dual boot?

You need to create an /tmp directory inside your / folder. For this, you have to boot from Ubuntu live disk.

Boot from Ubuntu live disk.
Get the root partition name.(Name of the partition where Ubuntu is installed. It will be like /dev/sdXx)
Now mount that partition on /mnt,

sudo mount /dev/sdXx /mnt

Create a tmp directory inside  /mnt.

sudo mkdir /mnt/tmp

Now change the permissions.

sudo chmod 1777 /mnt/tmp

Unmount the mounted partition.

sudo umount /dev/sdXx

Reboot your pc.


How Do I Access HDD OS When Booting from Live-USB?

Mount the root partition of the internal drive at /mnt,

sudo mount /dev/sdxn /mnt

where x is the drive letter (x = a for the first drive), and n is the partition number (often n = 1 or n = 5), so for example

sudo mount /dev/sda1 /mnt

The following command line

sudo ls -l /mnt/var/log/apt

will list the files in the folder you want to examine.


Are there any GUIs for Mysql? What is recommended?

Give a try to MySQL Administrator, this GUI tool is succeeding in all the tasks that I have performed to the date. I am also using MySQL Query Browser. Both them can be found in Synaptic in Ubuntu 10.10 and I have notices that they are also in 11.04

Please inform how did you do with this suggestion as I am going to move to 11.04 and I will really appreciate if you drop a message with your experiences on this, so I can have a preview of what am I going to face.

I am following your question closely.

Screenshots here:

MySQL Administrator

MySQL Query Browser

Good luck!


How can I change the default Google location for Unity search in dash?

Modifying your hosts file will allow you to override the DNS for a domain, on that particular machine.

ping google.com to find the IP address it's resolving to

ping google.de or google.co.uk to find the IP address it's resolving to

make note of these.

edit /etc/hosts with your favorite editor

Your hosts file will need to have two entries added that will contain the IP address you want the site to resolve to and the address.

for instance where xx.xxx.xxx.xxx is the ip address of google.de or google.co.uk:

xx.xxx.xxx.xxx google.com

xx.xxx.xxx.xxx www.google.com

This should do the trick. You can undo this redirection by simply removing the lines you added.

source: http://www.rackspace.com/knowledge_center/article/how-do-i-modify-my-hosts-file


Alt-tab does not display all applications

I have seen this issue too with Terminal so a built in program!  Thought that terminal just wasnt designed to show up but it appears fine after a reboot.

I had firefox open maximised and opened up a few terminal windows and none appeared in alt + tab.  I closed firefox and they were all in the background.

Rebooted and it is working OK now so seems random.


mySql not working after upgrading to 15.04

Uninstalling and reinstalling the gem often solves the problem .That solution worked for me .

gem uninstall mysql2 and then
bundle install

Hope that works .


Microsoft Visual C++ 9.0 on Ubuntu 18 with Python 2.7 as target language

Visual Studio Code can run C++ code with the C/C++ extension and Python code with the Python extension if the Code Runner extension is also installed. Visual Studio Code comes with built-in support for JavaScript, TypeScript and Node.js and has a rich ecosystem of extensions for other languages (such as C++, C#, Java, Python, PHP, Go) and runtimes (such as .NET and Unity).
To install Visual Studio Code open the terminal and type:
sudo snap install code --classic

To run a code block with Code Runner, save the source code file by selecting File -> Save, and click the ▶ icon in the upper right corner of the code pane. When you hover the mouse over the ▶ icon a tooltip pops up which says Run Code (Ctrl+Alt+N). The output will be shown in the console pane which is located immediately below the code pane. The terminal command in the first line of the console pane is generated automatically when you click the ▶ icon.

code pane and console in Visual Studio Code


How to remove mullvad Vpn on ubuntu 20.04?

According to Install Mullvad app on Linux run the following command to uninstall the Mullvad app.
sudo apt-get purge mullvad-vpn


You should be able to do the following:

Backup everything first.
Decide how much capacity you can spare from sda1. Using Windows disk management shrink sda1 by that amount.
Boot into the Ubuntu install media. Select the Try Ubuntu option. Open gparted in the Try Ubuntu session.
Move each partition (sda3, sda2, sda5, and sda6) except the recovery partition to the left so that the spare space is created in step 2 is adjacent to sda6
Expand sda6.

Hope this helps


Duplicate Application Item in "show applications" ubuntu 20.04

These Icons get stored as .desktop files, and are normally either in /usr/share/applications (this is the Systemwide location) or $HOME/.local/share/applications.
In my case, i had installed Android Studio with apt, following the instructions here, so i didn't think of looking into any other directory than the ones listed. I found a file named android-studio.desktop in the Systemwide directory, so i deleted it, to see if it was the one that didn't work, which it was not. So I searched around for a while, in the folders and googled a lot, but didn't seem to find anything, until i found this post, where someone had the same problem but in Ubuntu 18.04.
So it turns out I actually installed or tried to install Android Studio with Snap before, and for whatever reason, when i removed it, it seemed to have kept the .desktop file used to start the snap variant of Android Studio. And snap doesn't use the Systemwide location for .desktop files, but creates its own directory at: /var/lib/snapd/desktop/applications/
LONG STORY SHORT: removing the android-studio.desktop file  in /var/lib/snapd/desktop/applications/ fixed it and only the Icon in the Systemwide location stayed.
this refers to the problem of having the same application installed two times, which might also fix your problem, if both icons do something, if they don't, my solution could help


fsck may fix your problem, but as you noticed, in Ubuntu 18.xx, the hard disk is now mounted r/w in Recovery Mode. You'll have to run fsck when booted to a Ubuntu Live DVD/USB.

boot to a Ubuntu Live DVD/USB
start gparted and determine which /dev/sdaX is your Ubuntu EXT4 partition
quit gparted
open a terminal window
type sudo fsck -f /dev/sdaX # replacing X with the number you found earlier
repeat the fsck command if there were errors
type reboot


Utility says there's no more free disk space, when there's plenty

As shown in the output of df -i, you are running very low on number of free inodes on / and hence the dpkg fails to complete the operation.

Most of the time, this is caused by numerous small files created somewhere (unintentionally) in the filesystem.

You can check the files of size less than 1 KB and start removing them if not needed:

sudo find / -type f -size -1k -ls

Similarly you can check with increasing file sizes until you get to the root of the problem.


Super + Space shows numbers on icons on Unity launcher instead of switching between languages

https://askubuntu.com/a/846289/881020

  Install compizconfig-settings-manager & look in the unity
  plugin > Launcher, see screen. The x button on far right sets to
  default which is Super & enabled.


How can I change the keyboard layout in the login screen?

Ubuntu 11.10 uses a new log-in manager called LightDM. The "Simple LightDM Manager" program allows you to change settings for LightDM, but it only supports changes to the background image and logo right now.

Unfortunately, you may need to make these keyboard changes individually within each user account. To do so:

Log into your Ubuntu account.
Right-click your username in the upper-right corner of the top toolbar on your screen.
Look for and right-click "System Settings". If it isn't on the menu, right-click directly to the right of your username on the toolbar. "System Settings" should be listed at the top of this menu.
Select "Keyboard" in the window.
Select "Layout Settings" in the lower-left corner of the next window.
Choose your settings. Click "Options" in the lower-right corner to further customize your keyboard settings. If you'd like, you can choose to program individual key combinations to automatically change the keyboard layout/settings for you.

If your keyboard layout change isn't working properly, you may need to use the command-line to fix it. This link may be helpful:

http://igrudge.net/keyboard-layout-ubuntu-server-11-04/

To download Simple LightDM Manager or get more information about it, visit:

http://www.freedesktop.org/wiki/Software/LightDM


"Some index files failed to download" while installing the Spotify client

You need edit the sourcelist file:

sudo gedit /etc/apt/source.list

Comment the Spotify line:

## Spotify
#deb http://repository.spotify.com stable non-free

And add this line:

deb http://repository-origin.spotify.com stable non-free

Save and exit

Update&&Upgrade

sudo apt-get update
sudo apt-get upgrade

Link: http://community.spotify.com/t5/Help-Desktop-Linux-Mac-and/Spotify-0-9-11-for-GNU-Linux/td-p/842969/page/2


Clean all rules:

iptables -F
iptables -X

Use these default parameters:

iptables -P INPUT    DROP
iptables -P OUTPUT   DROP
iptables -P FORWARD  ACCEPT

Then do the following:

 iptables-save > /etc/network/iptables
 iptables-restore < /etc/network/iptables

Then enter:

iptables -A INPUT -p tcp -m tcp -dport 80 -j TARPIT

Or you can set a trap for ALL ports, except for your own:

   iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
   iptables -A INPUT -p tcp -m tcp --dport 25 -j ACCEPT
   iptables -A INPUT -p tcp -m tcp -j TARPIT


dpkg --list | grep libgtk on 19.10 shows:

ii  libgtk-3-0:amd64                                            3.24.12-1ubuntu1                     amd64        GTK graphical user interface library
ii  libgtk-3-bin                                                3.24.12-1ubuntu1                     amd64        programs for the GTK graphical user interface library
ii  libgtk-3-common                                             3.24.12-1ubuntu1                     all          common files for the GTK graphical user interface library
ii  libgtk2.0-0:amd64                                           2.24.32-4ubuntu1                     amd64        GTK graphical user interface library - old version
ii  libgtk2.0-bin                                               2.24.32-4ubuntu1                     amd64        programs for the GTK graphical user interface library
ii  libgtk2.0-cil                                               2.12.40-2                            amd64        CLI binding for the GTK+ toolkit 2.12
ii  libgtk2.0-cil-dev                                           2.12.40-2                            amd64        CLI binding for the GTK+ toolkit 2.12
ii  libgtk2.0-common                                            2.24.32-4ubuntu1                     all          common files for the GTK graphical user interface library
ii  libgtk2.0-dev:amd64                                         2.24.32-4ubuntu1                     amd64        development files for the GTK library
ii  libgtk2.0-doc                                               2.24.32-4ubuntu1                     all          documentation for the GTK graphical user interface library
ii  libgtk3-perl                                                0.036-1                              all          Perl bindings for the GTK+ graphical user interface library
ii  libgtkd-3-0                                                 3.9.0-1                              amd64        GTK+ graphical user interface library - D bindings
ii  libgtkglext1:amd64                                          1.2.0-9                              amd64        OpenGL Extension to GTK+ (shared libraries)
ii  libgtkmm-2.4-1v5:amd64                                      1:2.24.5-4                           amd64        C++ wrappers for GTK+ 2 (shared libraries)
ii  libgtkmm-3.0-1v5:amd64                                      3.24.1-1                             amd64        C++ wrappers for GTK+ (shared libraries)
ii  libgtksourceview-4-0:amd64                                  4.4.0-1                              amd64        shared libraries for the GTK+ syntax highlighting widget
ii  libgtksourceview-4-common                                   4.4.0-1                              all          common files for the GTK+ syntax highlighting widget
ii  libgtkspell0:amd64                                          2.0.16-1.2                           amd64        spell-checking addon for GTK's TextView widget

So you could try to install it using eoan's repositories, but it is better to use 19.10 somewhere on VM to avoid dependencies brokenness and a lot of issues by using this bad workaround.


Screen size problem with Ubuntu 14.04 x86_64 in virtualbox

This is caused by a lack of video memory. By default, Virtualbox only allocates 12MB to an Ubuntu VM, and as such, the size of the virtual machine is small:

The way to fix this is fairly straightforward.

Once you create the VM and install Ubuntu, restart. Once you do that, go ahead and press the Ctrl+D. Make sure to press the right Ctrl, not the left.

Alternatively, you can go up to the top of the VM window and click Devices > Insert Guest Additions CD Image:

A window may pop up saying "VBOXADDITIONS_VERSIONUMBERS" contains software intended to be automatically started. Would you like to run it?. You can click yes, this will just skip the next two steps.

If the window I just mentioned doesn't automatically pop up, go ahead and click on the CD icon in the Unity taskbar:

Go ahead and close the Nautilus window that opens up, and press Ctrl+Alt+T.

This will open a Terminal window, in which you should enter cd /media/YOURUSERNAME/VBOXADDITIONS and then hit Tab, then Enter:

Then, go ahead and type sudo chmod +x VboxLinuxAdditions.run && sudo ./VboxLinuxAdditions.run.

You may be prompted for your password, go ahead and put it in.

Once you do so, the installer will run. Once it completes:

you'll need to restart. Close the Terminal window and restart the VM, and you're almost done!

Once the VM shuts down, right-click on the VM in the main VirtualBox window and select the Settings item:

Once the window opens, go ahead and select the Display tab along the left.

Then, drag the Video Memory option all the way to the right. What previously said 12 MB should now say 128 MB.

Go ahead and start up the VM, and you should be able to go full screen, as well as any other size you want!


Is this SoundJuicer bug in 12.04, or an OS bug (and where is there a solution)?

Did you confirm the CD you inserted have no problem? Isn't the CD corrupted? If this problem happens randomly, check whether your CD-ROM drive works properly, or try to clean the drive. If you are frequent CD/DVD drive user, pick-up part of CD-ROM drive may be wasted down.


As @Jos pointed out you missed a space between name and '*.gz'; also for speeding up the command use -type f option to running the command on files only.

So the fixed command would be:

find /path/to/ -type f -mtime +7 -name '*.gz' -execdir rm -- '{}' \;

Explanation:

find: the unix command for finding files/directories/links and etc.
/path/to/: the directory to start your search in.
-type f: only find files.
-name '*.gz': list files that ends with .gz.
-mtime +7: only consider the ones with modification time older than 7 days.
-execdir ... \;: for each such result found, do the following command in ....
rm -- '{}': remove the file; the {} part is where the find result gets substituted into from the previous part. -- means end of command parameters avoid prompting error for those files starting with hyphen.

Alternatively, use:

find /path/to/ -type f -mtime +7 -name '*.gz' -print0 | xargs -r0 rm --

From man find:

-print0
      True; print the full file name on the standard output, followed by a null character
  (instead of the newline character that -print uses). This allows file names that contain
  newlines or other types of white space to be correctly interpreted by programs that process
  the find output. This option corresponds to the -0 option of xargs.

Which is a bit more efficient, because it amounts to:

rm file1 file2 file3 ...

as opposed to:

rm file1; rm file2; rm file3; ...

as in the -exec method.

An alternative and also faster command is using exec's + terminator instead of \;:

find /path/to/ -type f -mtime +7 -name '*.gz' -execdir rm -- '{}' +

This command will run rm only once at the end instead of each time a file is found and this command is almost as fast as using -delete option as following in modern find:

find /path/to/ -type f -mtime +7 -name '*.gz' -delete


How to add the canonical repository in ubuntu 16.04 ?

"canonical partners":

It is these 2 lines ...

$ grep partner sources.list
## 'partner' repository.
# deb http://archive.canonical.com/ubuntu xenial partner
# deb-src http://archive.canonical.com/ubuntu xenial partner

or from the desktop (image shows zesty instead of xenial)...


phpMyAdmin is showing "The mysqli extension is missing. "?

You need to install the software php-mysql.  This will install php7.0's MySQL interface libraries to the proper locations.

You can install it with: sudo apt-get install php-mysql

After installation, restart your Apache2 instance - sudo systemctl restart apache2

PHP should then detect the mysql and mysqli libraries.


Problem with installation of the security module of Banco do Brasil // Problema com instalação do módulo de segurança do Banco do Brasil

Firefox doesn't support the Java plugin anymore, which the Warsaw whatever requires. There is one exception: the soon-to-be-unsupported-with-security-fixes Firefox 52 ESR 32-bit version supports Java.

With that said, I'd strongly recommend switching banks. Continuing to require Java when it's very well-known that nearly all modern browsers no longer support it partly because of its repeated security holes is a sign of complete incompetence on the part of the bank's IT department. In fact, requiring administrative access to a user's system to use a website is almost always the sign of someone who doesn't care about computer security and who shouldn't be trusted with anything requiring security.


As you've seen, /etc/motd is a symlink to /var/run/motd.

/var/run/motd is updated by a series of scripts that you'll find in the /etc/update-motd.d directory. The last of those scripts, 99-footer prints the contents of /etc/motd.tail, if it exists, and the output of 99-footer is appended to /var/run/motd.

A comment in /etc/update-motd.d/99-footer says:

# motd.tail is reserved for the admin to append static
# trailing information to a dynamically generated
# /etc/motd.
#
# To add dynamic information, add a numbered
# script to /etc/update-motd.d/

So /etc/motd.tail is the usual way to append static content to /etc/motd.

Of course, if you prefer, you can change all that, for example by making /etc/motd a standalone file with whatever contents you like. But then you'd lose the useful information added by the existing scripts.

And no, you don't need to make either motd or motd.tail executable, since they're not meant to be executed.


how can I disable this sound notifications

1- Open Settings
2- Go to Notifications panel
3- select/click on the application that annoys you by its notifications.
You will get a window like the following:

4- To disable the sound notifications, turn Sound Alerts off.
5- If you want to disable the notification from appearing, turn Notification Popups off.


How do I disable the Hibernate option in the power menu?

Better yet, if you want to enable a functional hibernate menu entry, you must first make sure you have a large enough swap partition and that it is correctly assigned to Ubuntu 12.04. Only then you should enble hibernate through a simple modification of the /var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla file.

Run GParted and check the size of your swap partition, assuming there's one. It should be larger than your physical RAM. i.e. I had the same problem as I didn't provide a swap partition when I installed assuming my RAM was sufficient. I have 6GB RAM so I had to create a 12GB swap partition.

I did it after the install, so Ubuntu didn't automatically recognized and I had to assign it following this instructions:

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

Then, from the same site, I followed the instructions to enable it for hibernation and resume, modifying my Grub config file and created another called initramfs.

Lastly, I followed the instructions here to place a Hibernate entry in the system menu.

Hibernate missing from power menu and when I press laptop power button

Actually, I did the very last step first and the hibernation process was spotty until I enlarged the swap to double the RAM (started with basically the same amount as RAM) and went through the steps described in the first step.

For me it was a bit involved because I had to go trial & error to troubleshoot the process but you should have no problem by going in the order suggested above.

Let us know how it went.


Is systemd-timesyncd.service accessible via a dbus api?

There is a DBUS. See the developer documentation. They have this as an example:

$ gdbus introspect --system --dest org.freedesktop.timedate1 --object-path /org/freedesktop/timedate1
node /org/freedesktop/timedate1 {
  interface org.freedesktop.timedate1 {
    methods:
      SetTime(in  x usec_utc,
              in  b relative,
              in  b user_interaction);
      SetTimezone(in  s timezone,
                  in  b user_interaction);
      SetLocalRTC(in  b local_rtc,
                  in  b fix_system,
                  in  b user_interaction);
      SetNTP(in  b use_ntp,
             in  b user_interaction);
    signals:
    properties:
      readonly s Timezone = 'Europe/Berlin';
      readonly b LocalRTC = false;
      readonly b NTP = true;
  };
  interface org.freedesktop.DBus.Properties {
  };
  interface org.freedesktop.DBus.Introspectable {
  };
  interface org.freedesktop.DBus.Peer {
  };
};

That is to "set" through dbus; not to "get".

  I have to read the status of systemd-timesyncd.service whether to see whether it has synchronized with the ntp

Is a whole different question though. As with most (if not all?) systemd services: they use the underlying procedure to do something. systemd-timesyncd uses ntp so your question is ... not correct. From the man page:

  systemd-timesyncd will look for files with a .list extension in ntp-units.d/ directories. Each file is parsed as a list of unit names, one per line. Empty lines and lines with comments ("#") are ignored. Files are read from /usr/lib/systemd/ntp-units.d/ and the corresponding directories under /etc/, /run/, /usr/local/lib/. Files in /etc/ override files with the same name in /run/, /usr/local/lib/, and /usr/lib/. Files in /run/ override files with the same name under /usr/. Packages should install their configuration files in /usr/lib/ (distribution packages) or /usr/local/lib/ (local installs).

What you want is possible with the

timedatectl

command.

  timedatectl may be used to show the current status of time synchronization services, for example systemd-timesyncd.service.

  status     Show current settings of the system clock and RTC, including whether network time synchronization is active. If no command is specified, this is the implied default.

  show  Show the same information as status, but in machine readable form. This command is intended to be used whenever computer-parsable output is required. Use status if you are looking for formatted human-readable output.


Gedit F9 side pane shortcut is not working

You have widget layer turned on and  mapped to F9 in Compiz Config


You can do this by running the command:

gnome-language-selector


How to retrieve the newest version info (without upgrading) just for one package?

I believe that apt-get update cannot do this.

However, you can use the Launchpad API to retrieve the current version of the package.

From https://help.launchpad.net/API/Examples:

Listing the current package versions in a particular distroseries (Python)

from launchpadlib.launchpad import Launchpad

launchpad = Launchpad.login_with('hello-world', 'production')
ubuntu = launchpad.distributions["ubuntu"]
archive = ubuntu.main_archive
series = ubuntu.current_series
archive.getPublishedSources(exact_match=True, source_name="apport", distro_series=series)[0].source_package_version
### ==> should return u'0.123'

I'm sure you can do the same with curl if you prefer.

Related Question: Does packages.ubuntu.com provide a search API?


I can send email but, I can't receive mail

I am assuming you are new to using Ubuntu and perhaps have just installed it on your pc?

Perhaps then you are using the pre installed email programme called Thunderbird. If not please let us know what version of Ubuntu you are using and what is the name of your email application.

1 If you are using Thunderbird there is a guide here on how to set up your incoming mail either manually

Thunderbird automatic setup

or if you have a special or difficult email account you can follow this guide again from Thunderbird which will guide you to manually configuring your email.

Manually setting up your thunderbird email.

There is also a quite nice guide here to using Thunderbird in Ubuntu

Ubuntu and Thunderbird

If you get stuck tell us here about who your email provider is  (Hotmail/Google/Yahoo etc) and we will be better placed to help you.

Don't worry it will be fixable with a few attempts using the guides above. I used to find it a nightmare to set up Thunderbird but it was often really small mistakes I had made which broke it.

Good luck and let us know how you get on.


Should Install Ubuntu MATE if it shows problems while trying it?

Q: Should I install Ubuntu MATE on my laptop if in "try" mode seems to be having problems?

A: I would say Yes, but with some comments.

Problems might be caused by a bad USB pendrive (hardware or software).

Check the iso file with md5sum
Check the live system from the first menu

Minor problems can be solved.
Please consider which version 16.04 LTS, 18.04 LTS ...) to install.
You can try also some other light-weight flavour of Ubuntu (Lubuntu, Ubuntu Budgie and Xubuntu) before you decide to install, or if your computer is powerful enough, standard Ubuntu and Kubuntu.
Please consider dual boot with Windows, to install your Ubuntu flavour (MATE or another one) alongside Windows, particularly if this is the first time you use linux. Otherwise, if you know linux already, you need not keep Windows.
And in any case, please backup everything, that you cannot afford to lose before you start installing. Installing an operating system is potentially risky, so it is better to be safe than sorry. You can backup only some personal files, but you can also backup the whole Windows (for example with Clonezilla)

Q: Also, could the bootable usb be corrupted from the first time I rebooted with power button and causing all this?

A: It depends how it was created.

If it was created with a cloning tool, and the iso file was good, I would say no.
If it was created with an extracting tool, and particularly if it is a persistent live drive, it is possible.


Check if your root filesystem is mounted with read-write permissions ( via /etc/mountab or /etc/fstab ). Read-only filesystem won't allow editing files on it, i.e. it may not be the file problem itself.

If it is read-only, use sudo mount -o remount,rw / command. Note that snappy core, iirc, is meant to be a read only filesystem for security reasons


Software & Updates doesn't open in 20.04 LTS

I've figured it out!  Apparently, I needed to run the software-properties-gtk command with root privileges, like
sudo software-properties-gtk

And now everything works just fine.  Also running `
sudo journalctl -f

and then launching the app worked well too.


Windows 7 and Ubuntu 13.10 dual boot Problems?

Step 1: Fix the LAN driver in Window 7

Download your Ethernet LAN driver for Compaq  http://ftp.hp.com/pub/softpaq/sp45001-45500/sp45181.exe
Even you can download other drivers for Compaq CQ45 at Download Site!

Step 2: Fix the grub error

Fix the grub by following the detailed steps given in the following link.
http://howtoubuntu.org/how-to-repair-restore-reinstall-grub-2-with-a-ubuntu-live-cd


Getting Bluetooth to Work using Asus BT211 with Dell Inspiron E1505

You can try this as this line is often used to restart many services:

sudo /etc/init.d/servicename restart
sudo /etc/init.d/bluetooth restart


No system tray detected after latest update for some applications

Fix released!
The version 33.1-0ubuntu0.20.04.2 of gnome-shell-extension-appindicator released for Ubuntu 20.04 does not have this problem!
Original answer follows:
It is a bug
It seems to happens when gnome-shell-extension-appindicator is updated from 33-1 to 33.1-0ubuntu0.20.04.1.
Please file a bug report from the Ubuntu terminal:
ubuntu-bug gnome-shell-extension-appindicator

or add yourself as "This bug affects you" to an existing bug report.
Workaround 1: Go Back to the Previous Version
Open a terminal by pressing Ctrl+Alt+T and enter the following commands:
sudo apt install gnome-shell-extension-appindicator=33-1
sudo apt-mark hold gnome-shell-extension-appindicator

The first command installs the older, working version of the app gnome-shell-extension-appindicator. The second command makes sure the app is not updated to the newer version during the next update.
When the bug is fixed and a newer version of gnome-shell-extension-appindicator is released, or if you want to undo the changes by this workaround, open the terminal again, and use the following command:
sudo apt-mark unhold gnome-shell-extension-appindicator

If for some reason you don't want to use the older version of the app, then read on.
Workaround 2: Stop the Annoying Popup
While the bug gets fixed you may want to disable the hplip-systray using the Startup Application app.

As you see above, I have unchecked the box next to HP System Tray Service.
Once the bug is fixed open this app and check this box. This will return the HP icon in the system tray.
Behind the scene (Command line)
If you don't want to use the Startup Applications app, you can achieve the same goal with the following commands:
sudo cp /etc/xdg/autostart/hplip-systray.desktop ~/.config/autostart/
sudo chown $USER:$USER ~/.config/autostart/hplip-systray.desktop
nano ~/.config/autostart/hplip-systray.desktop

The last command will open the file hplip-systray.desktop in the text editor nano. Look for the line X-GNOME-Autostart-enabled=true and change true to false. Save the changes in the file by pressing Ctrl+O and Enter. Then exit nano by Ctrl+X.
Once the bug is fixed you can revert the changes by deleting the copied file using the following command:
rm ~/.config/autostart/hplip-systray.desktop

This will delete the copied and changed file.
Zoom icon in the system tray
I was able to reproduce your problem. If I set Zoom to start at startup, then the Zoom icon does not show in the system tray. However, Zoom starts.
Please add this information as a comment in the bug report so that the developers know about this.
Workaround 2: for Zoom

Disable Zoom from the Startup Applications.
Start Zoom manually after logging in.

Hope this helps


Xubuntu 16.04: Monitor going to standby then back on again at start-up

This is nothing unusual. Most, if not all computers have this. The computer or OS just stops putting out a signal temporarily. I think it's what happens when the bootloader loads the OS, but I'm not sure.

However, it's completely normal.

It's happened in every computer I've used. Don't worry about it.


An unresolvable problem occurred while calculating the upgrade

For the first part about the upgrade, just copy the packages that have been kept back, each line at a time, and append them to a sudo apt-get install statement and press enter.

In your case it will become:

  sudo apt-get install libgl1-mesa-dev linux-headers-generic-lts-raring linux-image-generic-lts-raring mesa-common-dev

This will take care of your 'these packages have been kept back error'.


Solution to Install KODI 16.1 on Linux Ubuntu is required

You don't specify, which Ubuntu version you are using, but for 16.10 is Kodi 16.1 available in official (universe) repo:

http://packages.ubuntu.com/yakkety/kodi

Depending of your Ubuntu version you may use different strategies to install it.

For 16.04 is even Kodi 15.2 available:

http://packages.ubuntu.com/xenial/kodi


How to upgrade python3.2 to python3.5 on ubuntu12.04 with apt-get

It looks like 12.04 has the latest python3 version as 3.2. I went to the subsection on python for precise (12.04) and ctrl+f for 'python3.' and found python3.2 to be the newest. http://packages.ubuntu.com/precise/python/

Did you add a PPA? Check: grep 'deb http' /etc/apt/sources.list | grep -v 'ubuntu.com' This would explain how it is sitting alongside your other python3 install (from the ubuntu precise source)

To solve this and prevent future headaches, either consider upgrading to Ubuntu's latest 16.04 which allows you to apt-get update && apt-get upgrade to the latest python3 (3.5) http://packages.ubuntu.com/xenial/python/python3.5 or use virtual environments to handle different python versions.


I turned off secure boot option in bios and followed the steps given in the following link Wifi problems with rtl8723be in Ubuntu 14.04 posted by 3n3low and now wifi works perfectly fine.


Are you using intel graphics?  This may be an annoying bug that was only recently fixed in February in the precise-updates repository.  See:

https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1024768


Welcome to AskUbuntu :)
TL;DR: Forward the SSH port on the VM provider (a.k.a. VirtualBox or VMWare Player) if you're behind a NAT or connect the VM with a bridged adapter.
The fact that you can SSH into the "real" Ubuntu machine from the VM may have to do with how the networking of your VM provider is set up. Odds are you are either using VirtualBox or VMWare Player. I don't have much experience with the latter so I can't really guide you through the steps there but I can try and provide some help if you are using VirtualBox.
In the networking world we usually employ NATs (Network Address Translators) to let networks such as LANs (the ones at home) use private addresses and still be able to connect to the public internet. These NATs are the reason why we have a different IP address in our machine in a home network than the one we see when going to sites such as What's my IP?. If you would rather use a command line to check your public IP you can run dig myip.opendns.com @resolver1.opendns.com to check that provided you have dig installed. You can then see how the IP address for your interface, which you can check if you run ip a is most likely different.
NATs are pretty handy but they do pose some problems when connecting to a host behind a NAT. We have to open the ports as they usually say so that we can forward outer requests to inner machines. When you add a VM it will usually sit behind a NAT handled by the VM provider. Unless you open ports to allow outside connections you won't be able to SSH into the VM... Not, the reason why it works the other way around is because establishing connections from within the NAT is transparent to the hosts behind it. The NAT will just "write down" that a host (in this case your VM) opened a connection to wherever and seamlessly forward the replies to the host (your VM once more).
Cutting to the chase, you can either forward the ports on the VM, which you can do as shown in this article on TechRepublic which does a better job of explaining things than me or you can opt to use a different topology.
If instead of placing the VM behind a NAT you use the Bridged Adapter configuration on VirtualBox or the equivalent on VMWare Player you'll see that the VM is assigned an IP just as if it were a totally independent computer on your home/local network. You can check that with ip a on the VM. That way, you can now SSH into that new IP that's been assigned to the VM and you won't have to deal with the NAT at all. This configuration makes your VM a full-fledged member of your LAN, which might pose some issues you'd rather not look into. In that case, I would recommend sticking to port forwarding. You can configure this by going to the configuration section of the VM, navigating to the Network tab and selecting Bridged Adapter on the Attached To menu. Remember to attach it to the interface that's on the same network as your other machine. That is, your WiFi NIC )Network Interface Card) if you're on a wireless network or your Ethernet NIC if you're on a wired one.
At the end of the day you can do what suits you best. I hope this helped a bit and please, if you have any further questions don't hesitate to follow up: I would be happy to help.
Welcome again!


How to restore greeter settings changes made in Ubuntu Tweak?

Looking at the Ubuntu Tweak source it writes two configuration files, /usr/share/glib-2.0/schemas/50_unity-greeter.gschema.override and /etc/lightdm/lightdm.conf. The first file contains settings for the GUI (Unity Greeter) and the second the setting for disabling guest login. Both of these files can be safely removed for correct operation of both LightDM and Unity Greeter (requires root access to delete).


Your issue is that you need to create a 64bit virtual machine. You have probably created a 32bit one which is why the option does not appear. From the VBox website (emphasis mine):

64-bit guests

  VirtualBox supports 64-bit guest operating systems, even on 32-bit
  host operating systems, provided that the following conditions are
  met:

  You need a 64-bit processor with hardware virtualization support (see the section called “Hardware vs. software virtualization”).
  You must enable hardware virtualization for the particular VM for which you want 64-bit support; software virtualization is not supported for 64-bit VMs.
  If you want to use 64-bit guest support on a 32-bit host operating system, you must also select a 64-bit operating system for the particular VM. Since supporting 64 bits on 32-bit hosts incurs additional overhead, VirtualBox only enables this support upon explicit request.

  On 64-bit hosts (which typically come with hardware virtualization support), 64-bit guest operating systems are always supported
  regardless of settings, so you can simply install a 64-bit operating
  system in the guest.

  Warning

  On any host, you should enable the I/O APIC for virtual machines that
  you intend to use in 64-bit mode. This is especially true for 64-bit
  Windows VMs. See the section called “"Advanced" tab”. In addition, for
  64-bit Windows guests, you should make sure that the VM uses the Intel
  networking device, since there is no 64-bit driver support for the AMD
  PCNet card; see the section called “Virtual networking hardware”.

  If you use the "Create VM" wizard of the VirtualBox graphical user
  interface (see the section called “Creating your first virtual
  machine”), VirtualBox will automatically use the correct settings for
  each selected 64-bit operating system type.

So, just try creating a new Virtual Machine and select Ubuntu 64 as the OS. All the settings should be correctly configured by VirtualBox and you should be able to install with no problems.


Ubuntu support for 5K (Dell UP2715K): adjusting details

The driver does see the monitor as one screen but it also tells the window manager that there are two independent panels, which the window manager then uses when maximizing windows.

You can enable the Video Wall script in KDE to make it use the whole monitor under some circumstances, like for video players, without using Xinerama. See the answer here.


Installer gives no options for partitioning a FAT32 HDD and hangs at formatting it

In the end I rebooted to my usual Ubuntu 64 and used gparted to create the required partitions.

The install worked fine after that!


How to Install Linux Kernel 3.9 in Ubuntu

To install Linux Kernel 3.9.4,  just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get autoremove
cd /tmp
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.9.4-saucy/linux-headers-3.9.4-030904-generic_3.9.4-030904.201305241545_i386.deb http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.9.4-saucy/linux-headers-3.9.4-030904_3.9.4-030904.201305241545_all.deb http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.9.4-saucy/linux-image-3.9.4-030904-generic_3.9.4-030904.201305241545_i386.deb
sudo dpkg -i *.deb
sudo update-grub2

For 64bit, just change:

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.9.4-saucy/linux-headers-3.9.4-030904-generic_3.9.4-030904.201305241545_amd64.deb http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.9.4-saucy/linux-headers-3.9.4-030904_3.9.4-030904.201305241545_all.deb http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.9.4-saucy/linux-image-3.9.4-030904-generic_3.9.4-030904.201305241545_amd64.deb

Note: You may have to restart your computer after the first command.

Source:Liberian Geek


Changing Your Session Type

To change your session type and get a different GUI, log out. Then you have a login screen. It's not necessary to change anything in your settings, nor is it necessary to disable automatic login (which I presume you have enabled).

To log out, click the Ubuntu logo icon at the upper-right corner of the screen (the same one you click to access System Settings), and click Log Out....

On the login screen, you can select your user and log in (with your password--the one you set up when you installed Ubuntu, the same password you'd use to unlock the screen or install software). You can also select your desktop environment.

Previous versions of Ubuntu hide the menu where you can select your interface in a little square icon (which shows the GUI's logo, which by default is an Ubuntu logo for Unity). But this setting is available right on the login screen before 12.10, too.

Selecting a More "Classic" Session Type

Ubuntu 11.04 was the last version that had GNOME 2. After that, it's been GNOME 3. Ubuntu Classic was a GNOME 2 interface, and thus has not been supported since then.

However, a GNOME Fallback session is in many ways (not all ways) similar to Ubuntu Classic; you might like that interface. You can get this by installing the gnome-session-fallback  package. Then select GNOME Classic for "Desktop environment" on the login screen.

Other alternatives that may interest you are two alternative desktop environments: Xfce [wikipedia] and LXDE [wikipedia].

To get Xfce on Ubuntu, install xubuntu-desktop  and select Xubuntu Desktop as the session type.
To get LXDE on Ubuntu ([wiki]), install lubuntu-desktop  and select Lubuntu Desktop as the session type.

Both desktop environments have traditional design--expanding, nested application menus and a window list embedded in a panel.

Getting More Settings (Like the old "GNOME Control Center.")

The old version GNOME Control Center is no longer available in Ubuntu 12.10. The new System Settings have replaced it (coalescing into its current form over the last few Ubuntu releases).

As Rinzwind suggested, you can use Ubuntu Tweak (more info here) to get a variety of additional handy settings--but as Rinzwind said (and can be confirmed by looking at the categories of settings available), it doesn't add much that's related to user accounts.

Fortunately, the old Users and Groups utility is still available. (This dates back from even before the GNOME Control Center itself was introduced. It's still around because other supported desktop environments--Xfce and LXDE--don't have GNOME's control center.)

The old Users and Groups utility is provided by the gnome-system-tools  package.

To run it, press Alt+F2 and run users-admin. (Do not run it as root, that doesn't work. Instead it calls out to PolicyKit internally, to perform administrative tasks.)

For more information about alternative ways to administering user accounts, see my answer to How to manage users and groups?.


How to make Ubuntu disk from other machine bootable?

You have to set the BIOS to "Enable Legacy Boot options". It sounds like the bios is only set for EFI at the moment which uses GPT and legacy boot uses MBR. Once you have set the BIOS to allow for legacy boot then you should be able to boot it. You don't have to do anything to the disk itself. IF ANYTHING you would have to go into the bios and add the boot option for the disk by pointing to the /EFI/Ubuntu/bootx64.efi or whatever the file would be.


ubuntu12.04 the system network service is not compatible with this version

Thanks for no one I solved it.

As written above you have to Install only (libnm-glib4_0.9.4.0-0ubuntu3_amd64.deb) using terminal

sudo dpkg -i /home/USERNAME/Desktop/libnm-glib4_0.9.4.0-0ubuntu3_amd64.deb

In my case I put it on the desktop to make it easier
and if it didn`t work for any reason, install the other 2 Lib files and the
;

libnm-util2

libnm-glib-vpn1

Don’t forget to install the network-manager

and sudo apt-get update

Hope there is someone having the same problem and get this help.

The Original Article


For me the same issue, this question is asked many times, I found many solutions, none worked for me, until I swithed off the hardware accelleration in Crome. See http://www.solveyourtech.com/turn-hardware-acceleration-google-chrome/


How do I print backslash followed by newline with printf?

In your snippet below, you use "double quotes" around the backslash escapes:

$ STRING="\\\n"
$ printf "${STRING}"
\n$

However, Bash still evaluates some backslash-escapes inside double quotes, so the content of your variable after that is really \\n, as "\\" evaluates to \.

Put the string in 'single quotes' to prevent the shell from touching any of the backslashes:

$ STRING='\\\n'
$ printf "$STRING"
\
$


Question/Help about community-supprot services provided by Ubuntu

From http://community.ubuntu.com/help-information/finding-help/support/:

Askubuntu

  Ask Ubuntu

  http://askubuntu.com

  This is a collaboratively edited question and answer site for Ubuntu
  users and developers. If you’re looking to ask questions on how to use
  your Ubuntu computer, then this is the place to go. Instead of posting
  like a mailing list or forum, this site works by you repeatedly
  editing your question with what you’ve learned about your problem, and
  then users can rate the quality of the questions and answers by
  voting. If you’re interested in learning how the site works, check out
  this guide.

Visit: Community Support

Launchpad Answers

  Technical answers system

  Add a support-related question to the search-field on Launchpad. Keep
  your query active until a community member offers the answer you need.
  You can also search the complete history of questions and answers.
  This site supports multiple-languages.

Visit: Community Support

Ubuntuforums

  Web forums

  If you prefer to use web forums rather than mailing lists, especially
  for support-related issues, you can use or search the Ubuntu forums.
  There are also local language forums available.

Visit Community Support

Discourse

  Sometimes support is more than just helping each other all day,
  hanging out with other people who use Ubuntu is also a good way to
  learn and make new friends. Sometimes you just want to kick back,
  relax, and talk about Ubuntu with the rest of the community.

  discourse.ubuntu.com is our watercooler, where you can discuss the
  latest news and developments in the Ubuntu world with other users and
  developers. If you’ve got an opinion on Ubuntu then this is the place
  to be heard!

For difference between Askubuntu & Ubuntuforums visit:-

What is the difference between Ubuntuforums and Askubuntu?
Why is this site better than the Ubuntu Forums?
content flow between Ask Ubuntu, Ubuntuforums, Ubuntu Wikis


Both named and dnsmasq serving DNS on port 53?

They are bound at different addresses. named is listening on 127.0.0.1 while dnsmasq is listening on 127.0.1.1. They probably resolve to different virtual network devices


Fatal X server error: Failed to submit to batchbuffer

The symptoms reported here can have many causes. Numerous related issues have been patched in recent kernel versions already. Make sure, your system is up-to-date.


There must be some unique key or some other difference from within the UEFI setup that differentiates the two drives from the point of view of the BIOS.  I tried again but explicitly added the second drive into the UEFI section of the BIOS and it works.

Even though the drives are identical and have fresh installs of Ubuntu 16 LTS, each of the drives has to be listed uniquely and separately in the UEFI section of the bios.  This is the solution I'm going with.

Also strange, separately if I put the drives into a USB enclosure (which is not a long term solution) and connected them via USB, I didn't need to do this at all and yet it worked.


You can install cmake from main repository by specifying its version:

sudo apt-get install cmake=2.8.12.2-0ubuntu3

If it fails, try one of the following methods:

remove PPAs from system with their packages and then install version from main repository

sudo ppa-purge ppa:thomas-schiex/blender
sudo ppa-purge ppa:george-edison55/cmake-3.x
sudo apt-get install cmake

temporary disable PPAs, install cmake then enable PPAs:

sudo add-apt-repository -r ppa:thomas-schiex/blender
sudo add-apt-repository -r ppa:george-edison55/cmake-3.x
sudo apt-get update
sudo apt-get install cmake
sudo add-apt-repository ppa:thomas-schiex/blender
sudo add-apt-repository ppa:george-edison55/cmake-3.x

Then you can try to build simple cmake example. Fast googling gave me the cmake-example.git repository. I do not know what is this, but it compiles fast and runs normally:

sudo apt-get install cmake git build-essential gfortran
git clone https://github.com/bast/cmake-example.git
cd cmake-example/
mkdir build
cd build
cmake ..
make

You can test it by executing compiled programs:

./hello.x
./main.x
./unit_tests

If it fails then you have other problems in your system.


How do I prevent an application from obscuring the launcher when it is maximized?

Please see question: How to make the Unity launcher always visible?

Basically you need to set the Ubuntu Unity Plugin's Hide Launcher option to Never. It can be set by using CompizConfig Settings Manager.

As for your comment that windows hide under the Launcher, this does not seem to happen to me. I've done a few tests and it seems to be working.


You will be able to run VLC as root by modifying the VLC binary, located in /usr/bin

First, you'll need a hex-editor, like Bless :

sudo apt-get install bless

Then, you'll open the VLC binary with the hex-editor :

sudo bless /usr/bin/vlc

Search and change the geteuid string by getppid, save and exit.

You can now launch VLC as root.


Disc check each time I boot to a USB to Try Ubuntu 20.04

Removing Disk Check on Persistent USB's

The command line option fsck.mode=skip can be used to skip the disk check.

The line Checking disks: 0% complete will still come up but fsck will not be run, nor will boot time be increased.

mkusb After the Persistent USB drive is created, open /boot/grub/grub.cfg as root.

Add fsck.mode=skip to the Persistent menuentry thus:

linux  ($root)/casper/vmlinuz  file=/cdrom/preseed/ubuntu.seed maybe-ubiquity fsck.mode=skip quiet splash persistent ---

Newer versions of mkusb already include this fix
If you also wish to remove the Try Ubuntu / Install Ubuntu screen delete "maybe-ubiquity".

UNetbootin After creating the boot drive, open /boot/grub/grub.cfg as root.

Add fsck.mode=skip to the first menuentry for (UEFI boot mode).
Open syslinux.cfg as root and add fsck.mode=skip to the default menuentry for (BIOS boot mode).

Rufus After creating the boot drive, open /boot/grub/grub.cfg as root.

Add fsck.mode=skip to the Default menuentry for (UEFI boot mode).
Open /isolinux/txt.cfg as root and add fsck.mode=skip to the "Try Ubuntu without installing" menuentry, (for BIOS boot mode).

The Try Ubuntu / Install Ubuntu screen can be removed from BIOS boot by overwriting syslinux.cfg with:

default persistent
label persistent
  say Booting an Ubuntu Persistent session...
  kernel /casper/vmlinuz
  append  file=/cdrom/preseed/ubuntu.seed boot=casper persistent initrd=/casper/initrd quiet splash noprompt --

The Try Ubuntu / Install Ubuntu screen can be removed from Rufus UEFI boot by removing "maybe-ubiquity" from /boot/grub/grub.cfg.

Edit 20200524:
The above workaround is no longer needed.

This bug was fixed in the package casper - 1.447, as announced in:  https://bugs.launchpad.net/ubuntu/+source/casper/+bug/1875548

Run:

sudo apt-get update
sudo apt-get install -y casper

I am still testing this fix.


Install UBUNTU 14 alongside Windows 8.1 (crack) on laptop (DOS pre-installed) now

If your laptop runs dos you either have a classic bios or csm enabled in your uefi firmware. So you should not have problems with secure boot.
Can you boot linux from your cd / dvd / usb?
You should be able to install it then.


After formatting and installing Ubuntu 15.10, and gnome-session-flashback, cannot view desktop icons or drag anything to the desktop

Found solution:

Open dconf-editor (Alt+F2 and write dconf-editor).
Search for org > gnome > desktop > background and check the show-desktop-icons button.


Given
$ cat file.json
[{"data":"redacted1","type":"unknown"},{"data":"","type":"unknown"},{"data":"redacted1@aol.com","type":"email"}]

[{"data":"redacted2","type":"unknown"},{"data":"","type":"unknown"},{"data":"redacted2@aol.com","type":"email"}]

[{"data":"redacted3","type":"unknown"},{"data":"","type":"unknown"},{"data":"redacted3@aol.com","type":"email"}]

then
$ jq -c '.[0].type = "name" | .[1].type = "junk"' file.json
[{"data":"redacted1","type":"name"},{"data":"","type":"junk"},{"data":"redacted1@aol.com","type":"email"}]
[{"data":"redacted2","type":"name"},{"data":"","type":"junk"},{"data":"redacted2@aol.com","type":"email"}]
[{"data":"redacted3","type":"name"},{"data":"","type":"junk"},{"data":"redacted3@aol.com","type":"email"}]


Nvidia driver activated but currently not in use

There is bugs reports for this issue at launchpad: jockey/+bug/771788 e nvidia-graphics-drivers-173/+bug/772207.  Add your card details then mark it to report that you have the issue.  Hopefully, it will be fixed soon!


Hardlink count inconsistent with matching files

The issue was in the filesystem. Thanks @terdon for the hint.

Apparently NTFS support on Linux is limited as the errors remain even after running ntfsfix.

Running chkdsk /F /R /X F: where F: is the drive letter from the elevated CMD prompt corrected the index entries and fixed the issue for me.


Use Windows drivers yo solve your problem:

Install ndiswrapper

sudo install ndiswrapper-common ndiswrapper-modules-1.9 ndiswrapper-utils-1.9

Install the WiFi driver (from Windows):

sudo ndiswrapper -i yourdriver.inf

Check the driver is working:

sudo ndiswrapper -l

Load the module:

sudo depmod -a

sudo modprobe ndiswrapper

Configure modprobe so that it loads ndiswrapper:

sudo ndiswrapper -m

Edit the modules to add ndiswrapper at the end:

sudo gedit /etc/modules

Remember to add ndiswrapper at the end.

Hope you now have your WiFi back to max speed!


Do I need to install a driver for a Mobile Intel® 4 Series Express Chipset Family video?

The information you see in the System Information is unreliable (it can also happen with other graphic adapters) the Intel drivers are installed as part of the setup and need no further packages to work by default.

If you really what to see what card is in use and the driver used for that card open a terminal and type lshw -C display and look for the configuration: driver=<some_driver> line.


How to uninstall ImageMagick completely and reinstall it in a right way?

The command sudo make uninstall should only works if you install ImageMagick from sources.
In this case, you must run this command from the main directory of the sources.

But it was probably installed from the Ubuntu Software Center. So you could try :

sudo apt-get remove imagemagick

Or directly from the Ubuntu Software Center


Please run this:

sudo service network-manager stop
sudo NM_PPP_DEBUG=1 /usr/sbin/NetworkManager --log-level=debug --no-daemon > ~/nm.out
sudo chown $(id -un) ~/nm.out

and then paste the contents of ~/nm.out here.

Note that this file may contain your username and password, so please read it yourself first, and change any private details before posting if necessary.


Help with a messed up /etc/profile file?

In the particular case of /etc/profile, the base-files package places a template file at /usr/share/base-files/profile, so you can simply copy that.

First back up your existing file

sudo cp /etc/profile{,.old}

Then

sudo cp /usr/share/base-files/profile /etc/profile


Why can't I install two architecture versions of libi2c-dev?

I'm a sys admin, not a developer, so I'm not familiar with the reasoning to do multi-architecture libraries on the same host. From a sys ads perspective, I'd just use a separate virtual machine.  You may want to try out debians multi-architecture setup here. Essentially there needs to be an emulation layer created.


Pass environment variable to bash script, called from within a function

If you want to set a variable only for a command, prefix the assignment to the command:

REMOTE_SERVER=s001 scr.sh "${@}"

Alternately, use a subshell for the function (then variable assignments won't affect the parent shell). You can create a subshell by wrapping commands in ( ... ) (parentheses), or using parentheses instead of braces for the function body. For example, with:

foo () (
    REMOTE_SERVER=s001
)
bar () {
    REMOTE_SERVER=s001
}
foo; echo "REMOTE_SERVER=$REMOTE_SERVER"; bar; echo "REMOTE_SERVER=$REMOTE_SERVER";

My output would be:

REMOTE_SERVER=
REMOTE_SERVER=s001


Error when using Juju Client on Windows 8.1 juju bootstrap to aws get AWS Acess key id you provided

Ok I found the answer.

When running on windows client the first time you run juju bootstrap it creates an environments folder, which contains the .jenv file. What this means if you later change the .yaml file the changes may not be copied over into the .jenv file. So if having trouble you must delete the .jenv/environments folder after each change to the .yaml file.
The issue is I left the <> on the secret-key and access-key, the keys should not have the <>. I had tried several times with the brackets and without the brackets, but didn't realize I had to first delete the .jenv file for it to create a new one with the changes.


bridge and LXC container on two cloud server

you didn't provide much info..

2 diff cloud servers in same cloud or diff cloud providers

which cloud?  aws, digital ocean etc?

what IP subnet are the LXC containers on server 1 and on server 2? all on the

same subnet/different 10.x.x.x subnets?

do you need to add a default route on each to point traffic to the other if the destination is unknown?


Evince fails to annotate text in right place

It appears this has to do with Poppler, which is not really a part of Evince, and thus has not been fixed yet.  It's caused on older pdfs by a mismatch in sizing between parts of the pdf format.  For a workaround, I just print the pdf to file, and replace the original file with the printed one, since that seems to fix the mismatch. You could also try other pdf readers.


If you are downloading the software from Software-center/Synaptic that will be at  /var/cache/apt/archives of your Ubuntu PC . you can get them and save .
if you want to install any software you have three things

i. Software-center
   ii.Synaptic package manager
   iii. Terminal methods if installing

Software-center and Synaptic and GUI based application and you can install applications from there with a Click .

Terminal ways are two .

            i. apt-get
            ii.aptitude

for apt-get

sudo apt-get install <application/package_name>

GUIDE: https://help.ubuntu.com/community/AptGet/Howto

there in the glides you can place what ever the software you want to install .

for aptitude

sudo aptitude install <pkgname>

GUIDE: https://help.ubuntu.com/8.04/serverguide/aptitude.html

here you have to mention the name , similar to apt-get .

but in apt-get and aptitude i vote for apt-get .

Best Audio/Video Software  , i always use VLC player (available in software center ) but we have more examples smplayer etc.

Download accelerators : I use wget (a CLI based ) but we have GUI also i vote for fatrat and deluge for torrent downloads .


How to start a never ending script at startup

Rather than setting up a script to run constantly at startup, why not change it to run using cron?  Since you are telling it to sleep for 60 seconds between runs anyway, using cron to run a script without a while loop once a minute would make more sense and be simpler to manage.

You might also be interested in the answers for this question on serverfault:

https://serverfault.com/questions/49082/can-i-run-a-cron-job-more-frequently-than-every-minute


I note that, in spite of your --with-gnutls --with-gnutls-openssl options, your built version does NOT mention GNUTLS, while the working version does.

Re-read all the files in the Lynx package directory that have shouty names (README*,INSTALL,...) and anything whose filename contains TLS, SSL, etc.


Startup Disk Creator creates puzzling output

SDC creates an iso9660 partition with a read only clone of the OS on it.

Many systems will not see an ISO9660 partition.

If you want a customizable flash drive try mkusb, it can build a drive with FAT32 boot partition, ext4 OS partition, ext4 casper-rw persistence partition and NTFS data partition that both Windows and Linux can see.

Mkusb does UEFI, BIOS, MSDOS or GTP. https://help.ubuntu.com/community/mkusb


How do I know when a new beta CD is released?

See the Maverick Release Schedule (via Releases --> MaverickMeerkat --> MaverickReleaseSchedule).

The next CD released will be the Release Canditate, on September 30th.


what you can do is check if your wi-fi card does need a (sort of) driver.
because ubuntu uses one driver for all kind of cards.
i had to do this on my asus n55sf laptop.
you have a rtl8191SEvA card from Realtek
the download click here

choose the second linux table because this one is for the rtl8191SEvA card.

i do not know how to intall it or place it in the correct folder.

maybe somebody else could help him with it


Empty file keeps getting synced when I modify any file in a folder

I also have this problem.
I have found a bug related to it: LibreOffice u1conflict

I suggest you click on the link to say that it affects you too. Together we have better chance to see this fixed!


NO problem @CL. Got it working... Did the following:

First, edit the following file:

sudo gedit /etc/pulse/daemon.conf

Uncommment and change the values of these lines:

enable-lfe-remixing = yes
default-sample-channels = 4
default-channel-map = front-left,front-right,center,lfe

Second, edit the following file:

sudo gedit /etc/pulse/default.pa

Add the following line to the end:

load-module module-combine channels=4 channel_map=front-left,front-right,center,lfe


Comment moved to the answer because it seems to work.

Remmina 0.99.9 works ok for me, but I use it to connect to Linux via VNC only.

There is a bug that can be related: https://bugs.launchpad.net/ubuntu/+source/remmina/+bug/993432 --- is this your problem?

In that bug, one user says that clicking two times WINKEY rapidly solves the problem (open and close windows menu).


Ubuntu 16.04 Certificate Authority Not Iniating - OpenSSL

Your first command establishes yourself as a certificate authority for a period of time, usually one year.  Running it a second time, 30 minutes later is unnecessary and could well be causing you problems.

Once you have declared yourself to be a CA you can create as many SSL certificates as you like.  It's not clear from your posting if this is still working.  If it is, you're fine.

I don't see anything in the man page about revoking a CA authority.  If trying to create two CAs 30 minutes apart broke something you may have to manually delete the pem file(s)


I've installed Ubuntu 12.04 along side windows 8 and can no longer boot into Windows

boot into your ubuntu if you can or run ubuntu from pendrive and install grub repair

 sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update
 sudo apt-get install -y boot-repair && (boot-repair &)

and read theseinstructions on recommended methods