How Can I Access A Broken Ubuntu 14.04 File System?

OK, thanks to several folks on this and other forums, I found the answer.  The key is to know the file system type of the partition of interest.  The lsblk command shows where the (name:broken) volume is mounted.  The mount command with no parameters provides the required information about file system type, which is ext4 in this case.  Note that several other file system types also have data in them, but it is not the data needed to fix the problem.

$ lsblk
NAME    MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda    202:0    0   8G  0 disk
└─xvda1 202:1    0   8G  0 part /
xvdf    202:80   0  24G  0 disk
└─xvdf1 202:81   0  24G  0 part

$ mount
/dev/xvda1 on / type ext4 (rw,discard)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)

Now that this is known, make the mount point directory:

$ mkdir ./mnt

... mount the volume:

$ sudo mount -t ext4 /dev/xvdf1 ./mnt

... check to see that the right directories and files are available:

$ ls -al ./mnt
total 100
drwxr-xr-x 22 root   root    4096 Jul 25 14:32 .
drwxr-xr-x  6 ubuntu ubuntu  4096 Jul 29 07:20 ..
drwxr-xr-x  2 root   root    4096 Mar 25 11:52 bin
drwxr-xr-x  3 root   root    4096 Mar 25 11:52 boot
drwxr-xr-x  5 root   root    4096 Mar 25 11:53 dev
drwxr-xr-x 89 root   root    4096 Jul 29 06:46 etc
drwxr-xr-x  4 root   root    4096 Jul 23 02:21 home
lrwxrwxrwx  1 root   root      33 Mar 25 11:51 initrd.img -> boot/initrd.img-3.13.0-48-generic
drwxr-xr-x 21 root   root    4096 Mar 25 11:51 lib
drwxr-xr-x  2 root   root    4096 Mar 25 11:50 lib64
drwx------  2 root   root   16384 Mar 25 11:53 lost+found
drwxr-xr-x  2 root   root    4096 Mar 25 11:50 media
drwxr-xr-x  2 root   root    4096 Apr 10  2014 mnt
drwxr-xr-x  2 root   root    4096 Mar 25 11:50 opt
drwxr-xr-x  2 root   root    4096 Apr 10  2014 proc
drwx------  3 root   root    4096 Jul 22 04:40 root
drwxr-xr-x  3 root   root    4096 Mar 25 11:53 run
drwxr-xr-x  2 root   root    4096 Mar 25 11:52 sbin
drwxr-xr-x  2 root   root    4096 Mar 25 11:50 srv
drwxr-xr-x  2 root   root    4096 Mar 13  2014 sys
drwxrwxrwt  2 root   root    4096 Jul 29 06:52 tmp
drwxr-xr-x 10 root   root    4096 Mar 25 11:50 usr
drwxr-xr-x 12 root   root    4096 Mar 25 11:52 var
lrwxrwxrwx  1 root   root      30 Mar 25 11:51 vmlinuz -> boot/vmlinuz-3.13.0-48-generic

... they are, so now it is time to edit the broken file:

$ sudo nano ./mnt/etc/sudoers

Yes, found the bad line, fixed it, and wrote out the corrected file.

Next steps:

unmount the recovered volume,
stop the recovery instance,
detach the recovered volume from the recovery instance,
attach the recovered volume to the original instance (be sure to specify the block device name as /dev/sda1 -- use anything else then IT DOES NOT WORK),
restart the original instance, and confirm that it functions properly.

I mis-keyed the required entry, /dev/sda1 (tried /dev/sda, /dev/xvda, etc. -- no go) and didn't find it for a while.  So, while the volume did re-attach, it wasn't recognized as the boot volume.  Once I entered /dev/sda1 as the block device name, it was accepted, recognized as the boot volume, and everything just worked.  SO GLAD THIS IS DONE!  It has been a real learning experience.  I hope this helps someone else who runs into these types of issues.


You should make a bootable USB drive using usb-creator-gtk. Or for Windows you could use Linux Live USB Creator, which is an easy-to-use interface for making bootable Ubuntu USB sticks. The full instructions can be found at the Ubuntu Community Documentation.


does youtube playlists roll on when suspended

Suspend is something similar to hibernation BUT the system remains switched on and powered up...

I strongly believe when u'll suspend your system, the videos on Youtube will halt right away. And once u come back, they will start from the same position u left off !

Secondly, if you have merely logged out, then your background applications do continue to run. hence your youtube will continue to play even when u'll log out.

Note: This happens with my system having only one account. I don't remember weather i have explicitally made some custom setting or its by default. I am using the server edition with cinnamon on it.


How to change theme in Qt5 configuration editor when it is too large

Open ~/.config/qt5ct/qt5ct.conf in a text editor.

Edit contents of the 5th line to style=gtk2


Find and report line numbers of empty lines in text file

You can find the empty lines, and their line numbers, with

grep -E --line-number --with-filename '^$' file.txt

An example:

w3@aardvark:~(0)$ grep -E --line-number --with-filename '^$' file.txt
file.txt:1:
file.txt:3:
file.txt:4:
w3@aardvark:~(0)$ cat -n file.txt
     1
     2  Not empty
     3
     4
     5  Not empty
w3@aardvark:~(0)$

If your "empty" lines contain blanks or TABs, use:

grep -E --line-number --with-filename '^\s*$' file.txt


How do I allow more than one user to read the output and enter commands for a program running in the Terminal remotely via SSH?

actually, the program "screen" allows you to do just that.

There are complete, step by step instructions on how to use it at

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

(the thread is a bit old, so I checked, and it really works)

What you'll want to do is to open a screen as the article instructs, and then just run the program in there. Whenever a user is finished using the terminal, he should type crtl-a and crtl-d. This way he 'disconnects' from the screen, but it keeps running


Screenshot Issue After Upgrading to Ubuntu 18.10

I went to the settings and reconfigured the Shortcuts. Then it worked for me.


Can i use my boot hard drive to install ubuntu?

if you want to use External HD you have to make it bootable. So you need another computer to make it bootable and then you can install ubuntu on it.


Ubuntu Netboot - PXE can't find kernel 'linux'

Just download the linux file inside the ubuntu-installer (link)  and replace the bad linux file ( tftpboot/bionic64/ubuntu-installer/amd64.

http://archive.ubuntu.com/ubuntu/dists/bionic/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/

That work for me !


You have Skype on host or vm? Skype uses port 80 by default if not changed by the user.
It may interfere with your apache.


This is just a glitch/bug.

One possible cause is that a temp file/folder/dir was taking up lots of space, but was not cleared yet. When you checked it in the morning, some process cleared the tempspace.

It's nothing to worry about, and probably was just a glitch in the system.

Based on your comment that it was a "hack attempt", that is probably the best answer. During the hack, some glitch or bug was introduced. It also may have just been a large amount of temp files (think memory overflow). Nothing to worry about in the long run.


I installed wingpanel on elementary (Jupiter) and its opening the folder /usr/share/applications

Wingpanel is in active development and not yet considered stable.  It is also not apart of Ubuntu but a primary piece of ElementaryOS an Ubuntu derived distro.  Please file this question as a bug here: https://bugs.launchpad.net/wingpanel/+filebug?NOREDIRECT


Something seems to be wrong with your sata controller and it doesn't want to reset properly.  Try adding libata.force=nohrst to your kernel command line in /etc/default/grub, and run sudo update-grub to make it take effect on the next boot.


That's an interesting combination of old bits. I assume it's a USB zip drive? It sounds like the drive was added but was then pushed offline, the media could have failed. Anyhow...

sudo apt-get install lsscsi
lsscsi -l

What's the state of the zip drive? Is it state=offline?

If you look through you logs e.g. dmesg, do you see anything related?

My initial impression is that your hardware is failing or that piece of
zip media is defunct. This would be easier to narrow down if you had extra
zip media to try out.

As for the 500G disk. Is it something you could read from before? Do you know
what it filesystem is?


The dash home button icon is an unexpected colour since upgrading. Why?

The Dash icon and app lenses do follow the main color of your desktop image. Unity has this behavior since 12.04.
Is the dominant color of your desktop yellow?


Kodi replaced Unity after upgrading from 17.04 to 17.10

Look for the little gear next to the "Sign In" button.  You should see a list with Ubuntu as one of the options.  Select that before you click "Sign In".


You need to check user manual of "Jabra Talk 45" to make your device discoverable/connectable after powering it ON.
Once your headphones is in discoverable mode, it will be listed on the device list of your computer/smart-phone(any source device)

Once your "Jabra Talk 45" is visible, you can click on it to pair with your source device.
(Usually an LED keeps blinking when it is discoverable and gets steady after getting connected successfully)

Cheers if it helped! :)


Which hidden files and directories do I need?

Unless you have a custom configuration file that you manually edited / wrote you do not "need" any of them. Ones you might like to keep would be .mozilla (for firefox), .ssh (for ssh keys), and .gpg (if you use gpg), and .bashrc/.zshrc/.vimrc, if you have a custom file(s).


If you understand what you say you understand, then you would know that this is not a/the problem.  Nothing in /proc takes up any space on the disk.  You need to look elsewhere for what is taking up space.  The same goes for /sys, and /dev.


rsyslog template date/time format with seconds

The variables $year, $day, ... $minute refer to the current time. You rather want the timestamp when the event was generated or reported (see here for the difference). The properties timegenerated and timereported (==timestamp) allow for further processing (i.e. you can pick certain fields from these properties). You cannot pick the seconds from the current time but only from the two timestamps mentioned above. So:

template(name="sambalog" type="string"
    string="%timereported:::date-year%-%timereported:::date-month%-%timereported:::date-day% %timereported:::date-hour%:%timereported:::date-minute%:%timereported:::date-second% %HOSTNAME% %app-name% %msg%\n")

Whoa, this is a very long line and instead of defining the template as a string you can also define it as a list. The behaviour is the same, just the definition is different and allows for linebrakes and comments in-between. Maybe that improves readability:

template(name="sambalog_list" type="list") {
    property(name="timereported" dateFormat="year")
    constant(value="-")
    property(name="timereported" dateFormat="month")
    constant(value="-")
    property(name="timereported" dateFormat="day")
    constant(value=" ")
    property(name="timereported" dateFormat="hour")
    constant(value=":")
    property(name="timereported" dateFormat="minute")
    constant(value=":")
    property(name="timereported" dateFormat="second")
    constant(value=" ")
    property(name="hostname")
    constant(value=" ")
    property(name="app-name")
    property(name="msg" spifno1stsp="on" ) # add space if $msg doesn't start with one
    property(name="msg" droplastlf="on" )  # remove trailing \n from $msg if there is one
    constant(value="\n")
}

if $programname == 'smbd_audit' then /var/log/so-test.log;sambalog_list

When I put the above into /etc/rsyslog.d/so.conf and then systemctl restart syslog.service and eventually issue

logger -t smbd_audit "Hello, $RANDOM"

then the file /var/log/so-test.log contains:

2018-10-12 22:14:12 myhost smbd_audit Hello, 15793


Brasero/K3b say: "no disc present". How to burn on my blank DVD?

You seem to have a really old optical drive there. It's one of the first DVD burners introduced. I believe this the reason for why your drive isn't recognizing the blank media, is that it's incompatible with your drive. I also believe it's not related to Ubuntu, unless you can state it works in another operating system.

Here are some options:

Make sure you have a blank DVD-R (minus sign), not DVD+R.

It's hard to retrieve the 'official' specifications of this drive nowadays, but it seems it's only capable of writing DVD-R, and only reading +R, according to this site.
Try upgrading the firmware.

The firmware A105 seems not to be the latest one available. The official download site seems not to be available anymore, but I see traces of A109 versions on the web. Try to upgrade the firmware if you can still find an official source and tool to do so.
Try buying media rated for lower speeds.

Media rated for lower speeds may have older, traditional dye types that your drive support better.
Consider buying a newer drive.

Newer types, second hand, should be fairly cheap and will save you a lot of headache.


Should I create separate users for glassfish, mysql or not?

Glassfish or MySQL will create their own users and I think it's better to rely on them instead of creating a group and adding your non-root user to it.


It appears that CRON was the issue. When the Java program ran, and outputted the results to file, it failed to write correctly. The SQL file I was reading was pointing at a wrong version.

To solve the problem, I added the following code near the top of the CRON script

export LANG = en_US.UTF-8

This ensured that the £ sign was correctly formatted.


How to limit download/upload speed for specific users?

iptables with tc?  Then again I think I remember pfSense (yeah it's not Ubuntu :/ ), used for traffic shaping, among its many roles, in a small office I used to work for. Since we were in a LAN, everything passes through pfSense. Each user is considered as 1 IP.

What kind of setup are you having, thin clients connected to one server?


Find text file containing a given text ignoring new lines and spaces?

With the newer versions of GNU grep (that has the -z option) you can use this one liner:

find . -type f -exec grep -lz 'this[[:space:]]*is[[:space:]]*some[[:space:]]*text' {} +

Considering the whitespaces can come in between the words only.

If you just want to search all files recursively starting from current directory, you don't need find, you can just use grep -r (recursive). find can be used to be selective on the files to search e.g. choose files of which directory to exclude. So, simply:

grep -rlz 'this[[:space:]]*is[[:space:]]*some[[:space:]]*text' .

The main trick here is -z, it will treat the each line of input stream ended in ASCII NUL instead of new line, as a result we can match newlines by using usual methods.
[[:space:]] character class pattern indicates any whitespace characters including space, tab, CR, LF etc. So, we can use it to match all the whitespace characters that can come in between the words.
grep -l will print only the file names that having any of the desired patterns. If you want to print the matches also, use -H instead of -l.

On the other hand, if the whitespaces can come at any places rather than the words, this would loose its good look:

grep -rlz
't[[:space:]]*h[[:space:]]*i[[:space:]]*s[[:space:]]*i[[:space:]]*\
s[[:space:]]*s[[:space:]]*o[[:space:]]*m[[:space:]]*e[[:space:]]*\
t[[:space:]]*e[[:space:]]*x[[:space:]]*t' .

With -P (PCRE) option you can replace the [[:space:]] with \s (this would look much nicer):

grep -rlzP 't\s*h\s*i\s*s\s*i\s*s\s*s\s*o\s*m\s*e\s*\
t\s*e\s*x\s*t' .

Using @steeldriver's suggestion to get sed to generate the pattern for us would be the best option:

grep -rlzP "$(sed 's/./\\s*&/2g' <<< "thisissometext")" .


Enable Xinerama in the Nvidia settings application and reboot. When you enable "use separate x session for each monitor", you can't move windows from one monitor to the other without enabling Xinerama too. Also, when using the Nvidia drivers, do everything from the Nvidia settings application, instead of the Ubuntu "Displays" dialog.


Hindi keyboard not working properly in Ubuntu

Check the keyboard layout*: if you are using Hindi Bolnagri keyboard layout, to print उ you need to press Alt+u and to print ऊ، Alt+Shift+u.

* Depending with DE you are using, getting to show the layout may differ:

using KDE, I haven't found a way to show the keyboard layout;
using Gnome Shell, you have an option to "show keyboard layout" when you right-click on the keyboard indicator;
I don't know about Unity (please edit);
I don't know about XFCE (please edit).


Ubuntu 18.04 won't boot, hangs at "Stopping User Manager for UID 120..."

OK, I had another go at it and was able to boot it up after trying 17.10 to 18.04 upgrade freezes during boot the switch to lightdm option.
No idea what caused the problem.


The easiest way to ensure that all the quoting is done right is to have the shell do it for you, by using declare -f to generate a textual representation of an already-locally-defined function, and declare -p to generate textual representations of any local variables that function needs access to.

doRemoteWork() {
  jq -Rn --argjson original_doc "$(<nodes.json)" '
    input | split("\u0000") as $ips
    | $original_doc
    | .nodes.app.ip = $ips[0]
    | .nodes.data.ip = $ips[1]
    | .nodes.analysis.ip = $ips[2]
    | .nodes.elastic_kafka_1.ip = $ips[3]
    | .nodes.elastic_kafka_2.ip = $ips[4]
    | .nodes.elastic_kafka_3.ip = $ips[5]
    | .nodes.master.ip = $ips[6]
  ' < <(printf '%s\0' "${GCP_INSTANCES[@]}") >"nodes.json.$$" \
  && mv "nodes.json.$$" nodes.json
}

ssh -o StrictHostKeyChecking=no -i key.pem user@172.13.1.23 \
  "$(declare -p GCP_INSTANCES; declare -f doRemoteWork); doRemoteWork"


Looking at your configuration, you need 3 mount points for the drives.  All drives need their own mount points or what happens is that the first one will mount, then the second one will override it, then the third will override as well.

Rename your mount point:

sudo mv /media/backupdisk /media/backupdisk1

Then create 2 more mount points:

sudo mkdir -p /media/backupdisk2
sudo mkdir -p /media/backupdisk3

Then fix your mounts in /etc/fstab like so:

#Hot backupdisk1
UUID=5C5D14B8044A6AA1   /media/backupdisk1  ntfs  defaults,nofail  0 0
#Hot backupdisk2
UUID=1447ECF46C1947D4   /media/backupdisk2  ntfs  defaults,nofail  0 0
#Hot backupdisk3
UUID=77886B755AE0BC84   /media/backupdisk3  ntfs  defaults,nofail  0 0

Save and reboot.  Now you should see all three as separate mounts.

Hope this helps!


Apache problems after upgrade from 12.10 to 13.10/14.04

Something is apparently running already on ports you're trying to bind to.
What is it? You'll have to find out yourself, I'm afraid.
What may help you with that is anyway netstat command. Try netstat -nap | grep 8080 (or 8081) to find out which process is using this port.


Configure a simple send-only mailserver for system mail?

Not sure, if that would help you, but i have used a perl script to check if some condition is true and then send out e-mail.

    #!/usr/bin/perl

    $mailfrom = "root\@myomain.com";
    $mailto = "root\@mydomain.com";

    use FileHandle;

    ##### Check some condition
    if (some condition to be true) {
        push @New,$_;
    }

    ##### Send mail if true
    if (@New) {
        my $data = qx("e-mail body here");
        $mail = new FileHandle;
        $mail->open("| /usr/sbin/sendmail -t") || die "Cannot open: $!";
        $mail->print("From: $mailfrom\n");
        $mail->print("To: $mailto\n");
        $mail->print("Subject: some subject\n\n");
        $mail->print(@New, "\n");
        $mail->print($data, "\n");
        $mail->close();
    }


laptop quite dead after update on 12.10 and calibre

I concur; it sounds like a complete hardware failure of some type.  Check that the charger is actually on and working. The 300 lights the white AC power LED whenever a working power supply is plugged in. If the LED is not on, then there's no power getting to the machine.  Either the power supply is dead, or the power socket is damaged.  Also check the power board is working if you use one etc.  If you have a multi meter check the output of the power supply.

Remove all external devices: drives, monitors, docking station, monitors, mouse, keyboard...  Everything.  Check that the battery is inserted correctly, or remove it completely.   (A shorted battery can hold the power supply out completely, but that hardly every happens these days).

Hopefully it's just the power supply and the machine itself is OK.


Sure, you are setting Cloned MAC address and not Device MAC address.


Is there another option besides MythTV for watching video files with remote control access?

You could take a look at XBMC. From what I gather from your post, it has everything you want.


Malayalam font not working properly; letters don't combine

Install the package ttf-malayalam-fonts (fonts-mlym on 16.04+), if you haven't already done so. Then create the file ~/.config/fontconfig/conf.d/10-prefer-malayalam.conf with the following contents:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
        <alias>
                <family>serif</family>
                <prefer>
                        <family>Lohit Malayalam</family>
                </prefer>
        </alias>
        <alias>
                <family>sans-serif</family>
                <prefer>
                        <family>Lohit Malayalam</family>
                </prefer>
        </alias>
        <alias>
                <family>monospace</family>
                <prefer>
                        <family>Lohit Malayalam</family>
                </prefer>
        </alias>
</fontconfig>


How to set network connection as Internet connection?


How to identify AMD graphic card model on Ubuntu 20.04

On Gnome 3 based distros (Ubuntu by default) open settings and click on the details and choose About:

reference


Many laptops/notebooks have a magic key-combination to enable/disable the touchpad (useful when using a trackpoint or external tablet/mouse);  does toggling that combination help.  I'm not sure what the combination on your Dell is going to be—on this ThinkPad it is Fn+F8.


Get ntp offset between local machine and ntp-server

Although it may not be exactly what you have asked for, you can use the following method (no sudo is required):

$ /bin/journalctl --unit=systemd-timesyncd -n 1  | tail -1
Aug 16 15:57:13 xxxxxx systemd-timesyncd[958]: Synchronized to time server 169.254.169.254:123 (169.254.169.254).

With the command above, you determine the time server timesyncd is synchronized to. In this example, it is 169.254.169.254.

Then you can use the command ntpdate -q with this server like this:

$ ntpdate -q 169.254.169.254
server 169.254.169.254, stratum 2, offset -0.000081, delay 0.02580
 1 Sep 12:20:24 ntpdate[3978]: adjust time server 169.254.169.254 offset -0.000081 sec

Note: You can install the ntpdate command, using apt install ntpdate.


Try this:

unity --reset

If that doesn't work, maybe the update didn't complete properly. Try:

sudo apt-get -f install
sudo apt-get update
sudo apt-get upgrade


How can I USB install Ubuntu 12.04.4 on my Macbook using the 32-bit image?

You are right, Macs only boot using EFI, and Ubuntu 12.04 does only bring EFI support in 64bit edition, but according to this  german blog post, you can still do it by carrying out the following steps:

Format your flash drive to a FAT file system
Download http://www.bloggerholiker.de/wp-content/uploads/2012/04/ISO-2-USB-for-EFI.zip
create a efi folder on the flash
create a boot folder inside the efi folder
extract the content of the zip into the boot folder
rename the 32bit iso to boot.iso and put it in the very same folder
reboot your mac and press and hold the ALT key
select Boot.efi when prompted

That should do the trick. Good luck!


In KDE when I create a file in the Home directory it also creates files on the Desktop

When you hover the pointer over the Folder View's borders a little panel should be displayed. Click on the wrench icon to open the Folder View Settings. In the settings you just need to change the folder to be displayed (your home folder by default) by one of your preference (e.g., the Desktop folder).


This problem is caused by a conflict between the explicit -t option and the implicit --user option that is present in Ubuntu's patched version of pip. This is described in pip's GitHub repository at https://github.com/pypa/pip/issues/3826 and https://github.com/pypa/pip/issues/4390.

To circumvent this, I would suggest using a virtualenv. The steps are as follows:

Install virtualenv if you haven't:

sudo apt update
sudo apt install virtualenv

Create and activate a virtualenv and upgrade pip:

virtualenv venv
source venv/bin/activate
pip install -U pip

Install pymemcache in your specified directory using the -t option:

pip install -t /home/praveen/Code/AWS/Lambda/Memcached-Py pymemcache


Ubuntu Desktop 14.10 installation went wrong and wiped the hard disk on windows 10

well, I think that you might not be able to recover windows' data (documents, music, all of that). If you still want to use windows 10, download the official windows 10 iso from windows 10 techbench (I'd give you a link, but I'm not sure I should; just search for windows 10 techbench) and if you want to install it alongside the Ubuntu you have installed, use the custom installation to do it on a separate partition.


How to use Sublime Text 2 as Quickly default editor?

Set the EDITOR environment variable to sublime and then quickly edit will use it:

export EDITOR=/usr/bin/subl

How do I set environment variables?

Just add the above line to your ~/.bashrc file


Finding out the buffer size of external hdd connected via USB

To find out, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the commands below.

sudo hdparm -I /dev/sdb1

Replace sdb1 with your hard drive name

*it has to be an uppercase I


How can I tell if I have 32-bit version of Ubuntu if I'm installing using the Windows installer?

I assume that a Wubi Ubuntu is still Ubuntu, so the answers to this question should work for you: How do I check if I have a 32-bit or a 64-bit OS?

I would suggest going with the second method outlined in the "checked" answer which I have copied below.

Open a terminal window and then enter and run the command file /sbin/init
Note: You can use the keyboard shortcut CtrlAlt+T to open a terminal window.

If you have the 32-bit version of Ubuntu the result should contain ELF 32-bit as in the example below.

  /sbin/init: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV) ...

If you have the 64-bit version of Ubuntu the result should contain ELF 64-bit as shown below.

  /sbin/init: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV) ...


How to use grep to search for a pattern which starts with a hyphen (-)?

In your case "-j" is interpreted by grep as an argument/option, not as a search pattern, even if you quoted it. To make it to be the pattern for what you want to search, just use -eoption:

sudo find / -name "*" | xargs grep -sn --color=auto -e "-j"

or even:

sudo find / -name "*" | xargs grep -sn --color=auto -e -j

The -e argument/option means that the next argument is the pattern. This is from man grep:

   -e PATTERN, --regexp=PATTERN
          Use  PATTERN  as  the  pattern.   This  can  be  used to specify
          multiple search patterns, or to protect a pattern beginning with
          a hyphen (-).  (-e is specified by POSIX.)

Other ways:

use --, as @Rinzwind said in his answer, to make grep to hnow that the options ended.
use \ to escape the hyphen (-):

sudo find / -name "*" | xargs grep -sn --color=auto "\-j"


I have an update to this issue. Finally the problem was found and the cause was a faulty DIMM module. Interestingly none of Dell diagnostics tests revealed this problem.


How to enable wireless network for standard users?

To allow change of wifi-connection without admin password create new file

sudo nano /etc/polkit-1/localauthority/50-local.d/org.freedesktop.NetworkManager.pkla

with the following content:

[Enable NetworkManager]
Identity=unix-group:netdev
Action=org.freedesktop.NetworkManager.*
ResultAny=no
ResultInactive=no
ResultActive=yes


I think I got to the root of your problem, the listed IPv6 address is invalid.  Is there any chance you have configured IPv6 proxy (either http proxy or socks proxy) in your system?  Because it looks like IPv6 address and port (8049).

You can check the environment variable http_proxy if it contains some value by doing:

echo $http_proxy

or check your network settings.

Another place where you could have the proxy defined is in the APT configuration which resides in /etc/apt/apt.conf file or /etc/apt/apt.conf.d/ directory.  You should look for Acquire::http::Proxy "<URI>"; setting or written in the block:

Acquire
{
  http
  {
    Proxy "<URI>";
  };
};

Also remember when working with raw IPv6 addresses and URIs to enclose IPv6 address into brackets like this http://[2001:db8:dbb:1:1:1:1:221]:8049/

This might look similar:

# http_proxy=2001:db8:dbb:1:1:1:1:221:8049 apt-get update
Err http://ftp.cz.debian.org wheezy InRelease
Err http://security.debian.org wheezy/updates InRelease
Err http://ftp.cz.debian.org wheezy Release.gpg
  Could not resolve 'db8:dbb:1:1:1:1:221'
Err http://security.debian.org wheezy/updates Release.gpg
  Could not resolve 'db8:dbb:1:1:1:1:221'
Reading package lists... Done
W: Failed to fetch http://ftp.cz.debian.org/debian/dists/wheezy/InRelease
W: Failed to fetch http://security.debian.org/dists/wheezy/updates/InRelease
W: Failed to fetch http://ftp.cz.debian.org/debian/dists/wheezy/Release.gpg  Could not resolve 'db8:dbb:1:1:1:1:221'
W: Failed to fetch http://security.debian.org/dists/wheezy/updates/Release.gpg  Could not resolve 'db8:dbb:1:1:1:1:221'
W: Some index files failed to download. They have been ignored, or old ones used instead.

More general hints:

You can check the IPv6 configuration from the command line using the ip command:

Address:

# ip -6 a s
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
    inet6 2a01:5f0:1006::59bb:820d/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::5054:ff:fe6a:a954/64 scope link
       valid_lft forever preferred_lft forever

and routes:

# ip -6 r s
2a01:5f0:1006::/64 dev eth0  proto kernel  metric 256
fe80::/64 dev eth0  proto kernel  metric 256
default via 2a01:5f0:1006::1 dev eth0  metric 1024

Anyway since the normal modus of operation is to try the IPv6 address first and then fallback to IPv4, and this is not happening, you also should check your APT configuration for any hosts written as IPv6 address or hosts which do resolve only to IPv6 address (as already suggested by dobey).  You might also want to check your /etc/hosts file, where you could have manually written a mapping from .deb archive hostname to IPv6-only address – you can verify this by pinging at the hostname(s) from your APT configuration (check /etc/apt/sources.list file and all files in /etc/apt/sources.list.d/ directory).

Also check your proxy (system or just APT) configuration, because it might creep in unexpected when you have long forgotten about this setting.


Clipgrab 3.2.0.9

Clipgrab 3.2.0.8 had some issue, it is now fixed in the latest release. To install, run these commands in a terminal (Open it with Ctrl-Alt-T ) to install it

sudo apt-add-repository ppa:clipgrab-team/ppa
sudo apt-get update

and then

sudo apt-get install clipgrab

Alternative 1: Youtube-dl (CLI tool)

You can try to using "youtube-dl". It is better than clipgrab in downloading the youtube downloader. To install it, run this command

sudo apt-get install youtube-dl

The downside is youtube-dl is a command line tool.

Alternative 2: Minitube

Install it using the link

minitube

or using terminal:

sudo apt-get install minitube


Ubuntu 15.10 boot loader for dualboot with OS X El Capitan

You should select the partition that you are installing Ubuntu for i.e. the same ext4 partition that that you are mounting root (/) to. You shouldn't need a separate /boot partition; make sure you have properly installed rEFIned (i.e. disable SIP first before installing).


Is it Possible to make "Forget password immediately" the default when opening LUKS encrypted partition?

I believe the setting comes from your desktop environment, e.g. GNOME. Not related to LUKS or the encryption.

If GNOME is your desktop environment, you should change GNOME settings. One way is to install gconf-editor by

sudo apt install gconf-editor

You might be able to find the relevant default setting there.


What does Ctrl-| (pipe key) do in a terminal?

It sends SIGQUIT to an application which does produce core dump. It is the same as if you typed kill -3 PID where PID is you program process id.

For more info, read  https://www.gnu.org/software/libc/manual/html_node/Termination-Signals.html


In the Brushes window all the way to the bottom set Spacing to a lower value.


No private directories found when I do have one?

You must mount the "other" drive before you can successfully run ecryptfs-recover-private.

I suggest the following steps:

cd to change into your homedirectory
mkdir otherHDD  to create a mountpoint for the other HDD
mount to see what is currently mounted
blkid |grep ext  to determine the name of the partition on the other HDD (probably something like /dev/sdb2). You will see several entries, choose a "likely" one, you won't damage here anything.
sudo mount /dev/sdb2 otherHDD (or whatever looked likely in  the step above)
sudo ecryptfs-recover-private
If you get an empty result: sudo umount otherHDD, then back to step 5 with another partition selected.

Just for completeness:
The  LOGIN Passphrase you will be asked about is either

your regular login password in the "other" system
or
it might be the "passphrase" that was generated when you encrypted your homedir and which you hopefully stored in a secure place.


My Swedish keyboard is set to English in Ubuntu 14.04

System Settings - Text entry - verify that Swedish is here.
Thats how I solve English and Czech keyboard


To install google chrome Either download from PPA or using .deb

PPA

Using terminal. run those commands, you can open termianl by searching from dash or keyboard shortcut CTRL+Alt+t

wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt-get update
sudo apt-get install google-chrome-stable

using .deb

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg –i google-chrome-stable_current_amd64.deb


Dual boot problem, black screen during the ubuntu boot

You're probably running into one of many "blank screen" problems that have been common in the past year or so. See, for example, these questions on this site:

Ubuntu 13.04 on UEFI system hangs at black screen
Ubuntu 12.10 - Black screen after GRUB, can't install. UEFI
My computer boots to a black screen, what options do I have to fix it?.

There are many others, too; try this Web search to see them.

Unfortunately, there is no one "magic bullet" solution, because these problems have multiple causes that require distinct solutions for each individual cause.


How to remove the widget controller from desktop

Right-click somewhere on the desktop, in the context-menu choose Desktop Settings. In the Desktop Settings window choose Tweaks, uncheck the option Show the desktop toolbox and click Apply.


Can you change the orientation of the Unity launcher?

This feature request was reported as a bug recently, but the request was declined.

Mark Shuttleworth answered:

  I'm afraid that won't work with our broader design goals, so we won't implement that. We want the launcher always close to the Ubuntu button.

See also: OMG Ubuntu - Ubuntu Unity launcher won’t be ‘moveable’


How to install ubuntu 13.04 alongside with windows 8?

It seems that your Ubuntu cannot see any partitions. This is probably due to the new UEFI and the GUID Partitioning Scheme. Some Windows 8 machines also include a "secure boot" feature which makes installing Ubuntu much harder. Is your drive encrypted?

UEFI, or EFI, is a firmware interface that is widespread on recent computers, especially those more recent than 2010. It is intended to replace the traditional BIOS firmware interface that is prevalent on earlier machines.

Make sure that you are using the 64-bit version of Ubuntu. Also, in the Allocate Drive Space menu, press the button which says Something Else. This will allow you to modify the partitions.

If all else fails, you might want to consider using GNU Parted. After booting up, press the Try Ubuntu button, and open up the application called gparted or Partition Manager. This program does support GPT and will allow you to see those partitions.


How to add all Gnome Desktop configuration (done in "Settings" front end) in a Git Repo?

First you need to make a script with the settings values you need and those are command line controllable..
For example:
gsettings get org.gnome.desktop.wm.preferences focus-mode
gsettings get org.gnome.desktop.interface clock-show-seconds

Above commands are easily understandable and both can be achieved both via GUI and CLI
Lets say you have set the above commands preferences via GUI and you want to make a text file of it.
Here is the script as an example:
#!/bin/bash

mkdir -p /home/admin/my_local_git_repo

#transfer the below commands to the file for git in local repository directory in a form of executable script file.

echo "
#!/bin/bash

gsettings set org.gnome.desktop.wm.preferences focus-mode $(gsettings get org.gnome.desktop.wm.preferences focus-mode)
gsettings set org.gnome.desktop.interface clock-show-seconds $(gsettings get org.gnome.desktop.interface clock-show-seconds)" > /home/admin/my_local_git_repo/preferences.sh

Here is the output when I ran the script with the command bash /home/admin/forgit.sh

You can add as many commands as you wish in the script named forgit.sh. Once you run the script It will create the script named preferences.sh in you local git repository directory.
for "How to make local git repository and further" you may go through this link https://docs.github.com/en/github/importing-your-projects-to-github/adding-an-existing-project-to-github-using-the-command-line
So If you have run the script  forgit.sh for the first time and then commit it to as per above link, you can write your comments "1st version" etc..
for the second time, "2nd version" some thing like that.. you can change script names, comment names, or even you can tweak the forgit.sh script such that it stright away push (git push) to the git repo..


The simplest, working answer to the question "How to save terminal history manually?":

history -a

It may also be worth to consider switching to zsh, which has setopt inc_append_history ("save every command before it is executed").

And this question is relevant as well: Is it possible to make writing to .bash_history immediate?


How to rebind the "fn" key to mouse button 4

The Fn key of a laptop typically is not seen by the OS. You cannot use it as a modifier key or assign it different functions.


ubuntu grub rewrite mbr on second drive constantly

First you need to find out on which HDD Ubuntu is installed. You can use Disks to examine your drives, open the Dash and type disks in the search-box, then just click on the icon which is labeled Disks. In Disks you will be able to see on which drive Windows is installed and on which drive Ubuntu is installed.

Then open a terminal ( Ctrl+Alt+T) and run the command

sudo grub-install /dev/sdX`

Replace X with the correct letter you found out in the first step. Don't add any number to the command, for example, if you install Grub to sdb1, Grub will be installed to the partition boot record of the first partition on the second drive, not to the MBR of the second drive!

In the BIOS change the boot-order to this drive.


To access mysql from CLI:

 mysql -u <username> -p<password> <database_name>

Make sure no space between -p and password. Of course, this password will be visible in history.

To overcome this:

Leave it blank and it will ask you for it.
start the command with a space in front of mysql


If you want to customize the message but not per-user you can use nologin, meaning re-enabling users account but assigning them /usr/bin/nologin as their login shell. They will not be able to connect and receive a default message saying the account is disabled or the message written in /etc/nologin.txt.

If you want a per-user message you can replace nologin with a hand-made script which always returns 1.

From https://serverfault.com/a/708923/186199 where is dupplicate marked as solved. Please mark it so here.


QinHeng CH345 USB MIDI device not showing up in lsusb

These "descriptor read" and "address" errors indicate that the USB communication with the device does not work for some reason.

It's likely that the cable, a connector, the host controller, or the device is defective.

Try with another controller/cable/device to check which one.


sensors shows me temperatures like -78°C

So my result of sensors on a live usb

acpitz-virtual-0
Adapter: Virtual device
temp1:        +27.8°C  (crit = +106.0°C)
temp2:        +29.8°C  (crit = +106.0°C)

nouveau-pci-0100
Adapter: PCI adapter
temp1:        +36.0°C  (high = +95.0°C, hyst =  +3.0°C)
                   (crit = +105.0°C, hyst =  +5.0°C)
                   (emerg = +135.0°C, hyst =  +5.0°C)

coretemp-isa-0000
Adapter: ISA adapter
Physical id 0:  +35.0°C  (high = +85.0°C, crit = +105.0°C)
Core 0:         +26.0°C  (high = +85.0°C, crit = +105.0°C)
Core 1:         +31.0°C  (high = +85.0°C, crit = +105.0°C)
Core 2:         +35.0°C  (high = +85.0°C, crit = +105.0°C)
Core 3:         +34.0°C  (high = +85.0°C, crit = +105.0°C)

it just disappeared.. Ill try sensors-detect..

I dont get sensors to display more, I installed fancontrol and run sensors-detect multiple times. pwmconfig shows "There are no fan-capable sensor modules installed"

I guess thats because my system isnt updated / upgraded as its an life system (sorry for no apostrophs, etc. every special letter hurts as i havent the correct input language on my life system)

Dont know how to continue..


Alright, issue resolved. Long story short several days later: The onboard video card wouldn't work under any circumstances. Adding a pci card and using nomodeset works. I also had to change out the power supply as it was causing hard drive issues. Nomodeset also allows the computer to boot to linux cds.


Try a netboot image. Netboot. Select release, architecture and then download the mini.iso. Write it to a usb, and it will boot. It will download the packages it need from the central repository.


How to change shortcut to launch Search window from just Super/CMD on Macbook?

Go to System Settings -> Text Input. On the bottom of the window you will see something like "Keyboard settings..." highlighted with orange letters. Click on that. It will take you to the Keyboard settings. There you can adjust all the keyboard shortcuts and add them if you like.

In order to change the keyboard shortcut, go to the category you want to choose, choose the shortcut and click on the key combination on that line. When you let the keys go, it will adjust the shortcut to your needs (e.g.: Super key -> Super key + Space)  If that key combination exists for another shortcut,  Ubuntu will automatically warn you about transferring the key combination (e.g.: Ctrl+Atl+Del) to another shortcut.

If you want any help, feel free to contact me.


The freezing usually can occur due to HDD failing or/and a problem with graphics card driver.

So first check the HDD for bad sectors. Open the Disks utility and check the S.M.A.R.T and see if disk is Healthy.

Then you can install an additional driver for your graphics card (if any). This can be done from Ubuntu Software Center → Edit → Software Sources and activate a binary-proprietary driver.
Reboot your system for changes to take effect.
An example for Nvidia

Also you can run a memtest from grub menu (memtest86+). Leave it for 30-40 minutes at least an see if any weird - red lines - messages appears.

If the problem persists, you can check some logs for weird - error messages

cat var/log/Xorg.0.log
dmesg


I think NetworkManager was being run/triggered from systemd and upstart. After

sudo service NetworkManager stop

the logs calmed down and everything seems stable.

(This was, for the record, on Linux Mint Betsy LMDE2, i.e. Debian-8-based).


Linux counterpart to Microsoft WSUS [xUbuntu 16.04 Server]

It would be difficult to provide support for the myriad of problems that comes with Ubuntu each update. You can use Cubic to preload your own ISO. It allows you to use a terminal the same way you would on a regular install as well as strip it down to make it smaller. I recommend running it within a VM because chroot can affect the host system.


there is the strongswan network manager
apt-get install strongswan network-manager-strongswan

The good part:

This will enable a new vpn option

The bad part

There is no chance of providing public-shared-key if you need to use this for your setup

(This answer is related to: I can't get any L2TP + IPSEC client to work on Ubuntu 14.04 with pre-shared key, can you?)


Poor battery life UX32VD Ubuntu 14.04 with optimus 4000/620m

You need to install Bumblebee to turn off the Discrete graphics card. Follow this link https://wiki.ubuntu.com/Bumblebee. Also see https://help.ubuntu.com/community/AsusZenbookPrime for kernel parameters to improve battery life. I am getting 5 hours with Ubuntu 13.10.


bash: compgen -c does not return me the output that I want

For compgen (and I think for Linux in general), a command is everything that you can run including alias' and functions, etc.
If you want to get only executable files/scripts in any of your $PATH directories, there is no good way using compgen.
You could use comm to show all commands excluding aliases, keywords and functions:
comm -23 \
  <(compgen -c | sort -u) \
  <(compgen -akA function | sort -u)

However, this will also remove commands that are both alias/function and command (e.g. ls or grep have an alias per default in Ubuntu, as well as anything you added yourself).
So, I think you're better off getting all executables from $PATH with your own script (and if you wish you can add builtins using compgen -b):
path_filenames(){
  printf '%s' "$PATH" \
  | xargs -d: -I{} -- find -L {} -maxdepth 1 -executable -type f -printf '%P\n' 2>/dev/null
}

sort -u <(path_filenames) <(compgen -b)


How can I remove or block every method that can be used to reset my password?

Any PC or server is vulnerable to physical attack, if the attacker has unhindered access to the hardware.

So do one (or more) of the following:

(1.)  Physically secure your hardware and data.

(2.)  Use keys or BIOS password to discourage alternate methods of booting.

(3.)  Store your critical (or confidential) data in an encrypted volume, that requires an additional pass-key (or physical token) to allow access.


Brightness control on Sony Vaio VPCY2 not working

LCD Brightness Control

Once you have installed the proprietary Nvidia drivers as suggested above, you may notice that your brightness control keys do not work properly. This is fixable by editing one's xorg.conf file. Open a terminal window and type the following:

sudo nano /etc/X11/xorg.conf

This will open your X server configuration (after prompting for your password). You should see a section titled "Device" that looks as follows:

Section "Device"
        Identifier      "Default Device"
        Driver  "nvidia"
        Option  "NoLogo"        "True"
EndSection

Append a line so it appears like this:

Section "Device"
        Identifier      "Default Device"
        Driver  "nvidia"
        Option  "NoLogo"        "True"
        Option "RegistryDwords" "EnableBrightnessControl=1"
EndSection

You will need to restart your graphical server (or reboot) for this change to take effect.


Login as user hdfs failed:su: Authentication failure

If I unterstand correct:

You created users wihtout password.

You need to create or mod the user with the -p flag:

useradd -g hadoop hdfs -p encyptedpasswordbyopenssl

The password needs to be in an encrypted format. Create it with openssl passwd mypassword


How do I get boot loader from USB drive onto my Hard Disk?

Im not entirely sure on how to lay this out but ill give it a shot.

Firstly boot into ubuntu on your live usb.

Then open a terminal and copy and paste each line individually:

"sudo add-apt-repository ppa:yannubuntu/boot-repair

sudo apt-get update

sudo apt-get install -y boot-repair && boot-repair"

After installing and running boot-repair it should give you specific instructions on what to do.
Just make sure you know your drive names and partions say /dev/sda1 for example.
I hope this helps. I would go into more detail but im on my phone at the moment.


Ubuntu machine behind a LAN as openvpn server

In order to help you debug your problem, you should do the following:

sudo /etc/init.d/openvpn stop
# Or 'sudo stop openvpn' if you are on a very new Ubuntu system
sudo openvpn --cd /etc/openvpn --config /etc/openvpn/server.conf

You should now get the openvpn output right on your terminal.


Ok I found what the problem was.

You are missing one entry in the file. Place the following entry into the file

Type=Application

After you save the file, you'll notice it's icon change to look more like an application than what is looks like now (a text/script file).

Even if you make the file executable Ubuntu Desktop doesn't know if this file is a script or application and assumes it's a script. But if you place the Type=Application it will run it fine.


I had some USB devices connected to the Dell U2715H monitor.   When I removed the extraneous USB devices, the monitor woke up.


Why does dhclient  return a services related message?

dhclient was converted to an upstart job, which is just another way of managing services, a number of things were converted to that in Natty and Oneiric.  If you run sudo service dhclient start you're going to see the message "RTNETLINK answers: File exists" that appears to be the actual problem you're having.  The init script is actually running the upstart job for you, but there's a problem with starting dhclient.  From a quick Google, it looks like you may have a problem in your network interface configuration.


I'm adding this just so you can mark this as solved ;)

Try renaming some of your configuration folders. For example, rename .config to .config-backup and then reboot. See if that helps. You can get your settings back if it doesn't by deleting the new .config folder and renaming the old one back to the original name.


Why I get "tar: Cowardly refusing to create an empty archive"? when trying to backup the whole server

Add a space before the / at the end of your command. Change your:

sudo tar -cvpzf mybackup.tar.gz --exclude=/backup/mybackup.tar.gz --one-file-system/

to

sudo tar -cvpzf mybackup.tar.gz --exclude=/backup/mybackup.tar.gz --one-file-system /


Add # (pound) sign at begining of the line matching.(search string : file path)

You can use

sed -i '\%xyz/toh/aaa% s/^/#/' file

Explanation:

\% set the regex delimiter to % (so as not to conflict with the path separator /)
match xyz/toh/aaa
replace the start of line ^ by `#


I'd flip the file around using tac - then you can note the first value of the third comma-separated field, and print when you see it again:

$ tac "$logfile" | awk -F, 'NR==1 {seen[$3]++; next} seen[$3] {print; quit}'
08/20-12:06:22.172940 ,1000001,10.0.0.1,10.0.0.2,ICMP,"ICMP test detected"


Natively install Ubuntu 18.04 with Unity

There is currently (Dec 2018) NO Unity bundle: Unity is not a fully-fledged flavor of Ubuntu. It's a community-supported Desktop Environment, which is only one element of an Ubuntu Flavor. Creating the .iso files for download is another element.

Many flavors of Ubuntu started this way, slowly growing and gathering members until they could support their new flavor properly. You can join the Unity effort, contributing patches, documentation, and testing, at http://discourse.ubuntu.com.

A common method of installing Unity that you may find more appealing is to start with the Minimal Installer, then install the ubuntu-desktop metapackage.


How to move wifi passwords to a new installation

On my 12.04 system the WiFi connections and passwords (in the clear) were stored in text files in /etc/NetworkManager/system-connections/

Stopping the network manager, copying these files to the new machine, restoring the permissions and restarting network manager worked for me.

sudo stop network-manager
sudo cp /backup/path/etc/NetworkManager/system-connections/* /etc/NetworkManager/system-connections/
sudo chown root.root /etc/NetworkManager/system-connections/*
sudo start network-manager


I want to add background color to vimrc but it's not working

In .vimrc, replace

set background=dark

with

highlight Normal ctermfg=grey ctermbg=black


How to disable mouse acceleration on ubuntu 18.04

Ubuntu uses gnome and gnome uses dconf(a "database" full of settings).

How to:

Install dconf-editor

sudo apt install dconf-editor via terminal or
search for Dconf Editor in Ubuntu Software

Open the dconf-editor and go to org -> gnome -> desktop -> peripherals -> mouse

Here are the mouse settings.

accel-profile -> sets what kind of acceleration you want to have
speed -> sets the mouse speed

You have these options in accel-profile:

default
flat aka. disable mouse acceleration
adaptive

To disable mouse acceleration:

set Use default value to off
set Custom value to flat

To change the mouse speed:

go to org/gnome/desktop/peripherals/mouse/speed
set Use default value to off
change the Custom value to the number that works for you
(the number can be between -1 and 1)


Problems with rendering after upgrade to Ubuntu 14.04 on Chromebook Acer C720

Check if your user has access to /dev/dri/*. You might have to add yourself to the video group.


First, boot into your BIOS with F10, or whatever your key is. (In my case, it's F10)

Then, go into the 'Boot' option, and make sure your SSD is on the boot list.

If not, add it to the first boot option.

If it is in the Boot order, put it BEFORE the OS. If you put it after, you will only be able to read the SSD in the OS, not boot off it.

I hope this helps you!


How can I run a live stream as local radio?

In Icecast parlance this is called a per mount relay and is a built in feature.

As this was trivial, I quickly made you a working config snippet, that you just need to insert into your icecast.xml config:

<relay>
  <server>204.45.41.148</server>
  <port>80</port>
  <mount>/</mount>
  <local-mount>/desi-radio.mp3</local-mount>
  <on-demand>1</on-demand>
  <relay-shoutcast-metadata>1</relay-shoutcast-metadata>
</relay>

For details as to how this works:
Icecast docs on relaying
Icecast docs on config file options, relaying section

Please note how I set this to on-demand, this means that the stream will only be pulled from the original server if there are local listeners.
This is generally a very nice feature to reduce bandwidth use on tight network connections as you only have one stream coming from the internet, while many users can locally connect to:

   http://YOURLANIP:8000/desi-radio.mp3


New admin account asking for a password?

You can set a password from terminal, just open up your favorite terminal and type:

passwd

If your feeling advanced you can stop Ubuntu prompting for password by configuring polkit

Here's an example of configuring polkit to enable users to install apps without authentication.


I think that is not the problem with Ubuntu, because i also use Nokia 5233 to connect to Internet and my Internet speed is almost same on Ubuntu 12.04 LTS and Windows 7. May be it is because you may have programs on Ubuntu which uses Internet connection( e.g RSS Reader, Weather Widget etc) and decreases overall speed of your connection.


Multiple panels appear when restart or log-in

I am having this same problem after installing Cinnamon, Gnome-shell, & KDE environments. Uninstalling the desktops does not fix either. Here is a screenshot.


I suggest that you make two changes. First, the package ndiswrapper will not properly drive your wireless device, or any that I am aware of, in any recent; that is, not end-of-life Ubuntu version. Let's remove it:

sudo apt purge ndiswrapper*

And remove it from /etc/modules:

sudo nano /etc/modules

Edit the file so that it only contains:

rtl8188fu

Save (Ctrl+o followed by Enter) and exit (Ctrl+x).

Next, we'll make a change in Network Manager:

sudo nano /etc/NetworkManager/NetworkManager.conf

Change the line managed=false to managed=true. Save and close nano as above. Reboot.

Is there any improvement?


Arduino IDE not connecting to microcontroller

I had this problem too, it turns out it was caused by the Serial Monitor being set to speed 14400. Since you can't change the setting without having a working serial port, the only way to do it is to exit the Arduino UI and edit the preferences.txt file (in Unix, it's in ~/.arduino/preferences.txt). Look for Serial.debug_rate and change it to 9600. Restart the Arduino UI and try uploading a simple sketch (eg. 'blink') and see if it's fix the problem.

I'm not sure why this would happen - I've used 14400 and never had a problem. I guess it's just one of those weird problems that never seems to have a repeatable reason?


How can I adjust the mouse scroll speed?

I removed the USB dongle that comes with my wireless mouse and plugged it back and fixed my scrolling speed instantly.


Reverting to previous kernel to avoid booting the new one that breaks my system

The grub2 documentation refers to some useful settings that can be used to set the default boot option.

Edit /etc/default/grub (you need root privilege to do this) and change and/or add the following settings:

GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true

and then run:

sudo update-grub

On the next reboot, select the kernel you want to boot from now on.  The next reboot should boot from that selected kernel.


If you need to run DNSCrypt as a forwarder for a local DNS cache (recommended), use dnscrypt-proxy.

dnscrypt-proxy can be configured to listen on a different port than 53, since port 53 is reserved your the DNS cache software (dnsmasq).

This link includes a configuration example for dnsmasq.

More information (and a link to PPA) is available here: http://www.webupd8.org/2014/08/encrypt-dns-traffic-in-ubuntu-with.html


In essence: its ok, it will work as you want, specially if you are giving it such a high priority.

But the correct procedure for that would be to create a script in /etc/init.d with the correct structure (look for the scripts inside that directory for examples) and issue the command sudo update-rc.d foo_script.

It will then create links to your script in the specified priority written in the script while maintaining the necessary other services for your script to run. But since your script has a very high run priority and no other services necessary should down up by then you do not need to worry about that.

What you did was just a short cut for what happens using that procedure and it should be fine.


Better to use

find . -type f -exec chmod 655 -- {} +

The other proposed solution from @sagarchalise will not work if filenames contain spaces or start with a dash.


Failed to suspend due to nouveau failure

I think it's the same problem reported as "laptop suspend broken after latest kernel update".

Please report that this bug affects you at Bug #1329689


Ubuntu Touch on Nexus 7: Why No ld-linux.so*?

The Ubuntu Touch builds use the armhf ABI, an architecture which gives significant performance improvements on newer ARM chips.  The cross-compiler which targets this ABI is the gcc-arm-linux-gnueabihf (hf for "hard float") package, rather than the gcc-arm-linux-gnueabi package.  This armhf cross-compiler is available in 12.04.

You should not symlink /lib/ld-linux-armhf.so.3 to /lib/ld-linux.so.3.  The linkers have different names precisely because they're used for libraries that have different calling conventions.  A "hello world" might work ok, but programs will start to fail in mysterious ways as soon as you use any code that needs to pass floating point numbers as arguments to a function.


damn Linux, turns out it wasn't my fault!

Application's menu missing from menu bar
answered Apr 27 at 1:06 by rlam12:

  Apparently it is a confirmed bug on the release... A fix is being investigated. You can see the bug report here
  The temporary solution is to open a terminal with ALT + CONTROL + T and typing unity. This will cause the UI to reset and fix the problem. You'll need to so this every time you boot and it happens.
  It is still unknown why it happens, but it affects about 30% of boots.


How do I create an empty file (0 byte size) in all the directories?

That could be ...
find . -type d -exec touch {}/emptyfile \;

-type d means "directories"
execute the command touch  and create a file named "emptyfile"
the {} substitutes what is found  as a result from find. The / is to make it a valid path+filenane and the escaped ; is to close the command (otherwise it becomes "emptyfile;")

result ...
rinzwind@schijfwereld:~/t$ mkdir 1 2 3 4 5 6 7 8 9 10
rinzwind@schijfwereld:~/t$ ls -ltr */*
ls: cannot access '*/*': No such file or directory
rinzwind@schijfwereld:~/t$ find . -type d -exec touch {}/emptyfile \;
rinzwind@schijfwereld:~/t$ ls -ltr */*
-rw-rw-r-- 1 rinzwind rinzwind 0 apr 16 19:57 5/emptyfile
-rw-rw-r-- 1 rinzwind rinzwind 0 apr 16 19:57 9/emptyfile
-rw-rw-r-- 1 rinzwind rinzwind 0 apr 16 19:57 1/emptyfile
-rw-rw-r-- 1 rinzwind rinzwind 0 apr 16 19:57 8/emptyfile
-rw-rw-r-- 1 rinzwind rinzwind 0 apr 16 19:57 3/emptyfile
-rw-rw-r-- 1 rinzwind rinzwind 0 apr 16 19:57 2/emptyfile
-rw-rw-r-- 1 rinzwind rinzwind 0 apr 16 19:57 10/emptyfile
-rw-rw-r-- 1 rinzwind rinzwind 0 apr 16 19:57 7/emptyfile
-rw-rw-r-- 1 rinzwind rinzwind 0 apr 16 19:57 6/emptyfile
-rw-rw-r-- 1 rinzwind rinzwind 0 apr 16 19:57 4/emptyfile

Mine works but the answer from Peter Cordes is better :)


Clonezilla - if I need Live DVD, why bother installing?

Running Clonezilla within Ubuntu allows you to clone unmounted drives. Cloning a drive while it is mounted can and will cause damage. I am not sure how it is possible to clone like how you mentioned in Windows, unless the drive is unmounted.


bogus auto-unlock from launcher after crash

Workaround: use the terminal to (re)set the launcher icons after a crash. The locked launcher icons are stored in gconf at com.canonical.Unity.Launcher favorites, which you can access with dconf or terminal.

This gets the current value:

gsettings get com.canonical.Unity.Launcher favorites

Save the output of the above, then after a crash, run this:

gsettings set com.canonical.Unity.Launcher favorites "$value"

For example:

gsettings set com.canonical.Unity.Launcher favorites "['application://nautilus.desktop', 'application://firefox.desktop', 'unity://running-apps', 'unity://devices']"


Menu disappears when maximizing window from half screen

Benjamin,

It's normal, as Ubuntu works with a global menu.
Try to move your cursor to the top area when your application is in fullscreen mode.

You'll see the menus and windows options, as expected.

Edited:

You're right. After try for a while, it happened to me too. You could try Ctrl+Alt+5 to quit this "problematic" mode.

This behavior is a bug, and a fix was commited, as you can see here.


Menu application in terminal and Nautilus

OP posted the answer as a comment

I solved the problem completely uninstalling gnome-shell login to Unity and with terminal launch
sudo apt-get remove gnome-shell after this step, proceed with sudo apt-get install gnome-shell

Or find gnome-shell in the Software Centre:


How to retain date stamp while copying to another PC

You can do this with the -p option to scp. As explained in man scp:

 -p      Preserves modification times, access times, and modes from the
         original file.

So, just run

scp source_file user@host:/remote/path/file


HP 510 laptop doesn't suspend when I close the lid

To know if the button is indeed working, go to a terminal and type

while [ 1 ]; do cat /proc/acpi/button/lid/LID/state; sleep 1; done

you should get one

state:      open

every second. Now close the lid and wait a bit. Open it again. Some lines should now be

state:      closed

with that, you can tell that the hardware is working, and the signal is read by linux

If it is working, well, I have no idea what your problem is =P

However, I have an ugly kludge you can use while your problem is not fixed

#ensures that a closed lid causes the computer to suspend
#! /bin/bash

while [ 1 ]
do
sleep 20
grep closed /proc/acpi/button/lid/LID/state && sudo pm-suspend
done

This is a bash script.

To use it,

1) create a file with these contents (say, check_lid)
2) right click the file, and open properties
2.1) go to permissions, and select 'allow executing file as a program'
3) on the shutdown menu, go to Startup Applications and add your program (check_lid) to the programs in startup
4) Ensure that your user can run sudo pm-suspend without using a password (via the sudoers file)


xenial: remmina unable to connect via rdp to win 10 vdi

Below is the script I use to connect to vdiW10 machine, it works for windows 7 as well for me:

xfreerdp /v:<remote machine name> /u:<username> /p:$(zenity \
--entry \
--title="Domain Password" \
--text="Enter your _password:" \
--hide-text) /d:<domain> /f /cert-ignore /microphone:sys:alsa /sound:sys:alsa +auto-reconnect /g:<gateway address>;

Update your info and paste it in the terminal, it working for 14.04 and 16.04 LTS.


How to troubleshoot pen drive mounting via File Manager in Xubuntu?

I had the same problem, you have to modify /usr/share/polkit-1/actions/org.freedesktop.UDisks2.policy

in my case I change to allow_any yes /allow_any 2nd and 3rd policy and ldap users automount correctly usb's


Ubuntu 20.04, Nvidia - unmet Dependencies error [Installation]

This looks like it is similar to an issue that Pop_OS! users were facing recently. System76 has already patched this for Pop_OS! and has alerted Ubuntu developers. I think this will be solved in a couple of weeks- sit tight.
See this: https://www.reddit.com/r/pop_os/comments/n5j8c0/nvidia_driver_4652402_issues/


On Ubuntu 14.04.3, ansible won't install python-keyczar on selected hosts - manual apt-get install python-keyczar -y works

I'm having the same issue. If you're ansible script is written well, and can be sure that no process is locking apt, then you can make sure that the lock doesn't exists before running the apt module.

You can do this with the file model with become: true state=absent on the lock file.

This is a horrible work around, but i blame ubuntu :P I encounter no such problems with Arch Linux


Easiest way to test hardware with windows

you can download Windows10 image from following link: https://www.microsoft.com/en-gb/software-download/windows10ISO

It is from Microsoft itself so it is pretty legit, download ISO either burn it or make LiveUSB out of it and install it. The OS will not be activated, however you can use it to test out your sound card.

Another idea I have is to try to use wine to install the driver and test the sound card that way.


What does lint_package_filename_version_match mean?

This can happen very easily, but will be fixed in the software store very soon.

Basically it's a mismatch in version numbers between

what you specified when uploading through the web UI of the store
what's in the manifest file of your click app

Before you upload, make sure you bump the version in both and make sure they're the same.


Accidental shutdown during 14.04 -> 16.04 upgrade

Try the following commands after you login :

sudo dpkg --configure -a

sudo apt-get install -f

and then

sudo apt-get update && sudo apt-get dist-upgrade

that should fix the broken packages if any


Best way to back up entire system to upgrade to larger mSATA?

If you can hook both drives up to the same machine without mounting them you can use gparted to copy and expand the entire filesystem from the old disk onto the new.

Be cautious of the risks to your data during such an operation.


Can Unity run smoothly on an HP Mini 210-1000

That mini should run Unity just fine. (Much better than in 10.10). See here for more information:

How do I know if my video card can run Unity?


CloudStickyNotes.jar not working in gnome

For other users that run into this problem.  The root of it is a compatibility issue between Java and the system tray in Gnome 3.  Go to CloudStickyNotes.com and contact support (scroll to the bottom to see the email address).  The owner (me) will send you a build that defaults to the window instead of the system tray.


Recently used documents are not actualized during a KDE session

Perhaps because there is also a .kde/share/apps/RecentDocuments. You can try symlinking them as described here:

 ln -sf ~/.local/share/RecentDocuments ~/.kde/share/apps/RecentDocuments


You can change it in /etc/passwd, /etc/group and /etc/shadow or you use one of the preferred possibilties above. But - most important - you have to change the ownership of all files belonging to the user.

For instance, if the old user id is 1000 and the new one is 5000:

find / -uid 1000 -exec chown -h 5000 {} +

And the same for the group id (if you change it as well).

find / -gid 1000 -exec chgrp -h 5000 {} +


Is there a way for MaaS to Commission a Raspberry Pi 3B?

While you may not be able to PXE boot via MAAS on the RPi3, juju supports manual provisioning including the bootstrap node - https://jujucharms.com/docs/1.24/config-manual

With this you can install the systems with 16.04, then allow juju to provision them into the environment via SSH.


First, make sure your kernel has  SCSI  generic  support  enabled.   In
make xconfig, this shows up under SCSI support -> SCSI generic support.


What other things can I use my dumb terminal for?

You can run a performance monitoring program and keep an eye on the consumption of CPU and other resources as you initiate programs and functions with Ubuntu's graphic user interface.

You could also write a program to ring the bell on the terminal to announce the time.

Anything you could do with gnome-terminal should be possible with your terminal. If you happen to have problems with extra garbage on the screen and misplaced information as you proceed you may have to change the terminal type terminfo and termcap use for your device. apropos terminfo would be a good place to start.


You used vovar outside single quotes for the first time, but not the second time:

... awk '/'"$vovar"'/,/}/ {gsub("$vovar"," ") ...

If you'd been consistent:

$ awk '/'"$vovar"'/,/}/ {gsub("'"$vovar"'"," "); gsub("}",": %s,"); gsub("{"," ");gsub(",",": %s,");print}' foo

                ciscoFlashCopyStatus
                : %s: %s,


How to fix Dual graphic card problem? Nvidia and Intel

You need Bumblebee, it manages switching between the two cards and turns off the Nvidia card when it's not in use. Use this guide for Ubuntu.


Swap not mounting on a fresh installation

Don't worry!

Format /dev/sda6 to be a valid swap mkswap /dev/sda6
Activate the swap by swapon /dev/sda6
Additionally modify /etc/fstab to make swap start after every boot. The swap line will probably be already there. You will just need to update UUID received as output of step 1.


I have only seen this when I do not set up disk encryption and ubuntu runs under the assumption of why would you not want to?  If you set up the disk encryption it should stop giving this message and say instead that mounting was successful.

Its basically letting whoever is loading the os at the time that the drive is not encrypted.

Is this similar to your situation?


Ubuntu not working properly in VM workstation 10?

I had exactly the same issue and many more when using VM Workstation. Thats when I moved to Oracle VM Virtual Box. I have not had any issue what so ever with any of my Virtual machines since.


You may have to check out another working copy, and move your changes to the new copy, but be careful skip the .svn/ files:

data$ cp -a xyz xyz.bak
data$ cd xyz
data/xyz$ find -type d -name .svn -prune | xargs rm -fr
data/xyz$ cd ..
data$ mv xyz xyz-broken
data$ svn checkout ... xyz-new
data$ cp -R xyz-broken/* xyz-new/

Umm.. I have not tested the script, hope it works!


First you need to install kernel-headers

sudo apt-get install linux-headers-$(uname -r)

If it doesn't work then try this also

sudo ln -s /usr/src/linux-headers-$(uname -r)/include/generated/uapi/linux/version.h /usr/src/linux-headers-$(uname -r)/include/linux/version.h

Edited for types.h:

sudo ln -s /usr/src/linux-headers-$(uname -r)/include/uapi/asm-generic/types.h /lib/modules/$(uname -r)/build/include/uapi/linux/types.h


What GSM middleware will "Ubuntu for phones" use?

If I understand correctly, it will be running on top of the Android kernel, and the same radio drivers which are currently used on Android, will be used on Ubuntu for phones.


How to save monitor configuration on a laptop

The solution exists of two parts:

1. create a small script to arrange the screens

You should think of your combined screens as one combined virtual screen, as explained here.
To arrange two screens into the combined virtual screen, you need to arrange them from left to right. In your case:

to place the left screen on 0,0:

xrandr --output DP-0 --pos 0x0

to place the right screen (your build in screen):

xrandr --output LVDS-0 --pos 1920x0

When we put these two commands in a script:

#/bin/bash
xrandr --output DP-0 --pos 0x0
xrandr --output LVDS-0 --pos 1920x0

Copy the script into an empty file, save it as set_screen.sh
To use it (after the second screen is connected), run the command:

/bin/bash /path/to/set_screen.sh

or, if you make it executable:

/path/to/set_screen.sh

Now you have two options, you can either:

add the script to a shortcut key: choose: System Settings > "Keyboard" > "Shortcuts" > "Custom Shortcuts". Click the "+" and add the command to run the script,

or:

2. Run a script in the background to call the command

As described In the post: Run script when monitor is connected.
Replace in the section:

#--- set both commands (connect / disconnect) below
connect_command = "gedit"

"gedit" by the command to run the script that you created in step 1:

"/bin/bash /path/to/set_screen.sh"

If you add the script in the linked post to your startup applications, you will have your setup to fully automatically arrange your screens if the second monitor is connected.


Understanding the options in the GRUB menu

The version numbers refer to the kernels you have installed. You can get the version number of the running kernel like this:

$ uname -r
4.14.0-rc4-sound-23

You can see all kernels installed by looking in /boot:

$ ls /boot/vmlinuz*
/boot/vmlinuz-4.13.0-19-generic
/boot/vmlinuz-4.13.0-19-generic.efi.signed
/boot/vmlinuz-4.13.0-21-generic
/boot/vmlinuz-4.13.0-21-generic.efi.signed
/boot/vmlinuz-4.14.0-rc4-sound-23

Note that the GRUB menu is populated by GRUB's configuration file, which is written to when update-grub is called. This is done automatically when you install or remove a kernel package (or run a system upgrade that includes one), but if you change GRUB configuration in /etc/default/grub, install a kernel you have compiled or downloaded from outside your package manager, you need to run sudo update-grub to see changes in the GRUB menu.

The kernels are listed in the GRUB menu with recovery options (mainly for fixing your system when it is broken) and in your case with an option to use Upstart, the older init system used by Ubuntu before systemd became the default init system in 15.04.

Possibly relevant: Remove upstart option from GRUB

These options in the GRUB menu (usually only visible under Advanced Options) to boot different kernels come in useful if you have problems; for example, a newly installed kernel is buggy on your hardware, and you need to boot an older one to get the system working well enough to start debugging.


How do I manually install Adobe Flash player for Chromium?

Search your /usr/lib directory for Chromium's addons or plugins directory. (It may look like chromium-plugins or chromium/addons or chromium/plugins etc.)

Once this has been identified, open the terminal and cd into it. Then use:

sudo cp libpepflashplayer.so <plugins directory location>


You can not run an install on win 8 through wubi. you have to do a lot of maneuvering to get it to work and unless you have the technical skill i would not recommend it. I don't believe running the live disk will work either even if it where a usb.


/dev/sda1 is your root partition, which indeed can not be unmounted while Ubuntu is running off of it, because this is where the operating system is.

What I usually do in such cases is to boot from a live CD (my favorite is systemrescuecd) and then resize the partition while it is not active.


Booting error on GRUB after Backtrack installation

Place ubuntu on a USB Live, boot from it and do the following:

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

Then

sudo apt-get install -y boot-repair && (boot-repair &)

Do the recommended repair and then reboot.


GNOME - Sort menu entries alphabetically

Finally I went through dconf-editor and found a custom array in org.gnome.shell.app-picker-layout.
By setting that to its default value and restarting gnome-shell, the applications organize themselves alphabetically.
I still don't know if it should be done after every installed application or if it will stay that way.


Can you clarify package naming conventions for a beginner?

There is absolutely no difference between the flashplugin-installer and flashplugin-nonfree packages. As @8128 say :

flashplugin-installer is the 'new' name for flashplugin-nonfree. The aim being to more accurately reflect the contents of the package - the package doesn't contain the actual flash player, only an installer that automatically downloads and installs a copy of the plugin. (The file downloaded is the tarball as provided on the Adobe website, but in this case the file is mirrored on Canonical servers.)
The reasons you still see flashplugin-nonfree in Synaptic is for backwards compatibility. It is a transitional metapackage with no actual content, all it does is depends on and install flashplugin-installer.

Link


Plain text programs
In plain text programs such as Gedit or gnome-terminal, do the following:
Right click your open document or the terminal window >> choose Input Methods from the context menu >> and then choose Simple (instead of the default System (IBus (Intelligent Input Bus))
AltGr + 9 + c will now work as intended.
LibreOffice
In LibreOffice, the AltGr/Compose key sequences work as intended, but you need to add Shift to get to the 3rd level:
AltGr (or Compose) + Shift + 9 + c.


ubuntu 14.04, Vostro 3559 Strange audio problem

Install pavucontrol (pulse audio volume control).

Run it . In the "output device" tab, try to  manually change "port" from speaker to headphone (or reverse) .


The units are milliseconds/second or microseconds/second, meaning how much time within a second the task has been using the device.


If you want to use wine follow these instructions. Commands after downloading a broker (metatrader4):

sudo apt-get install wine-stable
cd Downloads/
wine pepperstone4setup.exe

pepperstone4 is the example use in the link; change it to the broker you used.

Mind though that there is a better and easier method: install virtualBox, windows inside virtualBox and then you can use Windows software natively. Makes for easier backups and is fully sandboxed. It will be a lot smoother experience.


Ubuntu 17.10: "a start job is running for Hold until boot process finishes up (time/no limit)

This can be caused from a broken version of Guest Additions. From https://www.virtualbox.org/wiki/Downloads :

  Important: The Guest Additions which come with VirtualBox 5.2.6 and
  5.1.32 do not work properly on Linux guests with 3D enabled. Here are updated versions for 5.2.6 and 5.1.32.

The easiest way to fix the issue seems to be:

Power down the VM
Disable 3D Acceleration in VirtualBox Disaply Settings
Boot the system and install the updated Guest Additions
Power down the VM
Re-enable 3D Acceleration in VirtualBox Disaply Settings
Power up the VM system, which now boots correctly


No public key GPG error when submitting quickly application

You need to have your public key attached to your Launchpad profile.

https://help.launchpad.net/YourAccount/ImportingYourPGPKey/


Okular, the KDE pdf viewer, supports XPS. The package name is okular I'm not aware of any GNOME/GTK+ viewers that support XPS, though according to this evince bug in upstream GNOME support has been added. It's not working for me in Maverick....


Recovering Very Important Lost Data From Ntfs Partition

If the data is REALLY important. Stop using the disk/partition NOW. Unmount it! And do a read only copy of the disk. Every time you try to recover something on the original disk you are in danger of loosing more data. Then try recovery tools on the copied disk image. You can create an image with dd if=your_partition of=your_disk_image_file bs=512 (hope the syntax is correct)


How to edit header of tar.gz file that has been split

No. The tar header is in the beginning of the 1st section. you will have to download and reassemble the file, at least up to the section you want.
See https://www.fileformat.info/format/tar/corion.htm . Adding gzip compression makes the file harder to uncompress in the middle.


Boot and log in without fallback to text console

You will always get a black screen between Plymouth and Login, unless you are using Windows 10. For myself in Ubuntu 16.04 it lasts about four seconds. In Ubuntu 18.04 it only lasts 1 or 2 seconds. You can however eliminate all text that appears on that screen.

There are a number of different things you can do for a smoother boot experience:

Reduce console messages
Reduce screen resetting
Eliminate Grub messages
Reduce fsck during boot

I've purchased a tripod for my cellphone to make videos of the various grub booting scenarios but have run into technical difficulties creating GIF to post here.

1. Reduce console messages

Based on Arch Linux's Silent Boot article you can add three extra options after quiet splash boot parameters:

quiet splash loglevel=0 vga=current udev.log-priority=3

The full article references systemd in boot in which case this can be used:

quiet loglevel=3 rd.systemd.show_status=auto rd.udev.log_priority=3

Also touch ~/.hushlogin to remove the Last login message.

2. Reduce screen resetting

From this Q&A: What is vt.handoff=7 parameter in grub.cfg? it says:

  For a smooth boot process, we want to display something other than a
  black screen as early as possible and leave it on screen until the
  desktop is ready. vt.handoff=7 is part of this. We have the boot
  loader display an aubergine background (we wanted to have an Ubuntu
  logo as well, but there are problems with different aspect ratios
  between the boot loader and the real system, so this is the next best
  thing). vt.handoff=7 then causes the kernel to maintain the current
  contents of video memory on virtual terminal 7, which is a new
  "transparent" VT type. The first time that the kernel is told to
  switch away from VT 7, either from Plymouth or manually (Alt-F1,
  etc.), these contents are lost and VT 7 reverts to text mode.

If you are grub with a graphics background image add these lines in /etc/default/grub:

GRUB_GFXMODE="1920x1080x32"
GRUB_GFXPAYLOAD_LINUX="keep"

3. Eliminate Grub messages

After selecting a menu option, or the countdown timer expires grub sometimes issues these messages:

Loading Linux %s ..." ${version}
Loading initial ramdisk ...

To eliminate these message edit /etc/grub.d/10_linux and change these lines to comments:

# June 29, 2018 hide Loading Linux message
#  if [ x"$quiet_boot" = x0 ] || [ x"$type" != xsimple ]; then
#    message="$(gettext_printf "Loading Linux %s ..." ${version})"
#    sed "s/^/$submenu_indentation/" << EOF
#   echo    '$(echo "$message" | grub_quote)'
#EOF
#  fi

And a page down these lines too:

# June 29, 2018 hide Loading inital ramdisk message
#    if [ x"$quiet_boot" = x0 ] || [ x"$type" != xsimple ]; then
#      message="$(gettext_printf "Loading initial ramdisk ...")"
#      sed "s/^/$submenu_indentation/" << EOF
#   echo    '$(echo "$message" | grub_quote)'
#EOF
#    fi

4. Reduce fsck during boot

In your /etc/fstab ensure passno is set to 0 to prevent systemd-fsck@.service from running. More details from the manpage.

Change the frequency of fsck to every 30 boots or once a month: My Ubuntu is running fsck on every bootup


Windows System Reserved Partition mounting in ubuntu 12.04

My guess is you are using wubi.

You can edit /etc/fstab and comment out the entry for the problematic partition.

# command line
sudo -e /etc/fstab

# graphical
gksu gedit /etc/fstab

Add a # in front of the line

# UUID=FECA-7D83 /windows vfat utf8,umask=007,gid=46 0 1

and add the line:

UUID=7C7C735D7C7310DE /mnt/SysRes ntfs defaults,noauto 0 0

If you wish your windows partition to be mounted, identify it with blkid

sudo blkid

And update the UUID in /etc/fstab

Save your changes to /etc/fstab

For additional information see Ubuntu wiki fstab


Ubuntu boot mode conflict when installing to new (empty) SSD

Well, since the SSD is new, I decided to go with the default option of "Erase disk and install Ubuntu" instead of specifying my own partition table as I usually do. And this led to a successful install.

My guess as to the problem is that I was specifying the root partition as "ext4 filesystem" instead of ESP. Can someone comment as to whether this diagnosis is correct?

EDIT: It is correct. I confirmed by re-installing with my own partition table as follows: EFI System Partition (ESP) at the beginning of the drive with around 570MB of space, and then partitions for root, home, and swap. Thanks for the help!


14.04 bluetooth headset won't save a2dp setting

Using pavucontrol from the pavucontrol package, it is really easy to setup A2DP for your device, and map connections to it. Your paired headphones should appear as an option to output audio.

Don't forget to put it in high quality mode (A2DP) in the configuration tab. This is necessary for some devices that have mixed mode.

Source: https://wiki.debian.org/BluetoothUser/a2dp


I can not resist the advice to use ssh (scp / sftp) rather then ftp as I think it is more secure.

At any rate, vim will open files or save files over ftp (and scp).

vim ftp://user@server.com//path/to/file.php

Notice the double // :)

See this tutorial for details.

At any rate, to save a file you are working on locally over ftp, user Nwrite

Nwrite ftp://user@server/path/to/file.php

You can map that in vim with

cmap <Leader>r :Nread ftp://user@server/path/to/file.php
cmap <Leader>w :Nwrite ftp://user@server/path/to/file.php

Leader is a variable, by default it is /, but you can define it as another key

:let mapleader = "+"

For details See:

http://vim.wikia.com/wiki/Best_Vim_Tips#FTP_from_Vim

https://stackoverflow.com/questions/1764263/what-is-the-leader-in-a-vimrc-file


How to modify the default 'sender' and 'subject' in cronjob failure email?

I have following lines end of my backup script to send email out with log gathered before.

mailbody=${log}
echo "From: Backup xx <backup@gensand.box>" > /tmp/backupmail
echo "To: gen@riddi.eu" >> /tmp/backupmail
echo "Subject: [BACKUP] Failure report for $(hostname)" >> /tmp/backupmail
echo "" >> /tmp/backupmail
cat ${mailbody} >> /tmp/backupmail
cat /tmp/backupmail | /usr/sbin/sendmail -t


How do I make krusader the default file manager?

1) Make a folder in your home directory called bin

mkdir ~/bin

2) Make a script called Nautilus that executes Dolphin and put it in this folder

gedit ~/bin/nautilus

3) Then copy this code into it and save

#!/bin/bash
exec krusader $@
exit 0

This will launch krusader every time nautilus was to be launched.


Most of the boot problems can be solved in a semi-automatic way using a tool called boot-repair.

Usually this involves booting the PC from a live-CD or live-USB, enabling an additional repository, install boot-repair and then run it, following the instructions given by the app.

See here for details: https://help.ubuntu.com/community/Boot-Repair

Anyways, you don't need to restore Ubuntu boot if your goal is just to recover some files and documents stored in Ubuntu partition. From Windows you won't be able to see them, but they will still be there.

Easiest way to recover those files is to start your PC using an Ubuntu live-usb system like the one you used to install Ubuntu first time.

When prompted, choose the option "Try Ubuntu": from there you will be able to mount your original Ubuntu system partition (and your Windows partitions, if present), and copy your files to an USB disk, for example, or even to a directory in Windows partition.

Your partitions and disks will appear as disk icons on the left of your screen, just click on them to see their contents.

Usually personal files are stored in sub directories of the /home/ directory of your Ubuntu partition.


I am going to assume that you are using virtualbox. You will need to set the network settings for each of your guests to bridge mode. This should place the VM's on the network to find DHCP. See this page with explanations of networking in VirtualBox.

VBox Networking


Why swap is touched when zswap is enabled and zswap pool is not full?

Pages in zswap still get counted as disk swapped.
I believe this is needed because the zswap pool size is dynamic and this allows to eventually move all pages to the disk swap.

/sys/kernel/debug/zswap/written_back_pages shows how many pages where actually written to disk, but as far as I understand this is an all time cumulative increment.

To get the current number of bytes swapped on disk :
You want to calculate

$used_swap_in_bytes(as shown by "free -b" or "swapon -s") -
/sys/kernel/debug/zswap/stored_pages * $(getconf PAGESIZE)

eg (in bytes)

echo "$(LANG=c free -b |grep Swap |awk '{print $3}') - $(sudo \
cat /sys/kernel/debug/zswap/stored_pages)*$(getconf PAGESIZE)" |bc -l
echo bytes swapped on disk

or in Mio (floor rounded ):

echo | awk '{value='"$(LANG=c free -b |grep Swap |awk '{print $3}')\
- $(sudo cat /sys/kernel/debug/zswap/stored_pages)*\
$(getconf PAGESIZE)"';printf "%.0f\n", value/1024**2}'
echo Mio swapped on disk


How to install snappy Ubuntu 15.04 Core images on a PC

I don't think you can install Ubuntu snappy directly to your PC.

According to the official link: https://developer.ubuntu.com/en/snappy/start/

Snappy will run on:

Clouds

Launch an Ubuntu Core instance on Azure
Launch an Ubuntu Core instance on Google Compute Engine
Launch an Ubuntu Core instance on Amazon EC2
Launch an Ubuntu Core instance as an OVA image
Launch an Ubuntu Core instance on Vagrant

Things

Get started with a Beaglebone Black
Get started with a Raspberry Pi 2

Local

Launch an Ubuntu Core instance locally (KVM)

So to work locally you have to use KVM

Check the link to learn how to use it using KVM on Local PC


How To Debug and Fix PPTP/VPN Client Connection

Check your settings with it.

VPN connection in Ubuntu

Go to network manager > VPN Connection > Configure VPN > Add VPN

Name VPN Connection ( Any Name )
Gateway : You ip address of pptp server Or FDDN ( Fully Qualified Domain Name )
User Name
Password
Click on Advanced

  Click on " Use point to point encryption " Click OK & Save

Now open terminal

 tail -f /var/log/syslog

And just connect to VPN & check your logs.


How to install ubuntu on separated flash drives?

If you only want to play Minecraft and browse the web, this partitioning will do:

/dev/sda = /
/dev/sdb = unused

Alternatively, you could make a RAID 1 volume of the two disks to protect against the failure of one drive. A RAID 1 volume uses two (or more) disks with identical contents, so if one disk fails, you still have a working system. Or you could use the second drive to back up your data.

Separating /usr is not useful. On a typical desktop machine, /usr makes up the bulk of what is not /home. If you have little data on /home, with your scheme, you'd end up with /dev/sda almost empty. If you have a lot of data in /home, make it /dev/sdb.

If you need more than 8GB for the system, there's no particularly meaningful place to break it up. /usr/lib would be a good bet. Anyway, you can mount /dev/sdb wherever you like, and move one or more directories there and create a symbolic link.

Rather than pick a mount point, there's a simpler approach to splitting your system between two drives: make it a RAID 0 volume. RAID 0 combines two or more disks into one, in an arrangement that tries to spread the load evenly between the disks. The advantages of RAID 0 over a mount point is that you don't have to worry at all about choosing the mount point right for splitting the space evenly, and that it's a bit faster. The downside of RAID 0 is that if one of the disks fails, the whole filesystem will be unusable.

To install Ubuntu on a RAID volume, you'll need to use the server (alternate) installation media and do manual partitioning.


Unable to load the podcast's feed in Rhythmbox

OK, I think my previous answer may have been a bit hasty. I did some more digging for you, and here is what I found out.

Subscribe to the feed that you want. In my case, the example I used was 7 podcasts for Linux users.
In this example, I clicked on "Show Feed".
Then there was an option that said "All Shows Audio".
Finally it was just a matter of copy and paste. Here is another screenshot of the website feed I copied. Now go to Rhythmbox and click on Podcasts. In the search bar, paste in the link that you want. Next, click search, and then subscribe.
This website was helpful in getting answers for you. I hope this helps.


I can't install Broadcom driver on Ubuntu 14.04

Open your terminal and do the following,

sudo rmmod -f acer-wmi
sudo rfkill unblock all
rfkill list all

check the wifi is working fine,


Assuming that you are experiencing an issue related with proxy authentication, Here is a simple way to set proxy authentication in Ubuntu:

Here is a link to a python program named UBPROXY . Given below are the steps to set proxy Authentication.

http://code.google.com/p/ubproxy/downloads/detail?name=ubproxy

command to use->

1.download this program.

2.open your terminal

3."cd ~/Downloads" (Presuming that your download exist in this directory)

4."chmod +x ubproxy"

5."sudo ./ubproxy"


How to rename the shell current working directory

You can add this feature to your shell by modifying your ~/.bashrc file.

Assuming a standard configuration, in your ~/.bashrc file change the definition of PS1, which is the prompt, from:

if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi

to the following:

if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]${PROMPT:-\w}\[\033[00m\]\$ '
else
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:${PROMPT:-\w}\$ '
fi

You are replacing both the \ws with ${PROMPT:-\w}.

In a prompt string, the \w means the current directory.  The ${VAR:-VALUE} means use VALUE unless the variable VAR is set and not null.  Therefore it is possible to override showing the current directory while a shell variable is set.

Now you can set the alias with:

sbmaruf@lenovo:/sys/dev/block/7:6/bdi/subsystem/7:7/power$ PROMPT=proj1
sbmaruf@lenovo:proj1$

And unset it with:

sbmaruf@lenovo:proj1$ unset PROMPT

Or set it as null:

sbmaruf@lenovo:proj1$ PROMPT=
sbmaruf@lenovo:/sys/dev/block/7:6/bdi/subsystem/7:7/power$


discussion regarding upgrading to 12.1 is confusing

12.04 is an LTS or long term support version. It will be supported with updates for 3 years (desktop) and 5 years (server). 12.10 is not perfect though. I had some problems and went back to 12.10.


As I understand you need to install usb-modeswitch and usb-modeswitch-data packages, and to do that you have to use your Ubuntu CD/DVD as a repository, meaning you have to add it to the Software Sources list. Unless you also have a wired connection and you can already use the Internet. Anyway, you have to type this code in terminal:

  sudo apt-get install usb-modeswitch usb-modeswitch-data

Those 2 packages should be already present on your system and you may get a message in the terminal saying that they are installed but if they are not you need them.

Next step is to visit this page to learn how to setup a 3g connection using ubuntu network manager. I hope this helps because I am no expert in this kind of problems but I thought you can find a solution following the instructions from the link I gave you.

The intructions are targeted to people living in the UK, so you should choose your own location and all the other required data.


Use a DTS Connect enabled sound card in Ubuntu

S/PDIF supports the following formats:

Single channel PCM (Mono)

Dual channel PCM (Stereo)

Compressed bitstreams up to 48Khz/16bps using AC3 (Dolby Digital) or DTS encoding mechanisms.

Surround audio across S/PSIF can only be achieved using AC3/DTS. Multichannel PCM (most desirable) is not possible over S/PDIF but is possible over HDMI.

If you wish to use your external amplifier to play games that do not have native support for AC3 (almost none on PC do as it's typically unnecessary) then you must have a soundcard that supports Dolby Digital Live or DTS Connect, and an external receiver which supports decoding either one.