IP Table rules to swap traffic on two interfaces

I may be wrong but it sounds as if you're trying to locally route remote VPN clients' traffic among each other and other hosts on the VLAN.

If so, then because you're trying to route traffic, routing must be enabled.  So, unless it's already been done, edit /etc/sysctl.conf and add or uncomment the following line:

net.ipv4.ip_forward=1

Then either reboot or run:

sudo sysctl -p

Second, the INPUT and OUTPUT chains are only for packets destined for a local process or socket (meaning the host), and not for packets destined for another system.  For the latter, use the FORWARD chain.  Also, the filter table is likely a better location than mangle.

Third, -j may be better than -g for your case.

I haven't tested this, and can't intelligently comment on whether implementing a TUN interface might be a better approach, but to forward packets from tap to vlan.202 I might suggest:

iptables -A FORWARD -i tap -o vlan.202 -j ACCEPT

To go the other way:

iptables -A FORWARD -i vlan.202 -o tap -j ACCEPT

To route packets among systems on the vlan (if not otherwise accomplished):

iptables -A FORWARD -i vlan.202 -o vlan.202 -j ACCEPT

To route packets among systems on tap (again, if not otherwise accomplished):

iptables -A FORWARD -i tap -o tap -j ACCEPT

You can refine these rules by source, destination, protocol, and port, of course.

Also, these rules will not persist through a reboot, so you'll need to use iptables-save and iptables-restore in startup scripts, or incorporate the above iptables commands in a script that runs at startup. An example of a systemd .service file that calls a script (named iptables-rules.sh) at startup is:

# /etc/systemd/system/iptables-rules.service

[Unit]
Description=Run iptables rules at startup
Before=network-online.target

[Service]
Type=oneshot
ExecStart=/bin/bash -c /etc/my-scripts/iptables-rules.sh

[Install]
WantedBy=multi-user.target

Other sources cover how to write and save a script (syntax is easy; be sure to set the file as executable using chmod) and how to enable a .service.

Good luck and HTH.


How to get working Samsung SL-M2070W printer on Ubuntu 14.04?

If you did not understand a word of that, don't worry. I did not either.

Here is an alternative, but you may have to use a Windows computer to update the firmware on your Samsung M2070 FW printer. Once that is done, connect it to your router using WPS, or your preferred method. Once the printer is connected to the wireless network, your Ubuntu based computer will detect the printer.

Now go to System Settings, and then Printers, and hit ADD PRINTER,and the wizard will start.

Click NETWORK PRINTER, and choose 'Samsung M2070 FW'.

On the lower right hand corner, choose APP SOCKET/HP DIRECT. Your port settings will display, but you will probably not want to mess with that.

The Wizard will then search for drivers.
But wait! The Samsung M2070 FW is not in the driver list. No problem.

Under PRINTERS choose GENERIC, and on the next menu choose GENERIC PCL LASER.

Finish up the wizard and you are in business!

Cheers!


Are there any ways to access iCloud-based files with Ubuntu?

This would be sort of a hacky way to do it but, you may be able to install the Windows version of the iCloud desktop manager through Wine. This would give you complete iCloud access on your Ubuntu machine. I know there have been some problems with Ubuntu One so I can understand the need to use iCloud.


After upgrade to Ubuntu 18.04 - Tap to click is not reliable anymore

What ended up working for me was to remove the synaptics driver:

sudo apt remove xserver-xorg-input-synaptics

followed by a reboot. After that the touchpad worked again. I have a Dell XPS 15 9650.


How to enable vga switcheroo on an Asus U41S?

vga_switcheroo is broken for newer NVIDIA Optimus hardware (this is fixed in kernel 3.3). It currently does not survive suspend either (the card remains on after suspend and cannot be disabled/enabled without locking up the system).

I suggest you to take a look at Bumblebee. Since version 3.0, a new power saving feature has been added which can safely disable your discrete video card. More information about this can be found on Is a NVIDIA GeForce with Optimus Technology supported by Ubuntu?


I guess that simply means what it says, the file is not in the directory you are in. Check with ls -la and look for your file in the list it gives you. Also you can hit tab twice and get the choices you have and see if it's there. Plus, get ready to see lots of garbage, cat is not libreofice.


It should appear by default. No need to install specific package.
If you want simple colour coding, then you can try Bash-It.

Installation

git clone --depth=1 https://github.com/Bash-it/bash-it.git ~/.bash_it
~/.bash_it/install.sh

For more information
https://github.com/Bash-it/bash-it


capture stdout and stderr of all GUI programs?

You mean, like the existing ~/.xsession-errors log?

Unfortunately it tends to get filled with lots of warnings & other useless messages.


In terminal do:

ls /etc/apt/sources.list.d/*pusser*.list

and/or

grep -i pusser /etc/apt/sources.list.d/*.list

on any found filenames, do:

more /etc/apt/sources.list.d/found_filename_here.list

Edit that output into your question, and then send a comment to @heynnema, and I'll take a look for you.

Update #1:

I asked that you put the output of the above commands as an edit of your original question, as trying to read that data in comments is difficult.

But right now you should be able to do the following...

sudo rm -i /etc/apt/sources.list.d/home:stevenpusser.list


Which version of Ubuntu should I install on a macbook pro (intel)?

Most times, newer Ubuntu releases have better hardware support then olders. Especially on MAcBook i would always recommend you to install the latest (lts) version.

Are you able to connect your MacBook to Ethernet while installing? This could help you download drivers for your Wifi which might not be included on the cd. As #blade19899 wrote, you should use the amd+mac64 install iso.
It is possible that you do not have to reinstall: Connect you MacBook to the internet with a Ethernet and then type „Additional Drivers“ into the dash. There might be drivers available to install for your Wifi card.


LVM error on boot causing fall back to initramfs

After some tinkering in the liveCD, I have resolved the problem as follows:

Boot from Live CD and from Live CD sudo apt-get install lvm2.
Check the LVs from lvdisplay, and figure out the boot partition from lsblk
Mount the LV using lvchange -a y
Mount the root LV and the boot partition, e.g.

sudo mkdir /new

sudo mount /dev/mapper/my-root /new

sudo mount /dev/sda1 /new/boot
chroot to /new and re-install lvm2 from there.
Go to /usr/local/lib/ and remove (or move) libreadline.so.5.
ldconfig
Try to run lvm from chroot, you will see an error about /var not being available, instead of the usual libreadline.so.5 error.
update-initramfs -u -v. You will see libreadline.so.5 won't be copied from /usr/local/lib anymore, but instead from x86_64! This is the correct shared library.
Reboot. lvm should now load correctly in initramfs, so it mounts the root partition successfully and you can now boot.


Is there any way to upgrade to Ubuntu 14.04 through it's ISO?

Solution 1: Burning the ISO of Ubuntu 14.04 and booting the DVD

If you burn the ISO image and boot with the DVD created, you'll be able to perform the upgrade. You just have to select the option for upgrading your current installation of Ubuntu 12.04. Your data will be kept and the setup process will try to reinstall the packages installed (even external ones), if possible (of course), at the end of the install process.

It is even possible to upgrade from a 32-bit edition of Ubuntu 12.04 to a 64-bit edition of Ubuntu 14.04 that way. Of course, in that case, no previous package can be reinstalled...

Of course, it is not booting from the ISO itself (see Solution 2 below).

Solution 2: Using an external disk drive with Virtual CD/DVD feature

If you have an USB external drive with virtual CD/DVD feature (some enclosures like Zalman ZM-VE300 allow that), you'll be able to boot on the ISO image mounted as if it was a real CD/DVD.

If you have an external disk drive, but no Virtual CD/DVD feature built-in, you might be interested by YUMI, MultiSystem or else.

Solution 3: Creating an USB boot disk from the ISO with "Startup Disk Creator"

You can create an USB boot disk from the ISO with "Startup Disk Creator" which is included in Ubuntu by default. Just type "Startup Disk Creator" in the Dash.

Solution 4: Upgrading via Internet [ISO not used in this case]

If you want to upgrade Ubuntu 12.04 to Ubuntu 14.04 without waiting July 2014, you can also use this command line in Terminal:

update-manager -d

However, the ISO won't be used in this case. Everything will directly be downloaded from Ubuntu repositories.

Note

Don't forget to backup your data before performing any upgrade. It's always better to have a backup even if you don't have to use it than having no backup when you really need one ;-)!


Install the libssl-dev package from the repository. Run the following command in the terminal:

  sudo apt-get install libssl-dev


To disable it, go to System Settings > Privacy > Network Connectivity Checking and turn it Off

Source: Disable hotspot login Ubuntu 18.04


How do I choose my static IP address/Gateway etc?

255.255.255.0 is a standard class C network, giving 254 addresses to the local network. It is standard the router is at one end or the other - 1 or 254 - giving xxx.xxx.xxx.1 or xxx.xxx.xxx.254.

The router may be set to give addresses dynamically, as devices connect (DHCP) or you may need to set all addresses manually if DHCP is switched off. It's usual to have a pool of DHCP e.g. 50-253 which would allow 2-49 to be static addresses.

192.168.1.1 - router
192.168.1.2 - static address of PC
...
192.168.1.50 - DHCP address for phone on WiFi

You need to start by identifying the IP of the router and knowing if DHCP is switched on (+what addresses are in the DHCP pool) so you can work out what addresses can be static.


apt-get stopped working because of dependancy issue - libegl1-mesa

Running sudo apt-get install --reinstall ubuntu-dekstop fixed everything.


Ubuntu Gnome freezes/can't click on anything in VirtualBox full screen mode

Install the "Oracle VM VirtualBox Guest Additions" and turn off "Enable 3D Acceleration". Try them one at a time with a VM restart after each. Then both together if you don't see any results. Here is a link on how to install the guest additions on Ubuntu:Install Virtual box Guest Additions


Unable to connect to regular sites using IE7 in Wine

Make sure you use Winetricks to install extra dlls that are needed.


How can I get APT to ignore unmet dependencies?

If you have a particular application you do not want upgraded then "pin" it or "freeze" it using synaptic.

Highlight your selection > Go to Package > scroll down to "Lock Version" and click


Error `could not load host key` when trying to recreate SSH host keys

None of the answers above worked for me. I fixed my ubuntu system by doing the following:

/usr/bin/ssh-keygen -A


Where is my bonded network config hiding?

From the comments...

In terminal, check out nm-connection-editor or nmtui. You'll find bond0 there.


How do I reload network configuration with cloud-init?

It seems the trick to getting the yaml to generate from the cfg is...

cloud-init clean -r

Next problem is how to get that cfg set from the seed.iso or nocloud-net meta-data

the r flag is the same as any reboot shutdown -r now

If you run cloud-init init (without rebooting) there is not visible change to /etc/netplan/50-cloud-init.yaml

So still not clear on how to trigger that without the reboot?
I've tried cloud-init init and then systemctl restart cloud-init

I have also tried cloud-init -d modules --mode config and cloud-init -d modules --mode final

Okay wait I think I found it...

systemctl restart cloud-init-local.service

it seems to rebuild the netplan yaml from the cloud cfg after you cloud-init clean running cloud-init init does not do it. [Ubuntu 19.04 cloud-init 19]

[too many moving parts in this design]

Note: I have found an improvement which brings further clarity both these commands achieve the desired result.

cloud-init clean --logs
cloud-init init --local


sudo apt-get install --reinstall xubuntu-desktop should pick up the missing packages.


E: Problem executing scripts APT Update::Post-Invoke-Success error during apt-get update

This worked for me
(From here, https://forum.siduction.org/index.php?topic=6174.0):

sudo apt-get purge libappstream3


Authentication: OpenStack w/ Charms Setup

Actually found this document the best config overview:

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

Maybe should be added to the readme


How to change Firefox searchbar from google.com to google.com.tw

For the search bar:

Install the 'Add to Search Bar' add-on for Firefox.
Go to www.google.com.tw.
Right click on the search field and select "Add to search bar" in the contextual menu.

For the search built in the address bar:

Type about:config into the address bar.
Search for "keyword.url"
Change its value by adding "tw" where "google.com" is written.

Adapted from DuckDuckGo instructions.


perhaps 'caffeine' could help?
https://launchpad.net/caffeine


If you really need 12.04.3, you can find the ISO file in the old releases archive for Precise . The ISO file is suitable for installation in VMware Player.


All that was necessary to fix the language problem: editing /etc/default/locale and correcting the first line to read

 LANG="en_US.UTF-8"

like the other lines. After a reboot everything was fine.

As muru stated: I didn't need to generate new locales as en_US.UTF-8 was already used on my system


Megasync installation on Lubuntu 18.04 32bit

Yeah the development of 32Bit versions of MEGAsync have been stoped since Ubuntu 17.10.

What you can do :

Install older Ubuntu versions with 32bit
Buy a new computer with 64Bit and install Ubuntu 18.04 in 64Bit, if you have checked that your current computer does not support 64bit

It's your decision...


You could copy the package files on the internet connected computer to others from /var/cache/apt/archives then install the .deb files with sudo dpkg -i *.deb or by doing the below

To replicate the exact packages installed on one machine or another do this (I think if you've copied over the debs, it won't need to download anything, but I maybe wrong):

#source machine:
dpkg –get-selection | grep -v deinstall > dpkg-get.txt

#target machine:
dpkg –clear-selections
cat dpkg-get.txt | dpkg –set-selections
apt-get dselect-upgrade


It's important to make sure you are running mpd as the appropriate user, if these configs are in /home/$USER/.config/ then you need to be running mpd as $USER. If mpd is running as root, the root configs at /etc/mpd.conf are the ones being read.

Try systemctl --user status mpd and sudo systemctl status mpd to find out if mpd is running as the user or as root.


Samba share points not visible in google Chrome "save as" utility in 14.04

Regarding my answer here:

Nautilus uses gvfs to mount samba shares. Find out where it is located in your file system using this command:

mount | grep gvfs

Assuming you use the default Ubuntu configuration and are the first (or only) user on your Ubuntu machine, the mount point of already mounted Shares from Nautilus is  below this folder:

/run/user/1000/gvfs/

With the 1000 being your User ID. 1000 is the default UID for the first user of the system. Find out your User ID with the following command:

id -u

Go to Ordinateur to find /run folder.


Status of Steinberg UR22 USB audio interface in Ubuntu 15.04

Good news! I've have just purchased one of these and plugged it into my Ubuntu 15.04 box, and was somewhat surprised and relieved to see it appear in the device lists - 2 inputs, 2 outputs and midi in/out!

I only just got it yesterday, so I've tested the inputs, but not the outputs yet, or the midi (though the midi ports are there in alsa), since I'll need to go shopping for some cables.

Update: I've tested midi and outputs to PC speakers and it seems to be all good.  Using an inductive Mic and it seems quite clear.  Haven't recorded anything yet to look at the amount of noise, but live looping with it seems to work well!


Lost my root access and unable to install any software or any other priviliged operations

Unfortunately that command do the wrong thing, because gives you only that group and removes all others. usermod should be avoided, there are better and simpler tools to use.

The solution is to start in recovery mode and add your user to the sudo group.

To add a user to a group, I usually use

sudo gpasswd -a $user $group

many others prefer to use

sudo adduser $user $group

Both these commands do not change the set of groups to which the user already belongs.


By pressing Ctrl+L you'll see a textual/manual location bar appears in Nautilus file manager. Then edit the path yourself as you wish, e.g.

sftp://192.168.x.x/var/

I think it will go to /private/var/root/ by default, because that is probably the home directory of the user on the remote end. The same thing happens when connecting to another host using SSH - your current working directory will be something like /home/user.


"~/.wine is not owned by you", am I safe?

Wine expects that $WINEPREFIX (which defaults to ~/.wine) be owned by you. When you run wine with sudo, ~/.wine is owned by you, but wine is running as root. Hence the error. Wine immediately quits when this happens, so you don't need to worry, no damage was done.

You don't need to reset ownerships as in Zanna's answer (this particular run of wine didn't make any changes), but that's usually harmless.

Note that Wine applications have as much access to the system as the user they run as, so running Wine as root, as you have realised, is dangerous.


laptop not booting to ubuntu 13.04 after installing windows 8

Just burn a Boot-Repair-Disk (http://sourceforge.net/p/boot-repair-cd/home/Home/) and run boot-repair. That should fix it.

You can read about boot-repair here: http://help.ubuntu.com/community/Boot-Repair


Run in terminal

sudo modprobe -r acer_wmi
sudo rfkill unblock all


Freeze to a black screen and then restart

I'm taking this discussion out of commentary and into answer mode as we are getting to a point which regards some of my expertise. When you ask if it is better to put Ubuntu "in flash drive(usb3 for max speed) and run the "try ubuntu" whenever I want?", you are discussing doing something very similar to what I do every day, except that my flash drives actually contain complete installations that you can write to, which an image of a live cd on flash would not do.

I can answer that two different ways, both "yes".  yes it is better, which is why I do it.  My portable complete installation is better because I can boot my personal OS anywhere there is a pc, whether it belongs to me or someone else who trusts me.  It is versatile.  Even an image of a CD-rom is versatile, though annoying that you can't write to it or install new software.

If you intend to make an installation to a flash drive as I have done, you must do so on a computer in which you have temporarily disabled the hard drive.  If you do not, the internal windows hard drive will be essentially corrupted by the installation of the grubloader and suddenly that computer will become unable to even boot to windows unless the flash drive is inserted.

So, to recap my original solution revealed through comment discussion.  My advice was to reinstall Ubuntu but this time connected to the internet so that Ubuntu is better able to install properly.  I also suggested using the live-cd to check the hard drive for errors before even proceeding to install to it again.

(comments are automatically deleted after a time.  These "answers", which may benefit others, are retained indefinitely.)

PS:  about running from flash drives.  Most so-called usb3 flash drives are just as slow as usb2 because the chips are slow.  Patriot makes fast and slow units and the more expensive ones have little raids inside and go very fast.  That's what I use for units I make for my friends.  For myself I use something still faster and more expensive, combining an mSATA card case to usb3 adapter and then whatever size of mSATA solid state drive I choose to use.  I have two currently one is 64g and the other is 128g.

The case.  The drive.

One more thing.  This is going to sound crackers, but after investing in these supposed usb3 drives I found that computers with usb3 ports don't play well with them so now I use them only with usb2 ports.  They aren't remotely slow though, and faster than the patriots I mentioned.


Are there some Text User Interface programs for ffmpeg and other?

That's AKA the 'curses' interface which requires adding the ncurses library with

sudo apt-get install libncurses5-dev libncursesw5-dev

Each curses interface app has its own package. One example is cmus (more) for ffmpeg.

You can web search for more with the search term nameofapp curses ncurses . Once you find one, then confirm it's available for your version number of Ubuntu with man nameofapp run at a shell prompt.


Live cd and usb install failure blank screen when trying to install on an HP Pavilion dv6

From this post on the Ubuntu Forums

http://ubuntuforums.org/showpost.php?p=11503128&postcount=9

Use radeon.modeset=0 as a boot option

then install the ati driver

First add the Canonical Partners repository

Then

sudo apt-get update
sudo sh /usr/share/ati/fglrx-uninstall.sh
sudo rm /usr/share/ati/fglrx-uninstall.sh
sudo apt-get remove --purge fglrx*
sudo apt-get install linux-headers-'uname -r'
sudo apt-get install fglrx
sudo apt-get upgrade
sudo reboot

  The second through fourth commands may get a file nor found... Thats okay. Ensuring fragments are not there.

You may need these commands (I am not sure)

sudo echo options radeon modeset=0 > /etc/modprobe.d/radeon-kms.conf
sudo update-initramfs -u


Gnome 3 change system notification to be as unity?

The extension in 'Shell OSD' is outdated, and does not seem to work with 3.6+. A alternative extension that can be used is 'Panel OSD', which is more up-to-date, and should work with Gnome Shell 3.10+.

By default it shows the notifications on the top of the screen in the middle - using the settings (these can be opened from the extension's webpage or Gnome Tweak Tool) this can be changed to be on the top right:

The version for 3.10+ can be downloaded and installed from here

The 3.16 update removed compatibility with versions older than 3.10 - if you have a older version, you might be able to install it with:

cd ~ && git clone git://github.com/jenslody/gnome-shell-extension-panel-osd.git
git checkout d2289c2569d127725522eaa385b175220b28514c
cd ~/gnome-shell-extension-panel-osd
./autogen.sh && make local-install

I haven't tested this, but basically all you should need to do is get a version before this commit which removed the compatibility. Sources: extension README, https://stackoverflow.com/a/7832839/2943276


How to access gvfs mounts from command line?

Since Ubuntu 12.10, gvfs mounts can be found in /run/user/<uid>/gvfs.

Where /run/user/<uid> is the value of env $XDG_RUNTIME_DIR


Thanks @lesmana, you are correct. I have added the block of code to /etc/bash.bashrc and made sure it was not in any of the users profiles. That worked well. I also realized that I should set it in /etc/bash.bashrc and not /etc/profile because the first one is for bash (which history is pertinent to) and the second one is for Bourne shell (sh(1)) and Bourne compatible shells (bash(1), ksh(1), ash(1), ).


Clicking on the system monitor button does not work anymore from one day to the next (Ubuntu 18.04)

It does this sometimes if you keep your system running for days without restart.

to solve this whenever it happens:

Run in the terminal

killall gnome-system-mo

then

gnome-system-monitor

it should work fine after this.


#SOME_SECTION will only work if there is an appropriate anchor in the document. HTML has the . In the .doc file there should be anchors as well.

You may need to insert an empty link first and then make it into an anchor by filling in the "name" field.


Lost menu after installing classicmenu-indicator

I installed Alacarte and it finally worked. Problem solved. Thanks for your help.


The recovery mode is normally used when you need an exclusive admin access to your system. You normally go into the root shell and recover/repair the system through the command line.

Switch on your computer.
Wait until the BIOS has finished loading, or has almost finished. (During this time you will probably see a logo of your computer manufacturer.)
Quickly press and hold the Shift key (or Escape key on some computers), which will bring up the GNU GRUB menu. (If you see the Ubuntu logo, you've missed the point where you can enter the GRUB menu.) **
Select the line which starts with "Advanced options". *
Select the line ending with "(recovery mode)", probably the second line, something like:

  Ubuntu GNU/Linux, with Linux 3.8.0-26-generic (recovery mode)

Press Return and your machine will begin the boot process.
After a few moments, your workstation should display a menu with a number of options. One of the options (you may need to scroll down to the bottom of the list) will be "Drop to root shell prompt". Press Return with this option highlighted.
The root partition is mounted read-only. To mount it read/write, enter the command

mount -o remount,rw /

If you have /home, /boot, /tmp, or any other mount point on a separate partition, you can mount them with the command

mount --all

(This must be done following step 8 so that /etc/mtab is writable.) Alternatively, you could try to select "Enable networking" in step 7, though this has been found to cause the system to hang.

* If you have Ubuntu Quantal (12.10) or earlier, omit step 4 (the recovery mode menu items are displayed on the top-level menu).

** If you reboot, there is no need to hold the Shift key in step 3. The GNU GRUB menu will continue to be displayed automatically on each boot until a normal startup of Ubuntu completes. To configure GRUB so the menu is always displayed, even after a normal startup, see https://help.ubuntu.com/community/Grub2/Setup.

Source: https://wiki.ubuntu.com/RecoveryMode


Getting error running sudo apt-get -f install

Use

echo 'DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt || true";};' | sudo tee -a /etc/apt/apt.conf.d/70debconf

instead of

sudo sh -c "echo 'DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-pr econfigure --apt || true";};' >> /etc/apt/apt.conf.d/70debconf"


zsh from /usr/local/bin/zsh doesn't recognize vendor-completions

Completions are loaded from directories from fpath array. So directory /usr/share/zsh/vendor-completions must be explicitly included in it:

# do it before 'compinit' in ~/.zshrc
fpath=($fpath /usr/share/zsh/vendor-completions)

I still have no idea why it wasn't included by default.


Always start google chrome in full screen

I think that the best option is to use the kiosk mode, even if it's not really the F11 Fullscreen mode that you expected.

Open the .desktop file of Chrome:

sudo gedit /usr/share/applications/google-chrome.desktop

You need to add the --kiosk option in three places:

[Desktop Entry]
[...]
Exec=/usr/bin/google-chrome-stable --kiosk %U
[...]
[NewWindow Shortcut Group]
[...]
Exec=/usr/bin/google-chrome-stable --kiosk
[...]
[NewIncognito Shortcut Group]
[...]
Exec=/usr/bin/google-chrome-stable --kiosk --incognito

Hitting F11 does not work since it's not a true Fullscreen mode, press Alt+F4 to quit.


Plasma - Discover gets - not authorized message when selected Install

I corrupted things so badly in that OS.. I went ahead and installed a clean version of Kubuntu 18.04, KDE Plasma Ver: 5.12.7 and built things back as needed.


How can I transfer data from Macbook to Ubuntu desktop using Crossover cable?

Hmm, not sure why you'd be using/needing a crossover cable (From here: https://discussions.apple.com/thread/2178081?start=0&tstart=0
"... for years the Mac's ethernet ports have had the ability to reverse the polarity of the signals if a crossover is needed, automatically. No need for special cables when hooking up to a Mac.")

To get you started, both PC's need to be on the same LAN so they can see each other. Setup a static IP address on each PC.
E.g:
Mac-192.168.1.1
Ubuntu-192.168.1.2
Netmask for both 255.255.255.0

Try to ping each PC: Mac to Ubuntu: ping 192.169.1.2

Helpful links:

How to share files between Ubuntu and OSX?

https://superuser.com/questions/842924/directly-connect-macbook-to-linux-desktop-via-ethernet-for-fast-ssh


Seems like you installed Gnome, and it overrode notify-osd with notification-daemon. Remove the notification-daemon with:

sudo apt-get remove notification-deamon

Then reinstall notify-osd:

sudo apt-get install --reinstall notify-osd

Restart:

sudo reboot


In 32-bit Ubuntu 12.04, how can I find out if PAE has been enabled?

By definition, if you can see more then 3.2 Gb of RAM with a 32 bit kernel, pae is enabled.

To confirm this you can

grep --color=always pae /proc/cpuinfo

For additional information see https://help.ubuntu.com/community/EnablingPAE

EDIT: Actually, that grep command only shows that your cpu is pae capable. You know it is enabled if you can see more then 3.2 Gb RAM. See the above link for further information.

To see if it is enabled in your kernel

grep CONFIG_HIGHMEM64G /boot/config-your-kernel

If PAE is enabled you will see

  CONFIG_HIGHMEM64G=y


No Audio in Ubuntu GNOME 17.04, Realtek ALC892

First, you can install PulseAudio Volume Control using command :

sudo apt-get install pavucontrol

Run it, and go to the Configuration menu, select Analog Stereo Duplex on profile.

Then, go to Output Devices. Try Line Out or Headphones options until your speaker is normal.


The program 'curl' is currently not installed

Try to change the server to main server

Open System settings > Software & Updates > Ubuntu Software > make sure you have all the source selected (main, universe, restricted, and multiverse) and select download from Main server.

Now try again sudo apt-get update && sudo apt-get install curl


Extending ubuntu partition disk memory with unknown filesystem partition in between

I would begin by making a backup utilizing my method here: What's a good back-up strategy for 1 desktop PC? for although I've moved and resized many partitions without error or data loss a power or hardware failure during the process can ruin your day.

I would then continue by issuing the command sudo swapoff -a to insure that the swap partition (7) is not in use.

Then I would move partition 7 to the beginning of the free space to the left until all your free space is next to partition 9. Since p8 is unallocated you might be tempted to delete it but you will want to insure that your fstab is using UUID rather than /dev/sdX entried to insure that you don't impact mounting in some unexpected way.

When all this is complete select partition 9 and select Resize/Move and drag the bounderies left and right as necessary to utilize the space

Specifying Partition Alignment

To specify the alignment of the partition, click the Align to arrow button, and select from the list.

Use MiB alignment for modern operating systems. This setting aligns partitions to start and end on precise mebibyte (1,048,576 byte) boundaries.

MiB alignment provides enhanced performance when used with RAID systems and with Solid State Drives, such as USB flash drives.

Sources:
memory and
http://gparted.org/display-doc.php?name=help-manual#gparted-resize-partition
http://gparted.org/display-doc.php?name=help-manual#gparted-specify-partition-size-and-location


Unable to use laptop keyboard during installation

You might have to do the installation with the on-screen keyboard and the keyboard should be working after the installation. If it still isn't working after the installation, open the additional drivers app and look for a Surface keyboard driver.


How to uninstall ubuntu 12.10 and install 12.04?

Boot into windows 7 then go to control panel add/remove program and then check for ubuntu in the list if it is listed then do remove from it.
The simplest procedure would be to boot with the Live CD for 12.04LTS.

Install it on the current / partition by formatting it during installation. Select other partitions like home, swap etc. if applicable but do not format them.

When you reboot, Grub menu should indicate Ubuntu 12.04 LTS.


A comment before recommended linking your SDCard from your home directory. This is how it goes.

SSH into your phone or open the terminal app. Stay in your home folder.
Find the mountpoint of your SD-Card: ls /media/phablet/. In my case AC5D-91D7
Create a symbolic link. You have to replace AC5D-91D7 with the output of the command in step 2:
    ln -s /media/phablet/AC5D-91D7 SDCard

Now you can simply click on the SDCard folder in the File Manager App to see the contents of your SDCard.

Additional:

In case you want to keep your files on your SDCard rather than the internal storage you may consider (example for Music):

    rmdir Music
    ln -s /media/phablet/AC5D-91D7/Music Music

Your Music Folder is now located on the SDCard.


Nautilus elementary was only for Gnome 2 Nautilus, Gnome 3 Nautilus does not work with it at all.
Coverflow only worked for 10.04 and 10.10, in 11.04 the "Plug in" is broken.
Both projects are dead.
Marlin File Manager is the spiritual successor of Nautilus elementary, however it does not have a Coverflow plug in and it's in constant development.


Extracting information from Ubuntu man pages

You could use catman:

trusty (8) catman.8.gz
Provided by: man-db_2.6.7.1-1_i386

NAME
       catman - create or update the pre-formatted manual pages

SYNOPSIS
       catman [-d?V] [-M path] [-C file] [section] ...

DESCRIPTION
       catman  is  used  to  create  an up to date set of pre-formatted manual
       pages known as cat pages.  Cat  pages  are  generally  much  faster  to
       display  than  the  original  manual  pages,  but require extra storage
       space.  The decision  to  support  cat  pages  is  that  of  the  local
       administrator, who must provide suitable directories to contain them.

to simplify the files, then it's a SMOP. I suggest that a Perl script should be able to extract the data you want. One can easily detect the command name (and use that to find actual examples), find the EXAMPLES section (if it exists), count the number of times the letter "e" is used, ... with Perl.


12.10 kernel upgrade to 3.5.0-28 breaks booting into desktop

(Used the OP's solution that they posted in their question and made it an answer)

When I booted into kernel 3.5.0-27, I looked at apt-get and saw that the package linux-signed-image-generic had been held back. After upgrading linux-signed-image-generic by running apt-get update and apt-get dist-upgrade and restarting, booting into kernel 3.5.0-28 works.


Hibernation: Earlier warning if there's not enough free swap space

The problem you see here is that the kernel has to allocate enough free swap pages to write the hibernate image and this includes some meta-data overhead too. Unfortunately the kernel can only figure out how many pages needs writing to swap after it has quiesced the processes and this is late in the hibernate process.  The hibernate in theory should bail out if there are not enough free pages and return you back to a running system, so the fact that you seem to need to reboot looks like a bug to me.

As a rule of thumb, one generally sizes swap ~2 x the size of the available RAM, so running out of swap on hibernate shouldn't really fail because of lack of free swap; however it is a little more complex due to the possibility of having pages already swapped out and the small amount of meta data overhead required to write out the hibernate image.


Running hadoop command gives a "permission denied" error

The hadoop user doesn't have access this shall fix your issue

sudo chown -R hduser:hadoop /usr/local/hadoop


Avoid using Ubuntu Software before installing all the updates suggested after connecting to the internet in the first boot. Run the Updates tools if needed.

Alternatively open the Terminal and proceed with

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

For 16.04 and newer the recommended commands are

sudo apt update
sudo apt full-upgrade


Everytime i tried something in console like sudo apt-get install build-essential i get all this! I dont know how to fix it it stucks here

Run the following commands to fix the issue and the post any errors.

First, run the following:

sudo dpkg --configure -a

Then, run the following:

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

If that doesn't work, run:

sudo apt-get -f install
sudo apt-get dist-upgrade

Again, please post any errors. Thanks!


As JohnnyD said, add ppa:openjdk/ppa repository and then update it.After that, you can be able to install openjdk-7-jdk directly from that repository,

sudo add-apt-repository ppa:openjdk/ppa
sudo apt-get update
sudo apt-get install openjdk-7-jdk

Edit :

sudo apt-get install aptitude && sudo aptitude install openjdk-7-jdk

and not choose to keep the current version of the conflicting packages.


basically you need to enable rewrite module which is done by

sudo a2enmod rewrite

And also you need to have AllowOverride in your configuration set to All and not None

and in ubuntu the configurations are found in apache2.conf


how do I make "/sys/kernel/mm/transparent_hugepage/defrag" never status to close the THP warning

So as you I had this question and I went to github and forum to find the answer, and actually it result from a mix of a little bit all of them
I think you were on the good way but the main mistake everybody seams to do is to not restart the redis service after applying the new THP rules.
1. add rc.local
So first, on ubuntu 20.04 by default the rc.local don't exist, which I fixed by following those step (ref)

as root

1.1. make a systemd service for rc-local
add in /etc/systemd/system/rc-local.service
[Unit]
 Description=/etc/rc.local Compatibility
 ConditionPathExists=/etc/rc.local

[Service]
 Type=forking
 ExecStart=/etc/rc.local start
 TimeoutSec=0
 StandardOutput=tty
 RemainAfterExit=yes
 SysVStartPriority=99

[Install]
 WantedBy=multi-user.target

1.2. active it
touch /etc/rc.local
chmod +x /etc/rc.local
systemctl enable rc-local

1.2.1 in that file (rc.local) you could add
#!/bin/bash
echo never > /sys/kernel/mm/transparent_hugepage/enabled
echo never > /sys/kernel/mm/transparent_hugepage/defrag
systemctl restart redis-server.service
exit 0


How can I find files that I have modified?

This could help

https://askubuntu.com/a/832816/602526

Cleaned up:

Grep is pretty powerfull.

how far back do you want to go?

grep sudo /var/log/auth.log


How to activate a virtualenv within bash script resulting in activated prompt

A shell script, when executed, runs in a subshell and all parameters and environment goes out of scope once the execution completes.

To make the environment available in the current shell session , you need to source it:

source /path/to/script.sh

As a side note, if you want some blocking process to keep working in the background while you regain access to the terminal prompt, send the process to background:

some_command_to_run_in_background &


Is your video card a GeForce GT 525M or GeForce GT 520M? You can download linux driver for Ubuntu 64 bit from here. Installing the driver can be a pain in the back but if you are familiar with installing video driver it should not be such a big problem:

http://www.nvidia.com/download/driverResults.aspx/73666/en-us

http://www.nvidia.com/download/driverResults.aspx/73966/en-us

If you are using Ubuntu 32 bit you need the Linux 32bit video drivers from Nvidia.


I think some of your CCSM's*(Compiz config settings manager)* plug ins are working bad or something, go to CCSM and click on the Radio button of the Windows Decoration to turn it off and click again to turn it on,it will help.(if it does not work try to do the same thing to other plugins too, rarely those plugins fail to load correctly and give some extra SLOW to the pc) You can move windows without the need of the title bar, just grab alt and click on the window and move :-)


Only 3.2GB RAM (out of 4GB) usable on 64bit installation. Dell XPS 13

There are numerous factors that influence in the amount of usable memory shown. Let me talk first about Windows and then we can delve into Linux.

In Windows, if you have (Does not matter if you have 32 bit or 64 Bit) an X amount of memory, the system will reserved a percent of it for the correct functioning of the system. Depending on the hardware, integrated devices (Integrated video card, sound card, network card, etc...), amount of devices connected, version of Windows, etc.. the amount reserved will change. In some cases, on Windows XP in a PC with 4GB you will see yourself with only 3.5GB available. In other cases you will see 3.2GB, 3.1GB, 3.0GB or in the worst case I have seen, only 2.8GB. On Windows 7, the same reserved amount of memory varies depending on hardware and software, changing from 3.0GB to a 3.7/3.8GB available maximum ram. This available amount of ram is what the programs you run use and it is the memory that is left after the system has calculated and reserved the part of the memory that it needs to correctly work.

This memory is not normally interchanged between the user applications and the memory reserved for the system.

On Linux, is the same. The system loads and it needs a required amount of memory for everything to function as smooth as it can. If you have 512MB the system will not reserve a lot since it will notice the lack of memory. If you have 1GB or 2GB the amount reserved gets bigger. The limit for 32 Bit is 4GB from which it reserves between 200MB and 1GB of RAM (Again, depending on hardware or software) so everything can run smooth. So you would be left with a total usable memory between 3.0GB to 3.8GB.

Now, aside from the obvious reserved memory for the system, there are a couple of BIOS/hardware options that actually can take even more. The most common one is the amount of memory assign to an integrated video card. It can range from 2MB to a cool 1.5GB. If you have for example 1GB assign to the video card, that is 1GB you will not see in the total available memory. A sound card uses a small amount of memory ,but it uses memory nevertheless. Same for a network card, capturing device, webcam, etc...

Sum them all up and you get the total available amount of memory for the common programs you use (firefox, gimp, empathy, libreoffice, etc...)

So it is not a question of if Ubuntu is not reading the memory correctly with or without a 64 Bit system, it is more of a question about if the system has enough memory to operate correctly and enough for the user apps. In your case, as you can see, Ubuntu took 800MB for the system and 3.2GB for you to use with your apps, without both having to share memory in the process. This will enhance the speed and load time of the apps since they have their own user space in memory. A problem would be if the amount of memory the system needs is higher than the amount of memory you have and you want to open an app in that moment. They would have to share memory, which means having to use swap/virtual memory, which means slower loading times.

This is the terminal output of a 3GB Laptop:

exodus@exodus:~$ free -m
             total       used       free     shared    buffers     cached
Mem:          2898       1186       1711          0        117        569
-/+ buffers/cache:        499       2398
Swap:         3837          0       3837

As you can see by my example and your example, the shared memory is not needed since you have much more memory than you need in the moment you ran that command. The system has its memory and the apps have their memory.

As you can also see (Using in my example Ubuntu 12.04 32 Bit) the system is only taking around 120MB. But look here:

cyrex@cyrex:~$ free -m
             total       used       free     shared    buffers     cached
Mem:         14696       1744       12952         0        447        730
-/+ buffers/cache:        533       3318
Swap:          254          0       254

In this case I have 16GB RAM and Ubuntu 32 Bit also, is taking around 1.5GB for the system. Giving me about 12.5GB for the rest of my apps. Now read here, on the same system with Windows 7 64BIT it takes 3.5GB. It always says when I go see the memory left 12.4GB. So depending on the system and hardware, the amount reserved (Or stolen ^^) can vary.

Hope this helps.


Freezes when finishing installation of ubuntu 12.10

I think it would be nice to know where exacly your boot fails:
During BIOS hold down  shift until Grub appears, edit the kernel parameters (the line that starts with linux) by removing the quiet splash $vt_handoff and then boot by hitting F10.
Maybe the output shows where the system stalls. You should post the results.

I have kind of the same problem, although on an notebook with a NVS 4200M. I found the culprit is the graphics card driver that comes with the Ubuntu distribution (nouveau). Partially I am able to boot to Ubuntu by editing the kernel parameters to ro nomodeset noplymouth. Maybe this helps you although in my case the fix only worked once.

Once you have access to a terminal, you might want to remove the nouveau driver and/or blacklist it and then install the proprietary nvidia driver by

sudo apt-get install nvidia-current

or use this link:

I hope this helps


So far NTFS is the only reliable method to do this. I've added this line in my /etc/fstab to do this with my laptop:

/dev/sda5 /mnt/share ntfs-3g defaults 0 0

But first you'll probably want to do the following before adding the line:

Locate the /dev name for your Windows partition. Mine is /dev/sda5.
Create a mount directory: mkdir /mnt/<dir_name>
Mount the partition to your mount directory:
 mount -t ntfs-3g /dev/sda5 /mnt/<dir_name>

You can check your mount by issuing:

df -kh

You should see an output like this:

/dev/sda5       220G   56G  165G  26% /mnt/share

At this point, go ahead and go to the directory and try writing to the file system with something like:

touch test.txt

If this is successful, then you should be able to add this line to your /etc/fstab:

/dev/sda5 /mnt/share ntfs-3g defaults 0 0

Save it and reboot. It should mount by default on a full restart.

Hope this is helpful.


how to force download on one network and upload on another

Well... in a terminal with curl you can specify an interface.
From the manpage: curl --interface eth0:1 http://www.netscape.com/.

So for a single file you use something like this:

curl -LO --interface eth1 ftp://ftp.xs4all.nl/pub/test/10mb.bin

where eth1 is the interface connected to "C2N2".


How can I install VLC without libdvdcss?

There's nothing to remove, the only connection between vlc packages and libdvdcss2 is that vlc-nox suggests libdvdcss2 (which is a very weak dependency — made necessary by the fact that the standard repositories don't carry libdvdcss2). It's perfectly possible to install vlc without libdvdcss2 as is.


So, i tried again, and by now i found the answer myself. Obviously i was not able to google this in my first attempts...

The problem is the Xauthority, because this is not known by the snaps.
The issue is discussed here with multiple solutions, including

XAUTHORITY=$HOME/.Xauthority /snap/bin/mysnap


16.04 - Is it possible to speed up kernel boot time?

You can trim down the initramfs to speed up boot by editing /etc/initramfs-tools/initramfs.conf and setting MODULES=dep.

Then run the following to update the initramfs to hopefully make a smaller one:

sudo update-initramfs -u


Drumroll sound not working in Ubuntu 16.04

The greeter is using a different sound setting to that of your normal login session. It is possible you accidentally lower or muted the audio in the login screen. Try increasing the volume while you are at the greeter login screen and reboot the system?

PS: If you are on a laptop, you may have to increase it via your hardware volume key at the login prompt.


How can I prevent the alt-tab shortcut from nesting terminal windows?

If you don't want to wait around for the group to expand when alt-tabbing, you can use the grave key (`) while still holding alt  - this should be to the left of the 1 key on your keyboard. This is useful if you want to pick the window of an application that isn't currently active (e.g. you have many terminals open but are currently in Firefox)

You can also directly use alt-` without pressing tab at all, if for example a terminal window is currently active and you want to switch to a different terminal window.

Essentially, alt-tab switches between applications; alt-` switches between windows within an application.


This was caused because on MSI ONC with a raid 0 on ssd. The raid did not take the boot loader just redirected to an HD which did not start up fast enough causing the error.


Bad achive mirror during Server 16.04 install

I've discovered a solution for this problem. I don't know why this is the cause, but it seems to work flawlessly for all installs I've done since this problem.

When building a Live USB, not all programs are equal. I've tried many different methods with varying success, but one that I know works on Windows is Rufus https://rufus.akeo.ie/.

To check if your USB installer is the problem, do the integrity check on the main menu. If it fails, then you know the program failed to set it up correctly.

Programs I've used with varying success: YUMI, LinuxLive Usb Creator, UNetBootin, Universal USB Installer, and probably others. Although some of those were in the instructions on the Ubuntu site for installing from Windows, they don't always work.


@muru is correct, however
if you are trying to send a json encoding your base64 data
may be too large for the command line and you may prefer something like this:

(echo -n '{"image": "'; base64 ~/Pictures/1.jpg; echo '"}') |
curl -H "Content-Type: application/json" -d @-  http://some/url/

The -X POST is implied by -d.


Can my condenser mic be plugged into Linux Ubuntu directly for use?

You can't plug any microphone into audacity. You can plug it into a sound card. If your sound card supports phantom power, you're good to go. If not, you need a phantom power source. If you only have the on board standard sound card, it probably does not provide phantom power, and likely does not provide a balanced input either.

If you buy such a microphone, you should probably look into an external audio card that either supports phantom power, or at least XLR inputs.

Phantom power sources does not need to be compatible with Linux. They're a hardware device that sits between your audio card and the microphone. Commonly, they use a 9VDC battery to power the microphone.

See this eBay search for such power supplies. They have one side you connect to your microphone, and one that connects to your sound card.

So what you have to find out:

Can your sound card supply phantom power?
Is your sound card supported by Linux?


How to remove all non-ASCII characters from files?

Just use sed with in-place replace:
LC_ALL=C sed -i 's/[^\x0-\xB1]//g' multiplefiles*.tex

link to ASCII-table

\d0-\d177: Decimal
\x0-\xB1: Hex
\o0-\o261: Octal


I cannot use MySql as normal user in Ubuntu 18.04

From this tutorial you need to create a database and user to use mySQL.
To create a MySQL database and user, follow these steps
At the command line, log in to MySQL as the root user:
mysql -u root -p

Type the MySQL root password, and then press Enter.
To create a database user, type the following command. Replace username with the user you want to create, and replace password with the user's password:
GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost' IDENTIFIED BY 'password';

This command grants the user all permissions. However, you can grant specific permissions to maintain precise control over database access. For example, to explicitly grant the SELECT permission, you would use the following command:
GRANT SELECT ON *.* TO 'username'@'localhost';

For more information about setting MySQL database permissions, please visit https://dev.mysql.com/doc/refman/5.5/en/grant.html.
Type \q to exit the mysql program.
To log in to MySQL as the user you just created, type the following command. Replace username with the name of the user you created above:
mysql -u username -p

Type the user's password, and then press Enter.
To create a database, type the following command. Replace dbname with the name of the database that you want to create:
CREATE DATABASE dbname;

To work with the new database, type the following command. Replace dbname with the name of the database you created above:
USE dbname;

You can now work with the database. For example, the following commands demonstrate how to create a basic table named example, and how to insert some data into it:
CREATE TABLE example ( id smallint unsigned not null auto_increment, name varchar(20) not null, constraint pk_example primary key (id) );
INSERT INTO example ( id, name ) VALUES ( null, 'Sample data' );

Much more can be found in the tutorial linked above such as:

Creating SQL scripts
Deleting tables and databases
View a list of all users

More Information
To view the official MySQL documentation, please visit https://dev.mysql.com/doc/refman/5.5/en/index.html.


This seems to be an issue with GDM3 (the gnome display manager) trying to use Wayland.  Here is how I fixed the issue.

Boot and at the grub menu move into (boot from recovery)
Drop into a root shell
Ensure that lightdm is the login manager by running

dpkg-reconfigure gdm3
Next ensure that gdm3 does not want to use Wayland by editing

/etc/gdm3/custom.conf

Add "WaylandEnable=false" to the end of the file
reboot


NetBeans IDE 7.1 icon is not removed even after uninstallation. How do I remove that?

I found the Solution: use ezame to find the .desktop file:

sudo add-apt-repository ppa:caldas-lopes/ppa
sudo apt-get update
sudo apt-get install ezame

then find its location and delete the .desktop file.


iwconfig gives more information about wifi networks than ifconfig
sudo lshw -C network will give you even more information
for logs, you could try looking in the /var/log/dmesg files, although that's a lot to wade through so you would want to check as soon as possible after you fail a connection.  I'm not sure there are dedicated interface logs - hopefully somebody else will have a better solution for you.


Understand the differences between two network configurations for MAAS

The first network configuration is pretty clear. The /etc/network/interfaces file is familiar to everyone and of course IP forwarding through iptables is need while using MAAS, to provide internet to nodes that are being managed by MAAS.

The second configuration other than the DNS part and the br0 part is understandable. The DNS part is to actually make the MAAS server realize that it itself is hosting the DNS services. That line may be shifted to /etc/resolve.conf which includes other DNS configurations.
If this DNS entry is not made you will reach this error during JUJU bootstrap: https://github.com/Ubuntu-Solutions-Engineering/openstack-installer/issues/901

However, I am not really sure about the bridge br0. Did this network configuration actually work?


Error messages shown while booting Ubuntu 11.04

udev rules for your cannon printer. If you open

cat /etc/udev/rules.d/80-canon_mfp.rules

You will see where it wants to substitute SYSFS{} for ATTRS{}


Ubuntu One Account -The information could not be retrieved. Maybe your internet connection is down?

Their was a server side issue that was breaking the control panel. The fix was rolled out yesterday so you should see this issue resolved. Let us know if this is still an issue for you.


Wine probably has installed a version of Internet Explorer 6. You may find it by browsing to the following location (.wine is a hidden directory which can be shown in Nautilus by hitting Ctrl + H:

~/.wine/drive_c/Program Files (x86)/Internet Explorer

There you may find the following icon ready to run by clicking:

Alternatively try to execute it with the following command:

 wine '/home/<username>/.wine/drive_c/Program Files (x86)/Internet Explorer/iexplore.exe'

This will open Internet Explorer in Wine, from where you can access the registration site (hopefully in your locale - shown here is a German locale):


Dell DImension C521 won't automatically connect to a wired network

Ubuntu used to have a hard-coded default state for wired ethernet which has vanished from recent releases in favour of letting Network Manager, erm, manage the network.

You can usurp Network Manager, restoring the old behaviour by running sudoedit /etc/network/interfaces and appending:

auto eth0
iface eth0 inet dhcp

That assumes your network adapter lives at eth0 (ifconfig -a can tell you if this is the case).

Save and restart. If the network springs into life, hooray. If it doesn't and/or Network Manager's applet starts popping veins, revert the edit and find a better solution.


How do I fix Input/Output error during Lubuntu installation?

Usually when downloading an iso image for Ubuntu I use a torrent because it is checked during and after download to make sure it's all there, then I will burn the iso image at the slowest speed to make the disc stable and longer lasting (burning too fast can cause errors)...


Can set screen resolution with in VMWare

Install the vmware tools and then the VMWare Video Driver will help.

Installing VMware Tools from the Command Line with the Tar Installer

mkdir /mnt/cdrom

mount /dev/cdrom /mnt/cdrom

cd /tmp

(Update to specific version of vmware tools)

tar zxf /mnt/cdrom/VMwareTools-9.0.10-1481436.tar.gz

cd vmware-tools-distrib

umount /dev/cdrom

./vmware-install.pl


Reinstalling Ubuntu without formatting partition - what folders are deleted?

I wasn't able to find a hardcoded list in the ubiquity source code. The documentation says that partitioning is handled by d-i (debian installer) code to avoid duplication and maintenance effort. But I wasn't able to find an answer in the related packages or the Debian documentation.

Fortunately /var/log/syslog, respectively /var/log/installer/syslog post installation, contains useful information about ubiquity and the installation process. Here is an excerpt from a 12.04 install over a 12.04 install in my VM:

May 27 21:20:12 ubuntu ubiquity[8109]: switched to page partman
May 27 21:20:35  ubiquity[8109]: last message repeated 5 times
May 27 21:20:35 ubuntu kernel: [  598.116238] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
May 27 21:20:35 ubuntu ubiquity: umount: /tmp/tmp.5jn9BTMDwz: device is busy.
May 27 21:20:35 ubuntu ubiquity:         (In some cases useful info about processes that use
May 27 21:20:35 ubuntu ubiquity:          the device is found by lsof(8) or fuser(1))
May 27 21:20:35 ubuntu ubiquity:
May 27 21:20:37 ubuntu ubiquity[8109]: debconffilter_done: ubi-partman (current: ubi-partman)
May 27 21:20:37 ubuntu ubiquity[8109]: Step_before = stepPartAdvanced
May 27 21:20:37 ubuntu clock-setup: Sun May 27 21:20:37 UTC 2012
May 27 21:20:37 ubuntu clock-setup: rdate: adjust local clock by -0.063701 seconds
May 27 21:20:40 ubuntu ubiquity[8109]: switched to page timezone
May 27 21:20:42 ubuntu kernel: [  605.076359] Adding 784380k swap on /dev/sda5.  Priority:-1 extents:1 across:784380k
May 27 21:20:42 ubuntu kernel: [  605.225583] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
May 27 21:20:51 ubuntu ubiquity: not installable:
May 27 21:20:51 ubuntu ubiquity: version mismatch:
May 27 21:20:51 ubuntu clear_partitions: Considering /,/dev/sda1.
May 27 21:20:51 ubuntu kernel: [  614.038996] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
May 27 21:20:51 ubuntu clear_partitions: Removing bin from / (/dev/sda1).
May 27 21:20:51 ubuntu clear_partitions: Removing dev from / (/dev/sda1).
May 27 21:20:51 ubuntu clear_partitions: Removing etc from / (/dev/sda1).
May 27 21:20:52 ubuntu clear_partitions: Removing lib from / (/dev/sda1).
May 27 21:20:52 ubuntu clear_partitions: Removing lib64 from / (/dev/sda1).
May 27 21:20:52 ubuntu clear_partitions: Removing proc from / (/dev/sda1).
May 27 21:20:52 ubuntu clear_partitions: Removing sbin from / (/dev/sda1).
May 27 21:20:52 ubuntu clear_partitions: Removing sys from / (/dev/sda1).
May 27 21:20:52 ubuntu clear_partitions: Removing usr/bin from / (/dev/sda1).
May 27 21:20:52 ubuntu clear_partitions: Removing usr/games from / (/dev/sda1).
May 27 21:20:52 ubuntu clear_partitions: Removing usr/include from / (/dev/sda1).
May 27 21:20:53 ubuntu clear_partitions: Removing usr/lib from / (/dev/sda1).
May 27 21:20:53 ubuntu clear_partitions: Removing usr/not-formatted from / (/dev/sda1).
May 27 21:20:53 ubuntu clear_partitions: Removing usr/sbin from / (/dev/sda1).
May 27 21:21:02 ubuntu clear_partitions: Removing usr/share from / (/dev/sda1).
May 27 21:21:02 ubuntu clear_partitions: Removing var/backups from / (/dev/sda1).
May 27 21:21:02 ubuntu clear_partitions: Removing var/cache from / (/dev/sda1).
May 27 21:21:02 ubuntu clear_partitions: Removing var/crash from / (/dev/sda1).
May 27 21:21:02 ubuntu clear_partitions: Removing var/games from / (/dev/sda1).
May 27 21:21:02 ubuntu clear_partitions: Removing var/lib from / (/dev/sda1).
May 27 21:21:02 ubuntu clear_partitions: Removing var/lock from / (/dev/sda1).
May 27 21:21:02 ubuntu clear_partitions: Removing var/log from / (/dev/sda1).
May 27 21:21:02 ubuntu clear_partitions: Removing var/mail from / (/dev/sda1).
May 27 21:21:02 ubuntu clear_partitions: Removing var/not-formatted from / (/dev/sda1).
May 27 21:21:02 ubuntu clear_partitions: Removing var/opt from / (/dev/sda1).
May 27 21:21:02 ubuntu clear_partitions: Removing var/run from / (/dev/sda1).
May 27 21:21:02 ubuntu clear_partitions: Removing var/spool from / (/dev/sda1).
May 27 21:21:02 ubuntu clear_partitions: Removing var/tmp from / (/dev/sda1).
May 27 21:21:02 ubuntu kernel: [  625.522422] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: errors=remount-ro

Basically the directories bin, dev, etc, lib, lib32, lib64, proc, sbin and sys are deleted as are the contents of usr and var (/usr/local and /var/local seem to be an exception, but test folders I had in usr and var were deleted). The boot directory does not seem to be deleted and is just overwritten by the packages related to grub and the kernel.


Connect Linux to Mac Samba (Windows like sharing)

That's the result I receive from my Mac as well to that command, smbclient -L 192.168.1.111 (my Mac's IP).

If you want to access your shared music from your Mac to use or play back on Lubuntu, I would suggest using PCManFM, Lubuntu's File Manager, instead.

From your File Manager (which you can access by clicking on the Folder icon on your taskbar, or in System Tools > File Manager PCManFM)

Then, you can type in the address bar:

smb://192.168.1.18

(if 192.168.1.18 is your Mac's IP address).

If you'd rather use the GUI way, you can do instead:

Select "Go" > "Network"
Double-click "Windows Network".
Double-click the name of your domain (Probably "WORKGROUP")
Find and double-click on the name of your Mac.

At this point, you'll need to enter the password for your Mac's account.

Once you've successfully entered your password, the folders shared from your Mac will be listed.

Double-click on your Music share, and find the song you want to play.


Sometimes it goes to background process. You need to kill its process by

killall thunderbird

Then start that from anywhere you like.

thunderbird

I m not shore if this work. But my problem solved by doing this.


Setting up proxy to ignore all local addresses

How are proxy settings set in the Ubuntu gnome environment.

These methods are not full proof and can break the configuration of the system. Making the network behave in an undesired way. Only do this if you understand how it affects different parts of the system.

You can set some of the proxy settings here. But for ignore hosts you will need to set that else where.

$ cat /etc/environment
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
http_proxy="http://192.168.1.250:8080/"
ftp_proxy="ftp://192.168.1.250:8080/"
https_proxy="https://192.168.1.250:8080/"

The env command is related to the above file but many programs and system utilities make changes to the environment. More info can be found here, read this before making changes. https://help.ubuntu.com/community/EnvironmentVariables

$ env | grep proxy
http_proxy=http://192.168.1.250:8080/
ftp_proxy=ftp://192.168.1.250:8080/
all_proxy=socks://192.168.1.250:8080/
https_proxy=https://192.168.1.250:8080/
no_proxy=localhost,127.0.0.0,127.0.1.1,127.0.1.1,local.home

simply change this by

no_proxy=myhost_to_ignore,$no_proxy
export no_proxy

We need to add back the list of previously set no_proxy hence we add it back at the end of the line. This is only applicable to the terminal session that the command is run in and will not apply system wide read the community help documentation to make permanent changes.

To make changes in the gnome environment you can use the gconftool. Read the following guide before attempting to make changes.
http://library.gnome.org/admin/system-admin-guide/stable/gconf-0.html.en

Here are instructions on changing proxy settings using the gconftool
http://library.gnome.org/admin/system-admin-guide/stable/gconf-8.html.en#gconf-10

$ gconftool --recursive-list /system/http_proxy
use_authentication = false
authentication_password =
authentication_user =
ignore_hosts =[localhost,127.0.0.0/8,127.0.1.1]
use_http_proxy = true
port = 8080
use_same_proxy = true
host = 192.168.1.250

The following file  ~/.conf/system/http-proxy/%gconf.xml. Will be changed by the next command. I am unsure how to set a list type with gconftool. MY attempts ended up removing all the previous settings.

I am sure their is a better way to do this!!
Safe way to do it. get the current contents of the /system/http_proxy/ignore_hosts

gconftool -g  /system/http_proxy/ignore_hosts

Next copy its contents into the next command and add the host you want to add.

gconftool  --type list --list-type string  -s /system/http_proxy/ignore_hosts '[localhost,127.0.0.0/8,myhost]'


what you are doing is creating partitions for your ubuntu installation and not not defining the main / directory
if you are new just click back and as you said you are dual booting with windows just

click install along side windows it will solve the problem
..

but i don't suggest this as you are new
format that unknown space to ext4
and use it as mount to / and it will remove that error and ubuntu will be installed / is where your ubuntu is installed
and make another partition from that free space and use it as swap just make it as big as your ram ie if your ram is 4gb make it 4gb and swap is virtual memory,
this will work.
but i suggest you to go with upper suggestion


Putty Login error through SSH (Network error: Connenction timeout)

Go /etc/ssh/sshd_config and find the line # Authentication:
LoginGraceTime 120. Now change 120 to 300 and save it. I think it will give you 5 minutes more than 2 minutes for logIN.


bash fork: retry: Resource temporarily unavailable

For the case in the comments, where you were not using much memory per thread, you were hitting the cgroup limits. You will find the default to be around 12288, but the value is writable:

$ cat /sys/fs/cgroup/pids/user.slice/user-1000.slice/pids.max
12288
$ echo 15000 | sudo tee /sys/fs/cgroup/pids/user.slice/user-1000.slice/pids.max
15000
$ cat /sys/fs/cgroup/pids/user.slice/user-1000.slice/pids.max
15000

And if I use my "what is the thread limit" program (found here) to check, before:

$ ./thread-limit
Creating threads ...
100 threads so far ...
200 threads so far ...
...
12100 threads so far ...
12200 threads so far ...
Failed with return code 11 creating thread 12281 (Resource temporarily unavailable).
Malloc worked, hmmm

and after:

$ ./thread-limit
Creating threads ...
100 threads so far ...
200 threads so far ...
300 threads so far ...
...
14700 threads so far ...
14800 threads so far ...
14900 threads so far ...
Failed with return code 11 creating thread 14993 (Resource temporarily unavailable).
Malloc worked, hmmm

Of course, the numbers above are not exact because the "doug" user has a few other threads running, such as my SSH sessions to my sever. Check with:

$ cat /sys/fs/cgroup/pids/user.slice/user-1000.slice/pids.current
8

Program used:

/* compile with:   gcc -pthread -o thread-limit thread-limit.c */
/* originally from: http://www.volano.com/linuxnotes.html */

#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <pthread.h>
#include <string.h>

#define MAX_THREADS 100000
#define PTHREAD_STACK_MIN 1*1024*1024*1024
int i;

void run(void) {
  sleep(60 * 60);
}

int main(int argc, char *argv[]) {
  int rc = 0;
  pthread_t thread[MAX_THREADS];
  pthread_attr_t thread_attr;

  pthread_attr_init(&thread_attr);
  pthread_attr_setstacksize(&thread_attr, PTHREAD_STACK_MIN);

  printf("Creating threads ...\n");
  for (i = 0; i < MAX_THREADS && rc == 0; i++) {
    rc = pthread_create(&(thread[i]), &thread_attr, (void *) &run, NULL);
    if (rc == 0) {
      pthread_detach(thread[i]);
      if ((i + 1) % 100 == 0)
    printf("%i threads so far ...\n", i + 1);
    }
    else
    {
      printf("Failed with return code %i creating thread %i (%s).\n",
         rc, i + 1, strerror(rc));

      // can we allocate memory?
      char *block = NULL;
      block = malloc(65545);
      if(block == NULL)
        printf("Malloc failed too :( \n");
      else
        printf("Malloc worked, hmmm\n");
    }
  }
sleep(60*60); // ctrl+c to exit; makes it easier to see mem use
  exit(0);
}

See also here

EDIT May, 2020: For newer versions of Ubuntu, the default maximum PID number is now 4194304, and therefore adjusting it is not needed.

Now, if you have enough memory, the next limit will be defined by the default maximum PID number, which is 32768, but is also writable. Obvioulsy in order to have more than 32768 simultaneous processes or tasks or threads their PID will have to be allowed to be higher:

$ cat /proc/sys/kernel/pid_max
32768
$ echo 80000 | sudo tee /proc/sys/kernel/pid_max
80000
$ cat /proc/sys/kernel/pid_max
80000

Note that is quite on purpose that a number bigger than 2**16 was chosen, to see if it was actually allowed. And so now, set the cgroup max to, say 70000:

$ echo 70000 | sudo tee /sys/fs/cgroup/pids/user.slice/user-1000.slice/pids.max
70000
$ cat /sys/fs/cgroup/pids/user.slice/user-1000.slice/pids.max
70000

And at this point, realize that the above listed program seems to have a limit of about 32768 threads, even if resources are still available, and so use another method. My test server with 16 gigabytes of memory seems to exhaust some other resource at about 62344 tasks, even though there does seem to still be memory available.

$ cat /sys/fs/cgroup/pids/user.slice/user-1000.slice/pids.current
62344

top:

top - 13:48:26 up 21:08,  4 users,  load average: 281.52, 134.90, 70.93
Tasks: 62535 total, 201 running, 62334 sleeping,   0 stopped,   0 zombie
%Cpu0  : 96.6 us,  2.4 sy,  0.0 ni,  1.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu1  : 95.7 us,  2.4 sy,  0.0 ni,  1.9 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu2  : 95.1 us,  3.1 sy,  0.0 ni,  1.8 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu3  : 93.5 us,  4.6 sy,  0.0 ni,  1.9 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu4  : 94.8 us,  3.4 sy,  0.0 ni,  1.8 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu5  : 95.5 us,  2.6 sy,  0.0 ni,  1.9 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu6  : 94.7 us,  3.5 sy,  0.0 ni,  1.9 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu7  : 93.8 us,  4.5 sy,  0.0 ni,  1.7 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem : 15999116 total,   758684 free, 10344908 used,  4895524 buff/cache
KiB Swap: 16472060 total, 16470396 free,     1664 used.  4031160 avail Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
37884 doug      20   0  108052  68920   3104 R   5.7  0.4   1:23.08 top
24075 doug      20   0    4360    652    576 S   0.4  0.0   0:00.31 consume
26006 doug      20   0    4360    796    720 S   0.4  0.0   0:00.09 consume
30062 doug      20   0    4360    732    656 S   0.4  0.0   0:00.17 consume
21009 doug      20   0    4360    748    672 S   0.3  0.0   0:00.26 consume

Seems I finally hit my default ulimit settings for both user processes and number of timers (signals):

$ ulimit -i
62340
doug@s15:~$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 62340
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 32768
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 62340
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

If I raise those limits, in my case, I did it via /etc/security/limits.conf:

# /etc/security/limits.conf
#
# S18 specific edits. 2019.12.24
#       also for a rediculous number of threads test.
#
#Each line describes a limit for a user in the form:
#
#<domain>        <type>  <item>  <value>
#
#Where:
#<domain> can be:
#        - a user name
#        - a group name, with @group syntax
#        - the wildcard *, for default entry
#        - the wildcard %, can be also used with %group syntax,
#                 for maxlogin limit
#        - NOTE: group and wildcard limits are not applied to root.
#          To apply a limit to the root user, <domain> must be
#          the literal username root.
#
#<type> can have the two values:
#        - "soft" for enforcing the soft limits
#        - "hard" for enforcing hard limits
#
#<item> can be one of the following:
#        - core - limits the core file size (KB)
#        - data - max data size (KB)
#        - fsize - maximum filesize (KB)
#        - memlock - max locked-in-memory address space (KB)
#        - nofile - max number of open file descriptors
* - nofile 32768
#        - rss - max resident set size (KB)
#        - stack - max stack size (KB)
#        - cpu - max CPU time (MIN)
#        - nproc - max number of processes
* - nproc 200000
#        - as - address space limit (KB)
#        - maxlogins - max number of logins for this user
#        - maxsyslogins - max number of logins on the system
#        - priority - the priority to run user process with
#        - locks - max number of file locks the user can hold
#        - sigpending - max number of pending signals
* - sigpending 200000
#        - msgqueue - max memory used by POSIX message queues (bytes)
#        - nice - max nice priority allowed to raise to values: [-20, 19]
#        - rtprio - max realtime priority
#        - chroot - change root to directory (Debian-specific)
#
#<domain>      <type>  <item>         <value>
#

#*               soft    core            0
#root            hard    core            100000
#*               hard    rss             10000
#@student        hard    nproc           20
#@faculty        soft    nproc           20
#@faculty        hard    nproc           50
#ftp             hard    nproc           0
#ftp             -       chroot          /ftp
#@student        -       maxlogins       4

# End of file

I am able to go to 126020 threads, before the return of the inability to fork. This time the limit was (keep in mind that there are about `150 root owned threads on this server, before the test starts):

cat /proc/sys/kernel/threads-max
126189

O.K. so now adjusting that parameter:

echo 99999999 | sudo tee /proc/sys/kernel/threads-max
99999999

I can get to about 132,000 threads before my 16 gigabyte server starts to swap memory, and trouble errupts.

$ cat /sys/fs/cgroup/pids/user.slice/user-1000.slice/pids.current
132016

Note: running top places a significant additional load on the system under these conditions, so I didn't run it. However memory:

doug@s18:~/config/etc/security$ free -m
              total        used        free      shared  buff/cache   available
Mem:          15859       15509         270           1          79         137
Swap:          2047           4        2043

At some point you will get into trouble, but it is absolutely amazing how gracefully the system bogs down. Once my system starts to swap, it totally boggs down and I had many of these errors:

Feb 17 16:13:02 s15 kernel: [  967.907305] INFO: task waiter:119371 blocked for more than 120 seconds.
Feb 17 16:13:02 s15 kernel: [  967.907335]       Not tainted 4.10.0-rc8-stock #194
Feb 17 16:13:02 s15 kernel: [  967.907357] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.

And my load average ballooned to ~29000. But I just left the computer for an hour and it sorted itself out. I staggered the spin out of the threads by 200 microseconds per spin out, and that also seemed to help.


Ubuntu Core - How to get new public keys installed

A few suggestions all referenced in one location (here):

How do I add SSH Keys to authorized_keys file?

Can't login to Ubuntu Core 16 using a second ssh key

[SOLVED] Cannot ssh into Ubuntu Core 16


Ubuntu 19.10 upgrade to 20.04 (Please install all available updates for your release before upgrading.)

You are not fully upgraded.  To fix that held-back package, you can try these methods:  First, run the command
sudo apt-get --with-new-pkgs upgrade

And it should install the held-back packages.  It is safe, and usually does the trick.  If that doesn't work, see the list of held packages with:
sudo apt-mark showhold

And then you can unhold that package with:
sudo apt-mark unhold <package-name>

And then install:
sudo apt-get install -y <package>

Another way is to use aptitude. The command to use would be:
sudo aptitude safe-upgrade

safe-upgrade because it won't remove packages unless they're unused.
You can also run the dist-upgrade, which will force-install packages and dependencies, but be careful with that.  Sometimes it may remove packages to resolve dependency problems, which could make things even worse.  So please, try the methods above before resorting to dist-upgrade.
Best of luck!


Why doesn't the latest Ubuntu edition come with the latest stable Linux kernel version?

Like Ubuntu, the Linux kernel also has long-term support versions. So, for an Ubuntu LTS release (like 16.04), picking the latest long-term kernel version makes sense. This way, unlike with a normal stable release, Canonical can rely on the kernel maintainers to backport fixes for a long time. 4.4 will be supported till February 2018.

Canonical did pick a normal stable version, 3.13, for Ubuntu 14.04. This was considered a mistake. The Ubuntu community and Canonical devs had to pick up maintenance of the 3.13 kernel the same month that 14.04 released. On the other hand, 3.12 would have been supported by the kernel team until next year.


tar xvf /home/sermet/x.tar /home/sermet/

Mind you this will mess up your /home/sermet/ if the tar has not got subdirectories in it.


It sounds like NumLock is turned on. You have two options:

1) You can turn it off using Fn+Insert (NumLk) once you're logged in

2) You can turn off numlock by default in the BIOS


Is there any way to log windows log messages using rsyslog?

Never tried it myself, but take a loot at this project:
http://code.google.com/p/eventlog-to-syslog/


How to fix nodejs installation process on linux 19.04

Why try reaching your nose by going around the back of your head, instead of reaching straight up?
Here is how you can fix it. Head over to nodejs.org and download the stable version. Click that big green button where it says the LTS version. Once downloaded, right-click to see the option. Select the 'Open with Archive Manager' option. It will extract the file to your Download folder.
Now go to the 'software center' (with the 'shopping bag' icon) and search for Node or Node JS. You will find the Node JS the familiar green Node JS icon. Click to install and launch. That's it.
Launch terminal and type "node --version". You will see the version number.
You have installed Node.js in your system.


Do you know if the original resize/move failed when moving the partition, or when resizing the partition?

If it was during a move, then a good approach is to restore the dd image and try to figure out where the sectors are duplicated, and where the duplication (or copy) of sectors stops.  From there you can work backwards to piece the two halves of the partition together.

If the problem occurred during a resize operation, and tools like fsck cannot fix the problem, then you might consider trying to recover the data files with a disk scanning tools such as photorec.


Why is the ISO size for 12.04.3 larger than a CD?

It depends on architecture of your system for which you are installing Ubuntu.
If your system is 32 bit then Ubuntu 12.04 LTS 32bit CD image comes under 700 MB.
But if your system is of 64 bit architecture then Ubuntu 12.04 LTS 64bit CD image crosses 700 or 750 MB.

Other higher versions of Ubuntu 32bit & 64bit CD images even cross 800 MB. Thus require a DVD. Eg. Ubuntu 13.04 CD image is around 850 MB.
Following link may help you why it is so:

Kernels with Ubuntu LTS Enablement Stack


Unable to install/unistall because of python3 broken package

Try these  commands:

sudo apt-get clean
sudo apt-get update
sudo apt-get -f install


If xdg-open opens immediately and doesn't wait, consider using actual name of music player you use  ( default for Ubuntu would be totem) instead of xdg-open

Alternatively, what also can be done is this:

xdg-open file.wav ; while pgrep -f "file.wav" >/dev/null ; do : ; sleep 1 ; done

This probably would be better in a script instead of alias, so you would have multiple lines. Basically, here we've put a while loop that blocks us from going to next statement, and we're repeatedly checking if there's a process that has file.wav in its command-line. Once there's no process like that, you can go on to next line of xdg-open


Looks like:

sudo apt-get install unity unity-common unity-services unity-lens-* unity-scope-* unity-webapps-* gnome-control-center-unity hud libunity-core-6* libunity-misc4 libunity-webapps* appmenu-gtk appmenu-gtk3 appmenu-qt* overlay-scrollbar* activity-log-manager-control-center firefox-globalmenu thunderbird-globalmenu libufe-xidgetter0 xul-ext-unity xul-ext-webaccounts webaccounts-extension-common xul-ext-websites-integration nautilus nautilus-sendto nautilus-sendto-empathy nautilus-share activity-log-manager-common python-zeitgeist rhythmbox-plugin-zeitgeist zeitgeist zeitgeist-core zeitgeist-datahub

The . files you removed in your home directory will be re-created.

You may be able to

sudo apt-get install ubuntu-desktop


How to force audio from speakers and headphone

Install pavucontrol from the following link.

Now open the app using the follwing cmd in terminal :

pavucontrol

Now in the Playback tab, change the output to speakers--->


How to prevent screensaver from locking the screen in Unity

The easiest way to do this is open up the System Settings,  Dash -> System Settings  and select your screen.

You should be prompted with the following screen options;

You simply need to choose a setting that suits your needs - if you do not want the screen to turn off simply select 'Never'

You can also choose whether you want to 'Lock' the screen as well. Once done choose 'All Settings' and then close - you may have to log out and back in again for the changes to take effect.

Update

For 12.04 this setting screen has been renamed to Brightness and Lock - see below;


How can I list installed network cards using Terminal?

while  the above works, there are other options with less typing.

ip link show

or my favorite, netstat

netstat -i

you can also  use ifconfig and iwconfig for additional information or information about a specific device

ifconfig eth0

iwconfig wlp1s0

sort  of depends on the sort of information you wish to display.


Ubuntu machine not responding to ping from Windows machine on same network

Maybe your iptables (aka Firewall) has rule for blocking ping requests.
You can check it easily by disabling the iptables with the command sudo ufw disable. Run the ping test again.
Enable it again with sudo ufw enable.


Make gnome-terminal request user confirmation before close

GNOME Terminal checks if there is foreground process started by shell (see terminal_screen_has_foreground_process function)
You can use sh to create new process and gnome-terminal to ask before exit this way:
gnome-terminal -- sh -i -c python3

Update:
The same effect may be achieved with bash using custom script:
gnome-terminal -- bash -i my_script.sh

and the content of my_script.sh is just
python3


/dev/disk-by-uuid/* permissions = lrwxrwxrwx... Is this a security risk?

Permissions on /dev/disk/by-uuid/ are only the permissions for the links, not the permissions for the device referenced by the link.

Example

Here is the permissions on one of my partitions, in /dev/disk/by-uuid:

pim@pim-linux:~$ ls -lh /dev/disk/by-uuid/84bb8e1e-56a7-413c-82dc-c7f0d23d6059
lrwxrwxrwx 1 root root 10 Nov  6 07:57 /dev/disk/by-uuid/84bb8e1e-56a7-413c-82dc-c7f0d23d6059 -> ../../sdb2

You can see that /dev/disk/by-uuid/84bb8e1e-56a7-413c-82dc-c7f0d23d6059 is a symbolic links to /dev/sdb2 with all permissions (lrwxrwxrwx).

Now let's have a look at the permissions of /dev/sdb2:

pim@pim-linux:~$ ls -lh /dev/sdb2
brw-rw---- 1 root disk 8, 18 Nov  6 07:57 /dev/sdb2

/dev/sdb2 is a block device, owned by root, and only root (and the root group is able to read or write to it.

Let's try messing up with the partition, (as my normal user pim):

pim@pim-linux:~$ echo test > /dev/disk/by-uuid/84bb8e1e-56a7-413c-82dc-c7f0d23d6059
bash: /dev/disk/by-uuid/84bb8e1e-56a7-413c-82dc-c7f0d23d6059: Permission denied

Success! permision denied is what we expected.

About the attacker

The potential attacker (either local or remote) must have gained root privileges on your machine before messing with your disk, so the permissions on the /dev/disk/by-uuid/ links are not a security problem.


I believe the driver you compiled is rtl8192ee, please confirm in the terminal command:

lsmod

I suggest you try a driver parameter. Again, from a terminal:

sudo -i
echo "options rtl8192ee swenc=1"  >  /etc/modprobe.d/rtl8192ee.conf
exit

Reboot and tell us if stability is improved.


On a UEFI install, how to do Minimal, Minimal Virtual Machine, Expert install?

You will get a minimal install, if you select no (extra) program package, when offered by tasksel. So you need not do anything at the grub menu.

See this link for more details,

Mini system with 'text' screen user interface - Scroll down to the pink menu.

So if you do not select anything here, and un-select whatever might be pre-selected, you will get a minimal system.


How Can I Remove Epiphany Without Removing Gnome?

Gnome-core is just a metapackage.  You can remove it without much ill effect.

Its only provided files are a changelog and a copyright file.  It won't "hold" dependencies installed, you run a minor risk there, but nothing major.

Reference


"FreeImage is not set up correctly. Please ensure FreeImage is set up correctly" error when trying to verify cudnn installation

Installing the library fixed this for me

sudo apt-get install libfreeimage3 libfreeimage-dev

I found the solution here...

https://devtalk.nvidia.com/default/topic/1043665/?offset=3#5302165

Regarding the second part of your question for nvcc...

I'm sure you added the PATH correctly per the install guide, but if you reboot then the PATH will be reset. You'll need to add it to ~./bashrc or one of the many other options described here:

https://stackabuse.com/how-to-permanently-set-path-in-linux/
"How to Permanently Set $PATH in Linux" By  Tendai Mutunhire


Dual boot menu not showing after installation of Ubuntu 12.04

You can repair Grub by booting an Ubuntu Live-CD and using the program "Boot-Repair".

If you have an Internet connection you can just insert your Ubuntu CD (the one you used for installing ubuntu 12.04) and select "Try Ubuntu". It will then boot a live environment of Ubuntu from the CD.
Here you can install Boot-Repair via the Terminal. Type:

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

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

After that launch Boot-Repair and select "Recommended Repair".
That should do the trick and reconfigure/-install Grub.

Better and more detailed instructions can be found here: https://help.ubuntu.com/community/Boot-Repair

Good luck! :)


If ccpd= Canon Printer Daemon for CUPS ,

then here is the script

#!/bin/sh
# startup script for Canon Printer Daemon for CUPS (ccpd)

# Provides:         ccpd
# Required-Start:   $local_fs $remote_fs $syslog $network $named
# Should-Start:     $ALL
# Required-Stop:    $syslog $remote_fs
# Default-Start:    2 3
# Default-Stop:     0 1 4 5 6
# Description:      Start Canon Printer Daemon for CUPS

DAEMON=/usr/sbin/ccpd
LOCKFILE=/var/lock/subsys/ccpd
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
NAME=ccpd
DESC="Canon Printer Daemon for CUPS"

test -f $DAEMON || exit 0

. /lib/lsb/init-functions

case $1 in
  start)
        log_begin_msg "Starting $DESC: $NAME"
        start-stop-daemon --start --quiet --exec $DAEMON
        log_end_msg $?
        ;;
  stop)
        log_begin_msg "Stopping $DESC: $NAME"
        start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
        log_end_msg $?
        ;;
  status)
        echo "$DESC: $NAME:" `pidof $NAME`
        ;;
  restart)
        log_begin_msg "Restarting $DESC: $NAME"
        start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
        sleep 1
        start-stop-daemon --start --quiet --exec $DAEMON
        log_end_msg $?
        ;;
  *)
        echo "Usage: ccpd {start|stop|restart|status}"
        exit 1
        ;;
esac

exit 0

SOURCE


How to keep the coloring in bash when using `sudo -i`?

I was going to add PS1, following the answer by Alaa Ali, and I've found the following lines:

# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
force_color_prompt=no

I've changed it to force_color_prompt=yes, then exit, login back, and voilà! Colors!

I'm on Ubuntu (disco), hope that this help. I think that it's better than PS1 because there's a lot of code that depends on this variable, I don't know exactly what's doing, but somebody has written it, I don't want to waste his/her time :-)


If you downloaded standalone version you can place Aptana Studio in whatever Folder you wish and invoke it by double clicking in the AptanaStudio3 icon as shown in the next screenshot:

Optionally you can move the extracted folder and it contents to your local programs folder /usr/bin via gksudo nautilus or via terminal but I think it is not needed unless you wish to invoke it via terminal.

If you wish to add an Application Icon to your Applications list from the Unity Launcher (or any other launcher like Synapse) you can simply create a .desktop file with the next contents on it:

[Desktop Entry]
Version=1.0
Name=AptanaStudio3
Comment=Aptana Studio 3
Exec=/home/geppettvs/Documents/Aptana_Studio_3/AptanaStudio3
Icon=/home/geppettvs/Documents/Aptana_Studio_3/icon.xpm
Terminal=false
Type=Application
Categories=Application;

And place it inside of the ~/.local/share/applications/ folder. Remember to change the folder where AptanaStudio3 and its Icon resides in order to make it work properly.

Good luck!


Scanner detected with sane-find-scanner, but not with scanimage -L or sudo scanimage -L

From what I see on the official sane page, the ScanSnap S1300 uses the epjitsu, not the fujitsu backend. You could try moving the configuration entry from fujitsu.conf to epjitsu.conf file in the same folder.

I'm not sure what exactly are the differences between the S1300 and S1300i, so you may have to extract the *.nal firmware file from the Fujitsu Windows driver like it says in the header of both fujitsu.conf and epjitsu.conf files in /etc/sane.d/, if you haven't done that already.

Update
I just remembered when I built sane from source because I needed the new version for my scanner to function, I had to create a new udev rule for the scanner to be usable.

Created a new file in /etc/udev/rules.d called 40-libsane.rules and add the following line to the file:

ATTRS{idVendor}=="AAAA", ATTRS{idProduct}=="BBBB", ENV{libsane_matched}="yes"

Replace the AAAA and BBBB with the IDs of your scanner. You can see them by typing lsusb (actually it's the same IDs you said you used to create a new entry in fujitsu.conf).


Launching Chromium via Terminal, waiting some times, and close it

You're right, when you run something in the foreground —unless it forks out itself— it blocks flow. The answer would logically be to stick chromium in the background, and allow the rest of your commands to continue. You can do that with a single &

chromium-browser ... & sleep 1m; pkill --oldest chromium

There are other considerations to think about here when dealing with something as complicated as Chrom{e,ium}. They tend to fork out into monster processes and killing the head might not kill them all. If you're getting any gyp from the above, I'd switch to killall chromium.

And that all said, I've just learnt about the timeout command. Yeah, still learning. This simplifies the syntax and will even let you leave something in the foreground (useful for interactive terminal stuff).

timeout 1m chromium-browser www.youtube.com -start-fullscreen

This sends SIGTERM by default but you can tune it. See man timeout.


Help connecting to Windows Shares on 2003/2008 server Ubuntu 12.04

Instead of using "connect to server" you could try opening a nautilus window, press CTRL+L to show address bar, and write the address of your shared folder in this way:

smb://10.10.10.11/GLOBAL

Pressing enter you'll be asked for user, domain and password for the connection.
If you have trouble connecting using the domain name written in capital letter, try lower-case.
Til now I've been able to connect to every Windows Server I met


Brother MFC-7820N network printing of PDF files is extremely slow

Here is a valuable link.

The key bit of advice from that page is that the default BRScript and Foomatic drivers do not work with stuff like PDF files.  That sure is my experience too. Instead, there are other drivers:

sudo apt-get install brother-lpr-drivers-laser brother-cups-wrapper-laser

Those show up (for me anyway) in the (so, so terrible) "New Printer" interface in xfce as the "Brother MFC7820N for CUPS" driver. That one works.

edit — as of 13.10, you have to select "MFC7820N for CUPS" from the Brother printer list in order to find the driver.


How to run XDMan (Xtream Download Manager) on Ubuntu Startup?

To find the exact command first browse to File System => usr => share => applications
(This is your required app directory)

Here you can find all of your application shortcut. Click Right button on 'Xtreme download manager' > select properties > copy the command

To enable an application on startup you have to set that on startup application.

Go to dashboard

Now search for startup and open Startup applications

Click Add button

Now set name as xdm and paste the command

Click Add. Now it's done.


In windows 7 download an application called DISK INTERNALS ... This app will allow you to access and copy files from your ubuntu installation from within Windows. I have never used this app before but I am sure it's pretty straight forward to use.


How to track Firefox's Internet Usage for each tab?

I tried finding some add-on or tool that could track per tab bandwidth
usage but without any luck so I was wondering if there is any way I
could do that?

Yes, this can be done by entering about:performance in your browser address bar. It will present you with a list of your open tabs/add-ons with the Energy Impact and memory usage...

I am wondering if there is a way to put all the tabs not used in the past 30 minutes to sleep?

This can be done too.
install Sleep Mode from the Mozilla Addons site.
Search for Sleep Mode, by matico, and click the Add to Firefox button.
When prompted, click Add and then click OK.

Once installed, click the Sleep Mode icon and select if you want to ignore pinned tabs (and various Google offerings), and click START. All but your working tab will go to sleep (as indicated by the moon icon in the tab).
To disable Sleep Mode, click the same icon and click DISABLE.
That's all there is to hibernating tabs in Firefox with the Sleep Mode extension.
As for internet use monitoring there are a few more things to consider:
You could try entering about:networking in your browser address bar and selecting the monitor which you wish to use from the list on the left of the screen:

and consider online tools listed in this resource.
reference


You've increased the physical partition size, now you've got to use LVM to increase the logical partition size.

Easiest to install system-config-lvm to visually help you...

sudo apt-get update
sudo apt-get install system-config-lvm

Start it from the Unity dash by typing lvm into the search box.

Update #1:

Change the logical view for root. See https://wiki.ubuntu.com/Lvm for basic help. You can also search https://help.ubuntu.com for "system-config-lvm" and find a lot more detailed help.


Chromium does not start up on Ubuntu 14.04 LTS

This looks awfully similar to a problem mentioned for 16.04. Does it work if you launch Chromium via chromium-browser --disable-extensions?


Remove title bar from GNOME but keep window controls

You can use the Pixel Saver gnome extension. It hides the title bar and shows the window control options on the right of top panel


How to Remove Stckiness In Dual Monitors while using 18.04

Check your monitor positions they may have changed and your mouse isn't going following the same path it used to. Go into Settings -> Screen Display and you'll see this:

If monitors are above/below you have to move your mouse up and down. If monitors are left/right you have to move your mouse off the left edge to the right and vice versa.

If this is not the behavior you desire then left click on one monitor and drag it to the appropriate position in relation to the other(s).