gVIM has too much space between characters I installed ubuntu 12.04 lts yesterday, and didn't change any system setting, but gvim can't get correct font display, there's too much space between character.

Screeshot :

http://i.imgur.com/rm9hF.png

The .gvimrc file:

http://i.imgur.com/LngNy.png

Try another font.

http://vim.wikia.com/wiki/Change_font:

  In gvim, you can change the font using the Edit menu, Select Font. An
  alternative is to enter the command:

:set guifont=*

  Once you have a font you like, you want to make it the default in the
  future. Do

:set guifont?

  and Vim will display something like

guifont=Lucida_Console:h11

  Make a note of this string. Now put a line in your vimrc to set
  guifont to this value, like this:

if has('gui_running')
  set guifont=Lucida_Console:h11
endif

  Note: If there is a space in the text printed, such as

guifont=Monospace 10

  it will be necessary to escape the space

set guifont=Monospace\ 10

In my case:

gvim 8.1.1401
debian 10 (buster)
X11 with ratpoison

worked to replace:
guifont=Monospace:h10

with
guifont=Monospace\ 10

similarily
set guifont=Source\ Code\ Pro\ for\ Powerline:h10

was replaced by
set guifont=Source\ Code\ Pro\ for\ Powerline\ 10

Not sure if it helps.


Realtime noise-removal with PulseAudio? Is it possible to do realtime noise-removal with PulseAudio, so the sound output that's coming out is smoother?

Pulseaudio module module-echo-cancel
I started reading a lot about PulseAudio and "hidden" options it had so I could find one that was similar to this question. The one I found was the noise-cancellation module, which is one that dramatically lowers any static noise on the microphone and even A LOT of the background noise, basically giving you the benefit of only recording your own voice with excellent quality (For audio recording for example). To do this follow this steps:

sudo nano /etc/pulse/default.pa

Add the following line anywhere on the file, but I recommend almost at the end where you will find a comment about Echo Cancellation stuff (~line 140):
load-module module-echo-cancel

Reload PulseAudio (pulseaudio -k) or simply restart the computer. You should be able to select the new Noise Cancellation option from the Input Device Section:

You can find more information about it on the Echo Cancel Module Page
Set input as default
If you wish to set as default the echo cancel device simply turn the above line into:
load-module module-echo-cancel source_name=logitechsource

and then at the bottom of the file add
set-default-source logitechsource

In this case I named the source logitechsource, but you can name it whatever you want and simply either restart pulseaudio.
Rename device
Lastly, if you do not want a super long name on the Sound Settings (When you want to select an input/output device). My suggestion is renaming the input device like this:
load-module module-echo-cancel source_name=logitechsource source_properties=device.description=LogitechHD

And again, restarting pulseaudio. The end result looks like this:

UPDATE - Full documentation Found Here Thanks to clément

There is a noise suppression plugin for module-ladspa-sink:

https://github.com/werman/noise-suppression-for-voice

Here you can can find a tutorial for installation on Fedora, and 2 sample recordings to get an idea about the effects of the plugin:

https://weblog.lkiesow.de/20200705-ladspa-realtime-noise-suppression-plugin/
https://fedoramagazine.org/real-time-noise-suppression-for-video-conferencing/

On Ubuntu:

Download the linux_rnnoise_bin_x64.tar.gz
From the archive, copy the bin/ladspa/librnnoise_ladspa.so e.g. to /usr/local/lib/librnnoise_ladspa.so or anywhere else.
Find out the name of your input using pactl list sources short. For example my microphone is called alsa_input.usb-046d_0994_4A365E20-02.mono-fallback
Run the commands bellow to activate the noise cancellation (before running replace the /usr/local/lib/librnnoise_ladspa.so and alsa_input.usb-046d_0994_4A365E20-02.mono-fallback to your values determined in the steps 2. and 3.):

    pacmd load-module module-null-sink sink_name=mic_denoised_out
    pacmd load-module module-ladspa-sink sink_name=mic_raw_in \
        sink_master=mic_denoised_out label=noise_suppressor_mono \
        plugin=/usr/local/lib/librnnoise_ladspa.so \
        control=50
    pacmd load-module module-loopback \
        source=alsa_input.usb-046d_0994_4A365E20-02.mono-fallback \
        sink=mic_raw_in channels=1 source_dont_move=true sink_dont_move=true
    pacmd load-module module-remap-source source_name=denoised \
        master=mic_denoised_out.monitor channels=1

In your voice recording application you will configure audio input from Null output or Remapped monitor of null output and test (I used Skype Echo)

To make the changes permanent, append the commands from the step 4 into /etc/pulse/default.pa, omitting the pacmd on the beginning of each line.


Firefox Middle Mouse Button Scroll How can I get the middle mouse button to behave correctly in Ubuntu? Clicking the middle button does not show the arrow which allows me to scroll the page by moving the mouse.

Information:

Firefox 3.6.8
Mouse: Microsoft Intellimouse Explorer 3.0

Edit ➜ Preferences ➜ Advanced ➜ Check 'Use autoscrolling'

Edit 2020-11-23: this answer is verified with Firefore 62.0.3
Edit 2018-03-14: this answer is verified with Firefore 58.02
Just to precise, since version 57 of Firefox the path is the following: Menu ➜ Preferences ➜ General, then all the way down in the Browsing section check the box Use auto scrolling.
You can also just type auto in the search field once you're in the Preferences window.
See this screenshot:


Touchpad Freezing on a Sony VAIO VPCF22S1E I have a Sony VAIO VPCF22S1E. I just upgraded from 11.04 to 11.10 . While upgrading (on downloading packages step) I lost my internet connection and 2-3 minutes later it resumed. I continued to download packages. And finally, upgrading is completed. Now I'm using 11.10 . But when I log in to Ubuntu after 2 minutes the touchpad will be unresponsive. I can't use it or the integrated buttons.

The Disable touchpad while typing option is turned off (suggested from this answer) but it did not solve the problem.

How can I sure my packages downloaded and installed successfully? (As I said, I lost my connection while downloading packages)

PS: I can use USB mouse.

PPS: I have tried apt-get update , apt-get upgrade

Here is a fix worked for first reboot but now it's not working :

Edit /etc/default/grub to include GRUB_CMDLINE_LINUX=”i8042.nopnp”
Run: sudo update-grub
Reboot.

Turn off disable touchpad while typing in mouse options and reboot.


How to solve video and mouse issues on HP Pavilion A288N? I am trying to get an HP Pavilion A288N desktop to run 12.04, but display is bad and mouse acts like an 'eraser'. It has an integrated ProSavageDDR (KM266) graphics card.

I'm running already Windows XP on it with the latest driver from S3; SP23964 (VIA/S3 graphics driver v6.14.10.0012 update). However, XP has no problem.

Try this command first:

sudo apt-get install mesa-utils

to install display drivers. This will fix your display.


How to make bootable pendrive to install ubuntu os? I am a newbie to all of this stuff.

Initially I had a OS CD of Ubuntu 10.4 version. I never tried to install it. Now I have lost my CD somewhere. Earlier I copied the content to my laptop. When I tried to install by copying to another CD/pendrive it didn't install.

Now i am using Windows. But I would like to install Ubuntu, because everyone said that Linux/Ubuntu is an amazing OS.

So I searched in google for a solution. With Unetbootin, pendrive linux, I can make a bootable pendrive to install. But Unetbootin asks for an ISO-image. I did many experiment and wastes more than 9 CD's. I have no experience with that. Where can I get the ISO-image?
Actually, what is an ISO-image?

You can download copy of ubuntu iso at http://www.ubuntu.com.

For a pen drive installation,
The motherboard has to support booting from a USB flash/pen/key drive. Please consult your BIOS manufacture reference for more details.

An image is a copy of a cd/dvd that can be directly used for burning/mounting. Its more like a zip file or you can say a single file representation of a whole cd/dvd. There are some more features. Like - Copying contents of a cd/dvd and burning them won't make the cd/dvd bootable.  There are special flags with image file, that causes the cd to be bootable after burning.

You can use this tool for creating your bootable USB drive
it can be used from  Windows / Linux /Mac

It can also directly download the iso file to create the bootable usb stick for you.

unetbootin


Is there anywhere where I can get Ubuntu installed for me? I have tried for days to install Ubuntu on my lenovo ideapad z510 and I feel like giving up. I really feel like I will like Ubuntu, but for some reason I always have some king of problem.

I really don't want to give up on Ubuntu, but I don't want to brick my laptop either.

Is there anywhere I can have Ubuntu installed for me?

I have tried messing with my bios, used a DVD and a USB, but no luck.

Thanks in advance!

Edit: I am based in Warwick, RI in the USA.
I don't want to run Ubuntu in windows.

Edit 2: I will try the suggestion of going to a local shop or best buy. I will edit again if I find this successful. This may take some time because I need to find time to make the visit.

You should try any local computer repair shop, usually the people that work in those places know how to install Ubuntu. If they don't they will probably give directions to a place where someone can do that for you.

Most any local computer shop should know how to install Ubuntu. In my opinion you would be better off looking to Google to find a local computer shop.

And if worse comes to worse you could try best buy if its in your area and see if they would do it.

Suggested Google search: Computer shop Warwick, RI

I would look at the reviews for each store and make sure they have a good rep!


My Ubuntu is running fsck on every bootup On every bootup it's the same:

/dev/sda1: clean, 908443/38690816 files, 44176803/154733312 blocks

Is it some kind of option Ubuntu uses to ensure filesystem consistency or is there something wrong with my HDD? fsck takes up to 30s while booting and so about triples the time needed otherwise.

Full output (partly in German):

Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
Begin: Running /scripts/local-bottom ... done.
done.
Begin: Running /scripts/init-bottom ... done.
fsck von util-linux 2.20.1
/dev/sda1: sauber, 908443/38690816 Dateien, 44176803/154733312 Blöcke
udevd[623]: unknown key 'SYSFS{idVendor}' in /lib/udev/rules.d/45-libticables.rules:6

udevd[623]: invalid rule '/lib/udev/rules.d/45-libticables.rules:6'

 * Starting mDNS/DNS-SD daemon                                                 [ OK ]
 * Starting Reload cups, upon starting avahi-daemon to make sure remote queues are populated                                                                   [ OK ]
 * Starting configure network device security                                  [ OK ]
 * Starting bluetooth daemon                                                   [ OK ]
 ####* Starting all other stuff

/dev/sda1: clean, 908443/38690816 Files, 44176803/154733312 Blocks

The line producing that message is this:

/* Print the summary message when we're skipping a full check */
log_out(ctx, _("%s: clean, %u/%u files, %llu/%llu blocks"),

It skips the "full check" but just made sure that some fast test to the journal are clean and there isn't orphan inodes:

cat /var/log/boot.log
fsck from util-linux 2.20.1
fsck from util-linux 2.20.1
/dev/sda1: clean, 260598/771552 files, 1684682/3080192 blocks
/dev/sdb10: recovering journal
/dev/sdb10: Clearing orphaned inode 142568 (uid=1000, gid=1000, mode=0100664, size=32768)
/dev/sdb10: Clearing orphaned inode 138527 (uid=1000, gid=1000, mode=0100600, size=9580)
/dev/sdb10: clean, 54957/991232 files, 3498365/3958006 blocks

This is normal and expected. If it was a real thorough check it would take much more time but it usually takes a second or less. Systemd systemd-fsck(8) manual page has the conditions where a full check is triggered:

  systemd-fsck-root.service is responsible for file system checks on the
     root file system, but only if the root filesystem was not checked
  in    the initramfs.  systemd-fsck@.service is used for all other file
  systems and for the root file system in the initramfs.

  These services are started at boot if passno in /etc/fstab for the
  file    system is set to a value greater than zero. The file system
  check for    root is performed before the other file systems. Other
  file systems may    be checked in parallel, except when they are on
  the same rotating disk.

  systemd-fsck does not know any details about specific filesystems,
  and    simply executes file system checkers specific to each
  filesystem type    (/sbin/fsck.*). This helper will decide if the
  filesystem should    actually be checked based on the time since last
  check, number of    mounts, unclean unmount, etc.

You can simply check that the tests took next to nothing to run (if you use systemd):

sudo systemd-analyze blame | grep fsck
          1.608s systemd-fsck@dev-disk-by\x2duuid-408535fe\x2d28e6\x2d4d82\x2dbb59\x2d9810ead089a3.service
            87ms systemd-fsck@dev-mapper-vlhome\x2dlvhome.service

My searches land me conclusion that Ubuntu default maximum mount count is set to -1. This means that fsck will never run on any boot regardless of number of mounts. You can check yours by command -

sudo dumpe2fs -h /dev/sda8 | grep -i 'mount count'

You can increase it on your requirement using tune2fs. A typical example is as follows -

sudo tune2fs -c 30 -i 1w /dev/sda8

Customise it on your accord.


Ubuntu installations I have win 8.1 preinstalled.I installed  ubuntu  in a drive.but during the booting it is not asking which os is to boot and autometically win is booting.please help me.I am using hp laptop with preinstalled win 8.1

Go to the BIOS settings by pressing the escape key and then selecting BIOS (options may vary with firmwares). From there, find the boot devices in UEFI mode (legacy would be disabled by default). Select OS boot manager and hit enter key and bring up ubuntu by either pressing F5 or F6 (explained at the side of the screen) and press F10 twice and save settings and exit.


Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) Upon trying to upgrade from 10.10 to 11.04 all seemed to go well until the restart. This error message is what comes up:

Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

How do we fix that?

You are missing the initramfs for that kernel.  Choose another kernel from the GRUB menu under Advanced options for Ubuntu and run sudo update-initramfs -u -k version to generate the initrd for version (replace version with the kernel version string such as 4.15.0-36-generic) then sudo update-grub.

In addition to Tomeu's instructions, before chroot I needed to:

sudo mount --bind /dev /mnt/dev

Additionally, after the chroot:

cp -r /usr/lib/i386-linux-gnu/pango /usr/lib/

(Got this from here.)


How to untar a .tar.xz file I tried to run:

tar -zxvf name.tar.xz

but all I got was:

tar: Child returned status 2
tar: Error is not recoverable: exiting now

The z flag of GNU tar (which is the version of tar shipped with Ubuntu) is used to speciy that the archive being processed is compressed using gzip, which is usually indicated by the .tar.gz (or, more rarely, .tgz) extension. In GNU tar, it is an error to use the z flag if the archive is not compressed with gzip, as you experience now.

Archives using the .tar.xz extension are compressed with xz, and the corresponding flag in GNU tar is J. Hence, replacing z with J in your command should solve your problem. In addition, you may get a "command not found" error if the xz tools are not installed on your system, which can be remedied by installing the xz-utils package.

Alternatively, you can simply omit the filetype-related flag altogether, and simply use -xvf; in that case tar will attempt to autodetect the compression format by analyzing the file. (You can probably also dispense with the v flag; it just prints a list of the extracted files, which is not usually useful.)

You can use the command below to untar .tar.xz files.

Syntax:

tar -xJvf File_Name.tar.xz

Example:

tar -xJvf etc.tar.xz


kubuntu 15.04 background image disappears After one of the latest upgrades the background image disapper and the whole background becomes black. Nothing is possible anymore in de Desktop Settings, whatever you change the background will stay black.

When reboot everything seems fixed but after a few minutes black again. Any idea how can this be fixed?

It was a fresh install and not an upgrade from the 14.10.

Apparently, I found the problem. In the folder ~/.kde/share/config/ there is a file called kwinrulesrc that needs to be removed.  Just in case rename it and see if that fixes the problem.  If so, it is safe to delete it.


Virtualbox on Ubuntu 19.10 I have downloaded Virtualbox from the official repository. However, I can't manage to install it on Ubuntu 19.10:

> lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 19.10
Release:    19.10
Codename:   eoan

It says that my configuration does not have some dependencies:

dpkg -i virtualbox-6.0_6.0.14-133895~Ubuntu~bionic_amd64.deb
Selecting previously unselected package virtualbox-6.0.
(Reading database ... 183239 files and directories currently installed.)
Preparing to unpack virtualbox-6.0_6.0.14-133895~Ubuntu~bionic_amd64.deb ...
Unpacking virtualbox-6.0 (6.0.14-133895~Ubuntu~bionic) ...
dpkg: dependency problems prevent configuration of virtualbox-6.0:
 virtualbox-6.0 depends on libqt5opengl5 (>= 5.0.2); however:
  Package libqt5opengl5 is not installed.
 virtualbox-6.0 depends on libqt5printsupport5 (>= 5.0.2); however:
  Package libqt5printsupport5 is not installed.
 virtualbox-6.0 depends on libqt5x11extras5 (>= 5.6.0); however:
  Package libqt5x11extras5 is not installed.
 virtualbox-6.0 depends on libsdl1.2debian (>= 1.2.11); however:
  Package libsdl1.2debian is not installed.
 virtualbox-6.0 depends on libvpx5 (>= 1.6.0); however:
  Package libvpx5 is not installed.

dpkg: error processing package virtualbox-6.0 (--install):
 dependency problems - leaving unconfigured
Processing triggers for systemd (242-7ubuntu3) ...
Processing triggers for gnome-menus (3.32.0-1ubuntu1) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu1) ...
Processing triggers for mime-support (3.63ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for shared-mime-info (1.10-1) ...
Errors were encountered while processing:
 virtualbox-6.0

Running sudo apt-get install -f won't install the dependencies, but will remove the uncomplete installation of Virtualbox. Am I missing something?

To install the official package and testing VirtualBox for your release, you need only

sudo apt install virtualbox

That will cause https://packages.ubuntu.com/eoan/virtualbox to be installed (note: it's found in 'multiverse' so that repository must be enabled; https://help.ubuntu.com/community/Repositories/Ubuntu)

You are trying to install a virtualbox packaged for bionic (18.04) which is unofficial for Ubuntu 19.10 (eoan).  It needs to be removed (if installed) and the official 6.0.14 package installed from official repositories (for eoan).

I just installed Virtualbox-6.1 using the Bionic App repository. I did have to install libvpx5 using

dpkg -i from https://ubuntu.pkgs.org/19.04/ubuntu-main-amd64/libvpx5_1.7.0-3_amd64.deb.html

but it seems to work fine. Hopefully Oracle will add Eoan soon.


How do I use variables in a sed command? I tried the following code to replace QQ with ZZ, but it doesn't do what I want:

var1=QQ
sed -i 's/$var1/ZZ/g' $file

However, this code does what I want:

sed -i 's/QQ/ZZ/g' $file

How do I use variables in sed?

The shell is responsible for expanding variables. When you use single quotes for strings, its contents will be treated literally, so sed now tries to replace every occurrence of the literal $var1 by ZZ.

Using double quotes

Use double quotes to make the shell expand variables while preserving whitespace:

sed -i "s/$var1/ZZ/g" "$file"

When you require the quote character in the replacement string, you have to precede it with a backslash which will be interpreted by the shell. In the following example, the string quote me will be replaced by "quote me" (the character & is interpreted by sed):

sed -i "s/quote me/\"&\"/" "$file"

Using single quotes

If you've a lot shell meta-characters, consider using single quotes for the pattern, and double quotes for the variable:

sed -i 's,'"$pattern"',Say hurrah to &: \0/,' "$file"

Notice how I use s,pattern,replacement, instead of s/pattern/replacement/, I did it to avoid interference with the / in \0/.

Example

The shell then runs the above command sed with the next arguments (assuming pattern=bert and file=text.txt):

-i
s,bert,Say hurrah to &: \0/,
text.txt

If file.txt contains bert, the output will be:

Say hurrah to bert: \0/

To expand (pun intended) on @mani's answer,

this solution will work for regular expressions fed to other commands, such as perl
use double quotes around the regex (yes, even under Unixy systems) in
order to expand the variable as expected
| may appear in your variable's value as well, so don't be scared to try other delimiters


ARM Chroot installing xfce fails, packages named different I am trying to install xfce within an ARM chroot, most packages download  fine however a handful error out, after looking at the packages in the repo I have found that what apt-get is trying to get seems to be different to what the package is named.

For example, apt-get fails trying to get

http://ports.ubuntu.com/pool/main/u/upower/upower_0.9.22-1_armhf.deb

when I look on the server this file is not there but  there is:

http://ports.ubuntu.com/pool/main/u/upower/upower_0.9.22-1ubuntu1_armhf.deb

How can I fix it so apt trys to get the right package, there are about 15 packages that seems to be looking for the wrong file

I guess you need to update you package database, run:

sudo apt-get update


Chrome home page is not loading properly Some things changed after what i don't know. I can't delete thumbnails or add. Search bar is not rounded. The button minimize is changed. Please, help. What should i do? I use Ubuntu 18.10. nvidia-390

This might be due to an update for Chrome, but I'm not sure about the thumbnails. I would check which version of Chrome you're using and see if it's the latest version available. Look at the change logs for recent Chrome updates and see if the changes are associated with anything you're experiencing.

Chrome Releases


Hitting arrow keys adds characters in vi editor When I tried to use arrow keys in insert mode in vi editor the following characters are being inserted in the editor:

for ↓ I get B,
for ↑ I get A,
for ← I get D,
for → I get C.

Please help me in resolve this problem.

If you don't already have a .vimrc file in your home directory, create one using this:

vim ~/.vimrc

Add this line to the top of the file:

set nocompatible

Save the file and this should fix the problem for you. :)

This may happen because Vim received no (or wrong) information about the terminal you are using and therefore can't recognise the key presses correctly.
Since Vim tries to get this information from the TERM variable, this could be fixed by running
export TERM=linux

before starting Vim.
This is similar to Jasper Nuyens's answer about setting it to xterm. xterm, xterm-color, and xterm-256color relate to graphical terminal programs. linux is the terminal type set in virtual consoles and is worth trying if you're not in a graphical terminal, or if xterm was already set or otherwise not effective.


How do I increase screen resolution in ubuntu 12.04? I want 1366x768 I get the following output when I run xrandr:

Screen 0: minimum 320 x 200, current 1280 x 800, maximum 8192 x 8192
LVDS1 connected 1280x800+0+0 (normal left inverted right x axis y axis) 304mm x 190mm
   1280x800       60.0*+
   1024x768       60.0
   800x600        60.3     56.2
   640x480        59.9
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)

Please give me a suggestion how to get 1366x768.

According to that output, your laptop's native resolution is 1280x800, not 1376x768. Which laptop is it? You can run xrandr -s 1366x768, but it likely won't work, given your hardware seems to report it doesn't support that resolution.

To work with an old CRT monitor,
add the following to your xorg.conf:

before:

Section "Screen"
    Identifier  "Default Screen"
    Option  "AddARGBGLXVisuals" "True"
EndSection

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

after:

Section "Screen"
    Identifier  "Default Screen"
    Option  "AddARGBGLXVisuals" "True"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "TwinView" "0"
    Option         "TwinViewXineramaInfoOrder" "CRT-0"
    Option         "metamodes" "1024x768 +0+0; 800x600 +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

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

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "CRT-0"
    HorizSync       30.0 - 110.0
    VertRefresh     50.0 - 150.0
    Option         "DPMS"
EndSection

and get a stable flicker free workable screen.


Is it possible to control window positioning using keyboard shortcuts in Ubuntu? In Lubuntu, it is possible to control window positioning on the desktop using keyboard shortcuts, as follows:

Windows + ← - window occupies left half of the desktop
Windows + → - window occupies right half of the desktop
Windows + ↑ - window occupies upper half of the desktop
Windows + ↓ - window occupies lower half of the desktop

Are there similar keyboard shortcuts in Ubuntu (Unity)?

In my case, this can be done with Compiz Setting Manager.

First, you'll need to download Compiz (Skip this part if you already own it).

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

Open compiz, then navigate to Window Management category which located on the left pane.
Enable Grid plugin.
Set your own desired shortcut/keybinding for tiling window, simply click the corresponding action key, then change it to whatever you want.

Ctrl+Alt+Num...

Ctrl+Alt+1 => Lower Left
Ctrl+Alt+2 => Bottom
Ctrl+Alt+3 => Lower Right
Ctrl+Alt+4 => Left
Ctrl+Alt+5 => Maximimze
Ctrl+Alt+6 => Right
Ctrl+Alt+7 => Upper Left
Ctrl+Alt+8 => Top
Ctrl+Alt+9 => Upper Right
Ctrl+Alt+0 => Minimize


TLP governor settings not taking effect I have TLP installed with these config lines:

CPU_SCALING_GOVERNOR_ON_AC=powersave
CPU_SCALING_GOVERNOR_ON_BAT=powersave

But my governors are still ondemand. I know how to do it with cpufrequtils as mentioned in How to permanently set CPU power management to the powersave governor?, but why is the TLP settings not taking effect?

I dont have cpufrequtils installed. But I do have cpupower. But does that matter?

had the same problem, the solution is to disable cpufrequtils and ondemand service

sudo update-rc.d -f ondemand remove
sudo update-rc.d -f cpufrequtils remove


kubuntu: wine is not get removed after removing PPA , still showing up i'm using kubuntu 16.10 . today i installed wine PPA 1.7.35 following
commands

sudo add-apt-repository ppa:ubuntu-wine/ppa
sudo apt-get update
sudo apt-get install -y wine1.7

But, it showed some errors(i forgot them). and i tried to delete the PPA
with this command sudo add-apt-repository --remove ppa:ubuntu-wine/ppa and i was asked to press enter
, and did.

but wine is still showing everywhere and winecfg is working too.

how should i remove it completely?

Those desktop entries aren't actually part of the Wine package but of the per-user profile configuration which is never altered during package (un-)installation.

The desktop entries are created when an application run through Wine adds an entry to the (emulated) Windows start menu. The underlying files reside in ~/.local/share/applications/wine/ where you can delete them if you want.

There's (usually) a default per-user Wine environment in ~/.wine/ too if you want to get rid of all per-user resources related to Wine. If you used PlayOnLinux there's also ~/.PlayOnLinux/wineprefix/.

open the file manager as root, then search for wine using catfish and you should have entries under /.local/share & others. delete those files and it should be removed from your menu after you log out and back in.


19.10 pip for python 3.8 I have installed python3.8 to python 19.10:

 sudo apt install python3.8

I now want to install pip for python 3.8

 python3.8 -m pip install pip
 Requirement already satisfied: pip in /usr/lib/python3/dist-packages (18.1)

But the pip 3 is 3.7

 pip3 -V
 pip 18.1 from /usr/lib/python3/dist-packages/pip (python 3.7)

So that, for example :

pip3 install pyinotify
Requirement already satisfied: pyinotify in ./.local/lib/python3.7/site-packages (0.9.6)

Attempting to import pyinotify to a python3.8 script throws a ModuleNotFound error

In order to make sure you are using the correct pip, please use it as follows:

python3.8 -m pip install pyinotify

Brett Cannon, one of the Python core developers, just recently published a blog article about this topic:
https://snarky.ca/why-you-should-use-python-m-pip/

This all said, you usually want to install Python packages into a virtual environment, not in the system Python.

https://realpython.com/python-virtual-environments-a-primer/

I had the very same issue. I think the best practice is to call pip from within the python installation, which forces you to be specific on the version of python in which to install the library, ie.
python3.8 -m pip install pyinotify

Alternatively, you can change the default python installation so that pip3 will refer to python3.8. For managing python versions you can use update-alternatives:
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 1

sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 2

Now you will have to select the default version. Run the following and press 2
sudo update-alternatives --config python3

pip3 should now refer to your python3.8 package


Ubuntu upgrade failed I've tried to upgrade from 12.10 to 13.04 but it failed and result in "unstable system" or something.

sudo apt-get install -f doesn't work
sudo do-release-upgrade says I'm up to date.

So I though of deleting my current unstable 13.04 Ubuntu and install it fresh new(if there isn't something else i can do), but the problem is that I have dual boot with windows.

how can I delete my Ubuntu and install it fresh new, without touching windows?

The installation of Ubuntu allows you to upgrade 12.10. If you want to delete your current version select Erase Ubuntu 12.10 and install 13.04. If you just want to upgrade use the "upgrade" option

if you like fresh ubuntu. You can delete ubuntu partition with gpart and reinstall ubuntu 13.04... and choose install ubuntu alongside windows

Good luck!


nfs mount failes on startup After updating to Kubuntu 13.10 (beta) my nfs share stopped auto-mounting during boot.

Here is my fstab:

dimanne@Impedance:~$ cat /etc/fstab
# <file system>                           <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=328a9124-e5ff-4c13-a7e2-559ee6a20292 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=b3a4a4a4-c563-45c1-9d6b-602b07d66c70 none            swap    sw              0       0
# was on /dev/sdb1
UUID=9383ee42-aea8-4098-9533-08d1b9b04e59 /mnt/backup    ext4   defaults        0       2
# was on /dev/sdc1
UUID=4ad4e84a-1e0e-4cb6-a63a-753d3ffc9ff2 /mnt/freedata ext4    defaults        0       2

server:/mnt/media                       /mnt/media      nfs4    defaults

/dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0

Also I noticed suspicious messages in dmesg:

dimanne@Impedance:~$ dmesg | grep killed
[   23.436063] init: idmapd-mounting (/mnt/media) main process (455) killed by TERM signal
[   26.828198] init: failsafe main process (1119) killed by TERM signal
[   28.352642] init: kdm main process (1757) killed by TERM signal

However if I mount nfs share manually (sudo mount -vvv server:/mnt/media /mnt/media) all works perfectly, but at this time I get these messages in dmesg

[  458.804009] NFS: Registering the id_resolver key type
[  458.804024] Key type id_resolver registered
[  458.804026] Key type id_legacy registered
[  473.827828] RPC: AUTH_GSS upcall timed out.
[  473.827828] Please check user daemon is running.

What is the problem, how can I fix it?

P.S. I have read this NFS Mount fails on startup but there is no solution...

On Ubuntu 12.04 the problem can be cured by blacklisting "rpcsec_gss_krb5" module.
Just add "blacklist rpcsec_gss_krb5" at the end of "/etc/modprobe.d/blacklist.conf".

Of course, such solution is appropriate if you do not use Kerberos.
You can find more details on this bug here and here.

You need to replace "server" with your server's IP address and "/mnt/media" with the shared resource/directory of your server...


Network is not working nicely with RTL-8110SC/8169SC Well, I've got a wired network on my Ubuntu 11.10 fresh installation. I can download files and surf the Internet. The problem is that sometimes it takes a long time to load websites and sometimes it gives up trying. I also unsuccessfully tried to connect to an FTP server using Filezilla. The same wired network does work fine in a dual-boot installation of Windows 7.

How can I configure my network appropriately.

SOME INFO:

$ sudo lshw -class network
*-network
       description: Ethernet interface
       product: RTL-8110SC/8169SC Gigabit Ethernet
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 4
       bus info: pci@0000:04:04.0
       logical name: eth0
       version: 10
       serial: 00:1d:60:55:58:5c
       size: 100Mbit/s
       capacity: 1Gbit/s
       width: 32 bits
       clock: 66MHz
       capabilities: pm bus_master cap_list rom ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169   driverversion=2.3LK-NAPI duplex=full firmware=N/A ip=192.168.0.135 latency=64 link=yes maxlatency=64 mingnt=32 multicast=yes port=MII speed=100Mbit/s
       resources: irq:16 ioport:e800(size=256) memory:febfec00-febfecff memory:febc0000-febdffff

Maybe the kernel driver r8169 kernel is not good enough. Try compiling the ralink drivers:

Make a backup of your driver first. To find where the driver is:

find /lib/modules/$(uname -r) -name r8169.ko

copy the driver somewhere in your home directory.
Download the drivers here (select US1 server as the other two don't work)
Prepare the system for compiling:

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

Check whether the built-in driver, r8169.ko, is loaded.

lsmod | grep r8169

If it is installed, please remove it.

sudo modprobe -r r8169

compile the driver:

tar jxvf r8169-6.015.00.tar.bz2 # unpack this on th desktop
sudo mv r8169-6.015.00 /usr/src # move the drive directory from desktop to /usr/src
sudo -i

navigate to /usr/src/r8169-6.015.00 and run

make clean modules
make install
depmod -a
modprobe r8169

drop privileges:

exit

You can check whether the driver is loaded by using these commands:

lsmod | grep r8169
ifconfig -a

Reboot and check again that the driver is loaded. If it isn't, You might want to add r8169 to the list of modules which are loaded on startup. Edit this file:

sudo nano /etc/modules

add the line

r8169

save, exit, and reboot

If something goes wrong or you want to revert this procedure, just restore the file that you backed up in the first step to its original location.

Try to disable IPv6 if you are not using it.


Writing a bash script to read a text file of numbers into arrays, by column, on Ubuntu I'm trying to write a little bash script on ubuntu 12.04 and have little experience. Odd little problem converting a text file of numbers into arrays. I need all of the first numbers, second, etc into it's own array because I'll be running computations on numbers based on column more than the line it came from. All lines are 5 integers separated by spaces with a return at the end of each line. Is a multidimensional array possible in bash? Thank you!

Here is a script, it will store numbers from text file into two arrays x and y as you wished,

#!/bin/bash

nl=$(cat "$1" | wc -l)
declare -a x
declare -a y
for i in $(seq 1 $nl)
do
    x[i]="$(cat "$1" | awk -v p="$i" '{if(NR==p) print $1}')"
    y[i]="$(cat "$1" | awk -v p="$i" '{if(NR==p) print $2}')"
done
#upto this point all the numbers from first and second column of the file are stored
#into x and y respectively. Following lines will just print them again for you.
for it in $(seq 1 $nl)
do
    echo "${x[$it]} ${y[$it]}"
done

Do not forget to give the script execution permission.

chmod +x script.sh

Usage

./script.sh numfile.txt

where I am considering you will save the above script as script.sh and your textfile containing numbers is numfile.txt. And both are in same directory.

sorry I haven’t checked back. The solution was simpler than i thought since the numbers were separated by a space with a return at the end of the lines.

#!/bin/bash
COUNT=1
while read arr1[COUNT] arr2[COUNT] arr3[COUNT] arr4[COUNT] arr5[COUNT]
do
echo "next line"
 echo "${arr1[COUNT]}"
 echo "${arr2[COUNT]}"
 echo "${arr3[COUNT]}"
 echo "${arr4[COUNT]}"
 echo "${arr5[COUNT]}"
COUNT=$[$COUNT +1]
done < /home/john/testloop.txt


How to get date and time using command line interface? How can I get current date/time in terminal. I mostly start up my system in text(console) mode and need the command to know the current date/time.

The date command will show you the date and time.

man date will show you how to control the output to whatever format you need, if you want something other than the standard output. For example:

date "+%H:%M:%S   %d/%m/%y"

will output the date and time in the format 14:09:22   09/06/2015

An easier to read version of the man page can be found on Ubuntu Man Pages

if you are looking for sometting like YYYYMMDDHHMMSS, 20160804020100 use this:

date +%Y%m%d%H%M%S

it servers most purposes like file backup, or log filtering.


Lamp installation error: unable to resolve host I get an error every time I try to install lamp with:

sudo tasksel install lamp-server

My terminal looks like this :

root@(none):~# sudo tasksel install lamp-server
sudo: unable to resolve host (none)
tasksel: aptitude failed (100)

About the host error, it is because you don't have hostname set:

  root@(none):~#

You should set your hostname first:

sudo hostname ubuntu-server

Also check that your /etc/hosts file has a entry like this:

127.0.0.1   localhost
127.0.1.1   ubuntu-server

Then you need to have tasksel installed in your system:

sudo apt-get update
sudo apt-get install tasksel

Now you can use it:

sudo tasksel lamp-server

If you don't want to use tasksel, you could use:

sudo apt-get -o APT::Status-Fd=4 -o APT::Keep-Fds::=5 -o APT::Keep-Fds::=6 -q -y install lamp-server^

Can you please try the following command as it had worked for me.

sudo apt-get install lamp-server^


Step to step how to install Cinelerra I have some problems installing cinelerra on my Ubuntu.

How do I install it?

If you are asking for community version of Cinelerra, there is a PPA as @Brett Howard said. It worked on my current system. Just used these:

sudo add-apt-repository ppa:cinelerra-ppa/ppa
sudo apt-get update
sudo apt-get install cinelerra-cv

The updating process after installing the PPA is automatic:

sudo apt-get update
sudo apt-get upgrade

To install Cinelerra Community Version:

Hit Ctrl+Alt+T to open a terminal window, copy and paste below command to add the ppa repository:

sudo add-apt-repository ppa:cinelerra-ppa/ppa

Then update:

sudo apt-get update

Install Latest Cinelerra-CV:

sudo apt-get install cinelerra-cv

The ppa support Ubuntu 8.04, 10.04, 12.04, 12.10, and 13.04. Also works on Linux Mint 15, 14, 13.

To install Cinelerra 4.4 (HV version):

Press Ctrl+Alt+T to open terminal, copy and paste below command to download the Debs.

For 32-bit:

wget http://www.deb-multimedia.org/pool/main/c/cinelerra/cinelerra-data_4.4-dmo1_all.deb http://www.deb-multimedia.org/pool/main/c/cinelerra/cinelerra_4.4-dmo1_i386.deb

For 64-bit:

wget http://www.deb-multimedia.org/pool/main/c/cinelerra/cinelerra-data_4.4-dmo1_all.deb http://www.deb-multimedia.org/pool/main/c/cinelerra/cinelerra_4.4-dmo1_amd64.deb

Then install them (both 32-bit & 64bit):

sudo dpkg -i cinelerra_4.4-*.deb

For first time launching cinelerra by typing command in terminal, then lock to Unity Launcher.

cinelerra


How can I display all users and groups with a command? I want to display:

All users and

All groups
in my system using command-line.

users and groups commands display users currently logged in, and groups a user belongs to respectively.
How to display a list of all users and all groups by command-line?

You can display with the help of compgen builtin command as follows:

To display all users run following command:

compgen -u

To display all groups run following command:

compgen -g

However you can also display all users by cut -d ":" -f 1 /etc/passwd.

Here we are going to use getent for the detailed the info

We can list the user with the following command:

getent passwd

We can list the group as follows:

getent group

To fetch detail a specific user

getent passwd lalit

Replace the lalit with your user name. Lalit will not be in every system :)

You can read the more into about getent here


How do I re-run boot loader? Running sudo apt-get -f install said that The link /vmlinuz.old is a damaged link and:

you may need to re-run your boot loader[grub]

Here's the full output:

user@chrubuntu:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-3.13.0-32 linux-headers-3.13.0-32-generic
  linux-image-3.13.0-32-generic linux-image-extra-3.13.0-32-generic
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
user@chrubuntu:~$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  linux-headers-3.13.0-32 linux-headers-3.13.0-32-generic
  linux-image-3.13.0-32-generic linux-image-extra-3.13.0-32-generic
0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
After this operation, 270 MB disk space will be freed.
Do you want to continue? [Y/n] y
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = "en
en",
    LC_ALL = (unset),
    LC_TIME = "en",
    LC_MONETARY = "en",
    LC_ADDRESS = "en",
    LC_TELEPHONE = "en",
    LC_NAME = "en",
    LC_MEASUREMENT = "en",
    LC_IDENTIFICATION = "en",
    LC_NUMERIC = "en",
    LC_PAPER = "en",
    LANG = (unset)
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_ALL to default locale: No such file or directory
(Reading database ... 232120 files and directories currently installed.)
Removing linux-headers-3.13.0-32-generic (3.13.0-32.57) ...
Removing linux-headers-3.13.0-32 (3.13.0-32.57) ...
Removing linux-image-extra-3.13.0-32-generic (3.13.0-32.57) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-32-generic /boot/vmlinuz-3.13.0-32-generic
update-initramfs: Deleting /boot/initrd.img-3.13.0-32-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-32-generic /boot/vmlinuz-3.13.0-32-generic
The link /initrd.img.old is a damaged link
Removing symbolic link initrd.img.old
 you may need to re-run your boot loader[grub]
Removing linux-image-3.13.0-32-generic (3.13.0-32.57) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-32-generic /boot/vmlinuz-3.13.0-32-generic
update-initramfs: Deleting /boot/initrd.img-3.13.0-32-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-32-generic /boot/vmlinuz-3.13.0-32-generic
The link /vmlinuz.old is a damaged link
Removing symbolic link vmlinuz.old
 you may need to re-run your boot loader[grub]
user@chrubuntu:~$

How do I re-run the boot loader?

According to womble's answer to Damaged /vmlinuz and /initrd.img symbolic links after Kernel uninstall (on Server Fault), you don't have to do anything in this situation when your boot loader is GRUB/GRUB2—which it is, here.

For some other boot loaders (at least LILO), it is/was apparently sometimes necessary to manually run the boot loader's configuration.

If you did need to tell GRUB to check for existing kernels and update its configuration, running sudo update-grub would do so. And there's no harm in running that. But it shouldn't be necessary in this case.

$ sudo update-grub

And if you want delete / purge old packages you can do also

$ dpkg --list |grep "^rc" | cut -d " " -f 3 | xargs sudo dpkg --purge


Ubuntu doesn't boot without a Monitor connected to a AMD 390 As the title says Ubuntu doesn't boot with AMD 390 with Hawaii chipset. The same system boots with AMD 290 with Hawaii and with AMD 380 with Tonga chipset without a monitor. Any ideas?

I have solved the problem. For those who have a ASROCK motherboard with  one or more AMD 390 and the system will not boot without a monitor connected try to set the primary graphic adapter to ONBOARD in bios. After that my system boot headless without any problems and recognize the AMD 390.

I would edit Grub with the following edits.

Sudo nano /etc/default/grub

and edit the corresponding fields with...

GRUB_TIMEOUT=10

GRUB_RECORDFAIL_TIMEOUT=$GRUB_TIMEOUT

This will allow the system to boot even if it fails during boot.

Then run

Sudo update-grub

This will work assuming I understood you correctly in that you are attempting to get the system to boot whether a monitor is connected or not.


Videos hang / freeze for a few seconds on Ubuntu 18.04 Since the update to 18.04 every YouTube video and also locally played videos hang for a few seconds.

This can be temporarily "solved" by moving the mouse, but then it freezes again as the audio continues unaffected.

How can I fix this problem?

disabling hardware acceleration in chrome helped me, installing new kernel didn't

A litte late for the party. I know that the answer above is already accepted, but I want to share my experience which might be helpful for others. The problem was something to do with ACPI. I wrote a script which solves this problem automatically: Fix-video-lag-in-linux.

fix_lags.sh

#!/bin/bash
if grep -q acpi_rev_override "/etc/default/grub"; then
 echo 'Found settings entry, nothing changed';
else
 sudo sed -i 's/splash/splash acpi_rev_override=1/' /etc/default/grub
 echo "Finished successfully. please reboot to apply the new settings"
fi

undo_fix.sh

#!/bin/bash
if grep -q acpi_rev_override=1 "/etc/default/grub"; then
 sudo sed -i 's/splash acpi_rev_override=1/splash/' /etc/default/grub
 echo "Reset finished successfully"
else
 echo 'No settings found, exiting.';
fi


Ubuntu 17.10+ disable netplan According to: https://wiki.ubuntu.com/Netplan

I can disable netplan by: "preseeding netcfg/do_not_use_netplan=true (adding it the the command-line when you boot the Ubuntu Server installation media"

I'm assuming this is done via /etc/default/grub but where exactly do I add "netcfg/do_not_use_netplan=true"?

Is it added to: GRUB_CMDLINE_LINUX

I currently have this set to:

GRUB_CMDLINE_LINUX="ipv6.disable=1"

What would be the syntax to add in "netcfg/do_not_use_netplan=true" to this existing setting?

P.S. YES, I want to remove netplan, so the question is specifically about how to do that, not why.

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

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

These are the verified steps:

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

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

auto enp0s3
iface enp0s3 inet dhcp

while a static IPv4 address can be configured like this:

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

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

nameserver 8.8.8.8
nameserver 208.67.222.222

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

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

DNS=8.8.8.8 208.67.222.222

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

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

As an addition to this answer, the approach does work (18.04.4 LTS) for a move back to ifup/down, and is much easier that some other proposals.  I did reboot, but am not sure it was needed.

Steps:

ip a (to get the valid device names and IP addresses if required)

apt install ifupdown

vi /etc/network/interfaces  # if you are doing this, you know what to put in

vi /etc/resolv.conf  # if you are doing this, you know what to put in

apt purge netplan.io

init 6 # not sure if this was needed

Redundant files may still be present, but I have decided not to look for them


PHP is not working well on Ubuntu 13.10 and mcrypt is missing in phpmyadmin I've upgraded from UBUNTU 13.04 to 13.10 but I can not work with PHP pages or phpmyadmin .
I've tried this way to install lamp on Ubuntu sudo apt-get install lamp-server^ phpmyadmin
and I've done all of the configuration correctly after installation I've added this line  Include /etc/phpmyadmin/apache.conf to  /etc/apache2/apache2.conf then I restarted apache2

Now I have two problems:

In phpmyadmin on the bottom of the page is this error : The mcrypt extension is missing. Please check your PHP configuration
I've check  and mcrypt was in it , but in phpmyadmin it gives me error of missing .
The other problem is on PHP pages it seems like there is no PHP and it's all html because lots of PHP lines are printed in textbox's like : <? echo $row['details']; ?>
Can anybody tell me what should I do ?

Try this for your mcrypt problem:

mv -i /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available/
sudo php5enmod mcrypt
sudo service apache2 restart

It's a bug with the location of the mcrypt.ini file, I got the info from here.

I had the same bug, I did a cp instead of a mv to be sure but it solved the problem.

For PHP not working, if you get phpmyadmin working (even with the mcrypt error), it means PHP is working (because phpmyadmin uses PHP).
But in your example <? echo $row['details']; ?> change <? to <?php and try again?

I also had a problem with mcrypt after installing Ubuntu 14.04. Following this link should help.
www.php.net

Open your php.ini file sudo gedit /etc/php5/apache2/php.ini
Restart your apache2 sudo service apache2 restart

Hope this helps.


Can't mount replacement hdd to same spot? I replaced my media hdd with a larger size and now I cant mount it to the same location as the old one /mnt/ultron
I have deleted the ultron directory and recreated it, I have tried using the disks application, I even tried modifying /etc/fstab to have the new hdd's uuid. It appears to unmount instantly when I try mounting it.
I have successfully mounted it to other spots such as /mnt/ultrons just to test, but it will not mount to /mnt/ultron
My current /etc/fstab was created with disks and I have verified the uuid is correct. It even works if I change the mount point to anything else.
Here is my fstab
# /boot/efi was on /dev/sda1 during installation UUID=F1D3-05E0
/boot/efi vfat umask=0077 0 1
/swapfile none swap sw 0 0
/dev/disk/by-uuid/a815ea68-9d8c-41fa-9534-cabb080013c0 /mnt/ultron auto nosuid,nodev,nofail,x-gvfs-show 0 0

I found an answer for anyone facing this in the future. Simply run this command in terminal: systemctl daemon-reload
The answer and explanation is here.
https://www.bentasker.co.uk/documentation/linux/480-disk-automatically-unmounts-immediately-after-mounting


How can I stop my Dell Inspiron laptop from dimming the screen when I plug in the AC adapter? I'm using a Dell Inspiron N5110 laptop with Ubuntu 13 and I find that every time I plug the power in to charge, the screen brightness dims. If I go into the brightness settings window the brightness immediately goes back to full brightness (as they are set) without me changing anything. In order to keep the screen brightness on full I have to keep the brightness settings window open in the background. As soon as the battery is charged the brightness drops again until I unplug the power again. This happens every time and now I know how to get round it it's not a huge problem but still quite annoying. Any advice would be gratefully received. Let me know if you need any more info.

I'm quite new to Ubuntu so if you can give me nice simple instructions that would be great :)

Until someone comes up with an answer, here is at least a partial workaround that I use for the same problem (Dell Insprion 1525, 13.10).

I use "Indicator Brightness" http://www.omgubuntu.co.uk/2013/04/brightness-control-ubuntu which allows you to simply mouse over the indicator and roll the scroll wheel to increase the brightness.  If I am in a situation that makes it difficult to even see the indicator I will move the mouse, plug in the adapter, roll the wheel up, and bang you're back in business.

As explained in the article...

sudo add-apt-repository ppa:indicator-brightness/ppa

sudo apt-get update && sudo apt-get install indicator-brightness

I had a similar problem with a Dell Inspiron 1420, but was able to brighten the display using the Function key plus the up arrow (Fn+Up).


MacBook install: no mountable file systems I own a MacBook Pro running Mountain Lion. I would like to dual-boot my Mac OS with Ubuntu. When I download the file and try to open it, it reads "No mountable file systems". I have downloaded both the 64 and 32 bit software. Can someone help me through this process?

Go to Utilities and Bootcamp assistant and use the Bootcamp assistant to create a partition for Windows and instead of installing Windows install Ubuntu on it. You must first create a Bootable USB for Ubuntu on a pendrive.

Has to be an EFI boot, I installed x64 Ubuntu on my schools mac last year in highschool along side to the mac os, im pretty sure all i did was download the ISO and used Disk utility to put it on the flash drive, you can use Rufus https://github.com/pbatard/rufus/wiki/FAQ Fat32 EFI partition, good luck!


After I burn the image file to the sd card, it cannot work on the Raspberry Pi I follow the tutorial to burn the image file to the SD card, insert the SD card into the Raspberry Pi and plug in the power, but the Raspberry Pi cannot start（I download at http://cdimage.ubuntu.com/ubuntu-core/18/stable/current/ubuntu-core-18-armhf+raspi.img.xz ；Unzip with Bandizip；burn with Win32DiskImager； and use Raspberry Pi 4B）
Who can help me!!!

I've got the same problem same boot screen, i've tried to install the latest image ( https://ubuntu.com/download/raspberry-pi-core ) on my 32GB card with Raspberri Pi Imager, Balena Etcher and the official ubuntu instruction and got the same result : no boot. The only Ubuntu i've sucessfully boot on my new Raspberri Pi 4 is Ubuntu server 20 with Imager. i've also tried to modify the conf file as specified here (https://jamesachambers.com/raspberry-pi-ubuntu-server-18-04-2-installation-guide/ ) without any result.


How to insert a page in a DJVU file without quality loss? So I have a DJVU file generated from a PDF (under Linux):

pdf2djvu --dpi=300 -o OUT.djvu IN.pdf

the PDF contained scanned notes.

In these days, I only got the DJVU file. The problem: I found a page missing (between 359 and 360 in the DJVU).

How can I insert a JPG file between the mentioned sites in the DJVU file? (I don't want degraded quality or much bigger DJVU file size, just the 180 KByte JPG in it)

solution could be OS independent. (windows, Linux)

You can convert your DJVU file to .jpg and the .jpg to DJVU.


Java, installation problem or issue of the noob? Hi guys I have tried in recent days to install, obviously everything from termianl, the jdk for Java with no success.
Later I tried to install WinUSB and everything went ok.
Today panic, I'm going to install AWN and I find errors even when I type sudo apt-get update
I solved these errors, but every time I try to install any application, terminal gives me errors like this.
Down here is the complete code with that mistakes, maybe it happened to any of you, or know how to help me.
The big problem is that I can't install anything else because I always have this error.
Thank you in advice for your attention and for your help!

I write  sudo apt-get install oracle-java7-installer

I need java for use Netbeans

Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 oracle-java7-installer : Depends: java-common (>= 0.24) but it is not installable
                          Recommends: gsfonts-x11 but it is not installable
E: Unable to correct problems, you have held broken packages.

edited

java-common:
  Installed: (none)
  Candidate: (none)
  Version table:
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.3 LTS
Release:    14.04
Codename:   trusty
Linux giovanni-X551CAP 3.19.0-30-generic #34~14.04.1-Ubuntu SMP Fri Oct 2 22:09:39 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

For whatever reason the main repository is missing or your package information was deleted or never updated. Execute the following commands:

sudo apt-add-repository main
sudo apt-get update
sudo apt-get install oracle-java7-installer

Purge the foreign ppa and Install openjdk from repository:

$ sudo apt install ppa-purge
$ ppa-purge [YOUR PPA]
$ sudo apt install openjdk-7-jre


How can I delete my older versions of Ubuntu? Possible Duplicate:
  Is there a way to remove/hide old kernel versions?

I'm running from a low disk space two Ubuntu versions. I've installed Ubuntu 12.04 in a 6 GB disk partition, but after I updated it, the boot manager shows an older version of Ubuntu in the O.S. menu. I want to delete this old version so that I can free up disk space, as only 1 GB is left now.

The bootloader shows "Older Versions of Ubuntu" this means older Kernel version actually, you can use programs like  Ubuntu Tweak  that let you run a janitor thruought your system and delete innecesary files such as older kernel versions

You can also use Synaptic Package Manager to do that, here  Nixie Pixel  explains it all in a cool little video :)

You can delete the older Ubuntu version using Gparted to delete the partition where it's installed and later expanding the partition you want to occupy this empty space. Don't forget to save the files you have inside this partition (the one with old Ubuntu version).

To install Gparted type the following command on the terminal:

sudo apt-get install gparted

You can also install it via the Ubuntu Software Center

After modifying the partitions type the following command on the terminal to update the O.S. selection menu list:

sudo update-grub


GRUB not showing windows 8.1 already installed Actually there is a similar question on the community before as well but what I am facing is a different problem. Also there the person has not properly posted the status of his grub. Actually I installed windows 8.1 on my laptop & it was working fine. Then I installed Ubuntu on another partition & as per the instructions again booted using live usb of Ubuntu to repair GRUB using boot repair. You can find the boot repair report . But now the GRUB menu is not showing Windows option at all & I am unable to boot into Windows. Please help me - it's urgent!! Any kind of help will be appreciated.

Windows 8 does not shut down properly by default. I suspect this is your problem.
In your code I see:

Failed to mount '/dev/sda3': Operation not permitted
The NTFS partition is in an unsafe state. Please resume and shutdown
Windows fully (no hibernation or fast restarting), or mount the volume
read-only with the 'ro' mount option.
mount /dev/sda3 : Error code 14
mount -r /dev/sda3 /mnt/boot-sav/sda3

Try mounting as suggested and run

sudo update-grub

Just type the following command in a terminalCtrl+Alt+T

sudo update-grub


How to clear bash history completely? I want to clear all previous commands from the history of my server. I used history -c and it seems all things are cleared but when I ssh to the server, all the commands are still there.

How can I clear them permanently?

The file ~/.bash_history holds the history.
To clear the bash history completely on the server, open terminal and type
cat /dev/null > ~/.bash_history

Other alternate way is to link ~/.bash_history to /dev/null
However,
One annoying side-effect is that the history entries has a copy in the memory and it will flush back to the file when you log out.
To workaround this, use the following command (worked for me):
cat /dev/null > ~/.bash_history && history -c && exit

Try this one

edit your .profile and add the line below at the end of the file

rm -f .bash_history

this way, every time you login, it will delete your .bash_history file automatically for you. Adding the -r recursive remove option seems dangerous and not needed.


How to share internet through wifi in windows I use the netsh wlan command.
how I can use it in ubuntu 16.10

Plug your computer via ethernet and then make  anew connection as a HotSpot. Use this images as guides.


How to use ubuntu live disk to reset windows 10 password? I need to reset the password of windows 10 for my little brother. There is a similar post on here on resetting vista password with chntpw. I followed the steps but it doesn't help. Anyone know how to do this without chntpw, a GUI program is preferred.

P.S. The final solution for me: Reset windows 10 password with UUkeys

Mount the Windows drive.
Rename C:\Windows\System32\sethc.exe to sethc_bak.exe
Copy C:\Windows\System32\cmd.exe and paste in the same DIR, renaming to sethc.exe
Reboot into Windows.
On the logon screen, press shift 5 times. You should now have an admin CMD prompt.
In the CMD window, type net user your-user YourNewPassword [replacing "your-user" & "YourNewPassword" accordingly.]
Once into the account, delete C:\Windows\System32\sethc.exe, and then rename C:\Windows\System32\sethc_bak.exe to sethc.exe.

I have done this in a VM, and it worked beautifully

I never did this with Ubuntu Live CD, but with ophcrack Live CD:
http://ophcrack.sourceforge.net/

I tried a years ago, and I guarantee you that works fine in Windows XP and 7. I Never tried in windows 10. But you can try it and tell us.
It's a GUI program.


How to enable root login? I would like to enable the root account on my Ubuntu installation.

I realize the security implications of this.

Warning

While it's possible to do, it is not recommended.

Enabling

To actually enable root logins first you have to set a password for the root account and then unlock the locked root account. If you don't set a password for the root account the passwd command will return

passwd: unlocking the password would result in a passwordless account.

So, first execute in a terminal

sudo passwd root

you will be prompted for a new Unix password. Write it twice (second for confirmation).

Then execute

sudo passwd -u root

to unlock the account. This should return

passwd: password expiry information changed

Reverting

If you want to disable root account in Ubuntu you need to lock the root account by using the following command sudo passwd -l root

Alternatives to root login

If you want to work on a root console you can also use sudo -i.

Only do this if you know what you are doing. More information on why to stay with sudo here

Graphical version needs setting up 1st:

pkexec gnome-terminal will open a terminal with a root prompt.

passwd root will allow you to create a password for root.

Note: Running users-admin with elevated privileges no longer works because of a bug that is marked as "Won't Fix" for security reasons. See https://bugs.launchpad.net/ubuntu/+source/gnome-system-tools/+bug/685215 for an explanation.

pkexec users-admin will open the users screen:

Documentation

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

Simple answer: Yes, you can do it.

Currently there are two things preventing root from logging in on default Ubuntu.

The root user doesn't have a password set
They have "!" (an exclamation mark) in their /etc/shadow entry

The following command fixes both issues in one go:

sudo passwd -u root

The -u part is needed because of the "!" on their account.


WiFi asks for password again and again The Problem

My WiFi network disconnects itself randomly and starts asking for password.
The password is already stored, I just have to click on connect.
When I click on connect, it remains connected for some time then again disconnects and sometimes it even does not connects.
The speed while being connected is very low and torrents are not downloading.
When I sometimes connect to WiFi I get System encountered a error dialogue box

What did I do

I go to Edit connections and make sure that All users can connect is ticked.
I also deleted config file of connection from /etc/NetworkManager/system-conncections

I still can't connect to WiFi sometimes and it disconnects automatically if I'm ablee to get connected after some time. So what should I do?
After googling I found that this problem has been encountered in earlier versions, I'm using Ubuntu 16.04 so if there is a permanent solution which can help everyone that will be the best.
P.S.- I have already tried these links:

My wireless/WiFi connection does not work. What information is needed to diagnose the issue?
WiFi repeatedly asks for password (Ubuntu 12.10 fresh)
http://www.askubuntu.com/questions/285287/wifi-keeps-asking-for-password-ubuntu-12-10 .

Also the WiFi network works fine with my mobile.If more information is needed than let me know and how I can find it.
Also after seeing this I have a hardware detection problem, what logs do I need to look into? i found that no card was soft or hard blocked and rest info I found after using commands are on http://paste.ubuntu.com/19615988/
Output of lspci -knn | grep Net -A2

02:00.0 Network controller [0280]: Intel Corporation Centrino
Wireless-N 130 [8086:0896] (rev 34)
Subsystem: Intel Corporation
Centrino Wireless-N 130 BGN [8086:5005]   Kernel driver in use: iwlwifi

New Update: I can't connect to my WiFi network, I have to use USB tethering in mobile to use internet on my laptop.

These adapters do not support 802.11n protocol well (at least on linux), but iwlwifi driver tries to use it. You can disable this protocol by running in terminal

sudo tee /etc/modprobe.d/iwlwifi-opt.conf <<< "options iwlwifi 11n_disable=1"

This will be applied after a reboot.

Had the same issue, but there were system updates pending on my system. Once the system and network drivers were updated. It worked fine. Make sure you don't have any pending updates for your system.


How to command "Ping" display time and date of ping When I ping I have this display:

> ping -i 4 www.google.fr
64 bytes from wi-in-f94.1e100.net (173.194.67.94): icmp_seq=503 ttl=46 time=45.5 ms
.......
.......
64 bytes from wi-in-f94.1e100.net (173.194.67.94): icmp_seq=508 ttl=46 time=44.9 ms
64 bytes from wi-in-f94.1e100.net (173.194.67.94): icmp_seq=509 ttl=46 time=45.1 ms

I'd like to have the time of the ping before.

Something like:

> (right functions) + ping -i 7 www.google.fr
mardi 15 mai 2012, 10:29:06 (UTC+0200) - 64 bytes from wi-in-f94.1e100.net (173.194.67.94): icmp_seq=503 ttl=46 time=45.5 ms
.......
.......
mardi 15 mai 2012, 10:29:13 (UTC+0200) - 64 bytes from wi-in-f94.1e100.net (173.194.67.94): icmp_seq=508 ttl=46 time=44.9 ms
mardi 15 mai 2012, 10:29:20 (UTC+0200) - 64 bytes from wi-in-f94.1e100.net (173.194.67.94): icmp_seq=509 ttl=46 time=45.1 ms

How would you do this in a command line (if it's possible)?

Use:

ping www.google.fr | while read pong; do echo "$(date): $pong"; done

You will get the result like this:

(thanks to Achu and Eliah Kagan for the ideas)
there's a way to

add time to ping output
keep footnotes of ping
and terminate this whole construction with ctrl+c

to do this one should instruct right part of the command (after the pipe) to ignore SIGINT using trap "" INT:

$ ping www.google.fr | bash -c 'trap "" INT; awk "{print strftime(\"%c - \") \$0}"'
lun 26 Mar 2018 22:05:08 +0300 - PING www.google.fr (173.194.73.94) 56(84) bytes of data.
lun 26 Mar 2018 22:05:08 +0300 - 64 bytes from lq-in-f94.1e100.net (173.194.73.94): icmp_seq=1 ttl=47 time=19.6 ms
lun 26 Mar 2018 22:05:09 +0300 - 64 bytes from lq-in-f94.1e100.net (173.194.73.94): icmp_seq=2 ttl=47 time=20.1 ms
^Clun 26 Mar 2018 22:05:09 +0300 -
lun 26 Mar 2018 22:05:09 +0300 - --- www.google.fr ping statistics ---
lun 26 Mar 2018 22:05:09 +0300 - 2 packets transmitted, 2 received, 0% packet loss, time 1000ms
lun 26 Mar 2018 22:05:09 +0300 - rtt min/avg/max/mdev = 19.619/19.866/20.114/0.284 ms


Laptop does not wake up after sleep Today afternoon i wanted to download websphere, so i started download and closed the lid and came back after 2 hrs and opened the lid..

I think laptop was running..but when i hit my enter button display is not coming...I had to hard reboot my machine to get the display..

It happened many times..not only in this instance..

I just installed Ubuntu 10.04 ..i did not change anything..Do i need to do anything to enable this feature?

You can configure the laptop not to suspend when you close the lid using the power management tools from the menu:

  System > Preferences > Power Management

If your laptop has an nVidia graphics card, it may be the open source graphics driver causing the problem.  The open source graphics driver has some power management issues on some laptops.  Try switching to the closed source drivers with the Hardware drivers tool from the menu:

  System > Administration > Additional Drivers

Thank you

I notice something weird.  I can resume fine if I enter my password in as though I was getting the login screen.

Apparently the login screen is there but "out of view".  Just treat the screen as 'click-through' by assuming the cursor is in the password field.  Put the password in and it resumes!

Mind you, I have auto login set but after I suspend I'm getting the login screen anyway though I can't see it.


Just getting started with ubuntu and want to know how to access the full hard drive So I just bought this laptop the other day; its a Dell Latitude e5500.
It has Intel® Core™2 Duo CPU P8400 @ 2.26GHz × 2; 2gb ram, 160gb hdd
Mobile Intel® GM45 Express Chipset. When I bought it, Windows 7 came with it.

After setting up Windows 7, the computer was running really slow. I thought that it might just be the ram, but when looking in the task manager I saw that the CPU was constantly running at damn near 100% the whole time. So I decided to upgrade to Ubuntu 16.04.

So I used unetbootin to install Uubuntu, then did the full install. Once I had Ubuntu on the comp.

Now I saw the windows 7 partition on the desktop, and unmounted it; because I don't want windows 7 anymore and I didn't have anything on there that I wanted.

But now Ubuntu is telling me that I only have a 10gb hard drive when I should be seeing a 160gb hdd.

How can I find and access the full HDD so that I can utilize all of that space?

You can install GParted 2 ways :

with a terminal :

sudo apt-get install gparted

or graphically :

Open Ubuntu Software Center.
Type "gparted" in the search bar.
Click on the line were gparted in written.
Click on the install button that appears on the right.


Can't update mysql without system root password set I am trying to update the system but mysql 5.7 is failing. It appears that it cannot connect due to authentication issues.

Here is the full console output:

Reading package lists... Done
Building dependency tree
Reading state information... Done
mysql-server-5.7 is already the newest version (5.7.23-0ubuntu0.16.04.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up mysql-server-5.7 (5.7.23-0ubuntu0.16.04.1) ...
Renaming removed key_buffer and myisam-recover options (if present)
mysql_upgrade: Got error: 1045: Access denied for user 'root'@'localhost' (using password: NO) while connecting to the MySQL server
Upgrade process encountered error and will not continue.
mysql_upgrade failed with exit status 11
dpkg: error processing package mysql-server-5.7 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.7; however:
  Package mysql-server-5.7 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mysql-server-5.7
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

Important bit:

 mysql_upgrade: Got error: 1045: Access denied for user 'root'@'localhost'

I can login just fine with "mysql -u root -p" command. I don't use a password to login to the server as I use ssh keys if it matters.

Why did this issue crop up now and what can be done to resolve it? I also haven't updated the system in quite a while but this is the only package with issues.

You could try to enable passwordless login to mySQL via Unix Socket which is usually enabled by default, but maybe you have changed that.

Login to mysql root shell and run this:

grant usage on *.* to 'root'@'localhost' identified via unix_socket;

If this doesn't work, try to add a file ~/.my.cnf with content:

[client]
user=root
password=your_password

make it readable only by the owner (and root):

chmod 600 ~/.my.cnf

and then try again.


What program starts dbus-daemon? What program starts the per user session dbus-daemon process in GNOME 2 and GNOME 3 (presumably via dbus-launch)?  I would like to know because I would like to add a directory to the list of directories that dbus-daemon checks for .service files.

(Obviously if it's a sh program, "sh" isn't the answer I'm looking for ;-)

How could I have answered this question for myself efficiently?  What documentation is there on desktop and session startup?

The login manager starts dbus via the Xsession scripts directory. If the use-session-dbus option is set for the Xsession, then the dbus Xsession script is loaded, and it runs dbus-launch --exit-with-session $session_command.

I will disagree with dobey. The best thing to do is to learn how to find it for yourself.

List all processes and their PID tree structure:

pstree
init─┬─ModemManager───2*[{ModemManager}]
     ├─NetworkManager─┬─2*[dhclient]
     │                ├─dnsmasq
     │                └─3*[{NetworkManager}]
     ├─accounts-daemon───2*[{accounts-daemon}]
     ├─acpid
     ├─avahi-daemon───avahi-daemon
     ├─bluetoothd
     ├─colord───2*[{colord}]
     ├─cron
     ├─cups-browsed
     ├─cupsd
     ├─dbus-daemon
....

So dbus-daemon is started by init. However notice that there is more than one dbus-daemon running.

manos@box:~$ ps aux | grep dbus-daemon
message+   845  0.0  0.0  40668  2620 ?        Ss   10:48   0:03 dbus-daemon --system --fork
manos     2480  0.0  0.0  40248  2428 ?        Ss   10:48   0:01 dbus-daemon --fork --session --address=unix:abstract=/tmp/dbus-o3GMKn9JC1
manos     2569  0.0  0.0  39248  2004 ?        S    10:48   0:00 /bin/dbus-daemon --config-file=/etc/at-spi2/accessibility.conf --nofork --print-address 3

There are namely (at least) two instances of dbus-daemon running. One is started by init and it's system wide and the other is started for the user when he logged in. Watching the full PID tree structure (with pstree) you can visually locate exactly which process started the second instance.


Why does the system report 7.7Gb of total Ram when I installed 8Gb? Why does the system report 7.7Gb of total Ram when I installed 8Gb? I'm using 14.04 on a Dell Vostro 2011

The BIOS will reserve some memory, as will the most primitive level of the kernel, including some for video, perhaps. What is reported to you via system-info (which I don't use) or free -m is what is left.
If you observe the entries in the /var/log/kern.log file from during boot, you will see many having to do with reserving memory and such, and finally, a summary line:

May  3 14:27:20 s15 kernel: [    0.000000] Memory: 15975452K/16472972K available (8029K kernel code, 1240K rwdata, 3736K rodata, 1424K init, 1292K bss, 497520K reserved, 0K cma-reserved)

Because that's the actual size of your RAM. They say it's 8GB because it's easier to market.


how can I display mounted partitions in unity (ubuntu 12.10) I have a couple of mounted volumes ( under /media and ~/ ), but neither of which will ever display on my unity bar. I do however see both volumes listed in nautilus. What's interesting is that no partitions display on my unity launcher whatsoever (no iphone, disc, usb storage, etc.). I know you can also blacklist the UUID of a volume from displaying, but none of these items are blacklisted. How can I go about fixing this? Thanks!

Try the following:

Open up CompizConfig Settings Manager by running:

ccsm

You might have to install it first by running

sudo apt-get install compizconfig-settings-manager
Once ccsm is running, open up Ubuntu Unity Plugin.
Under the Experimental tab, select Always for the Show Devices setting.


How do I create a PPA? How do I create my own custom PPA to share with the Ubuntu community? I am trying to create my own custom package set and I would really like to share it with the community.

Using a Personal Package Archive (PPA), you can distribute software and updates directly to Ubuntu users. Create your source package, upload it and Launchpad will build binaries and then host them in your own apt repository.

Create a Launchpad Account.
Activate a PPA.
You can only activate a PPA if you have signed the Ubuntu code of conduct.
What are PPAs and how do I use them?
Uploading your source packages.

Here is a detailed explanation.

You will need a Launchpad.net account to create a PPA. Just click on your user on Launchpad (click on your name on the upper left) and create a PPA. You may have to first sign the Code of Conduct and have a GPG key registered with your account.


What is gdm3, kdm, lightdm? How to install and remove them? What is gdm3, kdm, lightdm? How to install and remove and repair them? Can anyone explain in details?

gdm3, kdm, and lightdm are all display managers. They provide graphical logins and handle user authentication.
From a Wiki article,:

A display manager presents the user with a login screen. A session starts when a user successfully enters a valid combination of username and password.

GNOME Display Manager (gdm3)
gdm3 is the successor of gdm which was the GNOME display manager. The newer gdm3 uses a minimal version of gnome-shell, and provides the same look and feel of as GNOME3 session. Is the Canonical choice since Ubuntu 17.10. You can install it with:
sudo apt-get install gdm3

and remove it with:
sudo apt-get remove gdm3

KDE Display Manager (kdm)
kdm was KDE's display manager. But it's  been deprecated in KDE5 in favor of SDDM, which is more capable as a display manager, and hence comes by default with Kubuntu. You can install it with:
sudo apt-get install sddm

and remove it with:
sudo apt-get remove sddm

LightDM
LightDM was Canonical's solution for a display manager. It was supposed to be lightweight and comes by default with Ubuntu (until 17.04), Xubuntu, and Lubuntu. It's configurable, with various greeter themes available.
You can install it with:
sudo apt-get install lightdm

And remove it with:
sudo apt-get remove lightdm

Repairing is broad term. However, if you have multiple display managers installed, you can choose between them using:
sudo dpkg-reconfigure gdm3

You can use any display manager's name in place of gdm3 in the above command, and it will allow you to choose between them. You must reboot for the change to take affect.
To check which display manager is currently being used, run this command:
cat /etc/X11/default-display-manager

as suggested in this question: How to check using the command line which display manager is running?
One important point to note that, currently due to a bug (I checked in 16.04) you cannot start GNOME3 or Ubuntu Unity session using SDDM. So, if you have both KDE and Unity or GNOME3 installed, make sure your display manager is either gdm3 or lightdm.

After installing and restarting Kubuntu with lightdm, I could not login with my username and password. So if you are using kubuntu 20.04, I recommendSimple Desktop Display Manager (SDDM) . If you are using ubuntu 18.04, I recommend gdm3. Of course, these are purely personal suggestions. I am not saying use it strictly.
You can use the command sudo nano /etc/X11/default-display-manager to find out which default display manager you are using (it can be with any text editor I use nano).


How to measure desktop login time with bootchart I've got an issue whereby after each reboot the first time I log into my session it takes ages. That is, it can take up to five minutes from the moment I enter my password until I can use the desktop.

I was trying to use bootchart to debug the issue, but while bootchart itself worked, the graphics output are cropped at 105 seconds, so I cannot even see when compiz starts.

Looking at /etc/init/bootchart.conf, it seems the graphic is cropped indeed after compiz start, but it doesn't seem to be my case

bootchart --format=$format \
    --crop-after=compiz,metacity,mutter,kwin,xfwm4 \
    --annotate=ureadahead,mountall,hostname,hwclock \
    --annotate=Xorg \
    --annotate=gdm-session-worker \
    --output="/var/log/bootchart" "$TARBALL"

Here is some example output.

Is there any way I can see a longer time axis on the graph, at least until the desktop is loaded?

Please use pybootchartgui (available in Software Centre). It'd create a graphical log after each boot.
Checking dmesg output would be equally good, but less 'visual'.

Please disable from Startup Application whatever you don't need, and make sure that the HDD is the 1st boot device in the BIOS.

Check /var/log/messages after you booted? It has a log with the times from during the boot sequence.

You might try running bootchart.

Check out this question also How can I see what happens during the boot process?

an alternative application to bootchart called pybootchartgui available in Ubuntu Software Center.

http://code.google.com/p/pybootchartgui/


How do I install IronPython? I tried installing Ironpython on ubuntu 12.04 using the guide here:
IronPython on Mono
But it doesn't seem to work. I have no Solutions/IronPython.Mono.sln, so i try to xbuild Solutions/IronPython.sln but it doesn't work because of some errors.

Can someone please point to another way of installing IronPython on Ubuntu?

Thanks!

I found a guide here:
https://datadrivendesign.wordpress.com/2012/08/05/getting-infer-net-and-ironpython-to-work-on-ubuntu-12-04/

It works now. Thanks guys

Use the command sudo apt-get install python-all

Heres a link to some useful information on python.

https://launchpad.net/ubuntu/precise/+package/python-all


Remapping Caps Lock to Control and Escape (not the usual way) I know how to use xmodmap to remap the Caps lock key so it acts as a Control key, or as an Escape key. I would like to combine both features as follows:

When I push, then release, the Caps lock key, it sends Escape.
When I hold down Caps lock and push another key (say A), it send Control-A.

Is there some combination of xkb, xmodmap and something else that could make Caps lock behave this way in X?

I'm using Ubuntu Precise on a Macbook Air 3,1.

I have this setup on my Mac and I had tried to find a way for Ubuntu without luck.
Well, it's now working. Thanks tungd for ponting me to xcape. What I have done is really simple and straightforward.

Under System Preferences → Keyboard Layout → Options... → Ctrl key position, I checked Caps Lock as Ctrl.

In a terminal run:
xcape -e 'Control_L=Escape'

Done, Caps Lock works as Ctrl when used like a modifier, and as Esc when pressed alone (there's a slight delay of a few hundred milliseconds, as noted on the xcape README file, so it's still not as optimal as the Mac solution which uses KeyRemap4MacBook.)

You can do the first (mapping Caps Lock to Esc) but you cannot do the second.

Simple Explanation: Caps Lock is just not designed to do something when pressed.

Elaborate Explanation:
There are many types of keys. Two of them are Modifier Keys and Lock Keys.

Caps Lock is a Lock Key while keys such as Ctrl, Alt, and Shift are Modifier Keys.

It's apparent from their names that Modifier Keys modify the function of the next key(s) pressed, and Lock Keys act as a toggle switch to turn on or off some particular function.

Now, since Caps Lock is a Lock Key, you cannot have it behave like a Modifier Key without mapping it to one. Caps Lock by itself cannot function as a Modifier Key.


Minecraft doesn't run; I do all the things to fix it, but it doesn't works! No OpenJDK 7 Java Runtime on the dialog box.

Done fixing this.

Here's my Java version.

I'd just reformatted my PC because there's problems in the last Ubuntu installation but Minecraft works fine there.
I am using TeamExtreme Minecraft Launcher.

sudo add-apt-repository ppa:minecraft-installer-peeps/minecraft-installer
sudo apt-get update
sudo apt-get install minecraft-installer

  Once installed, run Minecraft from the menu / Dash, login with your
  Minecraft account and the installation should start automatically.

Source

... and you can play Minecraft

Im hoping that this answer will help at least some of you. Open the .jar file by right-clicking on it and selecting "open with Java". When just double-clicking it, it usually tries to launch the .jar file using wine.


Just installed Ubuntu 14, very bad performance on games, need help So today I installed Ubuntu 14 on my laptop and I tried running counter-strike global offensive, but I only got 30-ish fps, which spikes to 120 sometimes and a lot of stuttering. My laptop has 2 GPUs: Intel HD 4000 and Nvidia GT750m, could it be that CSGO runs on the Intel GPU rather than the Nvidia ? Could use some help as I'm not sure what to do, csgo ran fine on windows 8 at about constant 100ish fps.

Specifications:

CPU: i7 quad core, 4th gen (don't know the exact numbers, it had MQ
letters)
GPU: Intel HD 4000 & Nvidia GT750M
Memory: 6GBs

first of all, i had csgo on my lappy running on win7 64bit, 4gb ram and i used to get around 60fps. So i think the problem here is with linux. Secondly linux is not really for gaming, you should have side loaded it with your windows if you are a gamer.
Now coming to your solution, try changing the windows compability layer software/package you are using. Try "playonlinux" or "wine" or any other and check the fps.
Sorry but i dont know how to see which video card is being used by linux.


How can I create a bootable Ubuntu USB? I have updated to Ubuntu 17.10. Now I want to create a bootable USB stick to use on other machines or to install 17.10 on a new machine. Start up Disk Creator recognizes my USB Drive, but is looking for a CD/DVD containing a source file.  I assume an ISO file.  I cannot change the source location and even if could, I have no idea where to find the 17.10 ISO on my hard drive.

I found sample code to create the USB using the terminal but I can not get that to work either, I keep getting a message saying the add command can not be found!

Must I be signed into the root directory to use the necessary  commands and if so how do I do that?

You must download the ISO file from https://www.ubuntu.com/download and then select the downloaded ISO in StartupDiskCreator.

The 1st: Format your USB FAT format.
The 2nd: Download & install Unetbootin; Then it has UI for burning USB boot-able Ubuntu from ISO file.

https://unetbootin.github.io/


How can I install AWN trunk? I've been trying to install AWN trunk in Natty Ubuntu Classic Desktop,but after add the PPA: sudo add-apt-repository ppa:awn-testing/ppa.

Update the sources: sudo apt-get update.

And install the files:

sudo apt-get install avant-window-navigator-trunk avant-window-navigator-data-trunk python-awn-trunk awn-settings-trunk awn-applets-python-core-trunk python-awn-extras-trunk awn-applets-python-extras-trunk awn-applets-c-core-trunk awn-applets-c-extras-trunk

I've got the following (My system is in spanish):

`Leyendo lista de paquetes... Hecho`
`Creando árbol de dependencias       `
`Leyendo la información de estado... Hecho`
`El paquete awn-applets-c-core-trunk no está disponible, pero algún otro paquete hace referencia a él. Esto puede significar que el paquete falta, está obsoleto o sólo se
encuentra disponible desde alguna otra fuente`

`El paquete awn-applets-python-core-trunk no está disponible, pero algún otro paquete hace referencia a él. Esto puede significar que el paquete falta, está obsoleto o sólo se
encuentra disponible desde alguna otra fuente`

`El paquete awn-applets-c-extras-trunk no está disponible, pero algún otro paquete hace referencia a él. Esto puede significar que el paquete falta, está obsoleto o sólo se
encuentra disponible desde alguna otra fuente`

`El paquete awn-applets-python-extras-trunk no está disponible, pero algún otro paquete hace referencia a él. Esto puede significar que el paquete falta, está obsoleto o sólo se
encuentra disponible desde alguna otra fuente`

`E: El paquete «awn-applets-python-core-trunk» no tiene un candidato para la instalación`
`E: No se ha podido localizar el paquete python-awn-extras-trunk`
`E: El paquete «awn-applets-python-extras-trunk» no tiene un candidato para la instalación`
`E: El paquete «awn-applets-c-core-trunk» no tiene un candidato para la instalación`
`E: El paquete «awn-applets-c-extras-trunk» no tiene un candidato para la instalación`

Am I doing someting wrong?, or there is no AWN trunk for Natty?.

try just

sudo apt-get install avant-window-navigator-trunk

that did the trick for me on natty just 5 secs ago. I think yours is just a typo problem :)

First, Install Ubuntu Tweak

Then you can install the necessary software, cleaning your system and configuring the many settings of Ubuntu.

Screenshot for Avant Window Navigator (Lang : Turkish)

http://i.stack.imgur.com/98axm.jpg


How to create package download script with correct dependencies? In Synaptic it's possible to select a bunch of packages for installation (or reinstallation), then just click File → Generate package download script to get a set of commands to download the corresponding deb files. This is useful for transferring missing packages to an offline system for installation, and it also resolves dependencies.

Unfortunately, as far as I can tell the process has some drawbacks:

The online system has no way of knowing which of the dependencies are installed on the offline system (unless they're both somehow in sync). In the worst case this means several roundtrips to download all the necessary files.
synaptic is not installed by default on a new system, so I'd have to use two roundtrips if I wanted to generate the package download script on the offline system - Once for the Synaptic deb file, and again with the files downloaded by the generated script.

apt-get download is not an alternative since it doesn't resolve dependencies.

Is there some way to

generate a package download script with the packages available on the Ubuntu live CD, or
transfer the packaging state on the offline machine to the online one and create a package download script with the latest upstream state?

The latter option would be preferred since it would also get the latest versions of each package.

The idea is that you generate the download script from the offline system, which knows which dependencies it'll need.

It needs to not be entirely offline, to have recent package lists, but if you don't have any connectivity at all, you can still fake this by copying /var/lib/apt/lists/ contents from an online machine (with the same sources.list).

Would apt-offline help?

https://debian-administration.org/article/648/Offline_Package_Management_for_APT

Also, there is debian manual on using apt without network connection here:
https://www.debian.org/doc/manuals/apt-offline/index.en.html


How to start/stop downloads in Azureus (Vuze) via terminal? I need to stop/start download through shell script in Azureus(Vuze).
I know there is CLI and I can invoke it as

java -jar Azureus2-XXX.jar --ui=console

The ? will show a list of commands I can use. To get a list of torrents,

show torrents

etc. But it is CLI. I need shell script to do that so How I can use it to stop/start downloads through shell script?

Is there any way to do that?

This solution works flawlessly

OK. So building up on my previous answer, here is a solution that works right out of the box without any hassle.

First, install this plugin in Vuze: Azureus HTML WebUI

Now, go to your browser and open http://localhost:6886/. This is a web UI for controlling your Vuze. Here, you can see that to pause/resume downloads, you have a link with such URL:

http://localhost:6886/index.tmpl?act=pause

Now, you can simply "click" this url using CURL by making a GET request. Hence, fire up these commands in the terminal for pausing and resuming:

curl --request GET 'http://localhost:6886/index.tmpl?act=pause'   # For pausing
curl --request GET 'http://localhost:6886/index.tmpl?act=resume'  # For resuming

I've never used vuze with Ubuntu, but in Windows you highlight the torrent and click stop/start.

Like I said I have only used it with windows.


Ubuntu Touch - Wifi - Sound - Stuff I recently installed Ubuntu Touch on my LG Nexus 4 and have followed all the steps.

At first, it seemed to be working perfectly well. Ubuntu booted, and was just as I expected it to be. Then I realized Wifi didn't work.

Next I noticed sound doesn't work either (from music app, phone app, etc.)

I can't install external apps either, and all I can do between my Linux Machine (computer) and my phone is access the phone's terminal through adb shell.

I have no idea where to start, from installing wifi, getting the sound to work, and getting the screen brightness to stay the way it is set whenever I switch off the phone and turn it back on.

Regarding the Wifi problem, I have read a few posts telling me to flash a radio.img from Android 4.3. I have no idea what that means, and if that is a necessary step I need guidance with it.

Thank-you, any help is appreciated.

Radio images for android 4.3 can be found here.

Download only the radio image and flash it. To flash it, copy radio.img to your device, reboot to BOOTLOADER and run the following command:

fastboot flash radio (radioimagename).img

(radioimage name is the name of the file you just downloaded and copied to your device)

Reboot again to Ubuntu after flashing the image. Everything should work. It did for me.