Bash - How to detect if a variable is more than a certain amount of characters

You can use if-then-else-fi like this:
if [[ ${#detect} -gt 8 ]] ; then
    echo "Error message..."
    exit 1
else
    echo "Good to go..."
    exit 0
fi

exit 1 generally means failure and exit 0 generally means success. In either case your script ends immediately when exit is encountered so use them appropriately.
You can also use implied if-then which is fairly unique the the shell language:
[[ ${#detect} -gt 8 ]] && { echo "Error message..." ; exit 1 ; }

# successful code here
exit 0

If you didn't need an error message the { ... } braces aren't required for a single command eg:
[[ ${#detect} -gt 8 ]] && exit 1

can be used to say "If the variable named detect is > 8 then exit".

Enhancing the process
Generally it is considered rude to allow the user only one chance to input a string. The polite method is to ask for the string again after telling them it needs to be 8 characters or less. For example:
echo "Enter character string 1 to 8 characters long or press <CTRL>+C to exit."
while True ; do
    read StringVar
    [[ ${#StringVar} -ge 1 ]] && [[ ${#StringVar} -le 8 ]] && break
    echo "Sorry that string is ${#StringVar} long. Please try again."
done

# successful code here

In this case the program keeps requesting input until variable StringVar is obtained and it is greater than or equal to 1 AND it is less than or equal to 8 at which point the while look is broken out of with the break command.
Alternately the user can press Ctrl+C/kbd> to terminate the bash script.
The concise lines:
[[ ${#StringVar} -ge 1 ]] && [[ ${#StringVar} -le 8 ]] && break
echo "Sorry that string is ${#StringVar} long. Please try again."

... can be made ridiculously verbose like this:
if [[ ${#StringVar} -ge 1 ]] ; then
    if [[ ${#StringVar} -le 8 ]] ; then
        break
    else
        echo "Sorry that string is ${#StringVar} long. Please try again."
        continue
    fi
else
    echo "Sorry that string is ${#StringVar} long. Please try again."
    continue
fi

Although not incorrect it is wasteful to both the programmer's and system's time.


Different install speeds on usb 3.0 usbs

I've been doing exactly this for a few years and like you, I too purchased Lexars only to find out they are over-rated, at least it appears I'm not the only amazon purchaser who has come to this conclusion.  They just aren't very good for speed, and even after retiring them I discovered other unexpected limitations to them.  Simply having a usb3.0 interface does not make for a fast device, but even among devices claiming speed like certain Lexars, the only guidelines you can depend on are respectable reviewers and your own benchmark testing.  If you don't mind wiping those usb flashdrives, you can use a utility built into Ubuntu's "disk utility" app to benchmark them, but they have to be completely wiped with no partitions on them at all before the benchmarker will work.

By contrast the Patriot brand, "Supersonic Rage XT" flashdrives are far better.  They are not the fastest I've tried, which I'll come back to later, but they are probably your best value in terms of money and speed.  Recently I purchased a special model of PNY which also claims exceptional speeds.  I've simply been too busy to run the benchmark.

Now if you want REAL performance, here's what you do.  You purchase THIS external mSATA to USB3.0 adapter case and any size of mSATA drive you like.  Most such drives 6gb/sec transfer rates.  With this adapter you'll come close to the performance you'd see with them as internal.  I'm using one right now on this computer I'm writing to you from.  I swear to you, if you try this, you will experience performance you won't see on most gaming desktop computers.

In case you care to know, I'm using a 64gb msata in my case, but I could just as easily use one as large as 1tb.  Other advantages of this design is that if by any chance you bump your stick you can break the plug off and you are locked out but as this device uses a male to male adapter cable, the odds are highly against a cable bump leading you to being locked out.

Is should also mention the dimensions as the ad omits it.  1.75" wide, 3" long, 5/16" thick.

In case you wish to duplicate my success precisely, here's the exact 64g mSATA SSD I'm using, here's the link to the exact item.  Interesting, the price has fallen, making this method less than half again as expensive as purchasing the patriot I linked you to.

You may also be intrigued by some of the clues about this project I've posted here on my user profile and on my linkedin page.  I'm hoping to one day dedicate some sort of web or perhaps Google plus community page to it as I personally feel it is the way to go for most people.  Having portable boot media like this is actually more practical than most people can imaging.  In some ways it is more practical than cloud computing in so much as it is not dependent upon internet connectivity.


Reliably remapping keys per input device

I also wanted to do swap cmd and alt keys only on my MacBook Pro, but not when I have a normal external keyboard plugged in.

From the directions here, the following "just works" on 14.04 (and likely 13.10):

Add options hid_apple swap_opt_cmd=1 to /etc/modprobe.d/hid_apple.conf, creating the file if it doesn't exist
Rebuild initramfs with sudo update-initramfs -u -k all
Reboot


How can I connect a Logitech Pebble (M350) mouse via bluetooth?

after rebooting a zillion times, and connecting on the Win10 boot, suddenly the same bt connection process worked and the mouse is now recognized.

I have no idea why it works now or why it did not work before but I think this subject can be closed.

Thanks for your help!
B


clamav - ERROR: /var/log/clamav/freshclam.log is locked by another process?

Short answer:

You don't have to run it manually because it has been run automatically and is running in the background, that's why you receive that message.

If you want to stop the daemon and run it manually:

sudo systemctl stop clamav-freshclam.service

run it manually:

sudo freshclam

What is happening and how to handle it?

Every time when you encounter into a similar situations, errors like file x has been locked or Another process is using this file : /path/to/x you can use the lsof command to find out which process is using that file, in your case if you run:

sudo lsof /var/log/clamav/freshclam.log

You should get an output like:

COMMAND   PID   USER   FD   TYPE DEVICE SIZE/OFF     NODE NAME
abc       126   user   3wW  REG  259,1  100          1048 /var/log/clamav/freshclam.log

The abc is the name of process which is using that file, in your case it's: freshclam.

That means freshclam which you want to run has been already ran by clamav daemons.

you can use less /var/log/clamav/freshclam.log or similar commands to see what's going on.

So you don't have to run it manually anymore, it's a process to avoid any conflict and having multiple instance of a same process doing same thing at the same time.

If you want to make it stop and run it manually, then send a SIGTERM to its process, that gives the process a chance to finish its job and close itself cleanly, something like:

sudo pkill -15 -x freshclam

in this case sudo may be necessary.
15: SIGTERM is the default

Then run it manually:

sudo freshclam

However in this case you can use:

sudo systemctl stop clamav-freshclam.service

to stop the daemon.


How does the Display Server - Display Manager - Window Manager structure exactly work?

An X Windows server provides a very basic graphical environment, usually connected to a monitor, a mouse and a keyboard.

A display manager (DM) is just the login screen, which runs in its own X windows server session.  When you log in, the DM will usually start an entirely fresh X session and will also start the window manager (or desktop environment) that you have chosen.

There are many window managers (WM) available for X.  These provide the basics of handling switching and focusing windows, positioning, resizing and decorations (or no decorations in the case of twm/ratpoison/awesome).

A desktop environment (DE) usually provides a window manager but a bunch of other stuff too: panels, start button, applets for volume, network etc.  They provide an environment in which everything looks similar and easily recognisable, and provide GUI tools that allow you to do many admin tasks without having to type in a terminal.  They often provide a display manager too, for a consistent end-to-end experience.  And in the case of Gnome and KDE, a full suite of applications too!

So hackers can survive with just a window manager, but general computer users prefer a desktop environment where everything is integrated in a familiar style.

The fun thing is, thanks to Unix's philosophy of decoupling components, and since the only common required component is X windows, you can mix and match the rest if you want to.  You could use Trinity KDE's display manager but ask it to run the Fluxbox window manager when you log in, and then startup LXDE's panel (lxpanel) to provide some icons, applets and a workspace pager.  You could even run bbkeys to perform window management actions using your favourite keybindings, and keep using it if you switch to a different WM later!  :)

(A setup like that can be achieved with configuration in .fluxbox/startup or in .xinitrc if you skip the DM and just run startx from the console.)

Finally, many window managers will let you switch to a different window manager via their menu (sometimes found by right-clicking the desktop), without restarting the X session or losing any of your windows!  This is great when you want to try out some WMs to see which one you like most.  Sadly modern Desktop Environments don't seem to bother with this cool feature.

Some distributions will offer you a failsafe login, which may provide an x-terminal with no window manager.  From there you can boot a window manager, kill it, start a DE, kill that, start a new window manager etc.  The X session itself will not close until that x-terminal does.


There are subtle problems, we'd probably need details to really fix.  Of course, you need to boot into Ubuntu in order to get the thing fixed, but your booter does not want to go there.  You can get there booting from the USB?

When your computer boots, it goes straight to windows?  You don't see a grub menu to choose the OS at all?

If yes, I have ideas. It may be you do need to follow the usual advice about starting Ubuntu and re-running the grub install, but the thing may be installed, but just not found.

I have encountered the problem you see in the following context. The hard disks are recognized at startup in an unexpected order.  The boot process will use the first OS loader it finds. If your first found drive has Windoze, you get that.

Sometimes it happens that when you run the Linux install, it notices the drives in a different order.  The one you think should be found and boot the grub menu actually is found second by the BIOS. The other drive has the  old Windoze boot loader.  For whatever reason, the Linux install sees the drives in different orders.  If that's what is happening, your BIOS may allow you to alter the order of the drives that are found.

Also, in the OS setup you may have a way to prevent the Windows only drive from being seen as a bootable device. I'd check, anyway

Before we understood that was the problem, we actually swapped cables from motherboard to disk drives. When we want Windows to boot for maintenance, the technician has to go into the bios and reverse the boot order.  If you think problem is like that, I can check those systems, get details.

Other ideas. It is possible the bootloader was not installed in the correct location.  In the installer, do you remember deciding where to install the boot loader? You may have to designate which drive, or even a partition.  If your drives are using the older Master Boot Record style to create partitions, then for sure the bootable thing needs to be set a active.  If you have the newer style partitions (GPT), I don't think you have to mark a partition bootable (https://wiki.archlinux.org/index.php/partitioning).

Maybe we should check how your drives are laid out. I have one traditional SATA and one of the newer type SSD.

$ lsblk
NAME           MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
loop0            7:0    0   100G  0 loop
└─veracrypt1_0 253:1    0   100G  0 dm
  └─veracrypt1 253:2    0   100G  0 dm    /home/pauljohn/TrueMounted
sda              8:0    0 931.5G  0 disk
├─sda1           8:1    0 214.9G  0 part  /home/pauljohn/VM
└─sda2           8:2    0   538G  0 part  /home/pauljohn/LinuxDownloads
nvme0n1        259:0    0   477G  0 disk
├─nvme0n1p1    259:1    0   500M  0 part  /boot/efi
├─nvme0n1p2    259:2    0     3G  0 part
[snip]

The sda is the ordinary one.  The one labeled NVMe is the SSD drive.  That's where I have the boot record installed. If you also have that kind of ssd, the way to see the partitions is parted, like so:

$ sudo parted /dev/nvme0n1
GNU Parted 3.2
Using /dev/nvme0n1
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: NVMe Device (nvme)
Disk /dev/nvme0n1: 512GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system     Name                  Flags
 1      1049kB  525MB   524MB   fat32           EFI system partition  boot, esp
 2      525MB   3747MB  3221MB  fat32           Basic data partition  msftdata
 3      3747MB  98.1GB  94.4GB  ext4            root
 4      98.1GB  151GB   52.4GB  ext4
 5      151GB   178GB   27.1GB  ext4
 6      178GB   188GB   10.5GB  ext4            opt
 7      188GB   223GB   34.6GB  linux-swap(v1)
 8      223GB   512GB   289GB   ext4            home

Note on partition 1, it has the boot attribute.  I have no other
partitions with the boot attribute, there's no confusion.  I suspect you have more than one, and it is finding the wrong one first.

Good luck, let us know  what you try, but be explicit. Write it down as exactly as you can. The  grub framework tries to make things automatic. That's great when it works. Less good otherwise.


Cannot find the graphviz package in apt on 18.04.1 LTS

I found the answer myself, I didn't have the "Universe" repository enabled in Ubuntu. I just had to run the following

sudo add-apt-repository universe
sudo apt update

And then installing it worked with

sudo apt install graphviz


How to measure "millisecond" timing in videos like Youtube (incl. frame by frame advance video)?

You can increase the fps of RecordMyDesktop to get finer control frame by frame. as noted here. Sadly this appears to currently be limited to 50 fps which at best will result in one frame every 1/20th of a second. You'll have to play with the settings to accommodate the limits of your system.

You'd need to be able to record 1000 fps to get millisecond frames. While 1000 fps recordings are possible the hardware is pretty cost prohibitive.

Playing the resulting video with the command ffplay videoname will give you not only a window to watch the video in but also a terminal output showing duration accurate to 1/100 th of a second.

You can also get the duration of the entire video with mediainfo as in mediainfo videoname which appears to have results accurate to 1/1000th of a second.

You can use ffmpeg to break a video into frames that you can examine seperately to determine the timing (frame 990 @ 1000 fps would be 990 ms from the beginning)

RecordMyDesktop is available in the Software Center if you don't have it and ffplay is part of the ffmpeg package also available in the Software Center


Unity - black windows when gaining focus

This is a bug, see https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/1072206

So far no progress.
Make sure to click "This bug affects me" on the bug report in order to increase visibility.


Since updating to 16.04 many application are missing the file menu

I think problem can be in menus setting. Try to open System Settings by typing unity-control-center in terminal, there click on Appearance, choose Behavior and here is setting "Show the menus for a window". Here choose second: In the window's title bar.


You should be able to remove the ubuntu-desktop metapackage (and unity) - which will prevent your computer from autostarting in the Unity desktop environment.

This command should completely remove the Ubuntu desktop, Unity, the Unity greeter, and relevant configuration files.

sudo apt-get purge ubuntu-desktop unity unity-greeter && sudo apt-get autoremove

You will want to make sure to read the list of packages that will be removed, to make sure it doesn't remove a package you want to use.

Source: https://askubuntu.com/a/483627/103537


I have the same exact Intel Wi-Fi module and this fixed the issue.
Edit /etc/modprobe.d/iwlwifi.conf and add the following at the end of the file
options iwlwifi bt_coex_active=0
Then do sudo modprobe -r iwlwifi and sudo modprobe iwlwifi
Or just reboot.


How do I disable the Message of the Day (MOTD) on Ubuntu 14.04?

Most answers need root access.

Any user can get a clean login(include disabling the MOTD), simply run:

touch $HOME/.hushlogin


You should probably install your linux distro in the same mode as your windows. Since it's Windows 8, it is probably in UEFI mode. Therefore, it might work when you install linux in UEFI mode as well.


ssh: connect to host myhostname.ddns.net port 22: Connection refused

A few things to check, in order of most likely IME,

Port forwarding. Unless your machine is directly accessible from the internet on 80.xxx.yyy.zzz, that's probably a router's address. You need to tell that router to forward traffic on Port 22 on to your computer. This is router-specific. The best single resource for this is PortForward.com.

I see no mention of this here or on the previous question so this seems most likely.
Firewalls can allow traffic from some locations and not others. I don't know what you've set up in this regard but if you're using UFW, sudo ufw status should let you see any deny/allow patterns that affect that port.
/etc/ssh/sshd_config might be set up to only allow connections on a certain network. This isn't the default behaviour so again, this will have been something you've inadvertently done.
If you've installed fail2ban, is it possible you've already triggered one of its its automated bans from your external IP?

Before you push this onto the Internet using near-stock settings, I'd strongly suggest you read an article I wrote on making SSH secure. People get hacked through inadequate security practices all the time and a SSH server is a direct line to total control.


After 1 year with problems to make works headphone together with mic, I got a solution for my ASUS S46CA, I think this can works for you too.
First, I try a lot of options snd-hda-intel, but only works this:
options snd-hda-intel model=alc255-asus
for my ALC270.
But it is not enough.
I needed use hdajackretask
And force
pin ID 0x1a to be "Headphone"
pin ID 0x18 to be "Microphone"
if alc255-asus don't works for you, you can try another options, like: alc269-dmic, alc271-dmic, headset-mic, alc283-headset.
Don't forget to restart the machine after hdajackretask.


Make sudoers work with only certain parameter?

Try to make a script and then let the use execute the script wthout password.

Edit:

sudoers:

#User alias specification
Cmnd_Alias ADJBL = script.sh

#For our user..
ouruser HOME=(root) NOPASSWD:ADJBL

then into the script:

#!/bin/bash

sudo echo 150 >/sys/class/backlight/intel_backlight/brightness

anf add it to path. this should work.


Brackets plugins not working in Ubuntu 19.04

This is a known issue of Brackets. you should take it up with his developer:

https://github.com/adobe/brackets/issues/13730

There is a quick fix though : you can change the language under "debug" from "system default" to "English(US)".


Problem in installing Ubuntu on Toshiba Satellite laptop

F2 or Esc will work to load Bios.
In bios check if HDD is listed.
You don't select windows load options from Bios, you only choose which hard drive to boot first. When the hard drive is loading file system it gives you option to choose the OS from available OS.

HTH


Software Center install hung in the middle, no network activity

Install clamav and clamtk this way...

In terminal...

sudo apt-get purge clamav clamtk # remove partially installed apps
sudo apt-get update # update the software database
sudo apt-get install clamav clamtk # install clamav and the GUI

To make future .deb file installs go easier and more reliable than the Software Center...

sudo apt-get install gdebi # this may already be installed

Then right-click on any .deb file (like the one you download in the next paragraph), and change the default "open with" app from Software Center to gdebi.

Then go to https://dave-theunsub.github.io/clamtk/ and download the newer version of clamtk (https://bitbucket.org/dave_theunsub/clamtk/downloads/clamtk_5.24-1_all.deb) and install it by double-clicking on it. Make sure to set the various preferences, folders to scan, recurse folders, and the "scheduler" scans for database updates, and auto scans.


Indicator-network or a connman frontend for KDE


Unable to install NVIDIA GPU drivers on Xenial

You install wrong drivers. Remove the legacy driver and install the correct driver this way:

sudo apt purge 'nvidia.*'
sudo apt install nvidia-361 nvidia-prime

Reboot.


Log in fails after installing additional drivers

Try starting a previous version of Ubuntu and see if that fixes it.

If this fixes it, run sudo apt-get update && sudo apt-get upgrade. Once this is complete open up Update manager and uncheck ALL of any updates having to do with graphics, then select one (1 - only one) again and write down the graphic update you selected.
Install these updates and restart, if you get the same problem, you probably have found the problem. If not, then do this again until (writing down the selected graphics update each time) you get this problem again. Once you find it, boom, you have your offending update and you can look for answers specifically for that update.

Hope this helps!


Theme gnome panel handles in flashback session

1 - install ubuntu

$ sudo add-apt-repository ppa:tualatrix/ppa
$ sudo apt-get update
$ sudo apt-get install ubuntu-tweak

2 - find & configure

Go to app search look for 'ubuntu-tweak' .
Open it then .
go to tweaks .
Then Unity .
Make it comfortable 'read then edit'

if that didnt workout with you try to reset unity then configure it
reset unity

$ unity-reset
$ setsid unity


How can I tell if my hourly cron job has run?

You should look in your /var/log/syslog log file. If a cron has run, it would have a line like:

Jun 11 19:09:01 penguin CRON[17376]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete)
Jun 11 19:17:01 penguin CRON[17799]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)

For troubleshooting tips, see https://help.ubuntu.com/community/CronHowto#Troubleshooting_and_Common_Problems


How to stop scripts from filling a disk to capacity

A "Custom script is set to run as root" sounds risky. Are you sure it must be?

You could create another partition, and have the script write output there. Then, it will only fill that partition, and the script will fail without troubling the system.

While the script is running (running away) use lsof (See man lsof for details) to see which file(s) is/are growing, seemingly without bound. Then, fix the script.


Toggle Fullscreen custom keyboard shortcut broken in 14.04, 16.04?

Well all you need is a compizconfig-settings-manager and plugin  compiz-fusion-plugins-extra

   sudo apt-get install compizconfig-settings-manager
   sudo apt-get install compiz-plugins-extra

Open compiz on Windows Management tab, activate Extra WM actions plugin by checking the box.

set keybind action "Toggle Fullscreen" on Extra WM actions page. Log out and login again

P.S. for gnome shell use gconf or try dconf to bind key

Tested on Ubuntu 14.04 and 16.04

original text link for old versions


Correct mydomain in /etc/postfix/main.cf.
04 is not a valid domain name - a valid value is an entry of the tour domain.tld.

Change the value for valid_hostname as well.
This is only a warning but hostnames are not numeric - use the output of
 hostname --fqdn

After that execute:
sudo newaliases
sudo apt-get install -f

mydomain

    The internet domain name of this mail system. The default is to use
    $myhostname minus the first component, or "localdomain" (Postfix 2.3
    and later). $mydomain is used as a default value for many other
    configuration parameters.

myhostname

    The internet hostname of this mail system. The default is to use the
    fully-qualified domain name (FQDN) from gethostname(), or to use the
    non-FQDN result from gethostname() and append ".$mydomain".$myhostname
    is used as a default value for many other configuration parameters.


Super + L is a shortcut set within Compiz window manager. What is being set in the settings goes into gsettings ( which is a framework for storring app settings, that's slightly different ) and then relays whatever shortcuts you set to gnome-settings-daemon or unity-settings-daemon.  That means we have to alter Compiz settings first.

The steps I personally took were as following:

Install compizconfig-settings-manager with sudo apt-get install compizconfig-settings-manager
Open compizconfig-settings-manager with ccsm command form terminal or from dash's search
Under Ubuntu Unity Plugin option find Key to lock screen option, click on the button describing the shortcut.

You will see the a small popup window. Unckeck the enabled option.

At this point you can go to Settings -> Keyboard -> Shortcuts and set custom shortcuts with keybinding Super + L as dm-tool lock command.

Tested on Ubuntu 14.04 LTS, Trusty

Edit

Since OP is using Ubuntu Gnome and not Unity, I used my 15.10 Ubuntu Gnome virtual machine, and found that in a normal session there's no compiz processes running , however the Super+L appears to be hard codded within the gnome-shell itself.

What I've successfully achieved is the following : run  the gsettings command bellow and in the Settings -> Keyboard -> Shortcuts -> Custom  menu set custom shortcut CtrlAltL to dm-tool lock command.

  gsettings set org.gnome.desktop.lockdown disable-lock-screen true

After  running the command and creating shortcut, instead of the usual builtin gnome lock screen , I was able to use lightdm.  OP also confirmed this in our conversation in the chat , but wanted Super + L to be the actual accelerator, and with better speed of locking. At the moment I am unable to address these issues, and it seems the key combination OP wants is hard-coded, hence unchangeable, but i am not 100% certain .


Krita: Filling a whole selection or layer

Fill Tool

Fill a contiguous area of color with a color or fill a selection. Clicking anywhere on the screen with the fill tool will allow that area to be filled with the foreground color. You can select the foreground color from the Advanced Color Selector pane.
Fill Tool Options
Click the paint bucket fill tool icon in the Krita toolbox to show the Fill Tool Options pane in the upper right corner of the Krita window.

Threshold
⠀⠀⠀Determines when the fill tool sees another color as a border.
Grow/shrink selection
⠀⠀⠀This value grows/shrinks the shape beyond its initial size.
Feathering radius
⠀⠀⠀This value will add a soft border to the filled shape.
Fill entire selection
⠀⠀⠀Activating this will result in the shape filling the whole of the active selection, regardless of threshold.
Limit to current layer
⠀⠀⠀Use this option to fill the entire selection with the foreground color.
⠀⠀⠀Activating this will prevent the fill tool from taking other layers into account.
Use pattern
⠀⠀⠀Ticking this will result in the active pattern being used.
Some parts of this were revised from the Krita/Manual/Tools/Fill webpage from KDE UserBase Wiki.


Install Ubuntu Touch on Cheap ARM A8 Chip Tablet?

I don't think OMAP3 is directly supported for Ubuntu-Touch.

<opinion>
However OMAP3 linux kernel is  community supported and does boot somewhat recent Linux kernels and Android on BeagleBoard so I would think that it may work since the ubuntu-touch reuses a lot of Android guts. I have not tried this myself since I don't have one of these, so take this answer with a grain of salt.

</opinion>


On really old Ubuntu 6.06 - How to upgrade

Backing up your data and doing a fresh install would be by far the easiest option, I'm afraid


Wired Xbox One controller not working on Ubuntu 18.04 (Kernel 5.4)

I fixed the issue, all I had to do was type "sudo modprobe xpad" in the terminal.


Port 3306 appears to be closed on my Ubuntu server

The problem was that the server was listening internally only.

Removing the line bind-address 127.0.0.1 from /etc/mysql/my.cnf solved the issue.

Newer versions of Ubuntu (≥16.04) may have this line in /etc/mysql/mysql.conf.d/mysqld.cnf.


Data hidden or lost on HDDs in RAID1 on Ubuntu server 12.04?

Your first screenshot does not indicate a data loss. The message "some contents unreadable" indicates that the file manager could not read the sizes of all files because of file system permissions, not because of file system damage.

Running nautilus as root or sudo du -h /path on the command line will give you the file usage of all files.

Second, you say that folders are shown in red. What do you mean by this (where are they shown as red)? Deleted files and folders are not shown at all, so that is not the cause. It could be that there are just the permissions missing, or that these directories are in fact not directories but symbolic links where the target is missing (in this case, ls for example shows them in red color).

To further clear things up, please paste the output of sudo ls -ld /home /var /bin.

As to the read error, you say it is on one HDD, but the screenshot says it is on /dev/md1 (so on the raid with both disks)? In general, a single failure on a file system can create a complete data loss, but this is unlikely. I think you will be able to recover your data if you are careful, don't do something prematurely, and interpret all the signs and messages correctly.

An important note:
Before you do anything, especially something which changes data on the disks (this includes raid resync, mounting, fscks, testdisk runs etc.), please make a complete bitwise dump of the disks! Only this way you will be able to safely experiment.


How to open .fodt files in LibreOffice by default?

First Right Click
Then Go to properties
go to 'Open with' tab
Then choose the Libreoffice
click on set as default

done.


install gcc4.9 on Ubuntu14.04LTS with "hash sum mismatch" error

if you trim the url back to the folder like this

http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu/dists/trusty/main/binary-amd64/

then it works in the browser and you can see that there is a gzip and bzip2 compressed copy of the Packages file. You could download this file and put it in /var/cache/apt/archives/list or /var/cache/apt/archives/ it might skip the failing step.

update: looking at the ppa's page i can see there is another link that will work better , try this

sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa


how to prevent swap space from formatting during installation?

Another solution for your problem is to not create a swap partition in the installation wizard at all and safely create it after the installation.

You can create your own swapfile via

sudo fallocate -l 1G /swapfile  #Replace the parameter to suit your needs
sudo mkswap /swapfile
sudo chown 0600 /swapfile
sudo swapon /swapfile

And you can add that swapfile to the /etc/fstab to mount it automatically at boot-time.And also it doesn't require a whole partition for it.


Ubuntu 16: google-chrome-stable : Depends: libappindicator1 but it is not going to be installed

You can run sudo apt-get -f install, as suggested by the error message. This should install any needed dependencies and resolve the issue. (Alternatively, you could use Synaptic, Aptitude, or another package manager to resolve the dependency issue.)

As @grooveplex pointed out, the -f stands for --fix-broken, not "force", and should not cause any damage to your system.


I think that:

your ATI drivers may have not been well installed
and that the free drivers have been removed.

So I suggest you to:

1 - uninstall ATI drivers doing this

$ sudo apt-get remove --purge fglrx fglrx_* fglrx-amdcccle* fglrx-dev*

2 - install the free drivers

$ sudo rm /etc/X11/xorg.conf
$ sudo apt-get install --reinstall libgl1-mesa-glx:i386 libgl1-mesa-dri:i386 xserver-xorg-core
$ sudo dpkg-reconfigure xserver-xorg

3 - reboot

$ sudo reboot

4 - check if your graphic card works correctly with the free drivers

5 - if your problem is solved after step 1 to 4, and you still want to install ATI drivers

Then to get the instructions to re-install your ATI drivers, if your card is a Radeon HD 3xxx or HD 4xxx: follow this answer starting directly at Download driver part.


Why does it take so long for ssh to decide there was an error?

you could debug ssh by types in ssh -vvv ... This will not only debug the login but also debugs the sessions.  It can get somewhat annoying when it continually throws in the debug however.  The amount of 'v's determines the amount of debug which is active in the sessions (the more v's the more levels of debuging).  I'm not positive this will help identify the problem but it could help track it down.  Usually there is a stay alive time set in your client ssh that will send "pings" to tell the server that you are still connected here is where that variable is set:

/etc/ssh/sshd_config
ClientAliveInterval 30
ClientAliveCountMax 5

Where
    ClientAliveInterval: Sets a timeout interval in seconds (30) after which if no data has been received from the client, sshd will send a message through the encrypted channel to request a response from the client. The default is 0, indicating that these messages will not be sent to the client. This option applies to protocol version 2 only.
    ClientAliveCountMax: Sets the number of client alive messages (5) which may be sent without sshd receiving any messages back from the client. If this threshold is reached while client alive messages are being sent, sshd will disconnect the client, terminating the session.

If you alter those settings make sure to restart sshd via this command:

/etc/init.d/ssh restart

Hope this helps!


Ubuntu 16.04 constant noise problem with headphones

I had exactly this same problem with my XPS 13 and found a solutions here:

https://www.reddit.com/r/Dell/comments/4j1zz4/headphones_have_static_noise_with_ubuntu_1604_on/

Essentially you need to do the following:
Start up alsamixer, then turn "Headphone Mic Boost" (that's the third control from the left for me) from "[dB gain: 0,00, 0,00]" one step up to "[dB gain: 10,00, 10,00]".


What is the absolute path to the file that contains all the drives?

That is /etc/fstab (for its syntax see man fstab).

To be more precise it doesn't contain drives but filesystems to be mounted.


Ubuntu Software App Shows Just Blank Tiles

After running some standard update commands such as:
sudo apt-get clean

sudo apt-get update

sudo apt-get upgrade

and
sudo dpkg --configure -a

sudo apt-get install -f

and restarting, it worked again!


I finally managed to update it by compiling it from source:

cd /usr/local/src
wget http://nodejs.org/dist/v4.4.3/node-v4.4.3.tar.gz
tar -xvzf node-v4.4.3.tar.gz
cd node-v4.4.3
./configure
make
sudo make install
sudo npm install npm -g


ERROR:root:Could not find any typelib for Click

You should upgrade your ubuntu-touch image with the one available in the devel channel.

But the error that you get is caused by a missing dependency, try to manually re-install the debian click package on your host, open a terminal and type:

sudo apt-get install --reinstall click python3-click


13.04 gnome session fallback: can´t edit panels

Bizarrely enough, Meta Alt RightClick shows the old and trusty panel menu.


I think your base system needs to be upgraded, because the PPA wine is depending on something newer than what you have.  Have you turned on Backports and Proposed updates in Software Sources?  After doing so, you'll need to either:

apt-get safe-upgrade

OR

apt-get dist-upgrade

before attempting to install Wine.  Good luck.


Oddly enough, I bought a DVI-HDMI Amazon adapter, plugged it in, and nothing happened. Then I closed the laptop, opened the laptop and when the screen of the laptop turned on suddenly the monitor began mirroring the screen on the laptop. I then performed the same procedure from the with the VGA adapter that had seemed to be failing before and it worked too.
I would suggest trying to open an close the laptop when using Linux with an AOC monitor after connecting the monitor to the Linux laptop. This is not necessary for Windows or Mac, but I guess for the Linux driver to register, this operation needs to be performed.


Lubuntu 16.04 gets stuck at shutdown (nmi watchdog bug soft lockup - cpu#1 stuck for 22s)

I had the same bug on my machine, I fixed it by appending nouveau.modeset=0 to the grub command line

To do so, when you're in grub menu, press e to edit the command line.
Then append nouveau.modeset=0 at the end of the line beginning with linux.
Then press F10 to continue to boot, login into your user session, then try to reboot the computer to see if the problem is gone or if you still have the issue.

If the problem is gone, you can make the change permanent by editing the grub config.

sudo nano /etc/default/grub, append nouveau.modeset=0 in the quotes of the line GRUB_CMDLINE_LINUX_DEFAULT="...". Then update your grub setup with sudo update-grub.

Related to

NMI watchdog: BUG: soft lockup - CPU#2 stuck for 23s! [nvidia-smi:566]


This update does not come from a source that supports changelogs

PPA does not seem to support changelogs, there is even a bug reported in Launchpad about it:

Bug #253119 “PPA packages do not show a changelog in update-mana...” : Bugs : Launchpad itself


Why can't my machine resolve local windows hostnames?

To ping a netbios name in Ubuntu you need to add wins to /etc/nsswitch.conf. Run:

gksu gedit /etc/nsswitch.conf

And add wins to the line:

hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4

So it looks like this:

hosts:          files mdns4_minimal [NOTFOUND=return] dns wins mdns4

Save the file, close the text editor, and ping away.

If that does not work, open /etc/samba/smb.conf, and uncomment the "name resolve order" line:

name resolve order = wins lmhosts bcast

after that, restart nmbd smbd winbindd.


You just have to install osspd as it was never programmed for pulseaudio, and also copy over the configuration file to your users home directory

https://bugs.launchpad.net/ubuntu/+source/xdemorse/+bug/661963


Flash suddenly stopped working in SeaMonkey / Ubuntu 13.10

Well! I had the 32 bit version because a while back the 64 bit version of SeaMonkey would crash all the time. I tried to run the stock 64 bit version of SeaMonkey and it crashed over and over again but I had the time to see that it was version 2.0.1. I guess no one bothered updating that crashing version. Oh well...

I went to Mozilla and downloaded the latest (2.5.x) and installed that 64 bit version. That works like a charm! Not only is it capable to use the same Flash binary than Firefox, but that way I have access to all sorts of plugins, way more than before.

Note that in the process I lost all my bookmarks, but the files from the 32 bit version were still available so all I had to do is load them and I got my bookmarks back. To load those, you have to go in your ~/.mozilla folder, then find the "default" directory for SeaMonkey. It should be fairly easy to find.


mysqladmin error while attempting to install MediaWiki on 14.10

What i've read on that tutorial is this:

  This step is not necessary if you were prompted to create a mysql root password during MySQL installation.

I recently reinstalled lamp and i remember having been prompted for MySQL root password during the installation. Most likely you have set your password already. If you don't remember having done so, try to change the password to a new one assuming that the default password ('') has been used:

mysqladmin -u root -p '' password '<new_password>'


LibreOffice Impress, how to scale an image to fit slide

I don't believe this is an option in impress as an alternative:

You could write a script to do the manual step for you on a directory full of images you wanted to resize. I would likely do this from the terminal with avconv like this: avconv -i input.jpg -vf scale=160:120 output_160x120.png

Where scale is the width and height desired. granted you need to match the orignal ratio or the image won't look quite right so if your image ratio is 4x3 you might use 320:240, and 16x9 you might use 320:180. Based on your comment you might use 280:467. Of course you'll need a loop to iterate through all the input files.

#!/bin/bash

for f in *.jpg;
do
command="avconv -i $f -vf scale=160:120 $f.160x120.png"
$command
done

You could modify this to meet your needs. Don't forget to set permissions on the script to be executable..

Note: Spaces in filenames will break this script...

If you need to remove them you might try

rename "s/\s+//g" *

or

IFS="\n"
for file in *.jpg;
do
    mv "$file" "${file//[[:space:]]}"
done

Space removal Source: https://stackoverflow.com/questions/15347843/remove-whitespaces-from-filenames-in-linux


Gtk-WARNING **: Unable to locate theme engine in module_path: "adwaita", error on executing the the python script with pygtk module

I had the same issue

sudo apt install gnome-themes-standard

Fixed the issue.


Reliable keyboard layout switching with Caps Lock

There is ancient bug on Launchpad, which contains workaround: https://bugs.launchpad.net/ubuntu/+source/unity-control-center/+bug/1343327

Maybe it'll help. But it did not help to me (U 14.04.4).


Strange graphics issue after upgrading to 18.04 that affects only one user account

I decided to clean up a bit some abandoned "dot-files" in my home folder (the home directory of the affected account) and managed to resolve the problem.

The problem was caused by my .xinputrc file that contained a single line of code:

run_im xim

In comments it was saying that it was created by im-config.  (I do not remember why I executed im-config.)  After I removed this file, the glitches were gone.

Update. It seems that the file got automatically regenerated with the following content:

# im-config(8) generated on Sun, 29 Jul 2018 09:11:43 +0200
run_im ibus
# im-config signature: 1badc17f2a2c24108e97cd2fd412e476  -

There is currently no problems with this new content.  (I am not sure if the file was regenerated by Ubuntu.)


Dual screen stretching with nvidia proprietary driver

Why don't you try this out -

According to NVIDIA, it's because the built in display is connected to intel iGPU. ( source: https://devtalk.nvidia.com/default/topic/807239/nvidia-server-setting-utility-doesn-t-see-laptop-screen/)

Which basically means that Nvidia x server has no control over your built in display.

To solve this, switch graphic mode from MShybrid to discrete in BIOS setting, which can force the built in monitor to be driven by you discrete GPU, and x server will work correctly to recognize both built in and external display.


you can download it from here

Or

You can use the rpm package and change to deb via ALIEN

to install alien command on Ubuntu

 sudo apt-get install alien

To use alien command to convert rpm to deb file

 sudo alien pakage.rpm

Output would be:
   package.deb generated

you can use

sudo alien -i package.rpm

this would convert the package from rpm to deb then install it automatically and then it would delete the source.

man alien

will show you how to use

Moreover
 see this link that talk how to build the ActiveMQ package


Why there are 2 files setting same variables on /etc/apt/apt.conf.d/?

20auto-upgrades replaces configuration of 10periodic. So there are no doubles: Apt will read each file in sequence. The same setting twice then the last one found will be active.
Not everybody has 20auto-upgrades. That one is installed when you in stall package unattended-upgrades.
10periodic is from package update-notifier-common and that one is installed by default.


Lubuntu 14.04 no sound, can't install pulseaudio

You try to install the pulseaudio (1:4.0-0ubuntu11) from the trusty repositories. But you have enabled trusty-updates, therefore libpulse0 (1:4.0-0ubuntu11.1) is to be installed.

The only explanation is that you have forgotten to start the command

sudo apt-get update

After that

sudo apt-get install --reinstall pulseaudio

and to upgrade the whole system

sudo apt-get dist-upgrade


Looping tr command to remove '\r' in multiple files in a directory

Using a find one-liner:

find . -maxdepth 1 -type f -exec sh -c '< "{}" tr -d "\r" > "{}.processed"' \;

This will create a carriage-returns-stripped copy of each file in the current working directory named as the original file with a .processed extension.

tr can read only from stdin, so it can't edit files in-place natively, however one hack is to redirect the content of a file to the stdin of a subshell and to redirect it as a here string to tr's stdin, so that the file is read before the truncation necessary in order to write the file takes place:

find . -maxdepth 1 -type f -exec bash -c '<<< "$(< {})" tr -d "\r" > {}' \;


Driver for ATI Mobility Radeon HD 5650 on 15.10?

You can install the Catalyst Control Center by running:

sudo apt-get install fglrx-amdcccle

Once it's installed, run it from the terminal by typing sudo amdcccle


Delete the directory ~/.local/share/keyrings or find the specific file in that directory and delete it. Also note that you don't have to setup a keyring when asked you can simply cancel the dialog and not use a keyring if desired.


Most recent update of 20.04 knocked out Realtek Wifi drivers...how to restore?

In the past, you might have installed (sudo apt-get install or sudo make install) static drivers for this device. The problem is that with every kernel update, like with Software Updater, the driver breaks.
Here, we'll change to a dkms driver, and this will rebuild itself during kernel updates, so you won't have to worry about this again. See man dkms for more info.

Go to https://github.com/aircrack-ng/rtl8812au

Click on the green Code button

Click on "Download ZIP"

Locate this file in your downloads area

Right-click on this icon and select "Extract Here"

Confirm this folder in your downloads area

Right-click on any white space in your downloads area

Choose "Open in Terminal"

In the terminal type:

sudo cp -r rtl8812au-5.6.4.2 /usr/src # copy the folder to /usr/src
sudo dkms add rtl8812au/5.6.4.2 # dkms add the folder
sudo dkms build rtl8812au/5.6.4.2 # dkms build the software
sudo dkms install rtl8812au/5.6.4.2 # dkms install the software
dkms status # confirm its status


After updating 12.04 at the next boot I get a black screen with blinking cursor

Installing the updates again by selecting recovery mode in the GRUB menu (under Advanced Options for Ubuntu, then the dpkg option (Fix Broken Packages) solved the issue by installing all the packages again. Now I can load into the GUI again.


sudo nano /etc/fstab

locate the line relative to your AA99-3674 drive and remove it. Then reboot.

Remember to make a backup copy of /etc/fstab before editing.


That is very odd. VLC has the codecs built-in, so it should not matter what you do with ffmpeg. Unless installing ffmpeg somehow messed up a library VLC was depending on...

The error you get sounds to me like there is something wrong with the file you're trying to open. Bit too basic maybe, but have you tried opening another video file, including one with a different file type (e.g. avi)?


What is it?

$? is a built-in variable that stores the exit status of a command, function, or the script itself.

$? reads the exit status of the last command executed. After a function returns, $? gives the exit status of the last command executed in the function. This is Bash's way of giving functions a "return value." It returns 0 on success or an integer in the range 1 - 255 on error.

Are there others like it too?

Yes,there are several such built-in variables in bash. You can see a list here.
Refer:
 http://www.tldp.org/LDP/abs/html/exit-status.html


I think its just your window manager is not able to start.
I assume u can open terminal by Ctrl+Alt+t(as was able to when i faced such issue sometime back). if you can just try to start your window manager(i am not sure but think that is unity or compiz so try running them).
if you are not able to do so u can start nautilus(file manager) and access your files or install gnome-shell with command sudo apt-get install gnome-shell.


To change your client time with ntp-client , i suggest you to run this command :

Example:

ntpdate ntp.myserver.net

Or

ntpdate 202.16.232.1

you can change word "ntp.myserver.net" and "202.16.232.1" your domain and your ip_server .


Unable to install Vertica 7 on Ubuntu 14.10

dpkg-deb: error: `vertica_7.0.0-1_amd64.deb' is not a debian format archive

Regarding the error:

  Not a Debian format archive

  This error indicated that the header of
  the .deb archive is not recognized as a valid debian format.

It means you downloaded something that is not passing the basic validation of being an installer for a debian based system. So either the download was not correct and the file became corrupted during the download or the file they let you download is corrupt to begin with.

Retry the download; if it is still giving this error you need to contact them.


Why does Kmail make JPG files larger when I forward them?

When I forward emails with JPEG attachments inline, the JPEG files size enlarge. Is this normal?

Yes. E-mail standards require that emails consists only of text; JPEG files are binary data. The inline images must first be converted into text, which increases their size. These are converted back into binary JPEG data at the recipient's end.

  Can I turn it off?

No.

The Base64 Wikipedia article has more technical information and examples if you are interested in one of the most common ways this conversion takes place -- this one increases sizes by approximately 33%.


13.04 sluggish after installation, live-cd was fast

13.04 seems to need a change of swappiness; have a look on the www. "what to do after installation of 13.04" site(s).
Alternatively the short answer is to get a Terminal, with Ctrl Alt T
 and take a look at your swappines with:-

cat /proc/sys/vm/swappiness

if the number given is less than or equal to 30, leave it - or change to swappiness 10, with:-

sudo sysctl vm.swappiness=10

If more problems are encountered then change swappiness back to the original number and wait for a kernel update.
I hope that that works for you!


Using Menu key as Compose key in Ubuntu 15.04 pops up a menu instead

As I said here, use this configuration: ['compose:menu'] in org.gnome.desktop.input-sources > xkb-options. Tested with Ubuntu 15.04 and xmonad.

With this configuration:

% xev
KeyPress event, serial 36, synthetic NO, window 0x1600001,
    root 0x233, subw 0x0, time 38683999, (93,83), root:(138,192),
    state 0x10, keycode 135 (keysym 0xff20, Multi_key), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: True

KeyRelease event, serial 36, synthetic NO, window 0x1600001,
    root 0x233, subw 0x0, time 38684071, (93,83), root:(138,192),
    state 0x10, keycode 135 (keysym 0xff20, Multi_key), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

Without this configuration:

% xev
KeyPress event, serial 36, synthetic NO, window 0x1600001,
    root 0x233, subw 0x0, time 38796879, (476,270), root:(521,379),
    state 0x10, keycode 135 (keysym 0xff67, Menu), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 36, synthetic NO, window 0x1600001,
    root 0x233, subw 0x0, time 38796951, (476,270), root:(521,379),
    state 0x10, keycode 135 (keysym 0xff67, Menu), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False


apparently the group of the parent folder of the share (/srv/smb in my case) does actually matter.

changing that to sambashare (which all my samba users are members off) fixed this issue.


You have probably done this, but just in case:

Wireless: have you enabled wireless from 'System Settings'?
Touch-pad: again, have you looked at Touch-pad and Mouse in the same place?


Install the subversion  package. Then try again. The svn binary, the Subverion client, is in that package.

By the way, the "Command not found" error also hints on this package:

$ svn checkout ....
The program 'svn' is currently not installed.  You can install it by typing:
sudo apt-get install subversion

Also, there's no need to run svn commands with elevated privileges like sudo. I understand you're just following a how-to there, but just don't do that.

Having said all that, zooming out on your initial issue about Wireless, I don't think this will work. Karmic Koala (9.10) is really old and Atheros wireless drivers aren't in the madwifi driver anymore nowadays. If I recall correctly, this is now merged in the mac80211 driver. Please ask a more specific question about your Wireless issue.


How to determine what modules are missing

This is a known issue and only a cosmetic problem. Don't worry about it!


Installing Windows 8.1 after Ubuntu 14.04

split your harddrive(using Hirens BootDisk setup - to resize the partition) and leave an unallocated space enough for windows 8.1 or whatever suits you

Then Create a Bootable FlashDrive with Windows 8.1 using Rufus preferebly or something that can create a bootable flash drive

Its worth a try worked for me


ABNT2 keyboard in Ubuntu Studio 16.04: accented letters only in terminal

I could make it work using this command from terminal:

sudo dpkg-reconfigure keyboard-configuration

It would display a little wizard for setting up keyboard layout preferences.

For ABNT Brazilian Keyboard, select "Generic 105-key PC (intl)".

This tool will update the file /etc/default/keyboard with your preferences.


Place the script into /etc/rc.local . Scripts there run as root when the system starts. It is also suitable for Raspberry Pi, as you specified in the comments.

In your case you want to run it as python /path/to/script.py &

Here's my sample rc.local file, I use the same approach to run battery and temperature monitoring scripts

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

/home/xieerqi/bin/batmon.sh &
/home/xieerqi/bin/preventShutdown.sh &
/home/xieerqi/bin/sh/temperature.sh  &

Additional info on /etc/rc.local


apt-get isn't the only front-end application thing that uses /var/lib/dpkg/lock.

Things like Update Manager and the Software Centre, Synaptic and aptitude all have their own ways of interfacing with the Apt and dpkg databases.

To find out what has it open, you can use fuser:

sudo fuser -u /var/lib/dpkg/lock

Then, if that's safe to kill (I'd advise people always check before using the -k flag), you can kill it and delete the lockfile.


Is an Ubuntu server the best option for me?

I do not advise. if you are not familiar with Ubuntu you will have a hell of a time trying to diagnose issues. I am a tech and I use Linux and Ubuntu server and I will not use Ubuntu as a file server just because of diagnostic issues.. ( i am a novice user) if i were a pro, that would be a different story.. tell your boss that the risk will not be worth the reward.

I can think of so many situations I've had with clients that Ubuntu would not be able to solve.


Why does passwd command show "UNIX password"?

It says UNIX because you're changing the password for authentication provided by the pam_unix PAM module. Quoting the manpage:

NAME
   pam_unix - Module for traditional password authentication

SYNOPSIS
   pam_unix.so [...]

DESCRIPTION
   This is the standard Unix authentication module. It uses standard calls
   from the system's libraries to retrieve and set account information as
   well as authentication. Usually this is obtained from the /etc/passwd
   and the /etc/shadow file as well if shadow is enabled.

It is related to Unix in that it uses the traditional files /etc/passwd and /etc/shadow as the source of authentication.

If you used another PAM module, like pam_ldap for LDAP authentication, it would say LDAP instead of UNIX:

$ passwd
(current) LDAP Password:
New password:
Retype new password:
passwd: password updated successfully


TouchPad doesn't work on start unless mouse drivers are restarted or sleep

Why not just add the commands to a bash script and schedule it to run at startup? May not be the best "fix" but it should work.

#!/bin/sh
sudo rmmod psmouse && sudo modprobe psmouse
# Find the command to set natural scrolling and insert here

I'm not sure that sudo won't cause issues with scripting, as I'm fairly new at it, but with playing around a bit, you should be able to get it to work. You may have to set the startup to use sudo and create the script without it to get a prompt or set to "Run in Terminal." I'm not sure on that point, but this would automate it, relieving you of the burden of typing the commands each time.

With the natural scrolling, you'll have to determine your button map and reconfigure it as shown here: http://n00bsys0p.wordpress.com/2011/07/26/reverse-xorg-scrolling-in-linux-natural-scrolling/

I know this is more a workaround than a solution, but it should help.


How to download youtube downloader in ubuntu?

sudo apt-get install youtube-dl

Installs youtube-dl. To use it you need the url of a YouTube (or supported) video. There are many options available with this program, but the gist would be

 youtube-dl -o [name of output file] [YouTube URL]

A generic working example would be

 youtube-dl -o file.mp4 http://youtu.be/PvkMEoqmbBA

For more help see man page or check out the documentation here


Unfortunately built-in driver support for nVidia graphics cards isn't very good. As you've noted, they're fine for basic computing, but anything requiring hardware acceleration or 3D support like videos or games won't run well at all.

In most cases you can solve the problem by searching "Additional Drivers" in the Dash. Then install the recommended proprietary driver for your graphics card.


OpenVPN - no internet on second device after reinstalling on Ubuntu 16.04

The default Openvpn configuration supports only one client per one client key. Try to generate more client keys, when you want more client connections.

The no internet access part of your question:

Try to add a following line to your iptables rules:

iptables -t nat POSTROUTING -s 10.0.0.0/24 -o br-lan -j MASQUERADE

The 10.0.0.0 should be replaced with your Openvpn ip address and br-lan should be replaced with your physical or virtual lan interface (this depends on your setup).


Ubuntu for Android on Samsung Galaxy Note

Here you can find a version for the N7000:

https://wiki.ubuntu.com/Touch/Devices/n7000

And here is a list for supported devices:

https://wiki.ubuntu.com/Touch/Devices

But I think the pen will not work.

I haven't tried yet but i will try on my Galaxy Note too.

There is a HDMI converter for the Samsung galaxy Note. But I haven't heard about a docking station.

For the HDMI-Convertor google for: ET-H10FAUWEGWW HDMI-Adapter


Conky, Show Desktop, Swap & Network Meters, Remove Background

You will probably want to define the following properties as follows:

own_window yes
own_window_colour 000000
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_transparent yes
own_window_type override

It will perfectly integrate with your desktop. The only downside is that it will give "static" transparency and therefore hide any underlying desktop icons.

Now if you have a compositor, you can even bypass that little problem using these property values:

own_window yes
own_window_argb_visual true
own_window_argb_value 00000000
own_window_colour 000000
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_transparent yes
own_window_type normal


As it turns out bumblebee destroyed everything. It added ubuntu-319 to the blacklist. I wasn't able to find every place where it touched config files so I wiped the system and did a clean reinstall.

After that the HDMI port worked again. I let it be at that and didn't even installed the NVIDIA drivers.

Not a very satisfying solution, but a solution.


Ubuntu 14.04 Doesn't refelct actual parition size

You have to resize the logical volume.

First, backup all your important files.

lvresize -l +100%FREE -r /dev/mapper/ubuntu--vg--root

I cannot test here, but it should use all the free space, and -r will auto resize the file system.


extracting specific columns and paste these into another text file

This should work - provided you don't care about preserving the specific amounts of whitespace in your data:

awk '(getline line < "text_1") > -1 {split(line,a); $5 = a[5]; $6 = a[6]; $7 = a[7]} 1' text_2 > new_text

Ex. given

$ head text_{1,2}
==> text_1 <==
foo     bar  A B C D E
bar     baz  F G H I J

==> text_2 <==
        foo   bar  a b c d e f g h i j k l m
        bar   baz  f g h i j k l m n o p q r

then

$ awk '(getline line < "text_1") > -1 {split(line,a); $5 = a[5]; $6 = a[6]; $7 = a[7]} 1' text_2
foo bar a b C D E f g h i j k l m
bar baz f g H I J k l m n o p q r

The difficulty with using cut and paste is that at least one of your files has inconsistent amounts of whitespace delimiting the fields. You could make it work for the input you have posted as follows:

paste <(cut -d ' ' -f1-4 text_2) \
  <(tr -s '[:blank:]' ' ' < text_1 | cut -d ' ' -f5-7) \
  <(cut -d ' ' -f8- text_2) > new_text

Ex.

$ paste <(cut -d ' ' -f1-4 text_2) \
    <(tr -s '[:blank:]' ' ' < text_1 | cut -d ' ' -f5-7) \
    <(cut -d ' ' -f8- text_2) > new_text

$ diff -ws new_text your_new_text
Files new_text and your_new_text are identical


I believe the issue was insufficient power being provided by the onboard USB host of my plug computer. The drive has yet to power itself down while in use and connected to a powered USB hub.


Certainly.  Just download the version (and flavor - Ubuntu, Kubuntu, Lubuntu, etc) that you want.  Check the MD5Sum
https://help.ubuntu.com/community/HowToMD5SUM
Burn the ISO to a CD or flash drive at the lowest speed possible.  Boot from the result and try all the applications before you install.  If everything works choose to install.


Acer TimelineX 4820TG fan speed out of controll after install Ubuntu 12.04

The answer is simple; update BIOS. There is a BIOS update for your laptop on the Acer home page which is mentioned as a fix for fan problems.
When I installed the update the fan immediately runs as it used to. I could install it with windows because I dual boot.
If anyone has this problem after installing, this is how you fix it.


It could be a formating issue. Mac's aren't equipped to write to NTFS, and with a drive of that type it could easily be formatted as NTFS.

1) Backup the entire drive. You should be able to drag and drop all of the contents to a desktop folder.
2) Go to launchpad, and then search for 'Disk Utility'
3) Find your drive. You should be able to find it by space.
4) Click 'erase'. This formats your drive into something Mac can read.
5) When it's done, put all of your files back.

One of the things I don't understand is that Linux and Windows can both read and write to NTFS, but for some strange reason this doesn't work. You should be able to still write on a Linux platform, but I understand that it may be convenient for getting files back and forth.


How do I apply a custom Gnome-shell theme for all users?

Put your configuration files into /etc/skel.
The window theme settings are located at /home/YourUsername/.gconf/desktop/gnome/shell/windows/%gconf.xml so you copy the settings file to /etc/skel/.gconf/desktop/gnome/shell/windows/%gconf.xml.

Then you do the same for .gconf/desktop/gnome/interface/%gconf.xml, this is where icon theme and gtk-Theme settings are stored.

You can do so with all settings in your home folder.


Clearing Disk Space at Command Line to fix Low Graphics Mode Problem

To drop to text console press:

CTRL+ALT+F1

To be efficient with searching for the biggest files in your home folder:

du ~ | sort -n -r| less

or just in the folder Video

du ~/Video | sort -n -r| less


How can I go from hosting locally to being internet accessable?

First thing it to check if you have class A IP address. Just go to this address and note down our ip. http://ipaddress.com

Also look for ifconfig output. Both addresses should be the same.
If yout ip does not start with 172, 10 ,192 then you are ready to go. From a diffrent computer or from your phone just enter http:/yourip:3838/histogram/
If you have an class C ip address then you must have access to your router / gateway and make an port fowarding.


I discovered the glitch happens if I update the drivers, using the default ones everything runs perfect. But I have to reinstall ubuntu. Is there any way to revert to the default intel drivers?


AX200 wifi does not work with ubuntu 18.04 (razer 15)

I went out and got a usb-ethernet adapter (LIFE SAVER! Will cherish this thing) and doing a apt-get update and apt-get upgrade.

I then updated to kernel 5.1.16 and put the latest firmware for AX200 into my /lib/firmware directory. I don't know which step absolutely fixed it (doing apt-get update/upgrade or using kernel 5.1.16 specifically; but I think it was the former probably), but it now magically works:

dmesg | grep wifi
[    3.164561] iwlwifi 0000:02:00.0: enabling device (0000 -> 0002)
[    3.175839] iwlwifi 0000:02:00.0: loaded firmware version 46.3cfab8da.0 op_mode iwlmvm
[    3.196234] iwlwifi 0000:02:00.0: Detected Intel(R) Wi-Fi 6 AX200 160MHz, REV=0x340

Hopefully this will help others to get this working because I was on the verge of returning this laptop...


Yes now that you have imported the key you can delete it from your home directory.

The key is now stored by apt (apt-key).

  apt-key is used to manage the list of keys used by apt to authenticate
  packages. Packages which have been authenticated using these keys will
  be considered trusted.

See http://manpages.ubuntu.com/manpages/xenial/man8/apt-key.8.html for details.


Why does my iPhone's directories not start with a "/"?

They do start with a / if you ssh into your device. This requires jailbreaking it currently.
What you're seeing is a product of the way your OS has mounted what's visible to it.


How to auto mount Windows mapped drives per user?

The only semi-automated way I have found so far is the following:

Start Nautilus
File -> Connect to server (save credentials in Gnome-Keyring)
Set a bookmark for the connection

Now everytime you click on the bookmark, the server drive is mounted. The disadvantage is that every user has to do this once and it will stop working when the AD password changes.


Access Ubuntu Server from other network via Filezilla?

Assuming that your server is in your home on your home network, and not a VPS (Virtual Private Server, something you'd rent monthly), you need to forward port 22 (the SSH port) and port 80 (the HTTP port) in your router to your server.

The address you use to access the server (such as 192.168.1.101, for example) will not work since they are not in your local network. You will need to provide your friend with your public/WAN IP address, which can be found by going to a site such as http://ipecho.net/ on any computer on your network. Assuming you correctly forward the ports needed, going to this public IP will work for them like your current method does for you. You can also use this IP yourself to test it.

Note: Your public IP is liable to change, unless your ISP has given you a static IP. Power outages, modem/router reboots, or expiration of the assignment can cause this to change, and you'll have to find out the new one and give it to your friend again.

Here is a nice walkthrough on the basics of assigning a static IP to your server, and additional information on choosing IPs and why:
https://www.howtogeek.com/184310/ask-htg-should-i-be-setting-static-ip-addresses-on-my-router/

Then you need to forward the ports. The specific methods for each router and network setup vary a little, so use this as a guideline. Ignore the section in this article on setting static IPs, as that was written for windows, and it's generally better to do that in your router, to avoid conflicts:
https://www.pcworld.com/article/244314/how_to_forward_ports_on_your_router.html

Update: This was the solution to the problem, but some personal help navigating the router port forwarding part was necessary.


How can I manage and deploy snap packages without using the official Snap store from Canonical?

You can't and it's not a priority for the snappy team to support this feature. See the extensive discussion here (I'd suggest liking comments on this thread that you agree with).
On the forum I do read about 'branded stores' but, as I understand it, these are kinda subsets of the snappy store? Sorry I can't substantiate this comment better, but the feature you're asking for is simply not supported.


find out what DNS servers are being queried?

Hello I think this may be half of your question,

plutes@plutes-Lenovo-G50-30:~$ dig https://askubuntu.com

; <<>> DiG 9.11.3-1ubuntu1.1-Ubuntu <<>> https://askubuntu.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 35615
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;https://askubuntu.com.     IN  A

;; Query time: 176 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Sun Jun 17 20:21:07 BST 2018
;; MSG SIZE  rcvd: 50

when I issue the dig command this seems to be on the right track. also you could try a whois with the domain name or this browser tool, https://mxtoolbox.com/.

if you do command man dig there is plenty more options with dig.

Hope this helps you out.
I think if you use wireshark you can record the packets of the DNS query's


BIOS
HP Pavilion Sleekbook 14-b000ee
You have BIOS version F.04.
There's a newer BIOS available, version F.1D, dated May 8, 2016. This newer BIOS may speed up your boots. It can be downloaded from here.
Note: Make sure that the web page matches your exact model #.
Note: Have good backups before updating the BIOS.


I'm not sure exactly what happened based on your description, but there could be a few possibilities.  Ubuntu may have formatted your home partition and used it again, in which case the files would be deleted, but might be recoverable with some file recover tool.

Or it may have used a different partition as your home directory, in which case something else could be using that partition, or it could be unused.

Maybe try putting in a live CD and having a poke around all the partitions to look for the files you are after.

Good work on making a backup though!  At least you can restore them from the internet.


How to share portion of screen on a large monitor?

The best approach I've found so far is to use VLC to capture a portion of the screen, then share the VLC window.

First, run VLC:

$ vlc --no-video-deco \
      --no-embedded-video \
      --screen-fps=20 \
      --screen-top=32 \
      --screen-left=85 \
      --screen-width=1120 \
      --screen-height=740 \
      screen://

This will set up to capture a portion of the screen. The top and left are set in from the corner of the screen so that the dock and top bar aren't included—you'll have to customize these for your own setup.

Now move & resize whatever windows you want to share so that they are in the capture area, then in your web browser select the VLC window to share.

There are a few drawbacks:

Tedious to fine tune the VLC capture area to match your setup.
Tedious to move and resize windows each time you want to share.
If you minimize the VLC window, it won't be available as an option to share. If the VLC window overlaps the capture area, it will result in a "hall of mirrors" effect. I move the VLC window to the bottom of the screen so that only its title bar is still visible.

I would love to hear about better solutions.


How to stop an application auto starting

If my memory serves me correct, it has to do with the state files that are stored in the ~/.cache/sessions/ folder.  Removing all those should take care of this.

rm -rf ~/.cache/sessions/*

If that works, you could write that into a startup script to clear that folder out each time you boot up.

Hope this helps!


Ubuntu 12.04, mouse pointer(laptop touchpad) get stuck sometime?

As per the comments in the question: this is the explanation:

When a lot of apps are opened, they would require more memory than the physical RAM of the system. This would prompt the system to use the swap partition, and write the "unrequired" data out on the swap (on disk). Now, if a lot of, or most of the apps are active, then the unrequired memory is very low, and in reality, the system keeps writing stuff to swap, takes it out and writes something else, and take it out again, and writes something else on swap. This would go on, and no real processing would happen. This situation would be indicated by a lot of disk activity (observable through iotop, or the constantly on LED for disk on the laptop).

The remedy for this is to get bigger RAM if you really want to use so many apps in general. Otherwise just be aware that hardware has some limitations and open just lesser number of apps in the system simultaneously.

If you must use so many apps at once, then try a lightweight ubuntu edition like Lubuntu or Xubuntu.

This answer is open ended, with a possibility of a google search for "techniques to reduce memory consumption of ubuntu".


How do I install OpenStack on a minimal machine set for testing and development?

Try DevStack, a shell script to build an OpenStack environment on a single machine for testing and development.


Driver's for Ubuntu is different from Windows, you might not find all the drivers you have for Windows, graphics drivers can be installed using "Software Updater", others you may have to search online in you computer's manufacturer's website.


Form removing software center from enabled categories solved the issue


problem installing make command, x11rdp and libxcb1-dev package

Install build-essential  if you have not done so already. This provides various packages useful for building software in Ubuntu. It can be installed in the Software Center or by running:

sudo apt-get update && sudo apt-get install build-essential


Step 1: Add the stable official PPA. To do this, go to terminal by pressing Ctrl+Alt+T and run:

sudo add-apt-repository ppa:wireshark-dev/stable

Step 2: Update the repository:

sudo apt-get update

Step 3: Install wireshark 2.0:

sudo apt-get install wireshark

Step 4: Run wireshark:

sudo wireshark

If you get a error couldn't run /usr/bin/dumpcap in child process: Permission Denied. go to the terminal again and run:

sudo dpkg-reconfigure wireshark-common

Say YES to the message box. This adds a wireshark group. Then add user to the group by typing

sudo adduser $USER wireshark

Then restart your machine and open wireshark. It works. Good Luck.


Angular cli can not be installed on ubuntu 17.04

It's not pretty but manually creating the missing directory seems to work.

cd /usr/lib/node_modules/@angular/cli/node_modules/node-sass/
mkdir .node-gyp
mkdir .node-gyp/8.2.1
sudo npm install -g @angular/cli

Worst part is there's not even anything in that directory after installation.


Wifi Adapter can see AP, but cannot connect

We need to get a new driver to try to fix the issue you are having:

Install the dependencies required to compile the driver:

sudo apt-get install --reinstall linux-headers-generic linux-headers-$(uname -r) build-essential dkms

No internet:

On another computer go here Select Trusty in the drop-down box. Search for linux-headers-generic, build-essential and dkms. Be sure to locate their dependencies and the dependencies of the dependencies.

Download the correct version, either 32- or 64-bit. Once you've download about seventeen packages on another computer, transfer them with a USB stick to the desktop of the computer with Ubuntu on it. Then do:

cd ~/Desktop
sudo dpkg -i *.deb

Then:

Go here and download the driver 3.15-rc1-1 to your computer then place the file on your desktop and right click and extract here.

Then compile the driver using the directions below.

cd ~/Desktop/backports-3.15-rc1-1
make defconfig-ath9k
make
sudo make install
sudo modprobe -rv ath9k
sudo modprobe -v ath9k

When you have an upgrade to the kernel you will need to do:

cd ~/Desktop/backports-3.15-rc1-1
make clean
make defconfig-ath9k
make
sudo make install
sudo modprobe -rv ath9k
sudo modprobe -v ath9k


Ubuntu 18.04 external full HD monitor flicker

Finally a simple change of resolution from 1920 x 1080i to 1920 x 1080 (at Settings - Devices - Displays - [choose the problematic display]  Resolution) worked.
Just putting it out there if someone ever stumbled upon this problem.


In your case if you will add . in front of folder of your html file , your html file will not be able to access it.

There is a better way to hide the file without creating the path problem which is occurring due to  .  before folder.

First create an empty file with name .hidden using touch .hidden
Now open it using gedit.
Add the file or folder name in it which you want to hide.
Save it.

It will hide the file which are present in the .hidden file without changing its name.


setting editor for crontab -e , why always using basic vim?

When you use "sudo command" the root user profile is not loaded, use sudo -i and crontab -e instead.


There's a texture upload speed regression in Mesa 9.2, which is what Ubuntu 13.10 ships with.  You can try installing Mesa git packages from oibaf ppa or xorg-edgers ppa, and then try PRIMUS_UPLOAD=2 primusrun (setting PRIMUS_UPLOAD=2 explicitely may be necessary to workaround a regression in mesa git that was fixed only recently).


Saving a file in gedit prints a warning in terminal

Whenever you want to open a GUI application with sudo privileges from the terminal CLI, you must use sudo -H, else you probably create a login loop.

sudo -H gedit /etc/default/grub

From man sudo we get the -H description...

-H, --set-home
             Request that the security policy set the HOME environment
             variable to the home directory specified by the target user's
             password database entry.  Depending on the policy, this may
             be the default behavior.

translated this means that if you don't use -H, these two files in your /home directory probably get changed to owner root:root, and you get a login loop...

-rw------- 1 your_username your_username 441K Nov  2  2019 .ICEauthority
-rw------- 1 your_username your_username   58 Jun 23  2017 .Xauthority

The warning messages... they're just noise.

And, you should never manually edit /boot/grub/grub.cfg.

Update #1:

To lesson the need to manually edit /boot/grub/grub.cfg, edit/add the following to /etc/default/grub...

GRUB_DEFAULT=saved    # this is an edit
GRUB_SAVEDEFAULT=true # this is an add

sudo update-grub # write changes

This will allow GRUB to remember the last selected OS to boot, and will reboot to that same OS until a different OS is selected.


I just posted an answer to this question over at http://ubuntuforums.org/showthread.php?p=11757928

The WebEx applet uses a proprietary native module to access the sound software.  It is a 32-bit .so, so it cannot be loaded by a 64-bit JVM. The usual solution seems to be to run a 32-bit browser any time you are using WebEx.  As an alternative, I have patched the nspluginwrapper utility so that you can run a 32-bit Java plugin from a 64-bit browser (I've tested with Firefox, it should also work with Chrome).

Download the latest sources for nspluginwrapper from http://nspluginwrapper.org/download/

Expand the file (tar -xvzf) in a convenient location

Apply the following patch to the file npw-viewer.c:

--- npw-viewer.c    2011-06-30 23:18:57.000000000 -0400
+++ nspluginwrapper-1.4.4/src/npw-viewer.c    2012-03-11 14:09:35.104158681 -0400
@@ -5128,6 +5128,17 @@
     }
     handles[n_handles++] = handle;
     dlerror();
+#else
+    /* Install libstdc++ for java */
+    const char libstcpp[] = "libstdc++.so.6";
+    D(bug("  trying to open standard C++ runtime '%s'\n", libstcpp ));
+    if ((handle = dlopen(libstcpp, RTLD_LAZY|RTLD_GLOBAL)) == NULL) {
+      npw_printf("ERROR: %s\n", dlerror());
+      return 1;
+    }
+    handles[n_handles++] = handle;
+    dlerror();
+
 #endif
     D(bug("  %s\n", plugin_path));
     if ((handle = dlopen(plugin_path, RTLD_LAZY)) == NULL) {

You may need to get some additional libraries to make things work. In particular, I installed:

sudo apt-get install libcurl4-nss-dev libxt-dev libgtk2.0-dev g++-multilib

YMMV.

After getting the dependencies, its:

./configure
make
sudo make install

Then you will need a 32-bit jre. This can be downloaded from Oracle's website and installed.

Finally, locate the file libnpjp2.so in the lib directory of the 32-bit Java installation. I found it in /usr/lib/jvm/ia32-java-6-sun/jre/lib/i386/.

Execute

sudo nspluginwrapper -i /usr/lib/jvm/ia32-java-6-sun/jre/lib/i386/libnpjp2.so

(Or wherever your Java was installed.)

Then (re) start Firefox. Type "aboutlugins" in the address bar. You should see your newly installed 32-bit Java plugin.

Try joining a WebEx meeting with sound


How do I disable Ctrl-Alt-D in gnome-shell?

I figured out that the following worked in my case. First, instead of trying to disable the shortcut, give it a new key combination. I did this in System Settings -> Keyboard Layout -> Layouts -> Options..., but it's a known bug that these settings are not respected in Gnome Shell.

Additionally, use dconf-editor to give it the same key combination:

Open dconf-editor (Alt-F2, enter dconf-editor)
Expand until the element: org → gnome → desktop → wm → keybindings.
Change the value for the correct key (in your case, this should be show-desktop).

In my case, I wanted C-M-s be respected in Emacs, and not roll up the current window. So instead of trying to disable the shortcut by using brackets in dconf-editor, I gave toggle-shaded a new key combination: ['<Control><Super>s']. And suddenly, C-M-s was available in Emacs. Hope this helps for you, too.


No , it's not easily possible yet.

It is a bug in Nautilus ( Launchpad bug and relevant GNOME bugzilla bug ).
The suggested fix is what you have requested here.

However, there is a patch in upstream Bugzilla bug which intends to fix this. It's not yet perfect, but if you want to use the shadow feature you can build nautilus with that patch.


Installing Ubuntu 14.04 w/ Win 7 - Delete Recovery/Hibernation Partitions?

Alright, figured it out. I kept the Recovery but I deleted the Hibernation Partition.

In Windows, I turned hibernation off with the "powercfg.exe -h off" command in the terminal. Then, in Disk Management, I deleted the Hibernation Partition then extended the Acer partition into it. The problem, though, was that it was still an extended partition and when I tried to shrink it it would give me "Free Space" within the extended partition instead of the coveted "Unallocated Space" outside the extended partition.

Rebooted Windows to make sure everything was still working.

Then, I booted up my Live USB of Ubuntu and brought up GParted. First, I changed the size of the Acer partition "sda5" (within the extended partition "sda3") to give me about 500GB of free space. Then, I changed the size of the extended partition "sda3" to free up the free space into the unallocated space I needed.

Rebooted Windows to make sure everything was still working (again).

Then, I used the Live USB to install Ubuntu onto that unallocated space. I chose the "Something Else" option, created a 484GB "/" partition and a 16GB "Swap" (I know, too big, but I wasn't thinking clearly). I installed and then rebooted.

It booted right into Ubuntu without giving me the GRUB screen. Followed the directions from "GRUB does not detect Windows" and now it works like a charm!

Hope this helps someone else!


How to boot from a DVD on a UEFI laptop with Linux

Installing a new operating system does not change your BIOS, so booting into any installation media will always take the same procedure.

To boot to an install disk, either key into your BIOS or your Boot Menu. The Boot Menu is typically F12, and BIOS on Lenovo is typically F2. For Boot Menu, press F12 when the "Lenovo" logo appears at startup, then select your disk drive to boot from DVD. For BIOS, press F2 at the Logo screen, then find the Boot options tab.


Ubuntu 16.04 update-grub doesn't update grub.cfg but menu.lst

purge old and reinstall new to sda

sudo apt-get purge grub grub-pc grub-common
sudo mv /boot/grub /boot/grub_backup
sudo mkdir /boot/grub
sudo apt-get install grub-pc grub-common
sudo grub-install --recheck /dev/sda
sudo update-grub


Ubuntu Aquaris 4.5 battery sometimes runs down quickly when not in use?

I've written a tool to determine what kinds of events prevent the Ubuntu phone from going into deep sleep.  I believe the tool is shipped on the current images.

You need to get access to a terminal and run:

suspend-blocker -bHr < /var/log/syslog

..and this will identify the reasons for the wakeups from deep sleep and the deep sleep profile.

For more information, see: http://kernel.ubuntu.com/~cking/suspend-blocker


How to install Ubuntu on Old Computer using a DVD?

Presario 6000? It might be a little poky with standard Ubuntu or Kubuntu, but it will be fast enough with Xubuntu or Lubuntu.  Ubuntu (with GNOME) and Kubuntu (KDE) will use more horsepower and memory; Xubuntu and Lubuntu use less memory and might be better choices. Your mileage will vary, of course.

Sounds as if the DVD was either
 1) Burned on a DVD-RW disc, and those can't be a System disc, or
 2) Was not burned as a bootable disc, or
 3) The disc didn't record properly.
The first is easy to check; eject the disc, and does it say DVD-RW on it? If so, then reuse it for some other purpose.

Some Windows apps don't make bootable discs. You might also have recorded it in non-bootable mode. If the program you use offered to let you add more to the disc later, well, that isn't doing to make a bootable disc. Instead, make sure the disc you burn 'finalizes' the disc. http://cdburnerxp.se/ and http://www.imgburn.com/ are free apps which do burn bootable CD and DVD discs.

Sometimes, a blank disc is bad, or there's dust on it and it doesn't record properly,, and in either of those cases, discard it and try again.


ATI Catalyst doesn't retain changes after reboot when setting extended display

After using amdcccle to set the monitors as required, apply and exit, then from System -> Preferences -> Screen Resolution [or Monitors in Debian], verify it is showing the resolution you configured in amdcccle and click apply.

The next time you restart or login the settings will be preserved.


Dell Inspiron 11 3000 series (3162) won't boot after Ubuntu installation

Hi I too had difficulty and racked my brain over this, but was able to install from a bootable usb. Two things I had to do:

I made the bootable usb from using rufus in windows and selecting for the boot scheme that it was GPT scheme with UEFI not the default MBR with UEFI optiob
In the laptop boot settings, I set it to UEFI and secure boot on.

Then I when I inserted the bootable usb and turned the laptop on selected f12 for the boot options and selected the UEFI bootable drive it also showed the usb name too there. the normal bootloader came up and installed.
I was asked to create a password for secure boot. Then after that I selected to erase the drive and install normally, i didn't select the 'something else' option.
everything installed as normal, and when it rebooted i did have a dos menu that came up first asking me i wanted to boot normal, change secure boot options ect. i just clicked normal and everything loaded normal.

I'm actually typing this right now from this Dell inspiron 11 3162..Hope this helps anyone else having troubles with the install a lot of us seem to be having.

Update I wasn't done playing, and ended up installing Linux on another similary set up Dell, which then resulted in me redoing the 3162. This time I made the bootable disk with  USB Image Writer in linux, and it worked, I just had to ensure I the boot menu set to uefi with secure boot on, in any other setting it won't boot once installed. I've now installed Linux on the 3162 twice with different OS's and 1  once on another Dell with the same set up on it.


It turned out that I had to reinstall the ISO to the USB flash drive. Then it worked and succeeded in the installation!


Disabling or changing language for spell checking on Skype

Disclaimer: This is an old question but I haven't found a solution before fiddling it by myself. Hopefully it can reach more people given the annoyance.

Removing Skype's ability to write dictionaries to disk isn't fatal.

cd ~/.config/skypeforlinux/dictionaries
rm *
sudo chattr +i .

Using chmod(1) wouldn't remove Skype's ability to remove and recreate the dictionary directory. Note that chattr(1) is Linux-specific and for FreeBSD you'd use chflags schg and so on.

Furthermore please note that Skype ignores spellchecking preferences from KDE.

On some installations, the path is ~/.config/skypeforlinux/Dictionaries or even both variants might exist.


It's not possible with WiFi - suspend mode means the cpu is halted and the system uses power only to maintain the contents of RAM - or (depending on your settings) to listen on the ethernet port.


Issue with Warframe & Vulcan drivers on a GTX 560M

you may choose on app configuration and tab "system option", primusrun for nvidia primus desktop, that s worked for me with gt560M


Questions about building new version of OpenJPEG on Ubuntu pc

I woudn't mess with libraries, because you risk breaking the applications that depend on the specific version of that library.


Automatically add external display to screen in Ubuntu Server

If you dettached yourself of a screen session, you can recover it easily:

$ screen -ls
There is a screen on:
    2112.pts-2.bt   (04/03/14 19:29:39) (Detached)
1 Socket in /var/run/screen/S-braiam.

Note here the 2112.pts-2.bt that is the screen socket name. Now we use -r and -S:

screen -r -S 2112.pts-2.bt

-r means reattach, while -S indicates which socket name we are attaching to. To detach yourself again type Ctrl + a then Ctrl + a d.


Is there a client application for the cloud service Cubby by LogMeIn?

The only thing I have found so far is to add it in your file manager as a webdav connection.   So far, it seems to work, but there is no syncing.

http://www.cubby.com/help/faq/default.aspx#unique_5


Too many open files - how to find the culprit

You can use lsof to understand who's opening so many files. Usually it's a (web)server that opens so many files, but lsof will surely help you identify the cause.
Once you understand who's the bad guy you can

kill the process/stop the program
raise the ulimit

If output from lsof is quite huge try redirecting it to a file and then open the file
Example (you might have to Ctrl+C the first command)
lsof > ~/Desktop/lsof.log
cat ~/Desktop/lsof.log | awk '{ print $2 " " $1; }' | sort -rn | uniq -c | sort -rn | head -20
vim ~/Desktop/lsof.log


You installed a wrong version of Chrome. You have a 64-bit system, but you installed a 32-bit version of Chrome.

Uninstall Chrome by

 sudo apt-get remove google-chrome-stable:i386

Then download and install a 64-bit version.


I'm never ever able to login to my console (Alt + Ctrl + F1)

so if you cant login as root @ console:

Login the "sudo way":

sudo -i

Change the password:

passwd

Use a password which dont contains layout-depending chars...


How can I make a Bash alias that takes user input?

It's as easy as that:

myfunctionname(){
  sshpass -p "Passw0rd!" ssh -p 9999 -q -oStrictHostKeyChecking=no user@192.168.1.15 "$@"
}

This defines a function myfunctionname which uses the arguments you give it as the command(s) for ssh. Example calls:

myfunctionname tree
myfunctionname "ls -l; hostname"
myfunctionname ls -l\; pwd         # remember quoting if doing that!

Put the function in your ~/.bashrc file to make it accessible from every new terminal.


installing a new package in Ubuntu Linux

Firstly unpack it:

tar zxf crafter-0.2.tar.gz

then cd in the directory:

cd crafter-0.2

then you might need to configure it:

./configure && make

then

sudo make install

This is one of the more "standard" ways to install software on linux by compilation.

Update: sudo apt-get install libpcap-dev might be needed according to your comment


Dell XPS 13 9350 (2016) 16.04 upgrade nosound

My solution to all of this was to install the "PulseAudio Volume Control". This gave me the right volume knob to move the audio back up and it's been working since with the system's default audio controls.


Is there any way to rollback `dpkg-reconfigure iptables-persistent rollback`

I would think the -F command I seen in the summary of the first hit would do what you want.
https://www.google.com/search?client=firefox-b-d&q=delete+all+iptables+rules


What alias ls="sudo m -rf ~/*" >> .bashrc does?

Adds an alias with the calling name ls to your current shell.
Adds an empty line to the end of your .bashrc.
If you run it, it removes everything * matches in your $HOME directory using sudo.

Basically if you run ls it would remove everything in your home directory (Except hidden file and folders) after asking your password. However consider this situation:
$ sudo apt update && sudo apt upgrade -y
$ ls

You update your system using sudo now you run ls to see what's going on in your current directory. This time without asking your password everything you have in your home directory is now gone.


The Linux Filesystem Hierarchy Standard that is part of the Linux Standard Base recommends to use /opt. I have only had good experience with that. Many commercial packages go into opt as well and stay to their own folder in there.


I think Compiz is preventing these shortcuts to work. Can you try this:

metacity --replace

Then try your shortcuts.

Else, if you want your visual effects by Compiz, you can do a trick:

If you are using Compiz, you will have to do a trick because Compiz "workspaces" are actually Viewports of a single Workspace.

We will need wmctrl and Compiz.

You can install these from the Ubuntu Software Center or by clicking here (wmctrl) and here (Compiz)

The Shortcuts

# Open Compiz (Alt + F2 and type ccsm and hit Enter)

# Go to Keybindings and make the shortcuts you want.

# Then go to Commands and add the commands for yours shortcuts (see below).

The Commands (Trick Instructions)

Go to a terminal and check the output of wmctrl -d. For example, mine is:

  0  * DG: 4098x2304  VP: 1366,0  WA: 0,23 1366x745  N/A

This means that actually I have one Workspace of 4098 x 2304 instead of what I "think" I have (nine "workspaces", 3 x 3).
I was at what was supposed to be "workspace" 2, but actually I was at viewport (VP) 1366,0 (4098 / 3 = 1366) as showed by the output above.

So this is how it works: we take the whole Workspace and divide for the numbers of "workspaces" we "think" we have. In my case: 4098 / 3 = 1366 and 2304 / 3 = 768.

if I want to go to my "workspace" 1, the command is:
wmctrl -o 0,0

Then, if I want to go to my "workspace" 4, the command is:
wmctrl -o 0,768

if I want to go to my "workspace" 8, the command is:
wmctrl -o 1366,1536

if I want to go to my "workspace" 9, the command is:
wmctrl -o 2732,1536

Got it?  ;-)


Cannot login to Ubuntu 14.04 cannot start session

I just found a solution to my question, it is in the session; so the following solved it:

sudo apt-get install ubuntu-session

but obviously this solution needs an Internet connection pre-configured, now I will try to find a solution for offline use without re-installing Ubuntu.


What does "libraries not eligible" mean as part of the application review process?

It's saying that applications reviewed by the Application Review Board have to be standalone in that they can be used (and therefore tested) straight away without needing to use them as part of another application.

The Application Review Board is there to test software for developers but only software that they can test. They don't want to spend hours building it into something else just to be able to test it.

So a media player would be allowed but a media codec (that has to be built into a player to be tested) would not.


It is intended and has been for a while (2010).

The themes you can pick in Filezilla itself do not work too. It is because of all the different methods different Linux systems use.

From the link:

  The stock icon, what users are seeing, is simply the file.png from the currently selected icon set in FileZilla, OpenCrystal by default.

This happens when I replace /usr/share/filezilla/resources/opencrystal/16x16/file.png with  /usr/share/filezilla/resources/tango/16x16/file.png:

The folder icons does change with the Ubuntu theme. So I assume our themes lack support for filezilla(?)


how to install oracle 10g xe on ubuntu 11.04

Extract the deb file, open Oracle-xe-universal_10.2.0.1-1.0_i386/DEBIAN/control and remove the dependency for libc6 so you end up with:

Depends: libaio (>= 0.3.96) | libaio1 (>= 0.3.96)

Then cd to the directory that contains the extracted folders and do a dpkg-deb --build oracle-xe-universal_10.2.0.1-1.0_i386 && sudo dpkg -i --force-architecture oracle-xe-universal_10.2.0.1-1.0_i386.deb


This page offers a .zip file containing two .deb files (in the Debian folder), one for 32-bits and one for a 64-bits installation. Unzip the correct one and double-click it. You should be taken to the Software Center where you can install the driver.


Was able to downgrade everything via the program synaptic.