To give user mywebsite read/write permission inside /var/www/html/mywebsite:
chown -R mywebsite /var/www/html/mywebsite

That should be sufficient.  You should not have to alter group owner or permissions because the user owner should be given read/write permissions already.
If you wanted to grant a group read/write permission inside that folder, say, group my-group, you'd need:
chgrp -R my-group /var/www/html/mywebsite
chmod -R g+w /var/www/html/mywebsite

Important notes

Don't set the ownership (either user or group) of files within /var/www to the www-data user.  The point of having the web server run as the www-data user is that this is an unprivileged account, unable to modify any files.  If you set some files to be owned by this user, you are negating that security measure.  If you need your web server to be able to modify certain files, only set ownership for those particular files and be very careful not to allow direct execution (eg via PHP) of them.  In general, never set it so that www-data can modify files.

When doing a recursive chmod, it is often better to use letters than numbers, eg chmod -R g+w something rather than chmod -R 770 something.  This is because the former is able to modify only the permission you want, and leave the others.  By default, directories and files will have different "execute" permissions - files will have it off (eg 644) and directories on (eg 755) because this permissions has a different meaning for directories.  If you do chmod -R 770 something then regular files will have execute permissions turned on.  In general it's a good idea to only modify what you need.
Another thing to note is that 770 would remove the world-readable permission, which will prevent the web server (which runs as an unprivileged user) being able to read it.  In this case it's also preventing the user mywebsite being able to see the /var/www/html/mywebsite directory at all, because you've set the parent directory /var/www/html to 770.


Getting the Ubuntu to work right in VirtualBox

Make sure that you're choosing Linux/Ubuntu on this screen. Make sure which version (32-bit/64-bit) of .iso you downloaded. Mount this .iso on the VB CD/DVD drive.


Is it considered good practice to avoid using `sudo su`?

You question is more an opinion than anything else.

IMO best practice is to use sudo every time as sudo will log your commands, while sudo su will not (once you are root).

If that is too tedious I suggest sudo -i for better isolation between user and root accounts (environmental variables)

See https://help.ubuntu.com/community/RootSudo#Special_notes_on_sudo_and_shells


Does Ubuntu 12.10 64 bit support the AMD Radeon HD 6790 video card?

I have a HD 6970, so from the same 6000 series, and there is an AMD driver that can be installed in Ubuntu. You can download it from  "Software Sources" -> "Additional Drivers". Or you can download it and install manually from the AMD website, which clearly specifies the 6900 series to have a supporting driver for Linux.


Retrieving the Names of Files in a txt file

You can execute

ls -1 >filename

this will redirect the output in the file with the filename given.

For the content of a folder:

ls -1 foldername >filename


Constant interrutions in very slow Wifi brcmfmac43241b4-sdio in VAIO pro 13

Try this:

Edit your iwlwifi.conf

nano /etc/modprobe.d/iwlwifi.conf

Comment the last three lines and add this:

options iwlwifi bt_coex_active=0 power_save=1

Your file should end like this:

# /etc/modprobe.d/iwlwifi.conf
# iwlwifi will dyamically load either iwldvm or iwlmvm depending on the
# microcode file installed on the system.  When removing iwlwifi, first
# remove the iwl?vm module and then iwlwifi.
#remove iwlwifi \
#(/sbin/lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs /sbin/rmmod) \
#&& /sbin/modprobe -r mac80211
options iwlwifi bt_coex_active=0 power_save=1

Reboot


Why is the month and day of week always in English, even if the system language is Spanish?

Try going to language support. Selecting the "Regional Formats" tab. Selecting desired format/language (Spanish) and then click "Apply system-wide".

It took me ages work out how to change this between English and Portuguese, but it was that simple.

You need to reboot before changes take effect.


How do I get two finger scrolling to work when the mouse is over a flash object?

The underlying problem is that the scroll events are being captured by the Flash object, but are not being passed onto the parent window when the Flash application has no use for them.

I'm not sure whether the responsibility lies with Adobe or the individual authors of the Flash applications concerned, but alas, I don't think there is anything that Ubuntu can do to fix this.


I faced nearly the same issue with 21.04 [vscode, node, react-native, watchman].
I would suggest to downgrade to 20.10 or 20.04 which I probably do too. I can't recall such memory drain since 19.04.
My config has 32G of ram which get exhausted very quick :(


How exactly does rsync decide what to sync?

I add new files to /dir/a and run the same command again, it knows what it did and only copies the new files.

No, it doesn't know what it did in a previous run. It compares the data on the receiving side with the data to be send. With small enough data, this won't be apparent, but when you have large enough directories, the time spent comparing before the copying actually starts is easily felt.

The default check is for file modification times and sizes. From man rsync:

-c, --checksum
      This changes the way rsync checks if the files have been changed
      and  are in need of a transfer.  Without this option, rsync uses
      a "quick check" that (by default) checks if each file’s size and
      time of last modification match between the sender and receiver.
      This option changes this to compare a 128-bit checksum for  each
      file  that  has a matching size.  Generating the checksums means
      that both sides will expend a lot of disk I/O  reading  all  the
      data  in  the  files  in  the transfer (and this is prior to any
      reading that will be done to transfer changed  files),  so  this
      can slow things down significantly.

And:

-u, --update
      This  forces  rsync  to  skip  any  files  which  exist  on  the
      destination  and  have  a  modified  time that is newer than the
      source  file.   (If  an  existing   destination   file   has   a
      modification time equal to the source file’s, it will be updated
      if the sizes are different.)

Note that these are not implied by the options you used. -a is:

-a, --archive               archive mode; same as -rlptgoD (no -H)
-r, --recursive             recurse into directories
-l, --links                 copy symlinks as symlinks
-p, --perms                 preserve permissions
-o, --owner                 preserve owner (super-user only)
-g, --group                 preserve group
    --devices               preserve device files (super-user only)
    --specials              preserve special files
-D                          same as --devices --specials
-t, --times                 preserve times


How to stop/kill "usr/share/python usr/share/apport/apport"

Try running

sudo service apport stop

in a Terminal.

You can disable Apport by changing the line

enabled=1

to

enabled=0

in /etc/default/apport


Find directories that DON'T contain a file but YES another one

The following command will list all directories that don't contain .flac or .mp3 files:

find ~/Music -type d '!' -exec sh -c 'ls -1 "{}"|egrep -iq "^*\.(flac|mp3)$" ' ';' -print

And the following command will list all directories that contain .rar files:

find ~/Music -type d -exec sh -c 'ls -1 "{}"|egrep -iq "^*\.rar$"' ';' -print

Now, joining these commands, the following command  will list all directories that don't contain .flac or .mp3 files and that contain .rar files:

find ~/Music -type d -exec sh -c 'ls -1 "{}"|egrep -iq "^*\.rar$"' ';' \
    '!' -exec sh -c 'ls -1 "{}"|egrep -iq "^*\.(mp3|flac)$" ' ';' -print


You want sudo update-rc.d ddclient enable


Partition changes name after every reboot

Use this command to determine the UUID of your C: drive:

sudo blkid

Example output:

/dev/sda1: UUID="f1b3915e-3c86-a3ec-3273-43967f134ce5" UUID_SUB="f48bf957-6f67-171f-ea75-29ddbd401637" LABEL="ubuntu:0" TYPE="linux_raid_member"
/dev/sda2: LABEL="Win" UUID="28A139962EFFC093" TYPE="ntfs"
/dev/sda3: UUID="571a61fe-6e6f-45d0-9fe1-832f28519f96" TYPE="reiserfs"
/dev/sdb1: UUID="f1b3915e-3c86-a3ec-3273-43967f134ce5" UUID_SUB="d0318ec5-9e4c-a864-7906-2d43bcbd0374" LABEL="ubuntu:0" TYPE="linux_raid_member"
/dev/md0p1: UUID="88dc483f-aef9-454b-b744-2c3e3202a198" TYPE="swap"
/dev/md0p5: LABEL="Home" UUID="b632fe56-564e-4d3f-833a-fde68fd1dd32" TYPE="ext4"
/dev/md0p6: LABEL="Ubuntu" UUID="da84c996-f7d0-4fe8-8822-407e4f6c5c22" TYPE="ext4"

Find the device corresponding to your C: drive (use label if it's difficult) and add such line into your /etc/fstab:

 UUID=AC7A30A47A306D68 /windows        ntfs    defaults,umask=007,gid=46 0       0

Reboot (or do sudo mount -a) and see your drive mounted in /windows.


Kernel dies in Jupyter Notebook after upgrading Ubuntu from 16.10 to 17.04

Simply update your jupyter, it should work.

e.g: if you installed it using pip run something like:

pip install --upgrade jupyter --user

or

sudo pip install --upgrade jupyter


Matlab: Blank window after splash screen

Try the following command:

wmname LG3D

More details can be found at:

Blank Window While Using xmonad/awesome/dwm

Empty tooltips in MATLAB


Why am I unable to mount file shares between two ubuntu machines?

Connect each computer to the internet and install the 'ssh' package. Then plug the computers directly into each other.

On computer A, do this:
sudo ip addr add 192.168.18.1/24 dev eth0

On computer B, do this:
sudo ip addr add 192.168.18.2/24 dev eth0

Then you can mount the filesystem over sftp in nautilus and copy that way just like you would between drives. On the computer you want to run the copy from, open nautilus and Click Go -> Location...   In the address bar put sftp://<username you want to access files as>@<other computer's ip address . So, for example, if you are on computer A and computer B has the user 'james' you could do something like this: sftp://james@192.168.18.2 and press enter. It should ask for your password for the james user on computer B and then it should show the files on computer B. Copy and Paste the files to where you want them.


Vidalia detected that the Tor software exited unexpectedly? [Only Vidalia no Tor Browser]

[Problem Solved]

note: this is for who have only Vidalia
 - remove the Vidalia using sudo apt-get autoremove vidalia
 - Install it by using sudo apt-get install vidalia
 - Start the Vidalia and it will give you the error
Vidalia detected that the Tor software exited unexpectedly. Please check the message log for recent warning or error messages.
 - Uncheck the option
 - Select the Advance and choose Use TCP connection(ControlPort) instead of Use unix domainsocket (ControlSocket)
 And you are done now run the Vidalia and it will work like a Charm :)


Can't configure wireless now that WPA2 is enabled!

I made this one: How to connect and disconnect to a network manually in terminal?

But i think it won't work since i later found out that when you put a WPA key, the whole thing gets a "little" complicated. Not so easy as iwconfi wlan0 key s:password for like WEP security. I then found out this HUGE post which has in detail information that worked in my case for WPA and WPA2 using PSK (At least in my case) I hope it helps you too:

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

NOTE: Make sure your card supports WPA. Happen to one of my students that he spend a week trying this and it did not work since his card did not support WPA (It did not even have anything WPA related).

More Specific link about WPA2 -> http://ubuntuforums.org/showthread.php?t=607410
Good luck, let me know how it went.


Right Click on the Desktop and select Change Desktop Background.

You can try the tile, zoom , center ,scale, fill, span options to fit the image according to your preference as shown.


Nvidia Quadro FX 380M drivers not working with Ubuntu 18.04LTS (HP-EliteBook-8440w)

Try to booting with parameter nvidia-drm.modeset=1


i think you can mount your device via usb and then just enable usb debugging in your device and then you can surely enjoy it.

once you have enabled usb debugging you can play them via rhythmbox music player


Ubuntu 18.04 and 20.04 stuck on gnome startup (on battery only)

Same bug on pretty much every distro I could try, s340 with 3500u here. Is this a known issue for the devs?

Edit: adding grub params nomodeset or iommu=soft solves this (idk at what cost) but it is a good temporary fix


Cannot scroll using trackpad on Sony Vaio

Try this:

sudo modprobe -r psmouse
sudo modprobe psmouse proto=imps

It should works now. It's time to make it permanent:

sudo tee /etc/modprobe.d/psmouse <<< 'options psmouse proto=imps'

That's all.

(That solution was posted here in Ubuntu Jaunty, but it should work in Oneiric)


Your user ID's aliases are not used via sudo

You may or may not want to use the trick linked to in the comments.

There might be reasons to have no aliases or other aliases for root.
These aliases can be stored in /root/.bashrc as you already know. They can be used when you run interactively at the root prompt # after
  sudo -i  # activates root's aliases

but they are not activated when followed by the alias on the command line
    sudo -i <specific alias>  # does not activate root's aliases
    sudo -H <specific alias>  # does not activate root's aliases

Examples:
$ LANG=C sudo -i

root@xenial32:~# alias
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias l='ls -CF'
alias la='ls -A'
alias ll='ls -alF'
alias ls='ls --color=auto'

root@xenial32:~# grep -e ^alias -e \ alias /root/.bashrc
# enable color support of ls and also add handy aliases
    alias ls='ls --color=auto'
    alias grep='grep --color=auto'
    alias fgrep='fgrep --color=auto'
    alias egrep='egrep --color=auto'
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'

Using one of root's aliases
root@xenial32:~# l
bin@  extractor.log  logfile.tar  mkusb.log

root@xenial32:~# exit
logout

sudodus@xenial32 ~ $ LANG=C sudo -i l
-bash: l: command not found

[127] sudodus@xenial32 ~ $ LANG=C sudo -H l
sudo: l: command not found

[1] sudodus@xenial32 ~ $ LANG=C sudo -i alias
sudodus@xenial32 ~ $

I would not use alias sudo='sudo -i' because

there is a risk, that you forget that you have superuser privileges, and may do things that you should only do with regular privileges. In other words, I would say that it defeats the purpose of sudo to always go to root prompt

an alias does not work anyway on the command line with sudo -i <specific alias>

it is often efficient to use sudo with the standard settings for text mode commands

for GUI commands I would recommend sudo -H or gksudo


In all Unix systems, including Linux a Superuser is the system user who has all permissions to be able to perform administrative tasks. This can be the user root but this user is diabled in Ubuntu for security reasons.

The Ubuntu way to perform admistrative tasks is to temporarily gain superuser privileges by putting the command sudo (super user do) in front of another command that requires superuser powers:

sudo dpkg -i packagename.deb

Then you will be asked for your password (which is identical to your login password):

[sudo] password for lasse:

Note that you don't see anything in terminal while typing this passoword (not even asterixes).

Users that are allowed to be administrators on creation of their account are put on a list of sudoers to enable the system to look them up before granting administrative privileges with sudo.

For further reading and alternative ways on how to become superuser or root see:

What are the differences between sudo, su, visudo, chroot, and gksu?
What are the differences between "su", "sudo -s", "sudo -i", "sudo su"?
Why is it bad to login as root?

Please also note that you can seriously harm your system when running a bad command as superuser. Sometimes you will not even be able to repair it. Therefore be careful what you do as superuser, and think twice before you press enter.


Why I am getting this "cannot remove" line in terminal?

According to this Launchapad bug report you should run

umount /run/user/root/gvfs

before exiting.


Where is NumLock in /usr/share/X11/xkb/symbols/

It's not defined on the us keyboard I use, but you can define it like this:

key <NMLK>  { [ Num_Lock,   KP_End, KP_1,   KP_Divide   ] };

If no key has Num_Lock as its unmodified symbol, it seems you won't be able to set the NumLock modifier, even programmatically with something like numlockx.


How can I uninstall VMware 8 Workstation from Ubuntu Studio 12.04.1 LTS?

You have to locate the command :

which vmware-installer

The default must be under /usr/lib so do the following(replace your path to command if its changed in your machine).

sudo /usr/lib/vmware-installer -u PRODUCT

For a list of which products are installed, you may run:

/usr/lib/vmware-installer -l

Another way is to remove manually

Follow this link to do it so.


Why does my Ubuntu display a corrupted screen on first boot but then work after rebooting?

This page describes a fix that worked for me: https://itsfoss.com/fix-ubuntu-freezing/

sudo gedit /etc/default/grub

Look for a line that looks something like:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

and add the nomodeset to the end of it.

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"

Then run:

sudo update-grub2


Change default OS Setting linux Ubuntu to Windows

Just click this link. The package "startupmanager" will be installed, and then you will be able to configure default OS boot system from the "system" menu.


You don't need the software. All UPS continue to work without the USB/serial connection.

Depending on what model UPS you have, you may have to run different software. e.g. the powstatd package provides software for what it calls "dumb" UPS. gunpower and upsd are other packages which do similar things. You may have to figure out which works best for your needs.


Ubuntu 16.04 detects wireless during trial, but not after install

The only way, for me, to solve this was by creating a cronjob.

@reboot systemctl restart NetworkManager.service

This was on a Dell XPS-13 9333


`do-release-upgrade` is selecting 17.10 instead of 18.04

It's normal; it will take some time before the new release is offered that way.

If you want to do it now, try:

do-release-upgrade -d


Is it possible to install Minergate in Lubuntu, for 32-bit?

Modern versions of MineGate 8ю3 are 64-bit only executables:

and old versions too:

So consider to reinstall 64-bit Ubuntu 16.04 LTS.


Why netplan routes configuration are part of an interface

It's not uncommon for a route to be specific to an interface, however, they are usually global.

For example, if I have a VPN interface, I will probably want to route all the subnets at the other end of the VPN over that link. It's likely that these are private/reserved subnets, which means they will only be available when the VPN is active, so it wouldn't make sense to have them in the route table at all times, although it will probably still work.

In the example you have provided, there are multiple default routes, probably for redundancy.

Probably the most important rule to understand in routing is the "most specific route first" rule, which means that if you are trying to access 10.0.0.1, it will traverse a route of 10.0.0.0/25 before it will traverse a route of 10.0.0.0/24, which will obviously go before 0.0.0.0/0.


How to install Diamond XtremeSound 5.1. sound card driver for 12.04?

The card isn't listed in the ALSA support matrix, so theoretically the card/chip isn't supported. But the C-Media CMI8738-LX chip Oli mentioned is supported, at least the standard version is.

If you have a motherboard with a HD-Audio specification compliant controller, you wouldn't need this card. PCI is now being phased out and cannot be found on newer Intel motherboards. If you only have stereo out on your motherboard and you need 5.1 you should get a supported external USB soundcard. You can get the generic CM106 based ones from China or something from well known soundcard manufacturers like Asus and Creative (the recond3D USB worked out of the box when I tried) or more expensive ones from audio interface manufacturers.


You can install it in as little as 11.  My Ubuntu VirtualBox install of Ubuntu 20.04 runs well on 11 GB. Not much space left over but runs well for testing.  15 is better if you have the space.


run Ubuntu Touch Developer Preview on desktop?

https://wiki.ubuntu.com/Touch/Emulator
This shuld work to create an Ubuntu Touch emulator, it did for me

Good luck!


How can Partition directory changes every reboot?

Your drive is mounted to a folder named like the partition name or if there is none like the partition ID. The second option might change. You can give the partition a name:

Go into the Disk Utility → select the drive → select the partition the right side → click the wheels below → edit file system → enter a name.

Next time you connect it, the partition should get a fixed name.


Programatically modify file associations using standard interface (using mimetype)

xdg-mime(1) may be what you're looking for.

The man page for this command links to the MIME database specification at https://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec/, and also the MIME applications associations specification at http://www.freedesktop.org/wiki/Specifications/mime-apps-spec/


Boot with Ubuntu livecd gives an error message before proceeding to a grub style menu, is it safe to proceed with installation?

Could not open "\EFI\BOOT\fallback.efi": 14

Doesnot cause any problems.After installing ubuntu try to turn off secureboot.

or

Try to install Ubuntu in EFI mode.

https://help.ubuntu.com/community/UEFI#Installing_Ubuntu_in_EFI_mode


If you're still trying to figure it out. I managed to get mine to work after a lot of fiddling. I did grab the source from here https://popcorntime.sh/ then I used the commands Ramesh posted earlier. I did not use the final part though and just checked the extracted folder. You would see that there's a file in the folder called Popcorn Time. Drag and drop to terminal and it should work flawlessly.

Hope this helps!


Continued problems with 16.04.1 with Dropbox and Nautilus

When you viewed nautilus-dropbox in Synaptic, and marked it for complete removal, did you remember to click on the APPLY icon?

If you don't see dropbox in Synaptic, you can download it directly at:

https://www.dropbox.com/download?dl=packages/ubuntu/dropbox_2015.10.28_amd64.deb

g15daemon is only required if you have a Logitech G15 keyboard. If you don't have such a keyboard, you can safely uninstall this.


How to rename the file and as well as move the file without renameing the file?

You must quote file names if they contain spaces or special characters that would otherwise be interpreted by the shell. This includes the round round braces ()in your case.

Use single quotes '' normally, unless you need Bash to expand variables inside:

mv 'The_Intel_Microprocessors_8th_Edition.pdf (DearBits)' Intel_microprocessors

or

mv 'The_Intel_Microprocessors_8th_Edition.pdf (DearBits)' /home/emertxe/Emertxe_books/

The alternative to quoting is to escape all spaces and special characters by writing a single backslash \ in front of each of them:

mv The_Intel_Microprocessors_8th_Edition.pdf\ \(DearBits\) Intel_microprocessors

This is also what Bash does for you if you use the Tab key to autocomplete the file name after typing the first few characters, but it is annoying to do that manually as you always have to remember which characters you need to escape and you may not forget any.


you need to use port after your ip address eg 192.168.2.5:5900 also some clients require two colens after the ip then it'll be something like 192.168.2.5::5900


How to keep grub from ever reinstalling itself

Edit2 2018-10-01: got it. tl;dr is that apt-mark hold grub-foo (on all desired packages) was the ticket, but appears to have required manually calling on each package apt dist-upgrade was attempting to bring in.

$ sudo apt-mark hold grub*
grub2 set on hold.
grub set on hold.
grub-common set on hold.

[... a bunch more packages ...]

grub-pc set on hold.
grub-legacy-doc set on hold.
grub2-common set on hold.
grub-gfxpayload-lists set on hold.
grub-pc-bin set on hold.

But right after...

$ sudo apt dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
  gcc-6-base:i386 grub-common:i386 grub-gfxpayload-lists:i386 grub-pc:i386 grub-pc-bin:i386 grub2-common:i386 ...

Go figure. However, manually specifying the above grub* packages to apt-mark hold worked and apt dist-upgrade no longer pulls in grub.

Last comment is that I tried this in /etc/apt/preferences.d/grub-blacklist:

Package: grub*
Pin: origin ""
Pin-Priority: -1

That didn't work.

Edit 2018-10-01: this was not the solution... even with the setting in /etc/apt/apt.conf.d/01autoremove below, apt dist-upgrade is still putting it forward to be installed. To be continued...

I think I may have answered both questions.

  how can I find out why grub is being summoned?

I'm most familiar with pacman on arch; looks like the equivalent to pacman -Qi pkg where you get a list of which packages require the named package. This was one equivalent of that for ubuntu:

$ apt-cache rdepends --installed grub-pc
|linux-image-4.15.0-34-generic
    grub-pc:i386

So, the meta-package for the linux kernel pulls it in. If I had more time/inclination, I'd see if there was some set of packages to install directly vs. relying on this convenience package, but I don't care to do that at this time.

  how can I prevent it from ever being installed again?

In looking for how to blacklist in ubuntu, there were various options, but I settled on this one because it seemed the least weird/hokey:

$ cat /etc/apt/apt.conf.d/01autoremove
{
  ...
  Never-MarkAuto-Sections
  {
    ...
    "grub*";
  };
};


Install .deb on from CD-ROM while offline with default applications only

You have to install the .deb , and the dependencies, with dpkg. As long as you have all the dependencies, you should be able to install them with dpkg.

If you are having a problem, pastebin the command and output you are getting.

A more automated method would be to use Aptoncd

http://aptoncd.sourceforge.net/


grub splash command freezing computer during resume from suspend (RAM)

I solved this by switching to Kubuntu 18.04 LTS. Enabled Nvidia driver through driver manager application. I now can have splash screen and suspend to ram both enabled.


I am having the same issue. I have Ubuntu 14.04 server running that I have been running forever, well as long as it has been out. Before that I ran 12. I have been using Samba for years without any problems. No withing the past two days it has stopped working. I can connect to the share, but when I try to access any folder in it. I get the following message on my windows 7 box:
Windows Error

The only thing that I did was apply updates to Ubuntu, nothing to windows. If I can provide any more information to assist in clearing this up let me know.

I forgot to mention. I also configured Samba to accept root login. I was able to log into the share, but couldn't access any directories. Same as regular user.


Resume from suspend not working on Macbook Pro 5,5 with Nouveau

The issue may just be trying to use the non-Nvidia drivers. I have an HP laptop that refuses to resume after hibernate in the same way as your Mac Book unless I install the proprietary drivers.


According to
this link,
the logic behind Kubuntu not "supporting" color emoji is that Qt doesn't fully support them. The reason that some apps show them (like Nautilus) is because they are GTK+ apps or something else that fully supports color emoji.


Internal Microphone not working with Ubuntu 13.10 on Compaq CQ-45

I searched some solutions on the Internet. Following worked for me.

I have added to /etc/modprobe.d/alsa-base.conf the following lines and worked for me:

options snd-pcsp index=-2
alias snd-card-0 snd-hda-intel
alias sound-slot-0 snd-hda-intel
options snd-hda-intel model=dell-m4-1
options snd-hda-intel enable_msi=1
options snd-hda-intel position_fix=1 enable=yes

And then in Pulse Audio volume control, I set the Built-in Audio to "Analog Stereo Input".


I need to be able to save my data on my Ubuntu on USB

Create your Live USB stick in Ubuntu Startup Disk Creator by selecting the option "Stored in reserved extra space."  Select the amount of extra space you want to use onthe USB stick to store your files and data.

(As a tip, I like to use the KDE version of Startup Disk Creator, usb-creator-kde, because it seems to work better for me).

Another option is to insert a second USB stick while running Ubuntu from the (first) Live USB stick.  Save your files to the second USB stick.


Refind configuration: Change boot order and default boot

First, you can set the default boot option in rEFInd by editing the default_selection item in refind.conf (usually in the /boot/efi/EFI/refind directory in Linux). Set any relevant subset of the text that appears when you highlight the option in the menu to make it the default. In your case, default_selection vmlinuz will probably work nicely.

Second, the "two versions of Ubuntu" to which you refer are almost certainly two different Linux kernels. The kernel is not Ubuntu, but it is the core ("kernel") of the OS, and in a technical sense, it's the part of Ubuntu that is Linux -- it's the Linux kernel (as opposed to a FreeBSD kernel, an OS X kernel, or whatnot). In any event, rEFInd is coded in such a way that all the files within a directory are sorted by date within the rEFInd menu, with the most recent file first. Thus, when you install a new kernel package, rEFInd will automatically move it to the start of the list.

This sorting interacts with the default you set in that when you set a default that matches more than one entry (as vmlinuz will if you've got multiple Linux kernels), rEFInd uses the first item in the list as the default. Thus, rEFInd should normally boot the most recent kernel by default if you set default_selection vmlinuz in refind.conf. (There can be exceptions to this rule if you mess with the date stamps by using the touch command in Linux or if you install kernels in a strange order.)

As rEFInd's designer, I created this system to work sensibly with most Linux distributions, provided a reasonable default_selection is set. Sorting by date stamps, in particular, helps a lot with this.


Not allowed to add .txt file to Computer

You may be in a folder where your user doesn't have permissions.

Try du /var > ~/tmp.txt to write the file to your home directory, you should have write permission there.


Why $PATH is not reflecting what is in the environment file, Ubuntu 18.04?

I had the same problem while trying to set my JAVA_HOME environment variable (link) after installing the default-jdk apt package, also on Ubuntu 18.04.1.

Setting JAVA_HOME in /etc/environment didn't work at all, even though that file is symlinked in /usr/lib/environment.d/ as described here.

Setting it in ~/.profile did work, but was obviously not system-wide, so some tools couldn't see it and it was just a pain.

I ended up setting it using a script in /etc/profile.d/ as described here, and that finally worked.

I have no idea why /etc/environment isn't working. I've successfully used that method on Ubuntu 16.04, but no luck on 18.04. I also grepped everything in /etc/ as described in this related question and also suggested here, but couldn't get to the bottom of it.


Why does rsync slow down my whole computer?

Answering my own question: the answer is "user error." The whole USB/NTFS thing was a red herring!

My rsync command was supposed to back up my internal drive to an external USB drive, like this:

$ rsync -avx / /media/backupdrive

After a recent OS upgrade, however, Ubuntu changed the auto-mounted destination to /media/username/backupdrive, inserting my username into the path. So, my script was not actually hitting the USB drive, but writing to /media locally on my boot drive.

In other words, my boot drive (an SSD) was being hammered by rsync and filling up to 100%. This caused the system slowness.


After installing Apache server the website home page works but links under it give 404

Finally found a way to fix this:
sudo service apache2 restart
sudo a2enmod rewrite
sudo systemctl restart apache2


How do I install Ubuntu on my HP Mini 1000 after HDD has been wiped?

You can easily install Ubuntu 14.04.2 LTS (32-bit), from USB. I have done this successfully on 20 (or more) HP 210-1000s Netbooks (and similar/earlier models). Check elsewhere on this forum on how to create the USB installer.

It needs to be 32-bit, due to issues with Intel Atom graphics chipset/drivers.

You may have issues with WiFi, but check output from: dmesg | grep -e b43 -e Broadcom -e 43xx

Fix is: (using Ethernet cable)

sudo apt-get install linux-firmware-nonfree

sudo modprobe -r b43
sudo modprobe b43

To confirm:

dmesg | grep -e b43 -e Broadcom -e 43xx


Close Android Studio and kill all processes using port 5037

sudo lsof -i | grep 5037
sudo kill [PID_NUMBER]
open Android Studio


How to fix backlight for Dell inspiron on ubuntu 12.0.4 LTS?

Click Here >> Ubuntu Wiki >> Debugging >> Backlight

Please let me know if this helps


How do I update Java to 8u51 on Ubuntu 14.04?

The WebUpd8 PPA is not updated any more.

You can update java to 8u51 using a script.

sudo apt-get install git curl
git clone https://github.com/hanipouspilot/oracle-java8.git
sudo sh oracle-java8/javains

This is only for 64-bit Ubuntu.

The problem is that Oracle changes links used in this script and I do not guarantee that I will update the script for the future updates. But I probably will if there is no a better solution.


Can I safely shrink my Windows partition and expand my Ubuntu partition, and can I make the final transition to Ubuntu only in this way?

Short Answer

Yes, your plan is workable

Medium Answer

There's no such thing as "safe" (in an absolute way) when dealing with partition-resizing operations. Your plan, in particular, will necessarily involve moving the start point of at least one partition, and that's always a bit risky. Be sure to have adequate backups before moving or resizing partitions.

Long Answer

Instead of expanding the current partition, you may want to consider creating a separate /home partition for use in the space you create when you shrink the Windows partition, as described here:

How to Create a seperate partition for home after accidentally installing ubuntu under single / partition

This will enable you to skip at least one round of partition-moving/resizing-from-the-start (assuming Ubuntu comes after Windows now), and it provides several other advantages.

You might even consider using a Logical Volume Manager (LVM) setup, at least for new space like your /home partition. The immediate advantage of LVM for you is that you can expand it without moving anything. For instance, suppose you end up doing three rounds of shrinking the Windows partition and moving the space to Ubuntu. With LVM, in each of these steps, you would:

Shrink the Windows partition
Create a new partition in that space
Add that new partition to the LVM
Expand the /home logical volume within the LVM

Steps #2-4 are all quick and low in risk, compared to moving and resizing a conventional partition, which is much slower and riskier.

The drawback to this approach is that the resulting filesystem will be fragmented, which will degrade performance, at least if it's on a conventional hard disk. This shouldn't be a big deal if your LVM consumes just a couple of partitions, but it could be a problem if you go through half a dozen rounds of resizing and re-allocating.

Another option you might look into, at least if you know you want to re-allocate a significant chunk of space right away, is to back up all the files you want to move to another physical disk, delete them from the original, do your re-partitioning in one big chunk, and then restore the files from the backup. This has the advantage of doing it all at once, which will have benefits whether you use LVM or conventional partitions. If you don't currently have enough backup storage to handle this task, GO GET IT NOW!!!! Backups are NOT a luxury.


You can use GLIPPER which is Klipper's Gnome Cousin. Click here
Glipper

Some of the features are:

Will not truncate your data. At least I tested by copying from my Blog a whole post that was 3387 words total.
You can have a maximum of 1024 entries (Klipper can have 4096). But I think that having 100 is enough.
Very easy to use, just highlight some text and done. You do not need to copy it. Just highlighted it.

After installing it you need to logout/login to make it show on the panel.


Inappropriate Fan Control on Asus Laptop Ubuntu 20.10

You can't control the fans form an OS if hardware doesn't allow this.
Most likely your laptop needs cleaning.


From GUI with Audacity -
Reversing audio can be done using Audacity Effect > Reverse. After reversing we can choose to just playback or to export in any codec supported.
From CLI with Sox -
On the command line we can reverse audio with sox option reverse:
sox input.wav output.wav reverse ## for conversion
play input.wav output.wav reverse ## for playback


You can simply download it from the web page, I linked it here for you:

  http://www.ubuntu.com/download/desktop/contribute?version=16.04&architecture=amd64

For downloading the server version simply switch out the word desktop with server.

And another link which will work as well is this one:

  http://releases.ubuntu.com/xenial/

Note: To editors, the clear writing of the links is intentional and part of the answer.


Nvidia drivers only work as guest? Windows 10 killed me too

Well, .profile and associated files did not recover my lightdm,but I installed LXDE and CUDA 7.5RC1 with the .deb package and now booting succesfully into the Nvidia drivers, plus CUDA does not have the "sudo" quirk.


Looks like your volume group name is elysium-oc-vg but partitions root & swap_1 are considered to be a part of elysium--oc--vg (additional - in the name).

So try the following cd /dev/mapper/, unlink elysium--oc--vg-root, ln -s ../dm-0 elysium-oc-vg-root and reboot the server. If everything is fine, do the same for swap partition.


What are the risks of running Nautilus as root?

As it is perfectly fine to run some applications as root we definitely need to know of the risks when doing so.

One of the benefits of any Unix-like operating system (like Ubuntu) is a tight security concept to minimize unwanted damage to vital system files. File permissions are an essential part of these security measures . Only if we make sure that certain files can not be accessed without administrative permissions we can be safe from accidental damage.

Hence all system files, global application settings for all users, applications binaries, and more will be protected from unwanted access by restricting access to root/administrators only.

Even administrators should not run their system as root but should rely on the much safer concept of sudo.

By running a graphical file manager as root we will do so with administrative permissions to all files on our system. As a consequence we will be able to open, copy, delete, and change permissions with all files and folders including system files without further warning.

As administrator we may exactly want to do that - then (and only then) it can be fine to run nautilus as root. But especially as a beginnner we may not yet be able to foresee what bad side effects can happen if we do thing wrong.

It is much safer to not run nautilus as root. There are few good reasons only to do so. Usually we can achieve what we want with other safer means.

Imagine an unwanted movement of our mouse, a premature mouse click, or a drag & drop action to the wrong destination. Imagine an accidentally wrong change of permissions on a folder. Imagine an accidental hit on Del while a file or folder is highlighted. If applied to the wrong files or folder we may end up with a non-booting broken system.

In addition consider the following: Once we are root on running nautilus all application we start from there, be it from the context menu, be it by a double click on associated file types, or be it by running their .desktop file will also run as root. All files we create by these applications will then also be owned by root. This may not be what we want. It would be much safer to run just a single application as root.

Still we may want ot decide that the task we plan is easier to perform from a GUI file manager than it would be from the command line. Only in case we are familiar with permissions, and the file system hierarchy we may take the risk of running Nautilus as root. As a beginner we should however refrain from doing so.

In case we had run Nautilus as root for an administrative task we should immediately close the Nautilus window again to avoid unwanted accidental actions.


Can't mount an Vodaphone Smart 4 Turbo as storage device

The cause of your issue is the version of the MTP library available in Ubuntu 14.04LTS - v1.1.6 - does not recognise our phone (Vodafone Smart Turbo - model 890N).

The workaround I found was to recompile libmtp from the latest upstream sources which also includes all the latest bugfixes which resolves the your observed issues.

We do have a question and answer that covers this.

I took that answer and created my own PPA:

sudo add-apt-repository ppa:fossfreedom/libmtp
sudo apt-get update && sudo apt-get upgrade

source is my blog

To revert this use ppa-purge to remove the PPA and downgrade the libmtp version back to the trusty version:

sudo ppa-purge ppa:fossfreedom/libmtp


Can I sync Ubuntu One contacts with my Android device?

No you are only able to sync files, contacts for Android devices will be coming soon. Unfortunately its just syncing between Desktops (like you said) and via the website

Hope i helped, heres the website if you want to check: https://one.ubuntu.com/services/


Try to remove the Cache, WTF and Interface folders in the WoW folder to start with fresh configuration and such. Especially if you play it on an entirely new OS (which isn't even officially supported), it is normally better to start of with a default installation.


I've filed an ITP bug on bugs.debian.org - now how do I get the package into Ubuntu?

As you've already worked out, creating an ITP bug doesn't get your package into Debian.
ITP bugs are how the Debian maintainers let each other know what they are working on, and elicit comments on proposed new packages.
There are hundreds of such bugs, and most of them aren't showing much progress.

So, you need to move along to the next step, which is to find a sponsor for your package.
The mentors site has a guide that you may find useful here.
You've got as far as step 3 in that process.

I suggest uploading your package to mentors.debian.net, and filing a sponsorship request bug.

Once your package is in Debian unstable, it would be automatically synced to the Ubuntu development release. Assuming Ubuntu was currently pre-Debian-Import-Freeze, if not, it'd have to wait until the next Ubuntu release.


Compatibility of existing software loaded on Wiondows PC

None of the programs are going to work by directly copying them over.  Instead, you'll want to learn if the software you want to use has versions available to Linux, or if there are alternatives you're can use.

While some of the programs you listed are available for Linux, some of them are not.  For example, you will have a hard time getting Photoshop Elements running.

Your best bet is to go to the official website of each software and try to find a Linux installer/download.  Otherwise, search the internet for whatever linux and see if there.  If it's not available, or if the solution to get it working seems daunting, try linux alternatives to whatever.

Even after you figure this out, you will need a plan to pull out the data for each software.  Chrome can store configuration in the cloud, but you don't want to lose any Photoshop files you've worked on.

Ubuntu and other Linux distributions often offer a Live CD.  This lets you load up Ubuntu and test it out without modifying your current setup.  Once you decide you want to go further, you can install it alongside Windows.  By doing this, you allow yourself the ability to go back to Windows when needed, and slowly bring down your dependency on Windows.  When you have the option of loading one or more operating systems, it's called Dual Booting.


Ubuntu LiveUSB boots to black screen after grub

I just solved my issue. In the UEFI settings, under Boot, there is a setting which needs to be chanced. The setting defaults to UEFI, but you have to change it to Legacy Mode.


It may not be elegant, but it does work on my system.

#!/bin/bash
# Ubuntu_Mate 18.04 LTS
#
# Backup sounds
cd /usr/share/sounds/My_Sounds/
echo yyy | sudo -S zip -u My_Sounds.zip *.mp3 *.wav
sudo zip -u My_Sounds.zip *.mp3 *.wav
# Send me email of the backup

CONTENT="Backup to Maxtor Drive has occured."
echo "Sending email."
/usr/sbin/ssmtp -t << EOF
To: joebob@yahoo.com
From: joebob@yahoo.com
Subject: Backups to Maxtor Drive

$CONTENT
Cheers,
   Andy
EOF


Nouveau failing to drive dual monitors on kernel 3.2.0-30

well, just for reference, this has helped:

sudo apt-get purge nvidia-common

It seems there was some sort of clash between nouvaeu and nvidia proprietary driver.


Try KDE Partition Manager. I think GParted is not able to move used LVM extents. KDE Partition Manager calls uses lvm pvmove to deal with your problem.


Taking more than ten minutes to install at such a system is not normal - mine is weaker and it installs at around 10 to 15 minutes. Unless , of course, you clicked to update while installing and it is your internet that causes it to be slow.

If you asked for it to update while installing and can't wait because of your internet connection, restart the installation and update after the installation while you use it normally.


Disk Space on Home partition shrinks from 5.5GB to 0 after each restart

Check you remaining free inodes with df -ih. If you use many small files (such as on a mailserver) then you may have run out! This is unlikely on a desktop, but let's eliminate it as a possibility first.


Ubuntu 18.04 - How do I turn of desktop sliding

I appear to have fixed this behaviour by turning off NVidia Optimus in the BIOS.  I set the BIOS to use Discreet Graphics.  Now I can move my mouse and windows to both screens without the desktop sliding left & right.

Regards

RobC


GRUB menu always appears on boot despite not dual-booting

Check the Grub Customizer
sudo apt-get install grub-customizer

Run, then:
General settings -> Show menu (uncheck)


Implementing an if clause in simple bash script

We can do better, we can do a range check to make sure it's between 1 and 12 inclusively. There are about a billion ways of doing this but here are a couple:

if [ "$v" -ge 1 -a "$v" -le 12 ]; then
    cal -m "$v"
else
    cal
fi

Or use an arithmetic test:

((v>=1 && v<=12)) && cal -m "$v" || cal


solution:

open System Settings -> Displays
and just turn off "Mirror Displays" option and press "apply".

good luck!


Gnome issues after downgrading from Gnome 3

That sounds like quite a mess.  Perhaps you should just reinstall.

But there are some other things you can try:

/var/log/dpkg.log tells you which packages were installed recently; perhaps you can use that to undo some actions.
I would certainly start by removing any relevant PPAs and packages installed from them.
dpkg -l libgtk\* will tell you which 3.0 libraries are installed; possibly by pulling out libgtk-3-0 and related things you can force removal of "gnome 3".
strace -e trace=open nautilus will show you which libraries it's using and that might give you a clue as to which package is causing the problem.
Running synaptic and looking at the local/obsolete section might help you find packages that aren't in your base OS and ought to be removed.


Hi Bader this is very common in Linux, passwords are usually concealed in the command line, but it will work anyway.


How to batch / multi process cropping images in the terminal?

The first problem seems to happen because when convert receives a list it will use the last file specified as the output file name. All the new files get named after the last file, which itself is left untouched (this is unlikely to be what you want or expect, but it is probably better than your files being unexpectedly overwritten).

When there is only one file in the directory (so your glob expands to the one file), convert complains about lack of defined images because it expects at least one input file and an output file name to be specified. The position you are using for your glob is the output filename position, so convert is complaining about the lack of an input file in your second image.

For more reliable results you should specify the input and output files:

 convert input-file.jpg -crop 599x500+147+200 new-file.jpg

If the name is long, you should be able to use tab completion (type the first few characters and then press tab to have the shell finish the name) for both input file and output file (that is, it's working fine for me).

For batch processing, you can use the shell to run your command once on each file and use a bit of string manipulation to construct the new names, so the new files have sane names, something like:

for f in *.jpg; do
    echo convert "$f" -crop 599x500+147+200 "${f/.jpg/-cropped.jpg}"
done

With the echo on the second line, this shows what the new names will be. If the new names look right, you can remove echo and run the commands again to actually crop the images.

Putting the new files into a new directory could be easier, especially if your filenames have different extensions...

mkdir cropped
for f in *.jpg *.png; do
    echo convert "$f" -crop 599x500+147+200 cropped/"$f"
done

Again, you need to remove echo before this will do anything.


How do I kill a Firefox process thrashing my computer? 18.04

Ctrl-Alt-T opens a terminal emulation window.

ps -ef | grep firefox  shows the Firefox processes, or top will show processes, memory use, and CPU use.

kill -9 nnnnn  where nnnnn is the PID number of a suspect process stops that process. You can specify multiple PIDs in one command line.

Browsers are susceptible to running Javascript of dubious goodness when you stumble upon a malicious website. Often, the website's creator is time sharing your PC to run mine Bitcoin or such.

Extensions like NoMiner block mining specifically, and other extensions like NoScript go further and block Javascript except when you let it run. Javascript is used so widely, for good and bad, that NoScript and other apps will allow you to open up Javascript for specific websites as needed, and will remember when you opened the door for a particular site.


The link you're using (http://bookfi.org/dl/1029034/ad9e54) isn't a direct link to the file. When I opened it in Firefox, it redirected me to the much longer http://dl.lux.bookfi.org/genesis/408000/7def946a9159159e60931e25e71f23eb/_as/%5BCommittee_on_Advanced_Engineering_Environments,_N(BookFi.org).pdf, which is what you have to feed into the wget command.

The reason it worked for freedownloadmanager was probably because it has a facility which lets it follow redirects. I don't know about curl; it'll depend on whether it follows redirects or not.


How to run two java applications running in different openjdk( say 7 and 8) at the same time in Ubuntu?

You can do it easily, just run it specifying the path of java you want to use.

In details:

Normally java is installed under /usr/lib/jvm there where you can find the default java versions you have in your system.

So if you want to run another version other than the default one you should specify the full path of the Java.

for example suppose that java-version-8 as you specified above is under your Desktop so you can run any app using this version with the command:

~/Desktop/java-version-8/java /path-to-your-application

so you indicate what version to use.

If you want to do it GUI you can create a .desktop or edit an existing .desktop for the app to specify the path of the new-java instead of the default one.

Read this and this to learn how to use .desktop files


Is there a way to get rid of the default file manager for Xubuntu without having to get rid of the desktop?

Removing xubuntu-desktop will actually do little.
xubuntu-desktop is only a metapackage.
This means that it has no files or code whatsoever, except for a control file that says it depends on thunar and other stuff, and possibly a bit of filler code. [Citation needed]. You can safely remove this package without losing anything, since all its installation did was pull in a ton of other packages, which actually make the Xubuntu interface work, that aren;t on the list of removals.
The reason it gets removed, is it "depends" on Thunar in order to get Thunar installed in a Xubuntu installation, so when Thunar is removed, xubuntu-desktop is als oremoved(without ill effect).
With that said, updates that add Xubuntu packages(uncommon) will go unnoticed, but updates on existing Xubuntu packages(common) will be performed.


Lubuntu on old Samsung NC10 Netbook fails to boot: "Restoring Resolver State"

This misbehaviour does not appear in Lubuntu 16.04, so you should upgrade to that version.

Press ALT+F2 to get to the command line interface and type the following:

sudo-do-release-upgrade

You will be asked for your user name and password.

Before the release upgrade, I did the following, but I am not sure if it is really needed:

sudo apt-get autoremove
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get autoclean

And to restart the system:

sudo shutdown now -r


broken upgrade from 10.04 to 12.04 on a VPS - recoverable?

I also had the python-problem and then lots of unmet dependencies. At last, after finding out that the real problem is in apt, I just did:

cd /var/cache/apt/archives
dpkg -i apt_0.8.16~exp12ubuntu10.16_amd64.deb

The following apt-get -f install installed all packages, that didn't work before and the following apt-get dist-upgrade (nearly) worked like a charm.

But after this mess of an upgrade with the do-release-upgrade-script from 10.04 to 12.04 and similar problems on other Ubuntu release upgrades, I took the decision that any new systems definitely won't have Ubuntu any more, but the good, old, stable and reliable Debian, with which I never experienced such problems!

Hope this helps You too !

Best wishes - Ralph from Germany


How To Install Ubuntu To A Usb Drive from an iso image

Pendrive as installation medium

It sounds like you want to use your pendrive as installation medium. You can achieve this easily by using a program called unetbootin (http://unetbootin.sourceforge.net/). You can install it from the Ubuntu Software Center (or the package manager interface of your choice) or by typing sudo apt-get install unetbootin. If you are on Windows or Mac OS X right now, you can download it from the website.

To install the Ubuntu ISO on the pendrive just go through the steps provided by unetbootin. You probably need admin permissions on windows or root permission on Mac OS X or GNU/Linux.

Pendrive as installation target

If you really want to install Ubuntu to a pendrive (not using it as installation medium, but as "main harddrive" for your Ubuntu), one way is to simply install it to the pendrive via the regular installer. Theres another way providing some kind of hybrid mode between installation and Live-Medium, but I don't really know how this works.


Blanking screen @ 30 Second intervals for no apparent reason

You probably did this, but in case you didn't:

Open System Settings
Go to Brightness and Lock
Change "Turn screen off when inactive for:" from 30 seconds (if it is) to a more reasonable time
Do that too with "Lock screen after:"


Unable to install anything in Ubuntu 18.04 Terminal

Sounds like maybe you’re repositories are outdated or corrupt.

Try
    sudo su root
    apt update

apt full-upgrade -y

If that fails (it should if your repositories are messed up.)

Try this

apt-get check && apt-get update
apt-upgrade

Note you may need to run the update a couple of times.


How to resolve my "loading icons" in compizconfig while loading Ubuntu 14.04 on Virtualbox?

First check that you are trying to run ccsm with export DISPLAY=:0
ccsm, or properly exporting target display.

If still hangs while loading, abort (Ctrl+C), go to GUI with Ctrl+Alt+F7 and try to hit Alt+F2 to get unity's shell, if it works type unity and hit enter.

If this doesn't work, still from the GUI (tty7), try to open a terminal with Ctrl+Alt+T.
You can also try right clicking on the desktop and selecting the "Open terminal here" option. If any of the above works, try issuing unity on your terminal, this should start/restart unity's shell session.

If any of the above worked, hit Ctrl+Alt+F1 to go to tty1 and try running unity from there. If still doesn't launch an unity session, try the following:

dconf reset -f /org/compiz/

unity --reset-icons &disown

Finally, after entering your session, go to Compiz Config Settings Manager and check Unity plugin is enabled, etc, like your linked answer suggests. Close ccsm. Reboot.

Hope it helps.


You might check:

http://support.brother.com/g/b/downloadtop.aspx?c=us&lang=en&prod=mfc845cw_us

http://support.brother.com/g/b/downloadlist.aspx?c=eu_ot&lang=en&prod=mfc845cw_eu&os=128

https://support.brother.com/g/s/id/linux/en/faq_scn.html?c=us_ot&lang=en&comple=on&redirect=on

Google search for Brother MFC-845CW ubuntu.


How can I get around using xclip in the Linux subsystem on Win 10?

See WSL issue #1069 for two workarounds:

  Just to clarify for anyone who stumbles upon this thread, to use type
  cat filePath | clip.exe into the command prompt.
  - JetStarBlues commented on Feb 8

Or:

  I can confirm that having Xming running and configuring the DISPLAY
  env var is enough to make something go to the windows clipboard:

$ export DISPLAY=:0
$ echo 'some text' | xclip -selection clipboard

  This works just fine. Apparently using the primary clipboard also
  works fine, so I'm guessing Xming will redirect both to the windows
  clipboard.
  - mateusmedeiros commented on Sep 9, 2016


How do I iterate the arguments in a bash script?

You should use $@ to refer to all the arguments:

for arg in "$@"
do
    if [[ -f "$arg" ]]
    then
        echo "$arg is a file"
    elif [[ -d "$arg" ]]
    then
        echo "$arg is a directory"
    else
        echo "$arg is not a file or directory"
    fi
done

See also: http://www.tldp.org/LDP/abs/html/internalvariables.html#ARGLIST


(Xubuntu) no touchpad or mouse on Aspire One D270

I solved this problem by installing from the daily-built alternate CD instead of my (probably incorrectly) upgraded regular installer.

For anyone with a D270 who stumbles across this, using the alternate CD will give a different error in that LightDM will fail to start. This can be solved by plugging the laptop into an ethernet connection and running sudo apt-get dist-upgrade from the (Ctrl+Alt+F1) terminal. You will then have Xubuntu running perfectly (minus brightness control and graphics acceleration) ;)


I face the same problem, however that developer no longer has a branch for kdeconnect for xenial, so i ended using this instead https://launchpad.net/~webupd8team/+archive/ubuntu/indicator-kdeconnect hopely would help others.


How can I remove duplicate second Unity Launcher on a Dual Screen setup?

You can now.

Open up Display preferences, and then you can choose between having the launcher on one display or all of them.

This dialog also allows switching on or off the sticky edges (i.e. the mouse slowdown) between the displays.


Do you have TV Card in your system with kodi boot, tvhead? If this is the case, change the configuration wait for boot tv = 20 sec; 20; sec
Freezing occurs when the tv card cannot find a connection; it requires more time.


Brightness keyboard buttons do not work on Asus 1225c

Copy-Paste from here the commands below (to your terminal) , with order and one at time

First

sudo sed 's/GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"/GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi="/' -i /etc/default/grub

Second

sudo update-grub

Reboot your system and see if Fn (for brightness) works.


Ubuntu with system on mdadm, broken grub, won't boot

I had it backwards, the /etc/fstab file you should use

/dev/md127 / ext3 errors=remount -ro 0 1

back to the way you had it.

I noticed your /etc/mdadm/mdadm.conf doesn't exactly match the output of sudo mdadm --detail --scan and I wonder if that might be part of the issue. The entry /dev/md127 seems like it should be what it is but the output of --detail --scan is /dev/md/127_0.


How to fill out the forms and save the inputs in this tax report pdf file

If you do not mind running wine you can try the free PDF-Xchange viewer from here;
http://www.tracker-software.com/product/pdf-xchange-viewer

This works great under wine, and you can use it to update metadata and annotate pdf documents as well. I downloaded the form and fill in some fields and was able to save it with this application.


What these make messages mean while compiling sane-backends?

You seem to be mistaken as to what is considered an error condition of the make program. "Nothing to be done" is not an error; it means that there is nothing left to do because the job was already done at a previous invocation of make. You can also look at the exit status of the make invocation if you run echo $? just afterwards. "0" means "no error encountered, everything was done as you asked".

Occasionally "Nothing to be done" is caused by a faulty Makefile (a. k. a. "job description") that doesn't reflect the intended action. You should report this as a bug to the author(s)/maintainer(s) of the Makefile.


Trash is empty, but the trash bin icon looks like there is something in it

The way I solved this problem was I simply deleted another useless file and emptied the Trash again.


Ubuntu 18.04 stuck at login after amdgpu install

You will be able to login after uninstalling amdgpu:

Press Ctrl+Alt+F2 in login screen.
Login with your credentials.
Run amdgpu-uninstall
Run reboot


Open the terminal and copy and run gconf-editor and go to 'apps -> gnome-power-manager' and check 'can_hibernate' and 'can_suspend'.


How can I send pulseaudio streams over to another computer?

This is a known bug in the pulseaudio package, where pulseaudio fails to find the location of the modules it needs to load. As a workaround set a symlink to the module location by executing the following command in a terminal:

sudo ln -s /usr/lib/pulse-1.0 /usr/lib/pulse-1.0.0

Note: this workaround was tested in the current environment and may not work in the future (hopefully we don't need it any more when an update was is released)


Is htop becoming part of the default install?

It seems it is not becoming part of the default desktop installation. It is, however, being included in the server image:

$ curl -sL http://cdimage.ubuntu.com/ubuntu-server/daily-live/current/bionic-live-server-amd64.manifest | grep htop
htop    2.1.0-3

It's now a dependency of the ubuntu-server meta-package, so it should be installed when using the standard option in the server image, without needing an internet connection.

Finding more about this was a bit convoluted - there's nothing in htop's package changelogs or on the Launchpad closed bugs list, or on the ubuntu-devel mailing list that seemed related at a glance. Turns out, the related bug report is #1644364 - [MIR] htop - the MIR seems to be "Main Inclusion Review (or Request?)", and not the Mir display, which threw me at first.

The MIR team decides upon whether a package should be promoted to main, and the requests filed on Launchpad for such packages are usually also tagged [MIR]. The process and criteria are described on the Ubuntu Wiki:

Main Inclusion Requirements (also see the graph of packages where dependencies are not of the required components: component-mismatches)
Main Inclusion Process

The MIR bugs offers an interesting overview of what's currently happening with the defaults. For example, it looks MP3 support will be available by default!


Are you on a laptop computer or on a desktop one? If you are using a desktop one, i remember having the same problem when i used the built-in speakers of my display... Every time the display would go on energy-saving mode (actually standby mode), the speakers would come off as well. As soon as I used separate speakers, the problem disappeared.

Hope this helps.


Error: Malformed entry 1 while trying to get ROS Kinetic. How do I fix this?

deb http://packages.ros.org/ros/ubuntu xenialmain there needs to be a space between "xenial" and "main"


Specify viewport instead of workspace.

( if
( begin
( is ( application_name ) "gedit" )
)
( begin
( set_viewport 3 )
( println "match" )
)
)


Ubuntu 14 Server on Mac Pro will not Power Off on Shutdown

There are a number of commands that will turn off your system, including halt, poweroff and of course shutdown.

Most of us with small modern machines expect the hardware to go off, but on larger machines the power usage drop (on a large machine turning off) can be a pain, not to mention the wear of powering off then powering back on hardware so the halt of power doesn't occur unless specified.

With shutdown just add a -h to cause power down of hardware (after OS is safely shutdown)

sudo shutdown -h now


The solution is to create AltGr encodings in /usr/share/X11/xkb/symbol/us, but swap most keys using /usr/share/X11/xkb/keycodes/evdev instead.

(However, I haven't worked out how to map Fn+F5 and Fn+F6 to XF86MonBrightnessDown and XF86MonBrightnessUp yet.)


Gparted can't resize Ubuntu. Want to resize it so that I can install Windows

At first it is dangerous resize system partitions. I also did it recently and worked without problems...so first backup your data...

Download for example ubuntu iso file and create a bootable live usb stick for example with unetbootin or any other software. (In my case it did not work with some usb sticks so try a different one if it doesn't work with the first one)
Boot into the live system with the stick and open gparted or any other partition manager.
Resize the partition (keep in mind the leave some extra space because you maybe need it in the future

That should do the trick....worked greatly in my case (dualboot UbuntuStudio and Kubuntu).


Install the package xdg-user-dirs and then run xdg-user-dirs-update. This will create the configuration files that will allow your icon theme to use the special folder icons.

See the Arch Wiki for more info https://wiki.archlinux.org/index.php/Xdg_user_directories


Issue is related to permissions [follow comments above]
Refer the Link Below, It May Help
Click here


Can't connect to smb share after upgrade to Ubuntu Gnome 16.04

This question is a duplicate of this one.

The answer: you must explicitly set

client use spnego = no

in /etc/samba/smb.conf.

If you can't find this file, execute command:

sudo apt-get install smbclient


5GHome

The 5G gets you to the first non-blank character of your 5th line; pressing Home or 0 moves to the start of the line.

By the way, do you know about https://vi.stackexchange.com/

Or, you can opt for set nosol in which case if you're at the start of a line and you move 5G you'll be at the start of line 5. help startofline


Brightness control problem on acer aspire V5

If your Acer Aspire V5 uses intel_backlight device instead of acpi_video0, then this set of scripts might provide a solution to you. See if you have intel_backlight device by examining the output of "ls -l /sys/class/backlight". To determine if your notebook responds to brightness commands on the intel_backlight device, start a root shell by executing "sudo -i" and then do this in the root shell:

Determine your maximum brightness:

cat /sys/class/backlight/intel_backlight/max_brightness

Decrease brightness to a desired value, for example to half of the maximum brightness value (substitute 500 with your value):

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

If your brightness has decreased, then use the above set of scripts to fix the problem with your brightness control hotkeys.

Finally, see how many steps you have for brightness control. If you completely decrease or increase brightness in about 5 key presses, then you should make one additional correction to your configs so that you have 10 steps to regulate brightness, as originally designed.
In your root shell, execute:

cat /sys/module/video/parameters/brightness_switch_enabled

If you see 'Y' or '1', run the following command:

echo 'N' > /sys/module/video/parameters/brightness_switch_enabled

Replace 'N' with '0' if you received '1' as an output from the previous command. After that, you should have 10 steps for brightness control instead of 5.


Kubuntu doesn't work after upgrade to 16.04

sudo dpkg-reconfigure sddm

and selecting sddm worked for me.


A script to create new users with user input

You could create a script that invokes that useradd command for this. Something along the lines of

#!/bin/bash
echo "Username:";
read USR;
echo "Password:";
read PWD;
HASHEDPWD = "$(python3 -c 'import crypt; print(crypt.crypt("'"$PWD"'"))')"
useradd -m -p $HASHEDPWD $USR && echo "Success";

note that this script would not work unless you are root since useradd requires root privileges to create directories in /home/$USR and also to modify /etc/passwd among other files

Shell scripts, such as this are stored as .sh files. So for instance, you'd save this as makeuser.sh. By default scripts are not given permission to execute, and you've to manually declare that by using chmod +x makeuser.sh

The first line (referred to as the shebang) determines the interpreter that the system will use to run the script. In this case, it runs it with the bash shell (Which is also default on ubuntu)

A good resource to learn more about bash would be googling tutorials and for details on how to use a specific command, you can use the man command. For instance, if you wanted to know more on the flags and other arguments accepted by useradd, you could use man useradd


Can I install Ubuntu on P4 Machine with Windows XP

Please visit this link to understand the minimum hardware requirements for latest Ubuntu.
https://wiki.ubuntu.com/QuantalQuetzal/ReleaseNotes/UbuntuDesktop#System_Requirements

You can install Ubuntu 12.04/12.10 on a with (P4 with 1 GB RAM), but your graphics hardware could create some problem. Just run Ubuntu from a Live CD or Live USB disk to get the actual picture.

But in my opinion Xubuntu/Lubuntu will be better option for you. Any of these two will give you faster and better performance than Ubuntu.


Extend partition on Ubuntu server inside a VM

What you did was extend the disk itself which is possible in a virtual environment, but not possible in real life as you cannot add more disk platters to an existing  disk so the space is there, but it's not allocated to any partitions/volumes yet so boot the VM, ensure all services that need the Logical Volume you want to extend are stopped and do a:

fsadm --ext-offline --yes resize /dev/mapper/owncloud--vg-root 800G

to extend the Logical Volume itself: you're confusing LVMs and partitions: they are fundamentally different, have a look here on TLDP.


Adding opencontrail to maas juju openstack

OpenContrail Juju charms are under development here:

https://jujucharms.com/q/contrail/robert-ayres

With a Juju Deployer config here:

http://bazaar.launchpad.net/~robert-ayres/+junk/contrail-deployer/view/head:/juju-deployer/contrail.yaml

These charms can be used to deploy OpenContrail today.

Although speaking as the author of these charms, they need a little work before they're ready for general public use. For example, Simple Gateway support (required for launched VMs to access the outside world) isn't in yet. However, they can be used as guidance for setting up OpenContrail manually.


See this support request and this inquiry. It seems like you can get an Arabic font working by installing the ubuntu-restricted-extras package, which provides ttf-mscorefonts-installer, which in turn includes the font from Microsoft. It is not clear whether this font is 100% functional, but one person at least reported that it was working for them.


How to get global application menu on Ubuntu 18.04

NOTICE: This extension no longer exists, making this answer outdated.  The answer however has been left intact as-is for historical reasons.  It is suggested that you attempt to use other mechanisms to achieve this goal, rather than this plugin.

If this fact matter, I'm the author of the extension:
https://gitlab.com/lestcape/Gnome-Global-AppMenu

I can not speak for ubuntu or gnome developers, but as you already note there are not any official implementation available for gnome-shell or the ubuntu-session.

The Gnome-Global-AppMenu extension is supported in Ubuntu 18.04 (X11 session) better than ever.

My desition to discontinued Gnome-Global-AppMenu was base on severals facts that are not really valid rigth now, for that reason the Gnome-Global-AppMenu is not discontinued rigth now, besides that, it have improvements.

The Gnome-Global-AppMenu is now using (as a user decision) the fork of unity-gtk-module called appmenu-gtk-module. This is the same fork that is used in Mate and XFCE. Also the jayanta support was improved to really work and more things was added.

After a lot of time inverted to underestand how Gtk, Gnome shell and also unity-gtk-module works around the global menu, with the developer of this fork called appmenu-gtk-module, we were able to create some funtional code for handled the Gtk Wayland windows. Here is the original code that you can install and test from the source:
https://gitlab.com/lestcape/unity-gtk-module

Personally, I'm also want to contribute to enhance more the Wayland support for the Gtk applications inside the appmenu-gtk-module, because the appmenu-gtk-module have just an initial support for the Gtk-Wayland.

Develop something is for me a pleasure and will not be ever an obligation. So, nothing of that means that i will promise not discontinued the develop of this extension or something like that. But also if that happens, the code is and will be aviable for the developers that want to continue with it.

You can check for yourself all that things if you install the extension from his official site in gitlab. Issues can be reported also there.


Detecting whether my wireless card supports mac address spoofing?

I'd use Tails if I was worried about revealing my MAC address to a random network. Everything is pretty much done for you and the devs are extremely paranoid (this is not a bad thing obviously). MAC address spoofing is enabled by default upon boot.

This is probably overkill just to spoof in Starbucks however. :)

Sorry I can't help you on how to spoof in Ubuntu as I use Kubuntu, I haven't used Ubuntu since they dropped gnome but there used to be an option in the network device configuration GUI.


Tourble submitting desktop app for review "payment details are required before any application can be reviewed"

as stated here (step 5), you must provide details of your PayPal account (email), Phone number and Postal address (ZIP code).

Click on Update my account details and then Submit to review.

Remember: The minimum price you can charge is $2.99


This will get you a similar appearance, however as far as running Mac programs I don't think there is such an animal.

https://www.noobslab.com/2018/08/macbuntu-1804-transformation-pack-ready.html


make it executable with:

chmod +x your_file.sh

if you use "-x" in chmod command, like you wrote in your question, you remove che "execute" attribute.

If you want check the attributes with:

ls -la /your_path/your_file.sh

if the file is executable you must see the "x" attibutes, like the followind:

-rwx------ 1 my-user my-group     114 ago 31 15:54 my_script.sh


The "read-only file system" indicates that Ubuntu had a problem with the disk, and unmounted it and then remounted in read-only mode, as described in https://askubuntu.com/a/197468/283721

You should boot a live USB and run fsck on the disk in question, and you might also check the disk connections, and test the hard disk for errors, as described in How can I check the SMART status of a SSD or HDD on current versions of Ubuntu 14.04 through 18.10?


Gnome-terminal not working properly with screen-256colors

First of all I'd like to confirm what you've already figured out, namely that directly under gnome-terminal (that is, outside of tmux or screen) you should set TERM=xterm-256color, whereas inside tmux or screen it should be set to TERM=screen-256color.

Apparently your .zshrc segment properly sets it for the shell that's run directly by gnome-terminal.

I'm not sure what needs to be put in .tmux.conf, I have solved it in my .bashrc similarly to your .zshrc fragment for xterm-256color. I also remove TERMCAP which is set by screen and causes some problems, but apparently tmux doesn't set it so it shouldn't make a difference for you.

if [ "$TERM" = "xterm" ]; then
    export TERM=xterm-256color
fi
if [ "$TERM" = "screen" -o "$TERM" = "screen-256color" ]; then
    export TERM=screen-256color
    unset TERMCAP
fi

Does this solve the problem for you?

By the way, instead of this snippets, copying your .tmux.conf also sets this properly for me (on Vivid), so you're on the right track, it should work. Is there maybe something else sourced by your zsh (e.g. the global config, or oh-my-zsh) that reverts to the 8/16-color TERM=screen?


Problem with internet-connected ubuntu apps (Software Center, Nuvola Player, Lightread, Ubuntu Tweak) in 12.10 quantal quetzal)

I have run into this issue a few times, when clicking the buy button it should take you to the Ubuntu login page and ask you to log in with your credentials.

After you have successfully logged in it should redirect you back to the store page and proceed with downloading the app.

Sometimes I have run into the error you have mentioned specifically with Steam.
This seems to be linked to a bug regarding host name not being resolved correctly in Ubuntu 12.10.

Disconnect and reconnect to your router and try downloading again, This seems to be the only temp fix.


E: Sub-process /usr/bin/dpkg returned an error code (1)

It appears you are using vivid (because you have plymouth 0.9), but you have the libplymouth2 package from trusty (because trusty is the most recent release that ships libplymouth2).

Remove it:

sudo apt purge libplymouth2

Then dpkg should no longer complain.


Try the following:

Configure the /etc/inetd.conf file manually by adding the line
"telnet stream tcp nowait telnetd /usr/sbin/tcpd /usr/sbin/in.telnetd" to it with elevated permissions.

Then, configure the /etc/xinetd.conf file manually by adding

"instances = 60

log_type = SYSLOG authpriv

log_on_success = HOST PID

log_on_failure = HOST

cps = 25 30"

to the default settings section (with elevated permissions).

Restart Ubuntu.

Restart the telnet server by running the commnd "sudo /etc/init.d/xinetd restart".

When you finish, use the command "telnet -tln" to check to see if the telnet server successfully opened a socket for you on Port 23

If so, you should see a line in the output that looks like the following:

TCP 0 0 (your local address):23  0.0.0.0:* LISTENING

If so, run ifconfig to grab the IPv4 and take that over to your other machine (running the telnet client). In that terminal run "telnet (the IPv4 you wrote down)". If everything's configured correctly (it may take a few seconds depending on your connection speed) it should connect and prompt you for a username/password. Enter them and you're in.


Install Ubuntu Bionic 18.04 on MacBook Pro 2018?

Getting the internal trackpad and keyboard to work with the 2018 Macbook pro is the least of your concern really.
There are no drivers for the Apple SSD controller yet. So regardless of that fact, it won't let you install anything...


How can I change my email address on launchpad?

From this answer:

  If you log in to your old account and click on the yellow icon next to where it says Email on your userpage, you can change your email address there and set one as default.


How can I boot Linux and Windows with grub?

Try this at the grub> prompt:

grub> insmod normal
grub> normal

You should then be presented with the normal GRUB screen, from which you can choose Ubuntu, Windows or whatever else.

To fix this permanently after booting into Ubuntu:

Run this command in a terminal:

sudo -H gedit /etc/default/grub

Find the line that says:

GRUB_TERMINAL=console

and place a # symbol in front of it, so that it looks like this:

#GRUB_TERMINAL=console

Save and close the file.
Run this command in a terminal:

sudo update-grub


chmod and chgrp aren't as scary as they appear and, the fact is, anything can be fixed by the root user if you mess it up.

To make the directory owned by the group "webgroup", just do:

sudo chgrp webgroup /var/www

To give the directory's group read/write access, just do:

sudo chmod g+rw /var/www

If you want this to apply to accessing and creating directories as well, use the 'X' option, e.g.:

sudo chmod g+rwX /var/www

Finally, if you want it to apply to all the folders and subfolders, use the 'recursive' option '-R', e.g.:

sudo chmod g+rwX /var/www -R


Deleted home folder on ubuntu server 12.04

Copy the contents from /etc/skel to your home directory (and fix the ownership of the copied files afterwards).


If pushing both left and right mouse buttons simultaneously doesn't work I would consider setting up some other 'shortcut' for middle-mouse button. Three-fingers tap seems reasonable for me. You should be able to enable it using the following command in terminal.

synclient TapButton3=2

TapButton3 means '3 fingers tap' and 2 is the number associated with middle mouse button.
It should work instantly. If so, I would suggest adding this command to 'Startup applications' as it may stop working after reboot. I didn't find any better solution to avoid it.

In general synclient takes care of your touchpad and let you configure it. Just try synclient -l to get list of available actions. Feel free to configure it however you like.


The latest kernel update broke my Macbook Air; how can I fix it?

jaacarmac solved the problem in his post:

A Happy Update!
Turns out my problem was I never ran update-grub. So right now, I'm rebooting with Unity installed again to see if it makes a difference.
A Happier Update
The problem now seems to lie with the new kernel. It won't recognize my wireless card. But this problem can be considered closed, methinks.


I believe the package you are looking for is libfam-dev and not libfam0-dev

You can install libfam-dev by typing the following in your terminal:

sudo apt-get install libfam-dev


Installed Ubuntu along side Windows 10, only boots to Windows,boot gets error, then grub menu

I "solved" this problem and am moving on to other problems. "Solved" in this case means I've learned that what I asked in my original question was based on a misunderstanding of the problem, and was not the actual problem.

What had happened was I inadvertently re-partitioned my external hard drive and installed Ubuntu there. It would only boot to Ubuntu if/when a certain combination of hard drives and flash drives were plugged into the hub at the same time. It took a while for me to figure out this pattern of events.

Unhooking all external drives was all that was needed to install Ubuntu correctly. Now both Windows and Ubuntu (with one minor exception) work perfectly. I no longer have any boot issues with Windows.

I was able to recover full use of the external hard drive by downloading and using Mini Tool Partition Wizard.

The one minor problem I'm having with Ubuntu is a series of error messages when trying to access the Windows partition and some of the partitions on the external drive. That I will research and address in new questions.

Thanks @oldfred for pointing me in the right direction.


I'm upgrading from 18.04 to 20.04. Which of these files are the most important to backup?

I have ubuntu and upgrade just fine just make sure all programs are closed and your good, but if you really want to back it up just go into files and copy and paste them to the external hard drive.


Centos7 LXC Shell Access on Ubuntu 17.04 host

Found it:

For CentOS images: lxc exec my-container -- bash
For Ubuntu images: lxc shell my-container,  or
For Ubuntu images:  lxc exec my-container -- sudo --login --user username


How to check for updates more often than daily?

I use two scripts, one that runs in the background whenever I am logged in, and one that is allowed through sudo without a password to apt-get update and additionally download packages.

You can download the two scripts I wrote here, or copy and paste them into gedit from below:
http://ubuntuone.com/0tNctmQnF2peAsUmaqtyo3

These are the two scripts I wrote:
The first should be called 'background-runner':

#! /bin/bash

# This will connect and download any new packages every two hours.
# Ideal for use on the development release to save time.
# Downloads almost all packages, not just security releases.
sleep 10m

while true; do
    sudo /usr/local/bin/package-downloader update
    sleep 120m
done

And the second should be called 'package-downloader':

#! /bin/bash
# This runs as root and is allowed through sudo to only download packages.

if [ $1 = 'update' ]; then
    apt-get update
fi

if [ $1 = 'download' ]; then
    apt-get update
    apt-get --yes --download-only upgrade
fi

To set this up, download or copy and paste the files into gedit and save the files with the names noted above. cd to their location in the terminal and run the following commands:

sudo cp package-downloader background-runner /usr/local/bin
sudo chmod +x /usr/local/bin/package-downloader /usr/local/bin/background-runner

Now we have to allow the package-downloader script through sudo.
Open a terminal and type

sudo visudo

at the bottom of the file add the following line replacing MYUSER with the username you run as, and then hit ctrl+x and then enter to save.

 MYUSER ALL=(root) NOPASSWD: /usr/local/bin/package-downloader

Now navigate to 'Startup Applications.' Click add.  Name it whatever you like, and enter /usr/local/bin/background-runner for the command. Save this and exit out.

Having logged out and logged back in, the scripts will perform an apt-get update every two hours. You might want to disable the automatic check for updates through the Update Manager's Software Sources dialogue, which you can reach by clicking settings in the bottom left corner. This way update-manager will not check for updates when the script is already doing so more frequently.

The scripts linked here will just do apt-get update by default. If you would like them to also download any packages, you simply need to edit the line in background-runner that says:

 sudo /usr/local/bin/package-downloader update

and have it say

 sudo /usr/local/bin/package-downloader download

The same can be done for changing the amount of time in between updates and downloads, just change 120m in

 sleep 120m

to your desired amount of time in minutes (m) hours (h) seconds (s).

FYI: This could potentially be a security risk if the permissions to /usr/local/bin have been changed. Because package-downloader is a script, and allowed through sudo, BE SURE ONLY ROOT CAN WRITE TO IT!


Will 16.04 LTS ISO image be modified to include Spectre and Meltdown fixes?

Always upgrade after install
Irrespective of Meltdown and Spectre whenever you install from Live USB or DVD (do they still make those?) you should update your Ubuntu and Kernel using:
sudo apt update
sudo apt upgrade

This will give you the latest fixes for everything including Meltdown and Spectre.
Alternatively if you have modern hardware you might want to consider upgrading to the newest mainline / stable kernel.


Ubuntu 20.04 and VMware Horizon client 2006

Installing horizon client:
Read the easy guide on their website. I assume you did, or found the information somewhere else.
The gtk2 package is used for interactive install. It does not affect how the client works.  As you might noticed the installation default to console after gtk2 was not found on your machine.
Getting the client work:
Add the missing libraries in your 20.04 installation as follows (Inspired by solutions given here).
sudo ln -sf /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0 /usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0

sudo ln -sf /usr/lib/x86_64-linux-gnu/libgstapp-1.0.so.0 /usr/lib/x86_64-linux-gnu/libgstapp-0.10.so.0

sudo ln -sf /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0 /usr/lib/x86_64-linux-gnu/libgstbase-0.10.so.0

The above was just enough for me until a recent software update. Today I read a comment  here that hinted the solution to my recent problem. For completeness I leave the relevant comment below.

"The problem is the CPU cannot support a instruction pshufb. Using a
nowadays CPU could solve the problem. I think this piece of code may
be related with non-H264 part Blast decoder. Perhaps enabling H264 or
using PCoIP could help."

In my case my remote desktop does not support PCoIP and H264 decoding was enabled by default. I disabled it (out of desperation I confess!), and the client started working properly.
Click on file icon on the horizon client, and click Configure VMware Blast to get to where you can select the decoder.
Other Resources:
Where is the vmawre log on your machine? Read this


"Both on the same line" means "'rice' followed by random characters followed by 'lemon' or the other way around".

In regex that is rice.*lemon or lemon.*rice. You can combine that using a |:

grep -E 'rice.*lemon|lemon.*rice' some_file

If you want to use normal regex instead of extended ones (-E) you need a backslash before the |:

grep 'rice.*lemon\|lemon.*rice' some_file

For more words that quickly gets a bit lengthy and it's usually easier to use multiple calls of grep, for example:

grep rice some_file | grep lemon | grep chicken


404 errors and "repository does not have a release file" when using 'sudo apt update'

You need to edit your /etc/apt/sources.list and remove all the useless repositories you have in it. You have lines for two different and incompatible Ubuntu releases, Debian buster which is incompatible with both of those and the third party repositories who knows if compatible, I am not going to check. The file is a mess and will never produce a stable system. The third party sources can be in  your /etc/apt/sources.d/ directory the location for them third party installed sources. Comment out the lines in those files by putting a # at the start of the lines that do not have one or removing the file completely, then apt update to have it re-read and update the package cache.


Libre Offices does not open LO Documents

Current version supported on Ubuntu 18.04 is 6.0.3.2. You have version 6.0.6.2. Likely, therefore, you are installing it via another software source. Remove the version you installed and remove the third party software source you used in "Software & Updates, "Other software" tab. Then reinstall.

Another possibility is that you have "Pre-release updates" checked on the "Developer options" tab of "software & Updates". If yo did that, then you know you can expect that a certain update may break. If you did that by mistake, again remove your current version and uncheck the checkbox on the "Developper options" tab. Then reinstall.


step by step installation phpmyadmin on Ubuntu 16.04 (Access denied while installing phpmyadmin)

Please fire following command and solve your problem 100%

sudo service mysql stop
sudo apt-get --purge remove mysql*
sudo apt-get --purge remove phpmyadmin
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get update
sudo apt-get install mysql-server phpmyadmin php-gettext php-mbstring
sudo service apache2 restart


Add custom keyboard shortcut to change keyboard layout

You can set the shortcut in your System Settings panel at Text Entry by entering your new accelerator keys (Alt+Shift) in the text field(s) "Switch to next/previous source using:"

Does that work for you or do you insist in a terminal command?


Built-in display blinking after trying "1920x1080i" configuration for external display

TVs are notoriously fussy as monitors, and I have seem quite a few reports of erroneous timing information through EDID, the data from the monitor that tells the video card how to craft the signal.

One workaround is to force specific timing rates through xrandr or your favorite video tool to override faulty EDID information, or to use some tools to rewrite EDID information in the TV.

A search including the exact LG model number plus "EDID" would be a good way to start researching the problem.


Because the program asks your password, you can be sure that your wireless card is working.
Check with

ip link

You should see eth1 (or wlan0) with 'state UP'

There are different solutions

Reboot
sudo rfkill your wireless card (disable an re-enable it)
Power off your WIFI-router. Wait some time and restart.

I had the same problem when I upgraded to 13.04.
I don't remember what solution I chose. Maybe all.


Here's a Yum repo with updated UbuntuOne RPMs for Fedora

http://www.maxiberta.com.ar/blog/ubuntuone-packages-fedora

Yum Setup

Download and install the .repo file into /etc/yum.repos.d/:

wget http://www.maxiberta.com.ar/repo/fedora-ubuntuone.repo
sudo mv fedora-ubuntuone.repo /etc/yum.repos.d/

Install the ubuntuone-client package and all of its dependencies:

sudo yum install ubuntuone-client

UbuntuOne Client Setup

Connect to UbuntuOne services and authenticate:

u1sdtool --connect

A popup window will appear where you can register a new user or use an existing account.

The Gnome Keyring will ask you to enter you passphrase in order to securely store your UbuntuOne credentials

The UbuntuOne Sync Daemon will run automatically every time you log in.

That's all! Your ~/"Ubuntu One" directory is now synchronized with your UbuntuOne cloud storage


JavaFX - Bad font rendering - color fringes - blurry tex

Solutions are:

Install openjfx12
Install libfreetype6-dev if openjfx12 not available
Or just create the missing link sudo ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so.6.17.1 /usr/lib/x86_64-linux-gnu/libfreetype.so

The result:


Flatten directory with incrementing names

ok, i understand that shell scripting is a really power tool but it is real mess:

i have tried with thefourtheye answer but the sort command messed everything up because of the order was like this:

Sequence 1.wav
Sequence 10.wav
Sequence 11.wav
Sequence 12.wav
Sequence 2.wav
Sequence 3.wav
Sequence 4.wav
...

and the spaces was a problem so i had to add " but there was some mess too i don't remember exactly where, then i tried to put some debug print and it didn't work so...
In the end I tested it on a Mac OS/X terminal and it has another shell i never heard about (zsh) that uses different commands.. a big mess.

I came up with a small python script. Maybe it is dirty but it works:

import os, sys

count = 1
for dirpath, diname, filenames in os.walk('.'):

    if dirpath=='.' or dirpath=='./out':
        continue

    filenames = [f for f in filenames if f.split('.')[1]=='aif' and f[0]!='.']
    filenames = sorted(filenames, key=lambda f: int(f.split('.')[0].split(' ')[1]))

    for f in filenames:
        filepath = dirpath+'/'+f
        ffmpeg_command = 'ffmpeg -i "'+filepath+'" out/track'+"%04d" % (count,)+'.mp3'
        count += 1
        print ffmpeg_command
        os.system(ffmpeg_command)


How to have gnome-applet's functionality with unity?

In this case I found another package that ported gnome classic applet (with some changes) for Unity. It is named indicator-multiload and it available from default Ubuntu repositories. I installed it by

sudo apt-get install indicator-multiload

More informations can be seen here http://www.webupd8.org/2011/06/indicator-multiload-update-brings.html


How to Change DNS of network from Terminal?

nmcli connection show --active  to obtain active connection name
nmcli connection edit double tab to list available connections and chose appropriate

   nmcli> remove ipv4.dns
   nmcli> set ipv4.ignore-auto-dns yes
   nmcli> set ipv4.dns 8.8.8.8 8.8.4.4 (or other dns servers)
   nmcli> save
   nmcli> quit

nmcli connection down your_connection_name
nmcli connection up your_connection_name


Change temperature values of Night Light

The screen of my laptop (Dell XPS 15) is rather blue.

An alternative could be to set the preinstalled D50 color profile to the laptop screen on the standard Settings app's Color sidebar item. (Monitor calibration misery is not needed; the D50 profile is available from the Add profile dialog).

This in itself compensates the blue-ness of the LCD to a really decent level.
It is not timed or periodic, it's on all the time. This could be your "day-time" compensation.
The night-light, when it gets turned on, will add its shift on top of this; they play nicely together.


Additional drivers for NVIDIA graphics card cannot be installed

Download the Nvidia driver if 32bit here else if 64bit here
Install the driver manually This link will help you
To install it manually

First press ctrl + alt +f1 This will open tty1

Now you are using the tty terminal console

log in with your user name and password

Now stop the lightdm(dgm or whatever) using the command

sudo stop lightdm

Then install the new driver with

sudo sh /path-to-the-driver

if something goes wrong close the installer and reboot then try again
still same problem the nvidia installer will make a black list in /etc/modprobe.d/
if this is not generated you have to make such file to black list nouveau
Run sudoedit /etc/modprobe.d/nvidia-graphics-drivers.conf and fill it with this:
blacklist nouveau
If the problem is not solve you have to add the string "nomodeset" to your /etc/default/grub, in GRUB_CMDLINE_LINUX_DEFAULT= line
then update the grub

sudo update-grub