These directions have been tested also to Ubuntu 18.04.1 and will very likely work also for any future release using netplan and systemd.

There's no need at all to fiddle with GRUB nor any manual file removal.
The configuration set up in /etc/networking files and directories will survive reboots.

These are the verified steps:

Check the actual interface names you are interested in with ip l for the links (aka interfaces) and with ip a for addresses.
Install ifupdown with sudo apt -y install ifupdown.
Purge netplan with sudo apt -y purge netplan.io.
Configure /etc/network/interfaces and/or /etc/network/interfaces.d accordingly to your needs (man 5 interfaces can be of some help with examples).
Restart the networking service with sudo systemctl restart networking; systemctl status networking or sudo /etc/init.d/networking restart; /etc/init.d/networking status. The output of the status command should mention active as its status.
The command ip a will show whether the expected network configuration has been applied.
Optionally, manually purge the remants of the netplan configuration files with sudo rm -vfr /usr/share/netplan /etc/netplan.

No reboot is needed in order to "refresh" the IP configuration: it will be active as of step no.5 . In case of troubles, double check the interface names. A typical IPv4 DHCP configuration will resemble this one:

auto enp0s3
iface enp0s3 inet dhcp

while a static IPv4 address can be configured like this:

auto enp0s3
iface enp0s3 inet static
address 192.168.255.42/24
gateway 192.168.255.254
#dns-nameservers 8.8.8.8 208.67.222.222

Beware, the dns-nameservers entry won't work (thanks @Velkan for pointing it out!): the resolver is still using /etc/resolv.conf and systemd is providing his own resolution service from 127.0.0.53.
So you can manually update it (no networking restart needed!):

nameserver 8.8.8.8
nameserver 208.67.222.222

But his would be only a temporary solution to vanish after the next reboot.

To get a permanent solution you need to edit /etc/systemd/resolved.conf and add a line like this one to the "[Resolve]" stanza:

DNS=8.8.8.8 208.67.222.222

Please, refer to man 5 resolved.conf for the full documentation.

Finally, in the unlikely case any network service is not responding as expected, then that services may need a restart. But that's a weird non-standard network daemon behavior.


If you are not familiar with the "global menu" - most applications have their menu appear in the top of the screen.

Simply moving you mouse into this space should be enough to display the menu:


You need to check this by yourself.

Documents to read more about the intel-virtual-output:

http://manpages.ubuntu.com/manpages/focal/en/man4/intel-virtual-output.4.html
https://wiki.archlinux.org/index.php/Bumblebee#Output_wired_to_the_NVIDIA_chip

Using mate-optimus on Ubuntu MATE may help too.


Software Updater Failed to download repositories 13.04

It is very normal for you to get this because if you take a look at their ppa you will notice that they DO NOT have a package for raring witch comes from raring ringtail witch is the code name for Ubuntu 13.04.
Afther you remove those repositories everything will be back to normal

Link on how to remove repository.


How to find the average number of lines in a directory?

Use awk:
awk 'END{FNUM=ARGC-1; print (NR-FNUM)/FNUM}' *.tsv


What'd be a good SEd trick to list the properties of all X input devices?

--list-props also accepts the numeric id, so

xinput --list | sed -n 's/.*id=\([0-9]\+\).*/\1/p' | xargs xinput --list-props

Or, thanks to @steeldriver

xinput --list --id-only | xargs xinput --list-props


The short answer is: No.

You would have to run a packet tracer, such as tcpdump or wireshark, and count them from that.

OR:

Make some iptables rule that makes a log entry for each connection (which might not be be the same number as requests, if multiple can be done per connection.

However, because HTTPS is encrypted, there isn't a good way to isolate "HTTPS: GET" from the rest of the traffic, as can be done for unencrypted HTTP. For example, I was able to extract this from my tcpdump logs for one computer and HTTP only on my network:

doug@DOUG-64:~/tcpdump/104$ gunzip -c all0.txt.gz | grep "IP 192\.168\.111\.101\." | grep "\.80:" | grep "HTTP: GET" | grep "^2019-01-" | wc -l
29835
doug@DOUG-64:~/tcpdump/104$ gunzip -c all0.txt.gz | grep "IP 192\.168\.111\.101\." | grep "\.80:" | grep "HTTP: GET" | grep "^2019-02-" | wc -l
69684

Meaning it did 29835 HTTP requests in January and 69684 in February.


First of all, open up your ~/.bashrc file and enable color prompts:

nano ~/.bashrc

uncomment then line #force_color_prompt=yes

Then, change the PS1 line directly under the line if [ "$color_prompt" = yes ]; then

to:

PS1='${debian_chroot:+($debian_chroot)}\[\033[00;32m\][\t] \[\033[01;34m\]\u@\h:\w\$ '

As you can see, 01:34m is light blue and 00:32m is green. Light green would be 01:32m instead of 00:32m.

Press CTRL + o and then press ENTER to save the file. Press CTRL + x to exit nano.

Then, run the following command to apply the changes by "sourcing" your bashrc file:

. ~/.bashrc

The changes should now apply to every newly opened terminal under your user.

click here for more info


Two possibilities that come to mind, after seeing your picture.

Video card driver may have been updated and creating the problem, ie not refreshing properly. Minimize then Maximize any application window, if font gets corrected then it is the video card driver.

or

It could be the video card is overheating. Use those compressed air cans to clean the vents of the netbook/laptop. Make sure your netbook has good ventilation and that the vents are not obstructed.


Ubuntu MATE vs. Xubuntu for HiDPI screens

Starting with mate-desktop-environment 1.20 MATE desktop environment has true HiDPI support. HiDPI is be supported by default in Ubuntu MATE 18.04 and later. Every aspect of Ubuntu MATE 18.04, its themes, its applications, its icons and its toolkit assets have been updated to take advantage of HiDPI.

Xfce4 4.14 has true HiDPI support in Ubuntu 19.10 and later.


lamp-server wants to install mysql but i want it to use already installed MariaDB

As bgvaughan stated, tasksel provides package 'groups' in order to setup complete and correctly configured, fully integrated services.

'M' from the 'LAMP' initials refers to mySQL, therefore tasksel will automatically try to install and configure mysql-server.

If you want to use mariaDB, you should install apache & php separately:

sudo apt-get install apache2
sudo apt-get install php5 libapache2-mod-php5

I haven't worked with mariaDB, but i've heard that it's a binary drop-in replacement for mysql, so i guess it should be working ok.


Acer Chromebook Touchpad Clicking Moves Mouse

Seems that your Touchpad isn't recognized correctly. I had the same problem too and found a workaround:
Acer Notebook rightclick not working

You should try this.

If this doesn't work you should try the Ubuntu 15.04 final beta. I tried it and it seems that my Touchpad is supported with Kernel 3.19.


THinkpad p50 running hot on ubuntu 16.04

Installing TLP – Linux Advanced Power Management may help by managing resources used by your machine.

See tlp power management for installation instructions, but here they are for convenience:

sudo add-apt-repository ppa:linrunner/tlp
sudo apt update
sudo apt install tlp tlp-rdw
sudo start tlp

Additionally, you can also install the following for your ThinkPad.

Battery charge thresholds – ThinkPads only
Recalibrate battery – ThinkPads only

These may provide additional help with your fan problem by managing battery charging (which may be contributing to heat in your laptop chassis).

You can install these optional packages using:

sudo apt install tp-smapi-dkms acpi-call-dkms


Broken packages after kernel update to 3.16

The main issue was Intel Graphics Installer. Remove it and the PPA. Then do sudo apt-get install ubuntu-desktop to recover all the broken packages


I can't remove a malformed line from my sources.list.d?

First install gksu

sudo apt-get install gksu

Then open the file with gedit

gksu gedit /etc/apt/sources.list.d/opera.list

You can post the line here for review or comment it out by adding a # in the front


Look in the logs. In terminal, cat /var/log/apt/history.log should list the packages that you removed.


can previous installation partition be made bootable

Ok, assuming your GRUB is working fine, and you are booting into the 'new' install on another partition somehow.  Yet your old partition still exists.

You can edit your 'working' grub menu to point to the other boot kernels located at /dev/sdXX/boot/vmlinuz-X.X.X-XX-XXXXXX

Basically, like the following:

menuentry 'RescueMePlz' --class ubuntu --class gnu-linux --class gnu --class os {
   recordfail
   gfxmode $linux_gfx_mode
   insmod gzio
   insmod part_msdos
   insmod ext2
   set root='(hd0,msdos5)'
   search --no-floppy --fs-uuid --set=root 1d73dc63-beac-4c49-a8c7-f4efd6fe3cb7
   linux /vmlinuz-3.2.0.24-generic root=/dev/mapper/somediskgroupvg-rootv ro quiet splash $vt_handoff
   initrd /initrd.img-3.2.0.24-generic
}

where --set=root  is your UUID or device path

you can run sudo blkid to find your previous /boot device's uuid value (or cheat by looking at your OLD grub.cfg)

important that you set the -set=root  correctly

hope that gets you started.


Ubuntu 20.04. Wifi TPLink extender issue

Today I faced a similar problem after switching over to Linux from Windows 10. Windows, my phone, consoles, etc were all able to connect to my TP-Link extender, but my Linux installation couldn't. I found your thread and was dismayed to find it had no solution, but as I managed to fix the problem for myself, I thought I'd post what worked for me here.
After a while of searching, I decided to try changing the DHCP client. I installed the package dhcpd5 from the repositories and then used a text editor to open the file /etc/NetworkManager/NetworkManager.conf.
Underneath the header [main], I added the line dhcp=dhcpd.
I ran sudo systemctl stop NetworkManager.service, then sudo systemctl start NetworkManager.service. I was then able to connect, and a speed test indicates the WiFi network is working properly.
Hope this helps!


Mounting virtual shared folder - mount succeeds, but any access to folders hangs

As @Takkat suggests, reinstall guest addtions after the kernel update

sudo /etc/init.d/vboxadd setup
sudo shutdown -r now

.. then restart the VM.

Now after running the script, the mount point succeeds.

Ensure that you have dkms installed.

sudo apt-get install dkms


Setting /var/www/html to chmod 777 on a development site

No, bad habits should always be avoided. And if you set your development environment incorrectly you are likely to copy something over to the production server. Unintended I am sure but I have seen it happen before.

Depending on how many users are developing: either 700 if it is one user or 750 if it is more than 1 user (and I count you, the webserver user and any other software you use that needs a user as separate users) could be more than enough.


What should I do when grub command-line shows up after trying to install ubuntu from usb drive?

You need to select right boot device in the BIOS of your new server computer. To tell you exactly what to do we need more information on your computer's BIOS.
But the simplest way is just to try all alternative boot options offering by your computer's BIOS one by one. If no success then change boot type from UEFI to Legacy or vise versa in computer's BIOS and try all options again. This is 'solution in the dark' so use it or provide more information on BIOS boot options.


For Data files [Documents, photos, music ,etc] the logical method would be by replacing the older files with the new one by considering the info parameters for example:Date of creation of Modification.I guess you will have to write a script for that to do your job.

OR

Alternately by removing the duplicate files after copying or merging the new ones.
For reference script like here ,which searches for the duplicate files and merges over old files.

For GIU purpose there is fdupes and also Fslint to do it manually.


The WubiGuide shows how to uninstall Wubi both automatically and manually.

Installing Wubi is not likely to have any effect on your computer speed (in Windows) unless you are very low on space. The main part of a Wubi install is the virtual disk which is the file \ubuntu\disks\root.disk (on the 'drive'/partition you installed to). By removing this and other Wubi files (through the normal uninstall process, or manually if required) this will free up the space and restore your computer back to the original state prior to install.

I recommend running chkdsk and defragmenting your Windows drive as well. After this is done, you can make sure that you have recovered the space. In rare cases the root.disk may be corrupted and recovered by Windows to a hidden \found.000 folder. After running chkdsk you can check for these and remove them if you don't think the space has been fully recovered. Note: the \found.000 folder is hidden and protected by Windows.


Old Fglrx Driver - AMD Radeon HD 3200 - ubuntu won't start

have you tried to use the latest driver for your ati graphic card ... i had the same problem as you when i installed the latest version it worked perfectly . (i have run Call of duty mw3 on my laptop)

for installing it use this commands:

sudo add-apt-repository ppa:makson96/fglrx

sudo apt-get update

sudo apt-get upgrade

sudo apt-get install fglrx-legacy

for removing it if you get any problem you can use this commands :

sudo apt-get install ppa-purge

sudo ppa-purge ppa:makson96/fglrx


Merging a "read-only" partition into the main partition

With the information that you've provided via edits and comments, it's easy to see that you've expanded your VirtualBox .vdi correctly and Ubuntu recognizes the full size. Now to make use of it.
In order to expand your current partition to use the full 32GB, you will need to have an Ubuntu Desktop .iso file. If you don't already have one available, download a copy from the Ubuntu website. Any version will do, though it would probably be best to grab the most recent version.
Background
For the sake of this walk-through, I've created a VirtualBox VM of Ubuntu Desktop 20.04 with a 25GB primary partition. I then resized the partition on the host using the following command:
VBoxManage modifymedium disk "Ubuntu Desktop 20.04.vdi" --resize 51200

Aside from the size of the partition, these are the same steps you did to create and later expand your VM storage size. After booting into the VM, I opened GParted and looked at the partition information for the main storage device, /dev/sda:

This is likely where you are in the process.
Resizing the Partition
It is not possible to resize a partition if it is currently mounted, and we cannot unmount a partition that is used for the operating system itself. For this reason, we need to boot into the "Live DVD" environment offered by the Ubuntu Desktop .iso file. Shut down the VM and add the .iso to the virtual optical drive for the VM:

Before booting the VM, double-check the device boot sequence. The optical drive must be placed ahead of the storage device. Once confirmed, boot the VM. You may see a file system check take place during boot. Let it complete:

You will be presented with the option to "Try Ubuntu" or "Install Ubuntu". As you already have a working installation, you will want to select "Try Ubuntu". This will start up a live environment from which you can modify your partitions.
Once the system finishes loading the live environment, open the "Disks" application. This will present information on your storage device(s) and the partitions contained within:

Click on the top square that reads "Extended Partition", then click the gears icon and choose "Resize...". You will be shown an option to modify the size of the partition with a slider. Extend the partition all the way to the end (if you would like to use the entire storage medium):

IMPORTANT: While you can click on the lower partition square and then choose to resize, you cannot extend the partition beyond the size of the upper square — even though the UI makes it look like you can. Any changes you make to extend the size of the formatted partition will be silently ignored. Start with the top square.
Click "Resize" and give the system a few minutes to do the work of expanding the extended partition. You will see the partition map updated to look something like this:

Now you can do the same for the actual data partition:

Then:

You should now see that the data partition is properly resized:

You can confirm this is complete by opening GParted and seeing a second application report the same numbers:

Optional: Consider running a "Check Filesystem" just to ensure that everything is 100% before leaving the Live DVD environment.

Now shut down the VM, remove the .iso image from the virtual optical drive, and boot into your proper environment. Once logged in, confirm that the partitions are the correct size with GParted and/or df:

There are a lot of steps here but, when you follow them one by one, you'll see this process is not at all complicated. What's more, VirtualBox will allow you to incrementally grow your partitions up to 2TB in total. That means you can become quite expert at this process in the future if you are regularly resizing your partitions.
I hope this is the "advice" you were looking for.


How do I tell apt not to install X11 & gnome dependencies cause I will use X11 forwarding?

apt-get --nodeps install PACKAGENAME
However...
In order to use ForwardX11 yes in your /etc/ssh/sshd_config, you must have X11 installed on both the remote and local machine.
Just like you must have an ssh client and an ssh daemon/server, you must have an X11 client and X11 server.
I hope that this helps clarify things.


Problem Creating Desktop Shortcut to Terminal Linux Command

It seems the error lies in Exec value. Desktop entries need absolute paths. So, replace ~/Desktop/ with /home/username/Desktop/ such that value of Exec in desktop entry looks like:

Exec=/usr/bin/gnome-desktop-item-edit /home/username/Desktop/ --create-new

Explanation:

From Desktop Entry Specification -

  The Exec key must contain a command line. A command line consists of an executable program optionally followed by one or more arguments. The executable program can either be specified with its full path or with the name of the executable only. If no full path is provided the executable is looked up in the $PATH environment variable used by the desktop environment. The name or path of the executable program may not contain the equal sign ("="). Arguments are separated by a space.


How to add 100GB from Windows 7 to Ubuntu?

Yes:

Get either a Ubuntu Live CD or a bootable USB stick.
Boot your system using this Live CD or USB.
Select "Try Ubuntu without installing"
Once Ubuntu boots, look for the partition editor (tap the Windows key, then type gparted to find it).

Using gparted you can first shrink your Windows partition and then expand the Ubuntu one to claim the unused space.

Be warned:

This operation will take a while.
BACK UP YOUR DATA.  There are NO guarantees that things won't go wrong. NO utility can guarantee that, so ALWAYS BACK UP YOUR DATA before trying something like this.

Apologies for using caps, but it's important. Back up your data.


Ubuntu Server 18.04.3 Server keeps crashing - Network related

I can confirm that I was having a similar issue and upgrading the kernel to v5 fixed it. In my case I was running 18.04.3 on bare metal and using various Docker containers.

Basically my issue was the same as this: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1842447

Since upgrading to v5 with sudo apt-get install --install-recommends linux-generic-hwe-18.04 I've been crash free for ~24 hours.

This also has relevant info https://github.com/mailcow/mailcow-dockerized/issues/2904

I know this answer is more specific to Docker but it isn't really a Docker issue. Kernel 4.15-60 broke something with networking, there is already a fix committed for kernel 4.15-62 but that hasn't been released yet. I'd avoid kernel 4.15-60.


Can I be sure about the legality of the applications in Ubuntu Software Center?

How you use that tool; where in the world you are; what you choose to download from youtube, will determine whether what you do is legal or illegal as will whether the video in question is protected under any laws.


Internet connection suddenly stopped working on Ubuntu 20.04

I think I know what the issue is. I had plugged in a second monitor, which is connected through a KVN switch. If I use that switch to suppress the output from my Linux machine (i.e. the monitor shows the output of my MacBook), for some bizarre reason the signal on the line seems to interfere with the wifi. The computer still sees the wifi network and the router, though.


Constant startup error issue - what is com.ubuntu.apport-support-gtk-root

Ubuntu has a program called Apport that is responsible for detecting such crashes and upon user consent, report these crashes to developers. This process intends to get the problem fixed by the developers.

However it can be very annoying to common users, and there is no point in showing errors to users when they cannot do anything about it themselves. So you might want to disable them.

The apport system creates crash report files in the /var/crash directory. These crash report files cause the error message to appear everytime Ubuntu boots.

Turn off apport

$ gksudo gedit /etc/default/apport

Just set the value of enabled to 0, and this will disable apport.

enabled=0

Save the file and close it. From the next boot onwards, there should be no error messages ever. If you do not want to restart the system then restart apport from the command line.

$ sudo service apport restart


How to run a script each time I login AND unlock session

Found this, which was made by Ubuntu Forums user opus1.  Maybe it can help.

This is what the post gives as a solution:

  For anyone interested, here's what I did: I looked at the logs
  (specifically /var/logs/auth.log) and saw that an entry is made when
  ever the password is checked and accepted. My log said:

Aug  7 14:10:57 mumble gnome-screensaver-dialog: gkr-pam: unlocked login keyring

  Ultimately I found an application called "Swatch" which monitors a log
  for you and will run a script when a string that you specify appears
  in that log. Swatch requires a config file (.swatchrc), and mine looks
  like this:

watchfor /unlocked login keyring/
  exec /root/.gnome2/nautilus-scripts/wakeServer

  where "/unlocked login keyring/" is the string to look for and "exec"
  defines the script to run when it is found. My wakeServer script looks
  like this:

#!/bin/bash

#wake the server
wakeonlan AA:BB:CC:DD:EE:FF

#record info in the log file
myVar="woke server at login:"
echo "$myVar">>/home/me/.serverWake.log
date>>/home/me/.serverWake.log

  where "AA:BB:CC:DD:EE:FF" is the MAC address of my server.

  Swatch will need to be entered as a start-up application (create an
  entry in System | Preferences | Startup applications called
  "runSwatch" and make the command "swatch --tail-file /var/log/auth.log
  --daemon". (In Debian, only root can read logs So the start up command needs to be prefaced with "sudo" and swatch will need to be added to
  the sudoers file without a password. In Ubuntu it appears non-root
  users can read logs. There could be a security issue with granting
  password-less access to swatch, but in my case it seems acceptable).

  So far it has worked perfectly!


Is there a way to install Deepin desktop environment in Ubuntu 19.04?

Go to Software and Updates, go to the "Other Software" tab and remove the repository that you just added. Then exit it and you should be able to to run "apt update" without errors.

It sucks how there's no way to install Deepin on 19.04 without some serious manual effort. Hopefully the PPA owner fixes this.


How to make the script command append to a file?

As the man pages says, the -a option is for append

script -a file

If file is missing, the default typescript filename is used.


Can't access local server via ssh - How to debug?

The problem was a IP conflict! After running a network test, I found that a specific user was not using the DHCP configuration...
Should I hang him or use a guillotine?
Well, I hope this solution can help other users with the same problem:
https://www.cyberciti.biz/faq/linux-duplicate-address-detection-with-arping/


Seems I was missing the memory option in QEMU commandline. If not specified QEMU defaults to 128MB of ram, not enough to boot the kernel.

Solution is to give QEMU enough ram using the -m parameter. My final command that works is:

sudo kvm -m 2G -hdb /dev/sdh


Cheese won't start: assertion 'CHEESE_IS_CAMERA_DEVICE (device)' failed

Unfortunately, it looks like there's a bug open on Launchpad about this, with no solution as of yet.
https://bugs.launchpad.net/ubuntu/+source/cheese/+bug/930128

I saw another thread about this on the Ubuntu forums, but their solution was hardly a "solution":
http://ubuntuforums.org/showthread.php?t=1969336


There is a shortcut in
System Setting/Shortcuts/Global Shortcuts for
Walk Through Windows of Current Application (Reverse), which is set to alt+~, if you delete that shortcut (i.e. set it to custom and leave it empty, then press apply) you will be able to use alt+1 in other applications, like you case with the browser.

(Tested under different Linux distro with KDE Plasma.)

Edit: on my keyboard layout ~ is on key 1, maybe that is why it worked for me.


I don't know where you got the program that you ran and took a screenshot of.  But in direct response to your question title (Installing Virtual Box 5.2), installing the latest version of Virtual Box (as well as many programs) are as easy as going to the official site of the application you want to install.

In this case, the official site of Virtualbox is http://www.virtualbox.org.

On this site, you have a download link on the left panel.  Clicking on the download link will take you to the available downloads.  All of the currently supported versions of Ubuntu are included in the list.

Clicking on the correct link will download the 5.2 Virtual box version (which is the latest).  The download will be a *.deb package, which you can install by double clicking the download, or runnning this from the terminal:

$ dpkg -i [downloaded package name].deb


The Chrome UI size issue is a known bug, and Chrome/Chromium has to fix it.  There's no other real workaround at this time, so use Chromium in the interim.  It's a known issue that Chrome has to fix, there's no workaround but to use Chromium in the interim.

And it looks like this is not necessarily the first time it's been seen, as this one of the bugs on this.

Also, consider trying the steps in this solution to a similar question as a workaround. (which recommends trying this command: google-chrome --high-dpi-support=1 --force-device-scale-factor=1)


To answer your question "why exe files can't run":

The .exe files are Windows executables.  They are represented in a Windows-specific file format that the regular Linux operating system does not know how to load.  They depend on Windows-specific shared libraries (DLLs) that are not present on a Linux system.

How to solve your problem?

Installing Wine on Linux may help, though it is not guaranteed to work for all applications.  (Wine depends on libraries that emulate the behavior of Windows, and that emulation is not 100% faithful to the original.)
If you can see the Windows files on the C: and D: partitions, there is a good chance that you have only clobbered the Windows boot loader.  This page talks about restoring the boot loader.


Gnome 3.14: Changing window icons to the left

In a terminal:

$ gsettings set org.gnome.desktop.wm.preferences button-layout 'close,minimize,maximize:'

$ gsettings set org.gnome.settings-daemon.plugins.xsettings overrides "{'Gtk/DecorationLayout':<'close,minimize,maximize:'>}"


Have you installed via apt-get? It seems this version is outdated.
This was happening to me:

$ sudo youtube-dl -U
It looks like you installed youtube-dl with a package manager, pip, setup.py or a tarball. Please use that to update.

You can install it from official sources: https://rg3.github.io/youtube-dl/download.html

Using curl:

sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl

If you do not have curl, you can alternatively use wget:

sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl

You can also use pip:

sudo pip install --upgrade youtube_dl

You can also use Homebrew:

brew install youtube-dl


/usr/lib/update-notifier/apt-check returns wrong information; also affects motd

Clear the package cache and download it again:

sudo dpkg --clear-avail

sudo apt-get update

If it doesn't solve the problem, create an empty motd.tail:

sudo touch /etc/motd.tail


unable to access location (failed to mount Windows share:permiss.denied) when trying to open a samba shared map

Is the "pp" in /media/pp/Acer your ubuntu local user name?

If it is change your share definition to this:

[WindowsAcer2]
comment = W7dirWindows
path =/media/pp/Acer/
browsable = yes
writable = yes
guest ok = yes
read only = no
create mode = 0777
directory mode 0777
force user = pp

Then restart smbd:

sudo service smbd restart

For an explanation as to why I suggest this please see my answer here:
Share external hard drive between two Ubuntu computers

Your mount point and the auto mount point for external "drives" have the same issue.


awk NR variable not working as expected, getting the whole line while asking for first field

When you use single quotes, $a is not expanded by the shell, so awk sees literal NR=$a. Since the awk variable a is uninitialized, that is equivalent to NR=$0 which compares the current record number to the value of the record.
When you use double quotes, both $a and $1 are expanded by the shell, and the expression becomes NR==2{print ; exit} because $1 is  empty in your interactive shell - that's why it prints the whole record.
Here are a couple of ways to pass shell variable values to awk while avoiding the trickiness of shell expansion:
awk -v a="$a" 'NR==a{print $1; exit}'

or
export a
awk 'NR==ENVIRON["a"]{print $1; exit}'

(You could use double quotes to allow expansion of $a and then prevent expansion of $1 by additional quoting/escaping ex. awk "NR==$a{print \$1; exit}" Records.txt but I recommend against it.)


There could be multiple issues here. It could be a driver related issue, or a hardware issue.

Download the driver, and install the package. Then make sure the proper driver is selected for the printer.

If you have done that, you could try to connect the printer via a USB cable to rule out wireless issues.

If that still doesn't fix the issue, you may have a worn out roller or something.


How can I setup nightly backups via the command line?

You can use tar and rsync for a combination of full & incremental backups and there is a tutorial here that sets it up to do nightly / weekly backups using cron.


Dreamviewer is not showing any syntax error in ubuntu

Have you try bluefish? Maybe you can use Brackets (by Adobe) or Atom (by Github) or Sublime Text 3. if you use Dreamweaver for web development I suggest Brackets if you use PSD... if not, I like Sublime Text 3, give a try.

I think maybe Dreamweaver not showing syntax errors because needs windows libraries to work properly.


The general policy is to keep two kernels around, so if the newer one won't boot, you can fall back on the older one. In your case, if you are sure the older one works, yes you can do sudo apt remove linux-generic 4.8.0.42.*.

This should do an update-grub automatically, so the next time you boot, the remaining kernel will be used.


You need to escape the % symbols like so:

date +\%Y_\%m


How do I upgrade my Ubuntu server from one LTS version to another? Is this safe?

It is generally recommended (read safer) that users of Ubuntu LTS wait until the first point release, due in July, before upgrading.

To upgrade from Ubuntu LTS on a server system (and Desktop too) before then, follow the steps listed below:

Ensure you're up to date with latest updates for Ubuntu.

Backup! Don't skip this step. Unexpected things can happen during an upgrade and you'll want to be prepared in case they do!

sudo apt-get update
sudo apt-get upgrade

Install update-manager-core if it is not already installed:

sudo apt-get install update-manager-core

Edit /etc/update-manager/release-upgrades and if necessary set Prompt=lts. Note: The minimum contents of /etc/update-manager/release-upgrades should be:

[DEFAULT]

Prompt=lts

Launch the upgrade tool:

sudo do-release-upgrade

Follow the on-screen instructions.

Slightly modified from Source: https://wiki.ubuntu.com/PrecisePangolin/ReleaseNotes/UbuntuServer#From_10.04_to_12.04

For more on do-release-upgrade and some handy options, see the man page.


How to fix my MBR? While installing random Ubuntu my MBR is not getting overwritten anymore

For the simplest solution, try installing Ubuntu by letting installer configure partitions.

Set 1 partition to be boot able and install either "/" on it or "/boot" on it.


How do you install ubuntu on a pre-installed windows7 system

You can try Wubi, it is an officially supported installer for Windows users that allows Ubuntu to be installed and uninstalled in a safe, easy way as with any other Windows application.

Once you are done download Run Wubi, insert a password for the new account, adjust other settings such as the disk space, and click "install".

The installation process from this point on is fully automatic.

The installation files (approximately 700MB) will be downloaded and checked, after which you will be asked to reboot.

Do so and select Ubuntu at the boot screen. The installation will continue for another 10 to 15 minutes and the machine will reboot again.

That's it. Now you can select Ubuntu at the boot screen and start using it.

You can always refer to the Installation Instructions here


Can not install pymol because I cannot install libfreetype6-dev

OPTION ONE

If you don't need version 1.8 and if you are using Ubuntu 14.04 or newer, you can install version 1.7 through the official Ubuntu repositories. Just run the following commands to install pymol version and pymol dependencies:

sudo apt-get update
sudo apt-get install pymol

If it still complains about libfreetype6-dev, run the following commands to fix that and then run the above commands again.

sudo apt-get clean
sudo apt-get update
sudo apt-get purge libfreetype6-dev

To search for available packages through apt-get, run the following command like in this example:

apt-cache search pymol

To narrow the results to those containing a particular word, use grep like in this example:

apt-cache search pymol | grep pymol

To list the available version:

apt-cache show pymol | grep "Version:"

To list  more info:

apt-cache show pymol

OPTION TWO

Alternatively, if you insist on installing the downloaded version, run the following commands to install libfreetype6-dev:

sudo apt-get clean
sudo apt-get update
sudo mv /usr/share/man/man1/freetype-config.1.gz ~/
sudo apt-get install libfreetype6-dev

This will move the manpage file to your home directory so you will have to view the file from there instead of using manpage.


Can I connect to a specific workspace via VNC?

You could always use X11 forwarding over SSH. This will let you run both commandline and GUI tools.

To do this on Linux or OSX run: ssh user@host -X

Then run whatever you need from there.


Is it safe to manually remove packages that apt-get remove/autoremove left behind?

Yes it is,  Ubuntu/Linux never let's you remove something that is important in boot systems,  unless you use GEdit


Change the order of applet data and time numbers

I don't know if there's a way to alter the display of the date/time applet to how you want, so here's my alternative solution.

Install indicator-sysmonitor, then create a custom shell script which will emit the date/time according to your preferred format.

Decide on what you want the date/time indicator to show (from your screenshot, I assume just the time) and then your script, via indicator-sysmonitor, would display the date.

The downside is the date may not be adjacent to the time...


NDISWRAPPER NetGear N300, still not working

Ndiswrapper is totally obsolete and causes problem than solving it.

In old days, Ndiswrapper was a successful tool but as of today, when almost all hardware manufactures are providing drivers, it must be used as last resort.

From a quick search, it look like netgear devices has really some problem with ubuntu..

This is Broadcom BCM43231 chip, so please  give a try to Installing Broadcom Wireless Drivers (specifically this answer)

I recommend a full reinstall of ubuntu to get rid of all changes by ndiswrapper

Another reference of the same chip and NetGear USB
Getting Ubuntu to recognize a BCM43231 network card what is up with terminal

As a last resort, if you have to go with the ndiswrapper way , follow this - http://ubuntuforums.org/showthread.php?p=11199585

&

http://sourceforge.net/apps/mediawiki/ndiswrapper/index.php?title=Netgear_WNA3100


First, add the following line at the end of ~/.Xmodmap file:

keycode 107 = Menu

Second, run this command in terminal:

xmodmap ~/.Xmodmap

Third, go to System settings → Keyboard, select Shortcuts tab, go to Screenshots and disable or change the value for Take a screenshoot (this doesn't have to be anymore Print key)


How can i limit disk space usage for one user?

The standard way to do it in UNIX is through the quota command. It allows you to dynamically change how much disk space each user can use.

See the man page, or google for a tutorial.


Okay that worked. Reinstalling Pulseaudio (which resets things to defaults).

To cut to the chase just type in these commands in a terminal in order.

sudo apt-get remove --purge alsa-base pulseaudio indicator-sound
sudo apt-get install alsa-base pulseaudio indicator-sound
sudo alsa force-reload
rm -rf ~/.config/pulse
sudo reboot

(restarts computer)

sudo apt-get install pavucontrol
pavucontrol


Do I need to make a partition on an EBS volume? What is better?

Inside EC2, to me, it only really makes sense to use the entire volume for the filesystem, because of the flexibility allowed by Elastic Block Store (EBS) volumes, which are much different than many physical disks, in the sense that you can provision them as needed, destroy them as needed, attach and detach them from instances without rebooting, and take snapshots and clone them without using the instance's processor, memory, or I/O.  And, without a partition table, resizing when you need more space is cake.

Need a bigger filesystem?  If you're using the entire volume without a partition table, it's very straightforward.

Make an EBS snapshot of the volume using the AWS console, with the volume still mounted and in use. You will not actually use this snapshot, but trust me for a moment.  If you recently made a snapshot of the volume, and still have it, you could skip this step, because the purpose here is to make the rest of the steps faster.

Unmount the volume.

Take a second snapshot.  This is the one you want.  We made the previous one because it will make this snapshot much faster.  When EBS takes a snapshot, it saves the disk contents to a hidden repository on S3. For each consecutive snapshot of the same volume, only the changed blocks need to be stored, so this snapshot will be built, mostly, with stored pointers to the location of all the data that's already been captured, and only changed blocks will be physically backed up.

Create a new volume, using the last snapshot.

Attach the new volume to the instance in place of the old one, and mount it.  Verify the data as needed.

Then, you can use resize2fs to grow the filesystem to fill the available size on the new volume, while the volume is in use.

Then delete the first snapshot above.  EBS will "roll forward" everything it contains that is also needed by the final snapshot, so the final snapshot is still valid.

As a final step, you may want to warm up the new volume using sudo dd if=/dev/xvdx of=/dev/null bs=1M.  When a volume is created from a snapshot, the contents of the volume are loaded "lazily" from the snapshot onto the actual volume, which means the volume becomes fully available before its performance is optimal.  If you ask for something from the volume that hasn't been loaded yet by the background process, you'll still get it almost immediately, but not as fast as if the background process had loaded everything.  The dd operation, above, does a physical read of the entire volume, causing the whole thing to be available with the lowest possible latency, more quickly than it otherwise might.  This is documented as something that should be done with the volume unmounted, but whether you do it before or after the resize isn't terribly important.  The various flavors of pre-warming EBS volumes is discussed at http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-prewarm.html ...

To me, using the entire volume for the filesystem, without a partition table, seems like the only way to go, since it minimizes downtime and the opportunity for error.  All of my EBS (and ephemeral, for that matter) volumes are done this way, except for some very early ones.

You can, of course, use fdisk or parted to create and modify the partition table in the customary way, but -- in my opinion -- this is unnecessarily adding additional "moving parts" ... which usually translates to more opportunity for error.

If you know how to get your local machine's X-Server working, and accepting incoming connections from the EC2 instance in order to display the GUI output locally, you can also easily use the graphical tool gparted on EC2 instances, with the graphical interface displaying on your local workstation screen -- yes, this works, I've done it -- but getting that working is outside the scope of this question.


max Memory and Storage capacity of Ubuntu 14.04 LTS

Linux (and therefore Ubuntu) is only limited to the physical architecture of the CPU, chipset, buses, and peripherals.

32-bit Ubuntu (which uses Physical Address Extension mode via Linux's CONFIG_X86_PAE) can use 64GB of RAM (though limited to 4GB virtual memory per process). 64-bit Ubuntu has no addressing limits, so depending on the CPU and chipset, this could be up to 256 TB (for the current generation of 48-bit physical memory CPUs). Most systems will be limited by their chipset and RAM sockets.

For more details, see Larger physical address space.

Hard drive size again depends on the hardware, not Ubuntu. The standard filesystem, ext4, can address up to 1 exbibyte.


You probably have loads of old kernels installed. You can remove some of them as follows:

First check your current kernel (you definitely do not want to remove that one)

uname -r

Then check which are installed with:

sudo dpkg --list 'linux-image*' | grep ^ii

And to remove an old kernel:

sudo apt-get remove linux-image-OLDVERSION

Replace OLDVERSION with the version of the old kernel you want to remove

Afterwards update grub with:

sudo update-grub

(Updating grub is not strictly necessary since it should run automatically after you uninstall an old kernel, but it does no harm)


Will it create any critical problems if one always uses ''shutdown -h now"?

None that I am aware of. That is how I shut down all of my servers. Using the -q options would force a non-graceful shutdown, but the -h option is fine. The 'now' part of the command is the 'time' to shutdown.
syntax:

shutdown [-a][-t sec][-krhnfFc][time][warning-message]
shutdown -h -t 10

specified a shutdown in 10 seconds.

shutdown -h 8:00

shutdown happens at 8 o'clock


USB Stick became Read-Only after using Pen Drive USB Installer

Try to create a USB STICK use Flash disk size 4 or 8 gigabytes


First write a script that brings up the AP.  An older tutorial that should basically work on debian systems is here. This gist is to install and configure hostapd.  This will get the AP started, but you'll probably want more than a link layer, like having the AP send data to a router that routes to the internet.  The tutorial covers this.

To get it to run on boot start the script in /etc/rc.local.


Mount error: "unknown filesystem type 'exfat'"

You get this error because the exfat filesystem is not installed in Ubuntu by default. exFAT is proprietary and patented by Microsoft.

Ubuntu 13.10 or higher

Since Ubuntu 13.10, this package is in the main repository. Just install exfat-fuse and exfat-utils:

sudo apt-get install exfat-fuse exfat-utils

Ubuntu 12.04

For ubuntu 13.04 and lower, you'll need a ppa to install the exfat support. Installation procedure:

sudo apt-add-repository ppa:relan/exfat
sudo apt-get update
sudo apt-get install fuse-exfat

If you see the error gpg: "tag:launchpad.net:2008:redacted" not a key ID: skipping during the apt-add-repository step, then you'll need to manually install the signing key and run the apt-get update and apt-get install steps after that:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4DF9B28CA252A784


what is the accurate command_line for deleting a folder in /usr/local?

sudo rm -r /usr/local/java will suffice. sudo gives you the appropriate permissions to delete the directory and the -r ("r" stands for recursive) option is needed to delete the contents of the directory recursively.

Please make sure you intend to delete the /usr/local/java directory before running the command above.


Deleting Swap File on VPS Server Using Ubuntu 18.04?

The swap file is a normal file. Simply remove it with

sudo rm -f /swapfile

and the disk usage should show that the occupied 1GiB is now free.


How do I find files with no group permissions?

You can use:

find . \! -perm /070

Or:

find . \! -perm /g+rwx

This works because:

When the operand of the -perm test starts with /, it causes -perm to test if any of the specified permissions are present.

(If you used - in place of /, it would test if all were present. Without a prefix character, it would test for exactly the permission specified, i.e., all of them and no others present.)
That's the opposite of what you're looking for -- none is the opposite of any -- and the not operator \! negates the result of the test that follows it.

(The operator is really !, and you can probably write it that way, but it's commonly written as \! to ensure that one's shell passes it on to find rather than treating it specially.)

As for the meaning of the specific strings after /, see FilePermissions, this Wikipedia article, and/or man chmod. In summary, as applied to the commands shown above:

070 is an octal permissions string, specifying permissions for user (i.e., owner), group, and other (i.e., everyone else), respectively. 7 is read (4), write (2), and execute (1) permissions (i.e., 111 has the 1 bits in 100, 010, and 001).
g+rwx is a symbolic permissions string, specifying that the group (g) has read (r), write (w), and execute (x) permissions.

Whichever notation you use, remember that you're expressing the opposite of what you ultimately want, since the result of the test is negated by !.


I'm getting an error when I try to install the Amazon MP3 Downloader

The Amazon MP3 Downloader package is meant for use with 9.04 and depends on some packages that are now out of date. Fortunately, you can download the now-outdated libboost-filesystem1.34.1 from packages.ubuntu.com and install it by hand.

If the Amazon .deb gives you further dependency errors, I can help you find those packages as well.

I should mention that there are alternatives to the Amazon MP3 Downloader. Pymazon is an option, and there is now a Banshee extension to do the job.


Just open a terminal and execute : sudo rm /etc/apt/apt.conf.d/20auto-upgrades.ucf-dist
The command removes the unneeded file and the informational message will not appear any longer when you are running sudo apt update or when you install new software packages.


I have the same problem, I am using AMD Radeon GPU driver. For me purging of the newly installed driver worked.

Press

alt+ctrl+F3

Login with your username and password

Then try

sudo apt-get purge "fglrx.*"

Then remove your xorg.conf

sudo rm /etc/X11/xorg.conf

and reboot

sudo reboot

I hope this will solve the problem


Bash still exists - it's not the terminal emulator.

gnome-terminal is the one the versions are supposed to use for Ubuntu, however when that gets removed or such it's possible that xterm is used in place.

Make sure that gnome-terminal is installed.


Icons on Gnome-shell's top status bar getting drawn beyond normal

This is fixed with version 4. You should now update, preferably by using E.G.O. The problem is I set the icon size to be too big in stylesheet.css. If you'd like to modify it, you only need to change the height to 22, in both places. The new version 4 will be available on Github & E.G.O very soon, and fixes several problems.

For everyone with the problem, press Alt+F2 and enter the following:

gnomesu gedit .local/share/gnome-shell/extensions/show-desktop@l300lvl.tk/stylesheet.css

Then, find and change the 'height' to a lesser value like 20/18/16/14 and then Ctrl+S to save, Alt+F2 and r to restart the shell.


Ubuntu Server 14.04 on VirtualBox - GPG error NODATA (All Previous Threads Unhelpful)

After analyzing packet traffic and testing vBox settings for NAT, NAT Network, bridged adapter, Internal Network, Host-Only Adapter and Generic Adapter.

Using Bridged Adapter and pointing to my NIC (network interface card) (in the picture) eth0 was still holding the old NAT settings. Restarted OS, dhcp pulled the new Bridged Adapter Settings. Everything works now.

What I did:

Change Attached to: Bridged Adapter (in virtualbox)
Restart the Virtual Machine (vbox)
preferable using Ubuntu OS rather than a hard reset
root#WebServer:/home# shutdown -r now


Ubuntu 14.10 stuck in BIOS after clean install

This could be related to this bug. See also here.


I couldn't find up-to-date information on cpu-g. In the meantime you might want to try hardinfo which you can install with:

sudo apt install hardinfo

Then typing hardinfo in the terminal or calling from Dash (Alt+F2) the gui appears like this:

You can get most if not all the information you need from cpu-g plus a whole lot more information on your machine.


Make Linux and Windows share localhost (webserver) files and database

When I first did this I had a lot of problems getting my LAMP stack to play nice with my WAMP stack - I got a lot of "you're not allowed to access this" errors when I navigated to localhost.

I tried various apache virtual host configurations, none of which allowed me access to the files.

What worked was to use mount --bind to put my windows folders into the corresponding linux folders. If this works, you'll notice the default ubuntu landing page for localhost replaced with the "it works" from windows. Note that any linux files will be hidden by windows files with the same name.

I have an fstab entry that mounts my windows partition to /media/windows.

The solution was to

 Mount and Bind the files into the correct locations:

First, make an "upstart file" with these contents as mentioned here.

Run this in terminal:

gksu gedit /etc/init/mount-bind.conf

Paste this into it, changing the ... to the path to your htdocs. Obviously, test these commands in terminal to be sure you have the paths right. The linux file locations are the important bit.

#
# bind mounts
#

description "bind"

start on stopped mountall

script

   mount --bind '/media/windows/.../htdocs' /var/www/html
   mount --bind '/media/windows/ProgramData/MySQL/MySQL Server 5.5/data' /var/lib/mysql

end script

With these two commands I got close, but InnoDB was preventing mysql from starting. The problem is the InnoDB log file size check. An easy solution is to have one OS use a different log file than the other. Otherwise only the most recent os will start mysql. You could also delete the files every time you start or shutdown, but it's easier just to keep separate logs. They share changes just fine, just not log files.

 Change MySQL log file location

In Ubuntu, in /etc/mysql/my.cnf, add this line in the InnoDB section:

innodb_log_group_home_dir = /var/log/mysql

That solved it for me.

Caveat: linux is more "case-sensitivey" than windows. Where windows will happily go grab an image with different capitalization and serve it, linux won't. Of course, real web developers always are exact in their capitalization.


failure linking 32bit app using libexpat on Ubuntu 14.04 64bit

I was having the exact same issue on 64-bit linux.
It resolved by installing expat1-dev for 32-bit

Here is the command

sudo apt-get install libexpat1-dev:i386


If no MultiBit shortcut is created, you can run MultiBit manually as follows:
open a terminal window and 'cd' to your installation directory
type java -jar multibit-exe.jar

You should have seen the following screen:

This is where multibit gets installed.
Try typing:
java -jar ~/MultiBit-0.5.16/multibit-exe.jar

and should work, unless you changed the installation path.


Can I add a ppa to a custom sources.list?

You can add it to mysources.list so long as you put that file in /etc/apt/sources.list.d.

You can read more about how apt searches for sources with man sources.list.


Problem with 14.04 on Mid-2011 Macbook Pro 17

I got a GRUB boot instruction from here, but I can't test it. I don't think GRUB can resolve that, but there's no harm in trying:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i915.lvds_channel_mode=2 i915.modeset=1 i915.lvds_use_ssc=0"

You could also disable the GPU in the EFI. This thread should be helpful:
https://forums.macrumors.com/threads/force-2011-macbook-pro-8-2-with-failed-amd-gpu-to-always-use-intel-integrated-gpu-efi-variable-fix.2037591/

EDIT: there's apparently a GRUB patch for this particular case


Since you can't properly sudo at the moment, you can try using pkexec :

pkexec chmod 0440 /etc/sudoers


How can I prevent misplaced new windows -top bar is hiding- in a multi-monitor setup?

There have been problems reported where windows are cropped when the two monitors don't line up at the top:

To confirm they line up perfectly along the top use xrandr:

$ xrandr | grep " connected" | grep "+0"

HDMI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 1107mm x 623mm
DP-1-1 connected 3840x2160+1920+0 (normal left inverted right x axis y axis) 1600mm x 900mm

The +0 confirms both monitors are aligned to the top.


Is it possible to disable (freeze) a package?

Linux doesn't start applications you don't need and keep them in RAM like Android does so they can receive push messages and the like. So freezing packages is not necessary.

For many applications, if you don't start the application, it won't run. It will still get updates in case you want to use it.

If you are really inclined to get rid of a package, uninstalling it (and installing it as needed) is possible for non-essential applications, but as with other Linux distributions, packages on Ubuntu depend on other packages, and have other packages that depend on them, so when you install or remove a package, other packages may be automatically installed as dependencies (or replacements) or removed because they depend on the package you remove. Removing a package with many dependencies or that is essential for the system to run properly may break the system very severely. All this is handled by the package management system. To see what is going to happen when you run a particular install or remove command, use the -s or --simulate option in APT, for example

apt remove <package> -s

this will show what will be done without actually doing anything.

Some programs do run in the background as services though. In those cases, you can use the systemctl command (part of the interface of systemd to stop and disable them (disabling prevents the service from starting on boot). Once again, you need to be careful here, because services may also depend on each other and stopping or disabling an important service can have a negative impact on your system's functionality and stability. However, systemd will start services you have disabled if other services depend on them, so this is less breakable than package management.

Here are examples on how to stop, enable, disable and start services.

enabling a service:

Enabling a service does not start it automatically; you need to use start for that, or add the --now flag, or reboot your machine. to make it take effect.

sudo systemctl enable <service-name>

disabling a service:

Disabling a service does not make it stop immediately, you need to use stop for that, or add the --now flag, or reboot your machine.

sudo systemctl disable <service-name>

starting a service:

starting a service does not make it enabled by default (this is what the enable command is for) but it starts the service immediately if it can be started.

sudo systemctl start <service-name>

stopping a service:

stopping a service does not disable a service which was enabled but stops it for the time being until next reboot.

sudo systemctl stop <service-name>

restarting a service:

Restarts a service but like the start and stop commands does not affect whether the service will be loaded and started on boot (the behaviour controlled by the enable disable commands.

sudo systemctl restart <service-name>


remove your snap version slack, and install deb version slack. Some snap based Apps do not fully support Ibus.


Unable to clean sendmail/ssmtp output queue

Well, the message is probably not in the queue, as soon as ssmtp doesn't manage queues at all.

Maybe some applications tries to send a message one in a while, so you could try find that app and remove mail sending logic.
In my case I couldn't remember which app that was so I just uninstalled ssmpt from the system.


Can someone help me install this program onto Ubuntu?

As your software is for Windows only, you need a Compatibility Layer.

On their website, they say they tested it with Mono on Mac OS X. You may be also able to use it on Linux.

The easiest way to do this is to install PlayOnLinux (via the USC or sudo apt-get install playonlinux). PlayOnLinux is a GUI Frontend for the compatibility layer Wine (http://www.winehq.org). Wine itself will download and setup Mono, if needed, as in your case, but Wine provides additional libraries that may be needed to use certain programs.

Install PlayOnLinux and open it.
Install the latest Wine version (Tools -> Manage Wine versions)
Afterwards click Install in the main window.
Hit the install software that is not listed in the bottom left corner of the new window.
Keep the default settings in the wizard and give the path to the Windows Installer (Setup.exe, Setup.msi, whatever)
Wait for the program to install, then create a shortcut of the executable
Finish and run the program.

I hope it works. If not, ask for help.


How to create backup CDs of my audio CD collection from the command line?

dd if=/dev/cdrom of=/path/to/imagename.iso bs=2048

The above command will make a burnable ISO image of whatever is in your optical drive.


I usually create a white rectangle which I put in the background of my graphic. You can put this to a seperate layer if you like, so that you don't interfere with it when editing the other stuff.

You can also change the Background color in the "File" -> "Document Properties" dialog (on the first tab, named "Page")

but I like the rectangle method more, because sometimes I like to keep parts transparent and I feel it makes me more flexible.


wakeonlan and/or etherwake WITHOUT sudo?

There are a few ways to use sudo from php as this article relates:

Granting sudo to PHP Script For Running Shell Commands

Before doing this remember the article's warning:

  Giving sudo to PHP is one of the several ways to execute a shell
  command from a web interface. It is probably not one of the most
  secure methods, so I recommend not doing this on a server which has
  outside (WAN) internet access because of the possibility of malicious
  code being executed. A person with ill intent could then access your
  entire network, including any shared files, network attached storage,
  etc. You need to be careful with this.

Add user to /etc/sudoers file

The article above describes how to setup a user with sudo access not needing a password. This Q&A gives other examples:

How do I run specific sudo commands without a password?


How do I deactivate At1lc driver after install of Alx driver? (replacement)

Put it on the modprobe blacklist.

sudo nano /etc/modprobe.d/blacklist.conf

add a line like this

blacklist moduleName

in your case

blacklist atl1c


armhf is an architecture used mostly in mobile devices and netbooks. Its more common name is ARM, or the Acorn RISC (reduced instruction set computing) Machine (see here for more information). Some packages that are not multi-arch will not install properly, whether they are i386 or not.

Side note: amd64 architecture can most of the time install and run i386 architecture programs.


How can I copy or move images from thousands of folders into one folder?

This is a Very Bad Idea.

However, assuming that your image names are unique (although duplicates will be handled by using mv --backups-numbered), and all your image-containing directories are under a directory called $HOME/source, and contain ONLY images (no files that should not be moved), and the the filenames might contain silly characters, and that the destination is $HOME/destination, then...

First read man find, man xargs and man mv. Then a simple

find $HOME/source -type f -print0 |\
    xargs -0 --no-run-if-empty mv --target-directory=$HOME/destination/ --backup=numbered

Reread man find, man xargs and man mv for detailed explanation.

After this finishes, you'll be left with a whole lot of empty directories under $HOME/source, which can be removed with

find $HOME/source -depth -type d -print0 | xargs -0 --no-run-if-empty rmdir

Read man rmdir.


I found the solution:

sudo apt-get install libgtk2.0-0


How to install libjawt.so in ubuntu 14.10

http://pedroalves-bi.blogspot.com/2014/05/setting-up-webex-on-ubuntu-1404-64-bits.html says that libjawt.so really is not required for webex to be running successfully and I can confirm that as for my Debian 8 host.

I was not able to discover a package which would install the file on place where it would be discovered by dynamic linker.

I've tried to create a symlink, but that's a hack and as we can see is not really required.


It just means that you're connected to their 3G/4G network on your computer and you should be able to access the internet through your phone.

Be careful though! This takes up a load of data!


Libgdx, gradle integration, drag and drop

If you hover the cursor over the install icon you'll see the following tool-tip (black box):

So all you have to do is open an eclipse instance, then drag & drop the icon to the workspace.

If the above method doesn't work you can install it through the eclipse marketplace. Open an eclipse instance, then from menu click Help and select Eclipse Marketplace...

Wait a few moments for eclipse to contact the marketplace. Type gradle in the search field (1) then click Go (2) or hit Enter and wait a few moments for the results. Once the search is complete, click Install (3) and wait for the process to complete.


Try reinstalling Ubuntu 15.10 with a live USB. Make sure to back up your important data.

The cause may be due to apps that only work w/ 14.04, or it may be because you didn't update to 14.10 first and because of that some things were not added in the process of upgrading since some important files were not in the system. The upgrader probably assumed you had those files. Another reson could be that your system is encrypted and it couldn't even add files to the system.


Re: LUBUNTU Disco Dingo - Is there an easy way to adjust volume with mouse-wheel

If I hover my mouse over the Volume Control panel applet, my mouse-wheel adjusts the volume higher or lower. If I click the mouse-wheel, the volume mutes & un-mutes.

or from the Lubuntu manual

  In the system tray there there are multiple widgets. With the volume
  applet you can change the volume by using the mouse-wheel with the
  mouse over the speaker icon or left click the speaker icon and drag
  the volume up and down. To mute the volume with the button at the
  bottom of the volume meter or middle click on the volume applet.

https://manual.lubuntu.me/stable/5/5.1/lxqt-panel.html?highlight=volume

I tested this and it works in both Lubuntu 19.04 & 19.10.


How should I format a SD Card for Panasonic Lumix DMC-TZ41?

Reapeatedly inserting it helped. After ~5 times the camera offered to format the card.

The folder structure is as follows:

.
├── DCIM
│   └── 109_PANA
│       └── P1090748.JPG
├── MISC
└── PRIVATE
    ├── AVCHD
    │   ├── AVCHDTN
    │   │   ├── THUMB.TDT
    │   │   └── THUMB.TID
    │   └── BDMV
    │       ├── CLIPINF
    │       ├── INDEX.BDM
    │       ├── MOVIEOBJ.BDM
    │       ├── PLAYLIST
    │       └── STREAM
    └── FILEMNG.DAT

It is formatted with exfat. 16.00 MiB at the beginning are not allocated.


Upgraded from 16.04 to 18.04; KAlarm no longer working

It turns out that, if I do install Akonadi Console from the Ubuntu software distribution, then KAlarm does work. I tested it with an tiny alarm set for five minutes from its input, and that works.  However, although all my previously inputted alarms show up, all their times are "never".  It did not seem possible to simply edit them to put in the times they are to go off.  So, I ended up having to laboriously delete each alarm and re-entering it (with ) with desired start times and adjustment of recurrences.

One thing I don't know how to fix still is my recurring script executions.  It seems the configuration file for KAlarm (where is it?) needs to be told where to find the terminal for running the "home/silbar/***.script".

Note added: I was not able to find that configuration file either on my computer or on the web, even though the kde.org people have a web page entitled "Chapter 3. Configuring KAlarm". I now run the script with an entry in the crontab.


20.04: Can't install gtk-recordmydesktop

It is because of it is obsoleted and currently not supported. You could install it by enabling some older repository (deb http://cz.archive.ubuntu.com/ubuntu eoan main universe for example) which contain it or download its packages from there. Enabling other ubuntu version repository should be immediately disabled just after installing. But it is a bad way which could break your system. Better use newer supported software.
Vokoscreen records a desktop, a window and an area:
sudo apt install vokoscreen

Or use vokoscreenNG:
sudo apt install vokoscreen-ng


What happened with message notifications from Empathy?

I believe this is related to this bug.

I enabled empathy notifications by whitelisting the Empathy application.  This is not exactly restoring 11.04 behavior but it is a workaround until the bug is fixed.

Here is how to accomplish this:

~ $ gsettings get com.canonical.Unity.Panel systray-whitelist
['JavaEmbeddedFrame', 'Mumble', 'Wine', 'hp-systray', 'Dropbox', 'scp-dbus-service', 'Skype']
~ $ gsettings set com.canonical.Unity.Panel systray-whitelist "['JavaEmbeddedFrame', 'Mumble', 'Wine', 'hp-systray', 'Dropbox', 'scp-dbus-service', 'Skype', 'empathy']"

Your initial list may look different than mine.  Take note of the double quotes around the output list when passed as input as well as the new entry for empathy.

You will need to log out and login again for the changes to take effect.

Note: This is not ideal.  On my box, when the old notification area blinks, it looks like it's missing the correct icon, but at least I know I have messages waiting.  I am going to leave mine like this until they get Empathy working with the new notification area.


Compressing part of filesystem a second time

I believe one needs to simply make a new SquashFS volume with the new files.

https://unix.stackexchange.com/questions/8907/modifying-a-squashfs


I'm having trouble starting Steam, could someone help?

You could try this.

 install wine proabaly

and enter this in the terminal:

 sudo apt-get update
 sudo apt-get install wine
 sudo apt-get install wine1.7 winetricks

and when it show the screen push enter, and it might work fine this way


Nvidia driver updates still showing nvidia-331

The nvidia-331 packages are left for compatibility only, they just pull nvidia-340 packages.

You have nvidia-340 installed. There is nothing to worry about.


Application autostart after system boot for a random interval

I don't know why you want it, but you can do what you want with the following bash script:

#!/bin/bash
interval=$(( ($RANDOM % 5) + 1))
sleep ${interval}m
(pidgin) &
exit

It picks a number 1-5 and then sleeps for that many minutes, then starts pidgin in the background and exits the script.


Auto switch keyboard layout to match input language in Ubuntu 16

There is a relatively convenient option that allows one to choose a keyboard from the main desktop menu:

https://help.ubuntu.com/stable/ubuntu-help/keyboard-layouts.html

It doesn't translate typing, but if you set a keyboard layout to another style, keys will automatically be re-mapped.

The "Keyboard Layout Chart" in the same menu will show how characters are mapped to each key.


Problems starting VMware Workstation 11 on Ubuntu 16.04 after upgrade from 14.04

After doing a big amount of tests including uninstall & reinstall ,removing preferences and rebuilding modules i found the following solution.

Temporary

export LD_LIBRARY_PATH=/usr/lib/vmware/lib/libglibmm-2.4.so.1/:$LD_LIBRARY_PATH

Permanent

echo /usr/lib/vmware/lib/libglibmm-2.4.so.1 | sudo tee -a /etc/ld.so.conf.d/LD_LIBRARY_PATH.conf
sudo ldconfig

As a result i am again able to start vmware by

vmware

UPDATE:

Please see the answer of @Michael Firth as it might be a better/cleaner approach.


Difference between /etc/security/pam_env.conf and /etc/environment + making sudo read pam_env.conf

There are 2 fundamental differences between /etc/security/pam_env.conf and /etc/environment.

The order in which PAM processes them.

/etc/environment is parsed first, but anything defined here is overridden by definitions for those same variables if they also exist in pam_env.conf.
However, it's possible to subsume + extend the variables from /etc/environment in /etc/security/pam_env.conf, e.g.:

/etc/security/pam_env.conf

PATH   DEFAULT=${PATH}:/usr/sbin

Variable expansion

a.  /etc/environment is not a script, but a set of assignment expressions, i.e. ${PATH} is not expanded, but used literally.

b.  /etc/security/pam_env.conf is a different animal altogether.  It's not a script per se; it's still just a set of KEY=VALUE assignments, but PAM can expand existing variables (ex: ${PATH}, ${DISPLAY}) and other PAM_ITEMs (ex: @{PAM_SERVICE}, @{PAM_USER}, etc.).  Take special note of $ vs @ here.

PAM also handles the special variables @{HOME} and @{SHELL}, which expand to whatever is defined in /etc/passwd. *Note: in most PAM applications, the traditional variables ${HOME} and ${SHELL} (compare @ vs $) are not available this early in PAM's flow.

Using the example given in the comments of /etc/security/pam_env.conf, this replacing/expanding behavior can be used to modify the DISPLAY variable for remote login sessions.

/etc/security/pam_env.conf
REMOTE_HOST     DEFAULT=localhost           OVERRIDE=@{PAM_RHOST}
DISPLAY         DEFAULT=${REMOTE_HOST}:0.0  OVERRIDE=${DISPLAY}

To the specific problem you described here, the values you configured in /etc/environment weren't available in the sudo temporary environment because the session facility given by the PAM application definition for /etc/pam.d/sudo never calls pam_env.so for sessions.

In /etc/pam.d/sudo, sessions only import the rules from /etc/pam.d/system-auth.  Following the trail, in /etc/pam.d/system-auth, the session stack doesn't have an entry for pam_env.so.

There are a few ways to customize the variables available in a sudo environment.

If you need some custom set of environment variables that only exist in sudo-land, it's fairly straightforward.

Create a file to contain your exclusive-to-sudo environment variables.

/etc/security/sudo_custom_vars.conf
GREET   DEFAULT="hello from sudo land"
VAR1    DEFAULT="${GREET}"
_VAR2   DEFAULT="VAR2 not passed to sudo, ...but"
VAR2    DEFAULT="${_VAR2} ${GREET}"                 OVERRIDE=${VAR2}
VAR3    DEFAULT="Nope. Unknown users cannot sudo."  OVERRIDE=@{PAM_RUSER}
...

Make a copy of /etc/pam.d/system-auth, rename it along the lines of /etc/pam.d/sudo-environment, and add a directive to the bottom of the session stack:

session     required    pam_unix.so
session     optional    pam_permit.so
# Add a line for using pam_env.so
session     optional    pam_env.so conffile=/etc/security/sudo_custom_vars.conf

If you want pass variables from the non-sudo environment, include the user_readenv=1 flag

session     optional    pam_env.so      conffile=/etc/security/sudo_custom_vars.conf    user_readenv=1

In the PAM application definition /etc/pam.d/sudo, make the replacement:

-   session    include       system-auth
+   session    include       sudo-environment

Open a new terminal to test

$ su <your username>                    # Testing PAM without logging out
$ export VAR1=""
$ export VAR2="hello from down here"    # Set var in non-sudo environment

$ echo $VAR1
<nothing>
$ sudo sh -c 'echo $VAR1'               # Test sudo's DEFAULT value
hello from sudo land

$ echo $VAR2
hello from down here
$ sudo sh -c 'echo $VAR2'               # VAR2 not passed to sudo
VAR2 not passed to sudo, ...but hello from sudo land
$ sudo -E su -c 'echo $VAR2'            # VAR2 (and everything else) passed to sudo
hello from down here
$ sudo env VAR2="inline override" su -c 'echo $VAR2'
inline override

$ sudo sh -c 'echo $VAR3'               # Testing we can read a PAM_ITEM
aaron

An alternative to tinkering around with the PAM modules is to edit /etc/sudoers with # visudo, as you did.  I realize this is an old question and way-back-when, commenting Default env_reset was the the thing to do.

Moving forward, the accepted best practice when using sudoers to pull in variable definitions from the environment is to append the variables to env_keep.  (...that is, unless you need a unique set of variables as shown above)

    /etc/sudoers
    Defaults env_keep += "var1 var2, etc..."


You can reduce the number of installed packages by providing --no-install-recommends:
sudo apt-get install npm --no-install-recommends

Comparison for minimal 20.04 LTS system:

sudo apt-get install npm

0 upgraded, 516 newly installed, 0 to remove and 0 not upgraded.

sudo apt-get install npm --no-install-recommends

0 upgraded, 313 newly installed, 0 to remove and 0 not upgraded.


Unable to mount my Nexus 4 as USB mass storage on Xubuntu 16.04 via MTP or otherwise

Well, I recommend to upgrade you Linux Kernal to Kernal 4.6.4 and install adb tools.
Ugrading kernal can be found in this blog Click here.
Install Adb tools as follows :

sudo add-apt-repository ppa:phablet-team/tools
sudo apt-get update
sudo apt-get install android-tools-adb android-tools-fastboot
sudo reboot

The above steps should solve your problem.


What tools and techniques can I use to make GTK themes?

There is the widget laboratory from one of my cohorts, Isaiah Heyer. That may be of use to you.


Nevernote is an open source clone of Evernote. The program, coded in Java, is able to run on Linux, Windows, and OS-X, but the primary goal is to provide a Linux client.

Nevernote was recently renamed to NixNote and comes in .deb packages for both 32 bit and 64 bit systems, available on the developer’s website.

http://nevernote.sourceforge.net/


Peerguardian Error "Could not use either kdesu(do) or gksu(do) to execute the command requested"

From the terminal do:

sudo apt-get install gksu

Then:

gksu-properties

in the window that opens change authentication mode to sudo.

Now it should work.


Should I be using a different strategy than "SetEnv" for setting apache environment vars on 18.04?

Hi no sure that do the trick but you can add some alias inside your profile or bashrc.

for exemple :

sudo nano ~/.bashrc

Create your alias : at the end of the file

# MYSQL SITE X
alias DB_NAME='maps_data'
alias DB_USER='chicommons'
alias DB_PASS='ChiCommons1$'
alias DB_SERVICE='localhost'
alias DB_PORT='3306'

Apply this new bashrc directives.

source ~/.bashrc

best regards


System won't boot / black screen after upgrade to 15.04, macbook pro 11,5

I managed to resolve this issue myself.

Firstly, the upgrade that was supposed to be to 15.04 actually only took me to 10.1. Presumably something baulked half way through.

I realised I could actually log in to command line with ctrl+alt+f1 – all the programs seemed to run fine, just not unity / compiz.

This little gem fixed the issue:

rm -rf .compiz-1

I got it here: upgraded to 14.10 and no unity no dash


Laptop brightness too low on Ubuntu 14.10

I found a post in the Arch Linux forums, that suggests the following kernel parameter for the Lenovo Ideapad Z500:

acpi_backlight=vendor

Please try this and give feedback if this solved your issue.

Related:

How do I add a kernel boot parameter?
Ubuntu 14.04 brightness problem (Lenovo Z500)


Snap packages are not the same as debs, and do not have "source" packages. They are also generally meant to include all their dependencies, rather than relying on package dependencies to provide them.

You can however, browse the Snap Store to find apps, and in the app details page, the Developer website link may point to a repository containing the snapcraft.yaml file from which the snap was built.


Is it possible to run next PS3 case from previous case?

What you're looking for is called "fall-through", and in bash's case statements, fall-through is done using ;& instead of ;;. However, you can't conditionally fall-through (that is, you can't insert a ;& in the middle of an if block). I suggest that you fall-through always, and continue if the code executed successfully:

case $opt in
"Option one")
# few lines of code
if [ "check that code did everything it was supposed to do" ]
then
    echo "Completed"
    continue
else
    echo "Something went wrong"
fi
;&

"Option two")
# more code
;;
esac


How can I update the development version Google Chrome?

Google Chrome in updated in Ubuntu via normal system update.
The Unstable channel is actually the DEV Channel of Google Chrome.

Go to System -> Administration -> Update Manager and update your system and the Google Chrome would be updated to latest DEV release.

Or to selectively upgrade Google Chrome, run this command from the terminal:

sudo apt-get upgrade google-chrome-unstable


Install python packages for specific python version

Use apt-file to find out the package name. For example if you want to install the right version of reportlab use:

apt-file -l search reportlab

On my system this produces:

gambas3-gb-report
python-mvpa2
python-pdfrw
python-pisa
python-renderpm
python-renderpm-dbg
python-reportlab
python-reportlab-accel
python-reportlab-accel-dbg
python-reportlab-doc
python3-renderpm
python3-renderpm-dbg
python3-reportlab
python3-reportlab-accel
python3-reportlab-accel-dbg

It is fair to assume that package python-reportlab is the 2.7 version and package python3-reportlab is the python 3.x version. If however you want to check that further you can use dpkg -L python-reportlab — this will list the package contents and you will see that the files are in /usr/lib/python2.7.

Unfortunately the dpkg -L works only on installed packages so if you want to check it before you install the package you will have to use the Ubuntu packages web interface. Once you open a package details page you can click on list of files and find out whether the files are in /usr/lib/python2.7 or in /usr/lib/python3.


Re-map Alt+drag in Unity. I need it for Inkscape

It seems to me its related to compiz, not Unity.
However, install compizconfig:

sudo apt-get install compizconfig-settings-manager

then launch it and search "move window", you'll find the shortkey alt<button1> and change it.


Your setup is a bit confused. It might be made to work, but is a bit sub-optimal, at best. Specifically:

You have a BIOS/CSM/legacy-mode GRUB installation. This creates any number of potential problems; see this page of mine for details.
There's no evidence of an EFI/UEFI-mode GRUB installation on your computer. Thus, the only way you'll boot the computer in its current state is in BIOS mode. To boot in EFI mode, you must install an EFI boot loader. Boot Repair should be able to do this.
Your partitions aren't optimally sized....

Your ESP (/dev/sda1) is 237 MiB. Although this is big enough to hold the necessary files, some EFIs have buggy FAT drivers that cause them to behave strangely with FAT32 partitions under 512 MiB; and some EFIs have problems with FAT16. Thus, I recommend making the ESP 550 MiB in size. (That's big enough to work around MB-vs-MiB confusion and to ensure that mkdosfs creates a FAT32 filesystem by default.) Note also that an ESP is unnecessary if you boot in BIOS mode.
Your BIOS Boot Partition (/dev/sda5) is grossly oversized. It's 200 MiB in size, but 1 MiB is normally adequate. (I've seen some reports of cases where it must be 2 MiB, but these seem to be quite rare.) This isn't really causing any problems except for the wasted disk space. Note also that this partition is unnecessary if you boot in EFI mode; it's used only by the BIOS-mode version of GRUB.
You've got 14.66 GiB of unallocated disk space. If you intend to use that for something, then fine; but if it's an oversight, you might want to correct it before going any further.

Your Boot Repair output indicates that the tool booted in EFI mode, which is usually best for an EFI-based computer; but as noted earlier, you have only a BIOS-mode GRUB, which indicates you installed Ubuntu in BIOS mode. If you want to boot with the current boot loader, you must re-enable BIOS/CSM/legacy support in your firmware, and perhaps tweak your boot order settings; but if you want to boot in EFI/UEFI mode, you should use Boot Repair in its current EFI-mode boot or some other tool to install an EFI-mode boot loader -- or start over from scratch (see below).
Your root (/) partition is /dev/sda2, which is 325.96 GiB in size. Given that you've got a separate /home partition, chances are your root (/) partition is oversized. Normally, 30 GiB or so is plenty for a root (/) partition if you have a separate /home. There are exceptions to this rule, though, such as if you'll be running a server that stores lots of stuff in /var (or anywhere other than /home). The system on which I'm typing this has a 45 GiB root (/) partition, of which 30 GiB is used. I have a lot of kernel source code in /usr/src, though, so I have more in / than most do. (I've also got a separate /home.) If you're experienced enough to know that you really need an over-300 GiB /, then fine; but if not, you may want to cut it back significantly and put the space in /home.

Given that this is a new installation, you might want to start over again. I recommend disabling BIOS/CSM/legacy support and double-checking that you've booted the installer in EFI mode. (Do this by launching in "try before installing" mode and opening a Terminal window. Use that to look for a directory called /sys/firmware/efi. If it's present, you've booted in EFI mode; if it's absent, you've booted in BIOS mode. To install, click the installer icon or type ubiquity in the Terminal.) You can then delete the current partitions, create a more optimized set of partitions (with different sizes, as noted above, and omitting the BIOS Boot Partition), and re-install.


Recommendation for installing Ubuntu (or variant) on old hardware like HP Omnibook XE3

if your ram is less than 1Gb use lubuntu (lightweight Ubuntu) ,you can find and download any version of Ubuntu in the Official Sites : http://www.ubuntu.com/ - http://www.lubuntu.net/ and so on ... (Ubuntu Gnome - edubuntu...) they are very user friendly sites and you can find anything you want to know about the Ubuntu os there.


trying to install compat-wireless-3.6.8-1.tar.gz


How can I forbid deletion of Windows files when using edubuntu USB live?

Since this would imply dropping sudo rights for the students anyway, a quick workaround could be this one:

Boot from the Live USB
Make sure all the partitions you don't want the student to access are mounted
Open Terminal with Ctrl+Alt+T
Change the ubuntu user's password: run passwd, hit Enter, type a password, type the password again and hit Enter
Close the terminal: run exit
Start the Guest user's session

This way being the partitions mounted in the ubuntu user's session there's no way for them to be mounted on the Guest user's session as well (unless by switching back to the ubuntu user's session in order to unmount them, which can't be done without knowing the password).


Problems with RVM and Rails when creating new app

This question could be transferred in www.stackoverflow.com

You probably have another rails app in /home/novito/Projectes/ folder.

Check the answer here (I don't know if it's related): https://stackoverflow.com/questions/3865515/strange-inability-to-require-config-boot-after-upgrading-to-ruby-1-9-2

I don't use ruby/rails, but if the above doesn't work, I think you need to reinstall the ruby version you downloaded with rvm: http://beginrescueend.com/

rvm implode
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
rvm requirements # Find the requirements (follow the instructions)
rvm install 1.9.3 # Change 1.9.3 with your version

More on rvm (check out "Basics"): http://beginrescueend.com/rvm/

Then try again:

reset
mkdir -p /home/novito/Projectes/mynewrailapp
which ruby #check you are using the correct version of ruby
which rails #check you are using the correct version of rails
rails new myapp /home/novito/Projectes/mynewrailapp


There are two types of "fast boot" options:

In Windows -- This option, generally called Fast Startup, Hybrid Boot, or Hybrid Shutdown, turns a shutdown operation into a suspend-to-disk operation. As such, it leaves filesystems in an inconsistent state, which means that they will be, at best, ignored by Linux or other OSes. At worst, they'll be mounted and damaged. This makes it imperative that this Windows feature be disabled in any dual-boot scenario. Note that one of the partitions that can be affected by this is the EFI System Partition (ESP), which holds boot loaders. Thus, you can encounter boot weirdness if you don't disable this feature. See here, among other places, for information on how to disable this feature.
In the firmware -- Many EFIs include a "fast boot" option. When enabled, this feature causes the firmware to take shortcuts in the system's early power-up steps. For instance, USB devices other than keyboards and mice may be left uninitialized. This feature is generally harmless from a Linux perspective, except that you may need to disable it to get a Linux installation medium recognized. On occasion, though, the initialization shortcuts may cause devices to malfunction in Linux. The naming of this feature varies greatly from one firmware to another, so it's impossible to tell you precisely where it is or what it's called. Some EFIs don't even have such a feature.

If Windows was installed in EFI/UEFI mode, it's impossible to boot it in BIOS/CSM/legacy mode -- at least, not without converting the partition table from GPT to MBR and installing a BIOS-mode boot loader. I don't know of any site that documents the precise procedure for doing this conversion. Personally, I wouldn't try without some very compelling reason. It's almost always better to install Linux in EFI/UEFI mode. See my Web page on this topic or the Ubuntu community wiki on the subject for more on how to install in EFI mode.


Kubuntu 14.04 freezing on MacBook Pro 6,2, not booting ldm

Make sure you're using a .img file and not an .iso file.

Look at this if it helps: Install Linux on a MacBook Pro


Try ubuntu and leave the password blank. That is the default on live systems. However, live systems don't normally require you to login, so you might have another issue.


Cannot "cd" or change directory using bash script in WSL

It's because you have created your script in a windows machine, some \r (carriage return) has been added at the end of each line.

Remove them like this:

tr -d '\r' < test.sh > new-test.sh

Also quote the variable's value:

cd "$dir"

then run your script:

./new-test.sh

As a hint it's also better to use:

 cd ... || exit

in case of any failure.

Configure your editor so it uses Linux format for saving files (If it's capable of) or use an editor in bash like nano:


Mounting Flash Drive to Compile C++ Programs

Read this article if you are unfamiliar with mounting filesytems in linux.

In Linux, if you, or any other program (CodeBlocks in this case) has to run a file, the file should have executable permissions. These functionalities are not supported by the fat32 filesystem. Normally if it was a filesystem that supports this feature, you could have give the file executable permission by using chmod (do a man chmod to know more about it).

But in your case, since it is FAT32, you will have mount the partition manually allowing programs to be run from the flash drives.

We need to first unmount the partition:

sudo umount /path/to/mount/point

Then we remount the partition again:

sudo mount -t vfat -o rw,auto,user,fmask=0022,dmask=0000 /dev/sdx1 /path/to/mount/point

where /dev/sdx1 refers to the partition you want to mount and /path/to/mount/point refers to the folder to which you want to mount it.

You can get information about the devices that are currently mounted by typing mount in the terminal. The mount command will give you the path/to/mount/point and also the partition you now have to mount (/dev/sdx1).

In the output of mount, a line starting with /dev/sdb1 on /boot ... indicates that the partition /dev/sdb1 is mounted at /boot (mount point).


Cannot execute shell /bin/zsh when execute a shell command in vi

set default shell in vim

:set shell=/bin/bash

Thanks to Ubuntu Forum


./openmw-launcher.i686: error while loading shared libraries: libQtGui.so.4: cannot open shared object file: No such file or directory

If you have 32-bit openmw on 64-bit OS, then it seems you should install 32-bit Qt-library with

sudo apt-get install libqtgui4:i386

Also I'm sorry, but Ubuntu packages have openmw* packages in repositories.

You can install them with

sudo apt-get install openmw-launcher


Remove wifi network from Network-Manager "never" connected

Solution

nmcli --fields UUID,TIMESTAMP-REAL con list | grep never |  awk '{print $1}' | while read line; do nmcli con delete uuid  $line;    done

On newer Ubuntu  (15.10) use this command:

nmcli --fields UUID,TIMESTAMP-REAL con show | grep never |  awk '{print $1}' | while read line; do nmcli con delete uuid  $line;    done

It will be possibe also to use TIMESTAMP field to know how many day/month are passed from last connection, like for example we want to remove connection older than 1 year


I also had the same problem. you can use the older version of robomongo instead of robomongo 3T (download older version).

There not much huge difference between these version.


What's the deal with the "." and ".." in the directories?

If Nautilus shows nothing and ls -a only shows . and .., then there is nothing in that directory.

Directory . represents the current directory, it is a way to reference files and directories using a relative path. E.g. ./subdir1/subdir2/somefile

When you give the command ls, under the hood this is translated into ls .

The same is true for .., it is a way to reference the parent directory. E.g. ../../etc/cron.d.


Davicom DM9601 USB LAN NIC Ubuntu 11.10 issue

Pre-Requirements

You will need the build-essential and linux-headers-generic packages to install. If you do not have these packages, you can find them on packages.ubuntu.com, download the *.deb files and manually install them.

linux-headers-generic is a virtual packages that installs the correct headers for the current kernel you're running. You can find that out by typing uname -r in the terminal. Mine is 3.0.0-17-generic. That means what I should really download is the linux-headers-3.0.0-17-generic package. Once you have your ethernet work, apt-get install linux-kernel-headers so you always have the correct headers.

The build-essential package has a lot of dependancies, and when you attempt to install the .deb file it will tell you what is missing. Go back to packages.ubuntu.com and download all of the *.debs for the packages it complains about.

If you're running Ubuntu, *.deb files can be installed by double clicking on them. On Kubuntu, you need to right click and choose the install option.

Build the module
Goto Davicom's website and download the LINUX Driver to your home folder.
Open up the Terminal and type tar -xzvf dm9601-Linux2.6_1_1 to extract it.
Type cd dm9601 to enter the newly created folder.
Type gedit dm9601.c to edit the broken source file.
Change #include <linux/config.h> to #include <linux/configfs.h>
Save the file and close gedit.
Type make to build the module.

Ok, now you've built the module. At this point we can test it. With your Davicom USB adapter plugged in, type sudo insmod dm9601.ko to temporarily insert the module. If everything works, we need to make this module insert automatically on bootup.

Insert the module on bootup
Type sudo cp dm9601.ko /lib/modules/$(uname -r)/kernel/ubuntu/net/
type sudo gedit /etc/modules
Add dm9601 on it's own line at the end of the file
Save and exit gedit.

Your module should now work on reboot. Congratulations! You will need to repeat steps 2,3 & 7 from the Build stage and step 1 from the Insert stage whenever you install a kernel update.

Troubleshooting
If insmod failed to work, you probably need to add your USB device ID to the header file.

Type 'lsmod' and look for a line that belongs to your Davicom USB adapter. It should look similar to "Bus 001 Device 006: ID 0a46:9555 Davicom Semiconductor, Inc." If you have doubt, unplug all other USB devices and find the only line that doesn't have "0000:0000".

For the example above, type gedit dm9601.h and insert 2 lines that look like:

DM9601_DEV( "Davicom Semiconductor, Inc", VENDOR_ACCTON, 0x0a46, 0x9555,
                DEFAULT_GPIO_RESET )

Your module source code is now configured to recognize your module. Continue from Step 6 in the Build stage of the instructions.


Can I use Pitivi to trim a video, without re-encoding it?

PiTiVi is a Non-Linear video editor first and foremost, and so it doesn't have a "copy" mode.

You have probably noticed that Avidemux has several "modes" of work. Cutting/splitting videos without re-encoding can only be done in "Copy" mode.
It also means that no video filters can be applied.

The "Copy" mode works by copying the raw compressed video from the original file (container) into the new file (container). That's why you can't use video filters in this mode.
You might have noticed that this cutting doesn't actually work always with exact precision. Effectively, "Copy" mode can only split on keyframes, and that means that unless you chose a keyframe to split on, your resulting video will have a few more frames than what you intended.
Usually too few to notice, but they are there anyway.
However, with some specific codecs, Avidemux can do "Smartcopy" as explained here on the website

  If your file uses MSMPEG-4 (DivX ;-) 3) or MPEG-4 video, you can use smart copy mode. Smart copy will leave most frames unchanged, but re-encode the part that lost its reference images with a fixed quantizer. So in our example, frames ab and nop would remain unchanged, while frames jkl would be re-encoded to use a different reference frame. Smart copy will ask you for a value for the quantizer to use – 4 or 5 is generally OK.

So you still get some video re-encoding, though minimal.

PiTiVi is a Non-Linear video editor first and foremost, and so it doesn't have a "copy" mode, which would prevent any track-mixing and any video effects. Which I think is good, because people would turn it on, and you would get complaints that the video effects don't work :)


What is the good way to remove SDK and other soft?

To uninstall APP SDK components on linux systems:

Delete the directory pointed to the AMDAPPSDKROOT environment variable.
Remove the AMDAPPSDKROOT and LD_LIBRARY_PATH environment variables.
Delete the amdocl[32]64].so from /etc/OpenCL/vendors.
Manually remove temporary and new files created with OpenCL.

Unless otherwise modified at install, the main files would have been installed to /opt/AMDAPP.

Source: AMD APP SDK v2.9 Installation Notes


How can I determine why sublime-text 2 will no longer start for me?

I believe this is a fix of the sublime-won't-start problem: link.

Basically what it does is - it reverts the Sublime to its initial state by removing your data (and configuration) folder, which is in one of the following paths, depending on your operating system:

OS X: ~/Library/Application Support/Sublime Text 2
Windows: %APPDATA%\Sublime Text 2
Linux: ~/.config/sublime-text-2

So you just exit Sublime editor, delete the data folder  (or back it up somewhere, for future needs) and then restart Sublime.

That will make Sublime work again - so then you can try redoing your steps and see what actually went wrong. At least it worked that way for me.


Ubuntu iso-file version verification not working

Seems like doing a manual check worked, using terminal command

sha256sum ubuntu-16.04.2-desktop-amd64.iso

The hash matched.


Operation on one disk overloads other disks

Most likely the disks are all on the same controller and the controller is the bottleneck.  That is to say, there is a limit to the throughput of the sum total of io to all of the disks, so when you start using one heavily, there is less available to the others.


Insert your Ubuntu CD in CD/DVD rider and start installation. Select the second hard drive for installation. It should be named something like 'sdb1' , because main hard drive is generally named sda1.
The process is easy, just give it a try.
If any difficulty arises post it here again. We will be happy to help.