"0: command not found" error while running a bash script

Bash has its own helpful options to determine what's happening.  the -v echos each line as read, and the -x prints out the line executed (after variable substitution, etc.)
$ bash -vx first.sh
bash -vx first.sh
echo "please enter any number"
+ echo 'please enter any number'
please enter any number
read n
+ read n
4
a= $(($n % 2))
+ a=           <======As a comment mentioned, a space causes problems
+ 0
first.sh: line 3: 0: command not found
if [ $a -eq 0 ]; then
    echo "EVEN"
else
    echo "ODD"
fi
+ '[' -eq 0 ']'
first.sh: line 4: [: -eq: unary operator expected
+ echo ODD
ODD


1st option : get a CD including Boot-Repair
The easiest way to use Boot-Repair is to burn one of the following CDs and boot on it.

Boot-Repair-Disk is a CD starting Boot-Repair automatically. (English only).
Boot-Repair is also included in Ubuntu Secured Remix CDs (multi-languages).

Get boot-repair disk
Remarks:

You can also install the ISO on a live-USB.
Please note that this ISO is not an official Ubuntu image.

2nd option : install Boot-Repair in Ubuntu
Either add ppa:yannubuntu/boot-repair to your Software Sources via the Software Centre or, for speeds-sake, add it using a new Terminal session:
sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

You can run this from terminal sudo boot-repair


What is the default method / program to download photos from a photo camera to the computer?

This answer is the result of info provided by Mik in a comment, indicating an answer of his.

Shotwell does very well what is asked.

Just connect the camera and start it (without mounting it), and run Shotwell . It will try to access the pictures.

In this way the camera contents are visible. Selecting some or all of them you can then right-click import them into ~/Pictures/Year/Month_etc/

After that the program will offer to delete the pictures on the camera.

Pictures are stored in multiple directory levels, according to year, month, day, but this is customizable - under 'Edit/Preferences' - Importing: Directory structure.


When it comes to graphics drivers for the desktop or games, I have the best luck with the Padoka PPAs. I am running an AMD graphics card on a laptop with Ubuntu 18.04 LTS, but it appears to support both intel and AMD and the two versions available support all the latest versions of Ubuntu. With your version of Ubuntu, 19.10, you will need to use the bleeding edge version of Padoka. On the other hand, the Oibaf repository is also popular, and supports all recent Ubuntu versions and nvidia GPUs as well.

I have almost always noticed an increase in graphics performance when utilising either of these mesa opengl and vulkan libraries. It is usually one of the first things I install after upgrading to a new version of the operating system.

In addition, if you experience 3D graphics problems you should make certain you are using Xorg, you can always try switching from Wayland to Xorg at the login screen.

I hope this response was helpful.


Use Torify. Torify is a wrapper for TOR and TORSocks which applies TOR to a specific application.

sudo apt-get install tor torsocks
torify command/or/path/to/tox


It turns out the messages come from AppArmor, a "security module for the Linux kernel" which I never knew about before.  I'm still not quite sure why it gives me those messages, but it happens whenever I try to save a screenprint (I use the Shooter Firefox add-on) to the /shr directory.  Firefox doesn't let me, and pops up a Download Error window ("because you cannot change the contents of that folder") which I never really paid attention to.  I figured it was a permissions thing which I never bothered to look at or change since I was always satisfied with saving my screen print to another directory.

Anyways, I was able to test this and duplicate the messages.  By the way, I was wrong when I wrote that there were only a few files that were being reported on; actually I missed the fact that there were all these lines like __ratelimit: 96 callbacks suppressed which means that there were more messages that the system withheld from the messages file.

I still don't know the why AppArmor felt the need to report on every file in that directory...


Why I can't I telnet to a specific port?

The address 127.0.0.1 is the loopback address.

As you have the 127.0.0.1:7788 in the "Local Address" of netstat output, this means that the connection is only listening for connections originating from this computer only on the loopback interface. No other computers on the network can reach your loopback address directly hence the telnet is failing from other computers.


You could try to install the package mathematica-fonts on your laptop, to resolve the first problem.

As to the second, I remember to have problems me too, but cannot remember just now the solution, probably the shortcut Ctrl-Q.


recovering linux boot loader after reinstalling windows

Find? I thought that you had to use the live cd and then install boot-repair, as seen here. Is that what you did?

This is also relevant.

Hope that helps!

Did you perhaps had an image of your windows system in a hidden partition and recovered it from there? If that's the case, then you probably lost your ubuntu partition. Just saying cause I had the same problem and the only thing I could do is install everything from the start.


Is there a command to close a terminal window via commandline?

To close a terminal window you can use the exit command . Alternatively you can use the shortcut ctrl+shift+w to close a terminal tab and ctrl+shift+q to close the entire terminal including all tabs.


Need to reconfigure absolute position of dual monitors after reboot, how do I fix that?

I fixed this by editing the monitors.xml file in your .config folder. You can see a more detailed description with example here...Ubuntu 11.10 dual monitor set up instructions
But briefly you can try this:

Open up a terminal (ctrl+alt+t)
Go to your config folder (cd ~/.config)
Open up your file for editing (gedit monitors.xml)
Your 2 monitors will be listed here, find the monitor on the left, it will have the values of <x>0<x> and <y>0<y>.
These values are measured in pixels, position the other monitor in relation to this using the x and y values. The current values you see here will be values that represent the incorrect set up when you log in - you can use them as a reference point.

This will hopefully fix it for you too.


Is it possible to use Caribou on the login screen instead of onboard?

The onscreen keyboard is launched by the Unity Greeter. The version that is in Ubuntu 11.10 is hard-coded to use onboard, but there is no reason why it shouldn't be able to use either.  Please file a bug / write a patch to unity-greeter.


You'll need to pass in some extra info for lftp if you want to avoid the Certificate verification: Not trusted issue. Try this:
lftp ftp://miljenko@lw001.usbx.me:11963 -e "set ftp:ssl-allow no; mirror -R ~/Downloads/ftp_out /Mastering%20Chrome%20Developer%20Tools; quit"

Be sure to set ~/Downloads/ftp_out to whatever directory you want to download the contents to. The key element here, though, is ftp:ssl-allow no.
Another option would be to create a file named ~/.lftprc and add the following line:
set ssl:verify-certificate false

If the ~/.lftprc file already exists, just add the certificate verification bit above to the end.
Hope this helps.


Kile creates .backup files by default in the same dir. Check for those. If that didn't work, then use a VNC server. SSH into and run:

$ sudo apt-get install x11vnc
$ x11vnc -storepasswd #Create a password
$ x11vnc -usepw -display :0 #Run it

This will log you into a running session.
Use any Remote Desktop client to connect (I am not sure if the connection will be encrypted, but you only need a few seconds, and can stop the server, so no big deal), and do your thing.

If you get a login error, try the following, but it might restart your session, so be very careful. You have been warned:

$ sudo x11vnc -xkb -noxrecord -noxfixes -noxdamage -display :0 -auth /var/run/lightdm/root/:0 -usepw


edit /etc/vsftpd.conf and remove # from local_enable=YES,
write_enable=YES and chroot_list_enable=YES.

now enter this to terminal sudo touch /etc/vsftp.chroot_list

and finally edit /etc/vsftp.chroot_list and add one user per line.


Adding ufw rules during a preseeded installation

I have been trying to get this working for a while, too. Nothing seems to work. Until I finally gave up and I fixed it with a simple rc.local workaround:

d-i preseed/late_command string \
    mv /target/etc/rc.local /target/etc/rc.local.orig; \
    echo '#!/bin/sh -e' > /target/etc/rc.local; \
    echo '/usr/sbin/ufw allow ssh' >> /target/etc/rc.local; \
    echo 'mv -f /etc/rc.local.orig /etc/rc.local' >> /target/etc/rc.local; \
    echo 'test -x /etc/rc.local && /etc/rc.local' >> /target/etc/rc.local; \
    echo 'exit 0' >> /target/etc/rc.local; \
    chmod +x /target/etc/rc.local

Basically I made a custom rc.local script which executes ufw allow ssh on first start up, which then will destroy itself by renaming the original rc.local script back to the original place. This seems to work.


Why are there so many "linux-" kernel packages on my machine, and what do they all do?

A kernel image package is related to the kernel image and modules which are loaded when your OS is booted. A header package provide files that are necessary to build out-of-tree kernel modules and/ or some other programs from source.

linux-image-generic

Usually you install the linux-image-generic package. That is a meta-package that does not ship any files itself. Instead, it depends on the latest kernel version provided by Ubuntu, for example linux-image-3.8.0-19-generic. This package is needed to receive kernel updates.

linux-headers-generic

A similar story holds for the linux-headers-generic package. You need to install this package if you use external kernel modules such as proprietary video drivers. The linux-generic package is a meta-package that ensures that both the linux-headers-generic and linux-image-generic packages are installed.

-generic-pae

This is a variant of the -generic packages. See What's the meaning of "-pae" at the end of kernel version?

linux-image-extra-*

This package was introduced with Ubuntu 12.10 and provides additional kernel modules (drivers). See What is the linux-image-extra package for and do I need it?.

Why multiple linux packages with the different version numbers?

The kernel is a critical piece of your system. Newer kernel versions may introduce a bug that make you unable to start your system successfully. With multiple kernels installed simultaneously, you can change the kernel version in the boot menu.


Can not boot Ubuntu 11.10 from external USB HDD

Try setting your external hard drive as primary boot device instead of the F12 boot menu option.


GNOME 3 graphics problem on Ubuntu 11.04

You may installed Gnome 3 wrong. The only things you have to do is the following:

sudo add-apt-repository ppa:gnome3-team/gnome3

sudo aptitude update

sudo aptitude dist-upgrade

sudo aptitude install gnome-shell


How to allow unattended-upgrades to start even running on battery?

After searching for a long time to allow anacron to start even on battery, I give up. Because I found a script to start unattended-upgrades if machine running on battery, which I originally wanted.

Run the unattended-upgrades if machine running on battery, perfect for laptop. Script to be execute at login.
Requirement :

Unattended-upgrades installed and enabled (link)
Allow unattended-upgrades and apt update to be execute without
password prompt with sudoers (link)
Run script at login (link)

Script :

 #!/bin/bash
sleep 6m
level=$(cat /sys/class/power_supply/BAT0/capacity)
status=$(cat /sys/class/power_supply/BAT0/status)
lastupdate=$(cat /var/log/unattended-upgrades/unattended-upgrades.log | grep `date -I` | tail -1)
# Exit if not discharging
if [ "${status}" != "Discharging" ]; then
  exit 0
fi
# Exit if updated today
if [ -n "$lastupdate" ]; then
  exit 0
fi
# Update
if [ "${level}" -ge 70 ]; then
    sudo apt update && sudo unattended-upgrades
fi


Using unicode correctly in Python 2.7, Ubuntu 13.4?

I should point out that you're playing with the introspection there. Python 2 is storing the unicode the only way it knows how but it's not corrupting the data and the interactive console is showing you that. It's showing you the raw string.

If you want to see the output properly, use print:

>>> d = {3:'tři'}
>>> print d[3]
tři

Python 2.x still treats Unicode as something magical and scary. Python 3 treats all strings as unicode. If possible, I'd probably recommend using Python 3.

$ python3
Python 3.3.1 (default, Jul  5 2013, 09:19:20)
[GCC 4.7.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> print('tři')
tři
>>> d = {3:'tři'}
>>> d
{3: 'tři'}
>>> d[3]
'tři'

It's not always that simple. Python 3 has some peculiar backwards-incompatibilities so if you need certain libraries (or have tons of your own incompatible code) this isn't really an option.


Wine 2.0 says it supports Office 2013. How do I actually install it?

I installed office 2013 and I used to get a black window after starting it up.
I fixed the black screen by following the solution posted in the WineHQ-Forum.

Here's what I did:

Install Wine and Components

First, install wine 2.1 (might als work with 2.0 'winehq-staging')

sudo add-apt-repository ppa:wine/wine-builds
sudo apt-get update
sudo apt-get install --install-recommends winehq-devel

Install 'winbind'

sudo apt install winbind

Create Clean 32bit Prefix for Win7

Crete a clean 32 bit prefix and start up winecfg:

WINEPREFIX=~/.wine/Office2013 WINEARCH=win32 winecfg

In the winecfg applications tab select "Windows version: Windows 7"
Close wine config and install winetricks

Install Libraries

sudo apt install winetricks

Then start winetricks for your prefix

WINEPREFIX=~/.wine/Office2013 WINEARCH=win32 winetricks

accept "select the default wineprefix" with OK.
Now, select "Install Windows DLL components" and go and install msxml6

I also installed the cambria font, but that shouldn't matter.

Don't close winetricks just yet, you most likely want to fix the black screen bug.

Fix Black Window

In order to fix the black window that impedes Office 13 to be used, add the  HKCU\Software\Wine\Direct3D\MaxVersionGL new DWORD value 30002 (hexa) to the registry.

Here's how to do this:
In Winetricks select Run regedit and wait for the Registry Editor window to open.
In the folder tree expand HKEY_CURRENT_USER - Software - Wine and create a new key in the Wine folder. To do so, right click, select new-->key and name it Direct3D. Now create new-->DWORD Value, rename the file to MaxVersionGL and set the value data to 30002 (hexadecimal).
Close the Registry Editor window.

It should look like this:

Close the Registry Editor window.

Close the winetricks window and run installer:

Install Office 2013

WINEPREFIX=~/.wine/Office2013 WINEARCH=win32 wine ~/PathTo/Office2013Setup.x86.exe

From here, the install runs and completes 100%.

Open one of the Office programs of your choice. They mostly work, but I found that the Word Math Typesetting does not work and Power Point may not start as well due to "not enough memory or system resources". So, still room for improvement.


In Ubuntu 13.04, after the computer sleeps, I lose my wireless connection

Do you have a lock screen after boot from suspend or hibernation? If so, I have found that if I login too quickly the connection is lost. The Wifi icon is visible on the lock screen. Wait until the icon shows you are connected to the wifi before logging in. It is usually only a couple of seconds wait time.


Opendkim won't start: can't open PID file?

I fixed it by specifying the PidFile in the /etc/opendkim.conf file:

PidFile                 /var/run/opendkim/opendkim.pid

I think it's better to solve it here than modifying the systemd script. Also, systemd recommends the PIDFile option if the Type option is set to forking, which it seems to be in this service.

This PidFile setting was present in the default /etc/opendkim.conf file. However, I replaced that file while I was following a tutorial for configuring OpenDKIM. So that is where it went wrong for me.


Make mex compiler of matlab working on mint?

You can try this. It works on Ubuntu, so it may work for you.

Ubuntu comes with 3 versions of gcc. One of the versions is gcc-4.4. I just installed this version using apt-get install gcc-4.4.

After installing you need to tell which of the installed versions is the active one (you want to work with). You can switch back and forward among different versions using the command update-alternatives. The command below on the terminal makes gcc-4.4 the active version.

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.4 50

For me, it does now work and mex files are compiled an executed.


On Linux you get this error because you don't have permissions for the license folder. An easy way to get past this is by launching the activation script with sudo:

cd $MATLAB/R20***/bin/
sudo ./activate_matlab.sh

($MATLAB/R20*** is your root MATLAB installation folder)


To resolve this problem I had to disconnect from my VPN.

Running sudo dockerd -D had revealed that there was a networking error.

(This is on Ubuntu 20.04)


How do I restore menu items in STEAM from the taskbar icon?

In a terminal window (CTRL+ALT+T):

cp /usr/share/applications/steam.desktop ~/.local/share/applications/steam.desktop
gedit ~/.local/share/applications/steam.desktop

Then, edit line 4 "Exec" from

Exec=/usr/games/steam %U

to

Exec=sh -c "STEAM_RUNTIME_PREFER_HOST_LIBRARIES=0 /usr/games/steam %U"

Save & Close the file. Right-click on the steam.desktop file, select Properties, select Permissions Tab, and check the Execute option Permissions to enable "Allow executing file as a program".

Close the steam Properties dialogue.

Double click on the launcher to launch STEAM


How to use palaver on ubuntu 13.04 32bit?

Could be that you have not pressed the shorcut again? Remember, you press, for instance, "Ctrl+L" to trigger the microphone, and again "Ctrl+L" to stop it)


Wvdial connection wont support ubuntu software centre

You can simply stop the Network Manger and everything will run great including Ubuntu Software Center! stop it by run this commend in the terminal:

sudo stop network-manager

you can bring it back by restart your computer or simply run this:

sudo start network-manager


Horizontal title bar shadow while in full screen

It's rather workaround then solution, but what You can do is to remove this shadow completely. To do so type commend below - it generally only renames the file, doesn't remove it.

sudo mv /usr/share/unity/6/panel-shadow.png /usr/share/unity/6/panel-shadow.png-removed

After that restart Unity by typing unity in alt+f2 console or in Terminal.

You can also bring back this shadow again anytime.

sudo mv /usr/share/unity/6/panel-shadow.png-removed /usr/share/unity/6/panel-shadow.png

And if You really need that shadow sometimes You can just create two hotkeys with commends above or with && unity added to both of them.

And You can also check this out: http://www.webupd8.org/2013/05/fix-shadow-displayed-on-top-of-full.html .


What is the hardware address of my Webcam Mic?

Try

arecord --list-devices

and

arecord --list-pcms

for example... I don't think that ALSA capture devices have a standard unix device file associated. On my laptop:

(0)asus-rmano:~% arecord --list-devices
**** List of CAPTURE Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC269 Analog [ALC269 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

I have an audio capture device in card 0, device 0, subdevice 0 (the internal mic). How this translate to an "address" depend on what you mean for it, and which app you use.

(0)asus-rmano:~% arecord --list-pcms
default
    Playback/recording through the PulseAudio sound server
sysdefault:CARD=Intel
    HDA Intel, ALC269 Analog
    Default Audio Device
front:CARD=Intel,DEV=0
    HDA Intel, ALC269 Analog
    Front speakers
surround40:CARD=Intel,DEV=0
    HDA Intel, ALC269 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Intel,DEV=0
    HDA Intel, ALC269 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Intel,DEV=0
    HDA Intel, ALC269 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Intel,DEV=0
    HDA Intel, ALC269 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Intel,DEV=0
    HDA Intel, ALC269 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
dmix:CARD=Intel,DEV=0
    HDA Intel, ALC269 Analog
    Direct sample mixing device
dsnoop:CARD=Intel,DEV=0
    HDA Intel, ALC269 Analog
    Direct sample snooping device
hw:CARD=Intel,DEV=0
    HDA Intel, ALC269 Analog
    Direct hardware device without any conversions
plughw:CARD=Intel,DEV=0
    HDA Intel, ALC269 Analog
    Hardware device with all software conversions

For example to record something from the mic:

arecord  -D plughw -f S16_LE prova.wav

(stop with ctrl-c when done).


How can I get my Dell C1760nw Printer to work with Ubuntu?

As of Ubuntu 14.04 (and earlier versions):
If you have a 64-bit system, copy and paste this into the Terminal (open it with Ctrl+Alt+T) and press Enter:
sudo apt-get install libcupsimage2:i386

If you have a 32-bit system, ignore that terminal command and proceed.
Download the Ubuntu .deb drivers from Xerox for their Phaser 6000 model. It comes packaged in a .zip file. (The Dell C1760nw is a "repackaged" version of this model, which means that the core printing device works the same as a Xerox Phaser 6000 because it came from the same factory, but it is assembled and sold to retailers by Dell instead of Xerox.)
You will need to save this .zip file, and extract its contents with a right-click if you are looking at it in the File Manager. A folder will be extracted, and therein will be a .deb package file. You should double-click this to open it.
You may encounter a window saying that the package is of "bad quality". You can safely ignore this; it's coming up because of an incorrectly entered variable that declares the creator of the file.
Then, install the printer. If you are prompted to choose a printer manufacturer and model, enter it as a Xerox 6000b. It works!
Note that all of these steps are still required to use the printer over the network.


Mathematica 8 choppy surface plots on Ubuntu 14.04

Try Edit->Preferences->Appearance->Graphics and turn on Anti-Aliasing... worked for me (Mathematica 9 on Ubuntu 14.04)


Check what packages of myslq are/is still installed:

sudo dpkg -l | grep mysql*

To completely remove remaining mysql packages do:

sudo dpkg -P mysql*


How do I configure a Wacom stylus on Ubuntu 17.04?

At the end of the day, this is what I eventually found out that:

Layout data for tablets and styluses is handled by the Linux Wacom project and should be contributed to them if it's missing. It includes all the information about the devices, such as the number of buttons.
Data for new tablets, once somebody contributes it, is eventually packaged into distros after some time. In fact, the Wacom settings page for my tablet worked since Ubuntu 18.04.
Configuration for input devices on Xorg (using libinput) is managed with the xinput tool. By running xinput --list-props <device>, all available settings are listed, and can be configured.
On Wayland, everything is more complicated: the input configuration, just as every other display/HID-related setting, is managed by the compositor.

GNOME manages them with gsettings: you can see the configuration with dconf-editor inside /org/gnome/desktop/peripherals. GNOME Settings does its work by changing stuff there.
On Weston you must change the configuration file (source).
Other compositors may behave differently.

Eventually I haven't managed to configure my stylus, but I think it's the stylus' fault: it has two buttons but they're actually not remappable: one acts as the eraser, the other one works as a button. They can't be swapped.


OK! I really figured out what's going on! And yes, you'll laugh! You just have to take the ownership of the folders from Windows --> Right Click on the Folder --> Properties --> Security Tab --> Advanced --> Owner --> Chose your username (admin), click Apply and you're done! You can delete/cut the folder and all the files inside it! :)))


OpenCV: Error - Module not found -(on IDLE)

You need to install opencv-python.
pip3 install opencv-python


Graphical bugs when putting Gnome panel on the right side

If you use Ubuntu 10.10, to fix Ambiance, run the following command:

gksu gedit /usr/share/themes/Ambiance/gtk-2.0/apps/gnome-panel.rc

And comment line 10 which looks like this: "bg_pixmap[NORMAL] = "img/panel.png"". To comment means to add a "#" sign in front of the line (without the quotes). After editing the file, the line should look like this:

# bg_pixmap[NORMAL] = "img/panel.png"

It's the same for Radiance (but replace "Ambiance" with "Radiance" in the command above).

In Ubuntu 10.04, the file you need to edit is the "gtkrc" file inside the gtkrc-2.0 folder.

Further info: "Fix" The Gnome Panel For Ubuntu 10.10 Maverick Ambiance And Radiance Themes


How do I re-install plymouth-theme-ubuntu-logo?

From the comments...

In terminal...

sudo update-alternatives --config default.plymouth

And choose bgrt, which is the default boot screen in 20.04.


Note what you're trying to achieve with this scp command:

root@hostname:/home/gsamaras/konstantis/cholesky#

You are root on machine named hostname

scp gsamaras@hostname:konstantis/cholesky/o_755.txt /

o_755.txt

You are trying to scp a file from hostname:konstantis/cholesky as gsamaras to /o_755.txt on the current machine.

You then login to a machine named gsamaras and look for the file there.  It's not going to be on gsamaras.  Try looking for the file in / and /home/gsamaras/ on hostname (the current machine).

In order to do what I think you want, you'd have to run the following scp command:

scp gsamaras@hostname:konstantis/cholesky/o_755.txt gsamaras@gsamaras:~/

Where hostname is the current machine.


Login screen problem, boots into text mode instead of GDM

First step is to login with a shell and look at /var/log/syslog for errors.

Researching /etc/init.d/gdm restart issues might help.


It's stored in ~/.local/webkit/databases/file__0.localstorage. Easiest way to fix it would be to delete that file and resync from Ubuntu One.


Dell XPS 15z (L511z) - Ubuntu 13.04 - Short Battery Life... Any help, ideas, or mods?

you can use TLP:  is an advanced power management command line tool for Linux that tries to apply these settings / tweaks for you automatically, depending on your Linux distribution and hardware

http://www.webupd8.org/2013/04/improve-power-usage-battery-life-in.html


This particular WiFi device uses an Archer T4U chipset, which needs a special driver to operate. This needs to be compiled from source on your machine. Fortunately, it's not too difficult. Here's how:

Open Terminal (If it's not already open)

Install some prerequisites:
$ sudo apt install git linux-headers-generic build-essential

Clone the Git repository to your Downloads directory (or any other, but Downloads is fine for this case):
$ cd ~/Downloads
$ git clone https://github.com/nyetwurk/linux-wifi-88x2bu-driver

Compile and install the driver:
$ cd linux-wifi-88x2bu-driver
$ make
$ sudo make install
$ sudo modprobe 88x2bu

At this point Ubuntu should pick up the WiFi device and let you connect to the network. If it does not, a reboot may be in order.
Hope this helps.


sudo: main: unable to allocate memory (Inside of Linux Container)

Are you following the WineHQ wiki to build Biarch 32 / 64 bit wine?

Try:

apt-get update

without the sudo

I was rejected trying to sign into the container and had to Attach to it using sudo.

My prompt was:

sudo@my32bitbox

It was not:

username@my32bitbox

After a couple of hours reading about main: unable to allocate memory
and getting nowhere I realized some other diagnostic commands ran fine without sudo so I tried the update and the other 2 commands that follow it and they worked fine without sudo as well.


Installing Ubuntu 11.10 on laptop with Ubuntu9.04

Most likely a bad burn/image.

I'd suggest to wait 2 days since 12.04 will be out on 4/26/2012 then try burning that image at a slower speed.

But if you want to use 11.10 right now, you should redownload the ISO and to make sure it's not a bad image verify it with MD5SUM(i never needed to do this so this can be optional)
https://help.ubuntu.com/community/HowToMD5SUM

then burn it to a new CD-R or CD-RW.

Still doesn't work? 11.10 could be incompatible with your machine, so try 12.04 in a couple days. Good luck!


Unless you need some cutting-edge newest version of Django, I would recommend installing it from Ubuntu's software repositories instead. From a terminal you can do this by typing

sudo apt-get install python-django

The most popular free open source software needed is available in Ubuntu's software repositories so that you won't have to do installations manually.

If you want to list all the subpackages of django that are available, you may use the command

apt-cache search django python

If you prefer not to use the terminal for installation, you can open up Ubuntu Software Centre and search for the packages there. You might have to check "Show technical items" in the bottom left corner for some packages.


How to set primary desktop on multiple monitors?

The primary monitor is the monitor that gets used when you boot, so it's a setting you have to change in your BIOS.  Ubuntu allows you to move screens around so that your secondary monitor can be placed anywhere you want it, but it stays the secondary monitor.

If your BIOS doesn't allow you to do this (my Siemens laptop allows this, my IBM doesn't) I can give you something to try, but at the moment, I don't have a secondary monitor to test this, so I cannot vouch for it (I'm travelling).
Only works on a powered-down laptop: close the lid, turn on computer, hope that the secondary monitor shows the boot screen now. (if your on-button is not on the side of your machine: test how far you have to close the lid for the monitor to shut itself off while you're reading this and the laptop is still on)
The next one is grasping at straws, not for the faint-at-heart but it might just work.

Make a full system backup (I use clonezilla)
Create a secondary user and log in there if this goes horribly wrong and none of your monitors work any more.
gedit ~/.config/monitors.xml
cut the primary monitor section between "" and paste it below the secondary monitor.
log out
pray
log back in


Download these files and copy them to your Home folder.

http://mirrors.kernel.org/ubuntu/pool/main/d/dkms/dkms_2.2.0.3-1.1ubuntu5.14.10.1_all.deb

https://github.com/lwfinger/rtl8188eu/archive/master.zip

Then run in terminal

sudo dpkg -i dkms*.deb
unzip rtl8188eu-master.zip
sudo dkms install ./rtl8188eu-master

Then reboot and insert the dongle. It should work.


How to autostart `xautolock` in Lubuntu?

I put the command in:

.config/lxsession/Lubuntu/autostart

but I found that it fails to invoke the command xautolock,  unless I put a script file inside the autostart file and then invoke xautolock from that script.

Don't know why but it works.


How do I get network working on a Dell n5010?

If you are not connected to the internet, mount your Ubuntu CD or USB, and try to install from Additional Drivers or execute this command in the Terminal:

sudo jockey-text -a

or

sudo apt-get install firmware-b43-installer

The first command does the same thing as Additional Drivers, and should no return any output once it's completed successfully. The second command directly pulls the driver package for your Broadcom chipset. Following these steps with internet connection will work as well.


The blinking caps lock is probably caused by a kernel panic, more info here. Look for log files as instructed here to debug this. It seems like there should be something related in /var/log/syslog.


When uninstalling a program from linux, remove will remove the core program, purge will remove the program and the misc data files and garbage you no longer need if you're not going to use it, but might want to keep if you were just installing another version, and autoremove will clean up files that are no longer needed after the removal of applications.

So first purge the application

sudo apt-get purge <application>

then autoremove stuff that's no longer needed.

sudo apt-get autoremove


Transfer file that keeps changing by having new lines appended

rsync is what you need, and it should be available for Windows.

rsync is famous  for  its delta-transfer  algorithm,  which  reduces the amount of data sent over the network by sending only the difference between  the  source  files     and  the  existing  files in the destination. (taken from man rsync).

Install rsync on your windows system, then from the Linux system do:

rsync --progress ip.of.windows.server:/path/to/file ./

It will transfer only the parts that changed. If the file evolves as you say, then each transfer will be very small and fast.

Note that rsync connects using ssh, so if you have ssh already set up and working, rsync should also work fine.


gnome-settings-daemon grabs multimedia keys and drops mute since upgrade 16.04

If you're not running gnome-shell as your desktop environment, you will have issues with your media keys. They're configured and handled by gnome-settings-daemon, but grabbed by gnome-shell since this commit in 2013.

To restore the old behavior without running gnome-shell or unity, you must install and run a shim program to grab and forward the keys.

For the media keys functionality, such a program is available in the arch linux AUR package gnome-settings-daemon-compat. This package provides the executable /usr/lib/gnome-settings-daemon/gnome-fallback-media-keys-helper, which provides support for media keys in any desktop environment/window manager.

You would need to add it as a dependency of your gnome session or otherwise have it run at session init. I'm not sure if it's packaged for ubuntu, or if you can run unity-fallback-media-keys-helper instead (I don't have either installed to check).


Is there a free cloud service where I can practice installing Linux?

You can do it on your own current operating system.

Use Virtual machines (Virtual Box is good) and install any number of machines(which are called guests). Try them, test them out without harming the stability of your main system(which is the host).

Most virtualization software is available for Linux as well as Windows hosts.

Hope that's a better solution than a cloud service. Most people use virtualization to accomplish testing and trying.


"Dragging" should work by first have xdotool press the mouse button with the mousedown command. Then issue the mousemove commands, and issue mouseup when done dragging.


I had the same issue. I tried to reinstall ubuntu-desktop, lightdm, compiz, but nothing helped, only this:

sudo apt-get install nvidia-current


Reconfiguration of xserver-xorg package fails on 12.04 LTS with Raring HWE installed

The problem is that when you have installed the LTS hardware enablement stack, you can no longer use the regular xserver-xorg and related packages. This command will certainly fail:

sudo dpkg-reconfigure xserver-xorg

However, a command similar to this should work:

sudo dpkg-reconfigure xserver-xorg-lts-raring

However, it can be more complicated than that, and in my case it certainly was!

In order to solve my problem, I had to reappropriate the solution from here:
https://askubuntu.com/a/344625/36661

Note that the solution is proposed for a completely unrelated question! However, I want to point out that those same steps can also solve this question. (Mods, please don't confuse the fact that I reappropriated an answer for the questions being duplicates -- the questions are unrelated!)

The solution is in response to this unrelated question:

12.04 - Experiencing major issues on graphic displays - Ask Ubuntu
Experiencing major issues on graphic displays


You can connect the Ethernet and run:

sudo apt-get update

This worked for me.


Failure to succesfully sync an iPod using Rhythmbox on Ubuntu 14.04

Run command:

sudo apt-get install libgpod4 libusbmuxd2 usbmuxd libimobiledevice4 libplist3

If you have Synaptic install, find those libraries so you can have the description of each of them.


You should not have such essential system libraries in /usr/local/.
Remove them and consider to reinstall them from their package:

sudo rm /usr/local/staf/lib/libcrypto.so.1.0.0
sudo rm /usr/local/staf/lib/libssl.so.1.0.0
sudo apt-get install --reinstall libssl1.0.0


Try this in terminal

sudo pppoeconf

You'll have to type your username and password you're using for internet connection.


You can choose Libreoffice writer in openwith option in the right-click menu. If it doesn't work just rename your filename.doc to filename.docx will work.


Does the Upgrade Tool in Kubuntu Erase Current Programs & Configurations?

I completed the upgrade. Data integrity is ok, programs are ok, previous desktop settings/configurations are ok. I have run into some issues with USB drivers (I expected such, you should too), but graphics drivers are fine. Wayland is ok as a desktop server as well, no weird issues on my hardware. If you are going to attempt the upgrade, ensure that you use a backup tool such as GNOME Backups (My preferred) beforehand.


Can't execute `netplan apply` command in Ubuntu 20.04 LTS

This error is returned from systemd in response to the command:
systemctl stop --no-block systemd-networkd.service 'netplan-wpa-*.service'
This checks whether /run/systemd/system exists and is accessible.
This is always true on a correctly booted Ubuntu 20.04 system.
I don't know what you might have done to cause this directory to be absent, but such a system is badly broken and unsupportable.


Had a problem with exactly the same description as yours (tutorials for dynu and duckdns are the same).
For me it helped to change from
*/5 * * * * /home/pi/duckdns/duck.sh >/dev/null 2>&1

to
4,9,14,19,24,29,34,39,44,49,54,59 * * * * /home/pi/duckdns/duck.sh >/dev/null 2>&1

Both ways I was able to see the program run
pi@raspberrypi:~ $ service cron status
● cron.service - Regular background program processing daemon
   Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2021-01-02 21:27:11 GMT; 9min ago
     Docs: man:cron(8)
 Main PID: 285 (cron)
    Tasks: 1 (limit: 881)
   CGroup: /system.slice/cron.service
           └─285 /usr/sbin/cron -f

Jan 02 21:27:11 raspberrypi systemd[1]: Started Regular background program processing daemon.
Jan 02 21:27:12 raspberrypi cron[285]: (CRON) INFO (pidfile fd = 3)
Jan 02 21:27:12 raspberrypi cron[285]: (CRON) INFO (Running @reboot jobs)
Jan 02 21:29:01 raspberrypi CRON[557]: pam_unix(cron:session): session opened for user pi by (uid=0)
Jan 02 21:29:01 raspberrypi CRON[558]: (pi) CMD (/home/pi/duckdns/duck.sh >/dev/null 2>&1)
Jan 02 21:29:03 raspberrypi CRON[557]: pam_unix(cron:session): session closed for user pi
Jan 02 21:34:01 raspberrypi CRON[613]: pam_unix(cron:session): session opened for user pi by (uid=0)
Jan 02 21:34:01 raspberrypi CRON[614]: (pi) CMD (/home/pi/duckdns/duck.sh >/dev/null 2>&1)
Jan 02 21:34:02 raspberrypi CRON[613]: pam_unix(cron:session): session closed for user pi

But only by specifying the minutes for the program to run, it actually updated ip address on duckdns site. Tested and rebooted raspberry multiple times, always the same result.
Hope this helps.


How to make the newly created files inherit the directory's permissions...?

You could assign a group ownership to a parent folder and then make inside files inherit properties.

Assigning group ownership could be set by

sudo chmod -R 660 /path/to/parent
sudo chown -R myself:somegroup /path/to/parent

The group ownership can be inherited by new files and folders created in your folder /path/to/parent by setting the setgid bit using chmod g+s like this:

chmod g+s /path/to/parent

Now, all new files and folder created under /path/to/parent will have the same group assigned as is set on /path/to/parent.

Source


Installing nvidia-modprobe on Ubuntu 14.04 causes frozen splash screen on boot

I got the same problem. My solution is:

Remove nvidia-modprobe.
Use this script:
http://docs.nvidia.com/cuda/cuda-installation-guide-linux/#runfile-verifications.


Changing UUID with tune2fs gives "NOT A DIRECTORY" ERROR

The trailing slash was the culprit! What a stupid mistake. Thanks so much for catching it. I did also have to change the /etc/fstab UUID, because using tune2fs only changed the partition id, not the fstab. Thanks again.


(This answer is targeted only at those using eCryptFS-based encryption, as the original author has indicated.)

In this case, you'll want to do the following:
1. Back up your data.  (Always a good idea.)
2. Boot from a LiveCD with GNU parted.  (I believe the Ubuntu CD has this.  GParted is a Gnome front-end that makes this easy.)
3. Have Parted resize the partition.

Because you're using eCryptFS, you can just resize the underlying partition and filesystem without any interference to the encryption layer.


Change the default Bookmarks Folder In Firefox

The Bookmarks Toolbar option is inbuilt into 68.02.2 (64 bit).

If it's not already visible on your system you need to perform the following steps (which don't involve add-ons).

Press F10 or Alt to get the menu bar [File Edit View etc] at the top of the FireFox menu bar.

Then select view→Toolbars→Bookmarks Toolbar and ensure that there is a ✓ next to Bookmarks Toolbar.

You can the drag and drop pages as required either directly on to the Bookmarks Toolbar or down in to the Bookmarks option in the sidebar (you may need to ensure that view→Sidebar→Bookmarks is also showing a ✔


Recover deleted encrypted home dir after Ubuntu install over partition

Since you possibly have the content of the missing wrapped-passphrase file, why don't you run a recursive grep on the files you rescued? I would suggest to start only with the first 16 characters, f...2.

GL!


Github and many other website not loading

When using PPoE connection, one common problem is to set correct MTU on the Ethernet connection.

Use ping command to determine your MTU:

ping -M do -s 1472 freelancer.com

If the result is (result = "Frag needed and DF set") then go with lower number in the ping command:

ping -M do -s 1462 freelancer.com

until you get reply to your ping command (result = reply).

Write down the Number - this will be your MTU.

Now set up the new MTU (your Number) on your ethernet connection as in this question:

How do I change the MTU value on Ubuntu?


May I suggest you to recover your grub installation with a live cd?
I could recover grub many times by following these instructions at: https://wiki.ubuntu.com/Grub2#Recover

"METHOD 3 - CHROOT

This method of installation uses the chroot command to gain access to the broken system's files. Once the chroot command is issued, the LiveCD treats the broken system's / as its own. Commands run in a chroot environment will affect the broken systems filesystems and not those of the LiveCD.

1) Boot to the LiveCD Desktop (Ubuntu 9.10 or later). Please note that the Live CD must be the same as the system you are fixing - either 32-bit or 64-bit (if not then the chroot will fail).

2) Open a terminal - Applications, Accessories, Terminal.
3) Determine your normal system partition - (the switch is a lowercase "L")

sudo fdisk -l

If you aren't sure, run
df -Th  Look for the correct disk size and ext3 or ext4 format.

4) Mount your normal system partition:

Substitute the correct partition: sda1, sdb5, etc.
sudo mount /dev/sdXX /mnt   # Example: sudo mount /dev/sda1 /mnt

5) Only if you have a separate boot partition:
sdYY is the /boot partition designation (for example sdb3)
 sudo mount /dev/sdYY /mnt/boot
6)
Mount the critical virtual filesystems:
 sudo mount --bind /dev  /mnt/dev
sudo mount --bind /dev/pts  /mnt/dev/pts
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys  /mnt/sys
7)
Chroot into your normal system device:

sudo chroot /mnt

8) If there is no /boot/grub/grub.cfg or it's not correct, create one using

update-grub

9)
Reinstall GRUB 2:

Substitute the correct device - sda, sdb, etc.

Do not specify a partition number (e.g. do not specify sda5, instead it could be sda)

grub-install /dev/sdX

10) Verify the install (use the correct device, for example sda. Do not specify a partition):  sudo grub-install --recheck /dev/sdX
11)
Exit chroot: CTRL-D on keyboard
12)
Unmount virtual filesystems:

sudo umount /mnt/dev/pts
sudo umount /mnt/dev
sudo umount /mnt/proc
sudo umount /mnt/sys

13)
If you mounted a separate /boot partition:

sudo umount /mnt/boot

14)
Unmount the LiveCD's /usr directory:

sudo umount /mnt/usr

15)
Unmount last device:

sudo umount /mnt

16)
Reboot.
sudo reboot "


Unable to install qt-sdk unmet dependencies

First do

sudo apt-get install qtcreator
sudo apt-get install qt4-designer
sudo apt-get install qt4-dev-tools

then

sudo apt-get install qt-sdk


regain control of mouse by restarting Xorg?

I have the same problem and it has nothing to do with Firefox in my case.

Its definitely NOT a hardware problem (I've tried multiple mice).

The symptoms : I do "something" (haven't quite put my finger on it yet) that causes the left mouse button to appear stuck down (its like a MOUSE_DOWN event happened, but never a corresponding MOUSE_UP event).

The stuck mouse button seems to manifest itself mostly in Intellij IDEA, which basically becomes unusable.

I generally have the following three programs running at all times :

Intellij IDEA
Virtual Box (usually running a few windows VMs)
Chromium

To solve the problem, I end up having to reboot (which kills a lot of time, because I have to alsy cycle the VMs).

As far as what triggers this problem - it is somewhat hard to determine but I think it may have something to do with using the mousewheel while the focus is on one of the virtual box VMs.

One other thing I've noticed is that the problem only seems to happen in Unity.  If I choose Gnome shell then I've not had the issue (but I end up coming back to Unity since its grown on me).


Error while installing libgraph on ubuntu 17.10

The default version of guile-x.x-dev in Ubuntu 17.10 repositories is guile-2.0-dev. guile-2.0-dev is also available in Ubuntu 18.04. Open the terminal and type:

sudo apt install guile-2.0-dev

If you need the specific version of guile-1.8-dev you can manually download the guile-1.8-dev .deb file from the official Ubuntu 16.04 repositories: i386, amd64 and double-click the .deb file to open it in Ubuntu Software. If you manually installed guile-1.8-dev, mark the package as held back to prevent it from being automatically upgraded or removed.

sudo apt-mark hold guile-1.8-dev


Why do some apps look ugly after upgrade to 18.10?

There is this issue: https://github.com/ubuntu/yaru/issues/654

I was using Yaru Dark. Normal Yary makes all apps look ok. So as a workaround, I switched to this.


How to make scripts run in Guake terminal instead of normal terminal?

Just edit your .desktop file as below,

Exec=guake -e /path/to/script.sh

By default this starts hidden window and runs there. If you want to start it as visible window use,

Exec=guake -t -e /path/to/script.sh

For default terminal it is gnome-terminal


Cannot login after installation of Ubuntu 18.04.3 on my new Dell Inspiron 3593

What I did in the same situation, mentioned below:-

Pressed CTRL+ALT+F3 to login to a terminal console and just update and upgrade the apt repository and packages by below commands:-

sudo apt update
sudo apt dist-upgrade

After this just press CTRL+ALT+F1 and try to login again.

It worked for me.


How to access files (documents, drives..) in i3wm?

What "Ravexina" suggested is correct, although I would suggest that after Mod + D, i.e from dmenu try using nautilus --no-desktop. This will get rid of that pesky desktop that opens up every time you open nautilus.


As long as you enable java, user can compile something more complicated that escapes your restrictions. E.g. even vi can be used to escape restricted shell. Well, vi is not written in java but same idea...

Chroot and it is not intended to be a security measure, there are programs that can let you escape chroot if you are root. I think the best you can do is to create some minimal system in chroot and create unprivileged user inside (so it will have it's own /chroot/etc, /chroot/usr that will be accessible to user.


How might an Ubuntu 18.04 system that has somehow had Python 2 removed be recovered?

You might be able to re-install all packages via:

sudo apt install --reinstall ubuntu-desktop


Try these commands to completely remove the unconfigured mysql-server-5.5,mysql-server
 packages,

sudo dpkg -P --force-remove-reinstreq mysql-server-5.5
sudo dpkg -P --force-remove-reinstreq mysql-server

Then install it again by running,

sudo apt-get install mysql-server-5.5
sudo apt-get install mysql-server


"Unknown sequence editconfigs" when trying to build a kernel

It seems as if in 18.04 you need to run:

apt-get source linux-source

Instead of:

apt-get source linux-image-$(uname -r)

This should fix your problem.


apt-get update fails for missing GPG keys but keys are present

Looks like it was the permissions on the /etc/apt directory.
Somehow it got set to 700 . On working machines it was 755. When I changed it to 755 on my newly upgraded machine it worked fine.


How to logout from (a broken) Unity via terminal?

Well... i think that when you want to log out that your 'long-running' prograns in(from) that session will also stop running anyway!
The reason why there are no decorations and probably cant move application windows is that your session-manager hasnt loaded a window manager.
So you have to find out the sm and the wm to load...
That is in (K)ubuntu but not in (L,X)ubuntu and some other very small (limited) desktops that dont use a 'real' sm.
If you use unity you can have compiz with the CompizConf settings manager(ccsm) where you can choose the gnome or the unity environment...
It has todo with the chosen profile(see preferebces knob) I think...


Upgrade to Ubuntu 18.04/Get more free space

Here is how to get more free space on updated Ubuntu
Display filesystem size and space used

df -Th | grep -v fs

You can free some space with those steps

# 1 # Remove unused packages
sudo apt-get update
sudo apt-get -y autoremove
sudo apt-get -f install

# 2 # Clean apt downloads
sudo apt-get clean

# 3 # Remove old snap packages
LANG=en_GB.UTF-8
snap list --all | while read snapname ver rev trk pub notes; do if [[ $notes = *disabled* ]]; then sudo snap remove "$snapname" --revision="$rev"; fi; done

# 4 # Delete old logs
sudo /etc/cron.daily/logrotate
sudo find /var/log -type f -iname *.gz -delete

Then display again filesystem size and space used

df -Th | grep -v fs


Merging partitions in the installation process

You cannot.

You cannot, without gparted (or equivalent) move the partitions around so that the to-be-merged partitions are adjacent on the disk.

You cannot, halfway through an install, easily shuffle this disk partitions and get everything to work on the first try. This way lies madness.


How to update Apache2 on Ubuntu 14.04 Server to the latest version?

That is the latest version available for Ubuntu 14.04 from the official repositories. You might want try a PPA such as this one.

Note that the Ubuntu team backports patches for security issues, and increments the packaging part of the version number (1ubuntu4.1 in 2.4.7-1ubuntu4.1), leaving the upstream version number unchanged (2.4.7), so instead of blindly relying on the upstream version number to determine if a flaw is patched, either go through the changelog of the Apache package, or visit the Ubuntu Security Notices, or try a known test for the flaw.


Error while installing spellchecker for LibreOffice

hunspell-en-us : Conflicts: myspell-en-us but 1:3.2.1-2ubuntu1 is to be installed

This simply means that you cannot install both at the same time.


copy+paste problem from root to partition folder

I don't think there is any other way. In order to change files in the root folder, you need to be root. In most GNU/Linux distros (including Ubuntu), programs execute as a standard user by default, even if you are the administrator on your system. In order to get a program to execute as root, you need to type in gksudo nautilus, which is exactly what you did. However, I suppose if you want to simplify the process you could write an executable script.


There may be two issues here.

First, as you have found out you need to delete 1 of 4 primary partitions to create more (extended) partitions. I second @Mordoc's comment above. Backup and remove D:. Do not format, keep in unallocated so that Ubuntu installation process can find it and create its own sets of partitions / and swap.

If you want more space for Ubuntu, you can shrink C: and make the unallocated space a bit bigger.

Second, The 32GB SSD is used by Windows in such a way that is not compatible with Ubuntu installation. This has been discussed before in another question. See Can't see HDD during install 12.04 on Lenovo U310 for a solution to that problem.

See Is a 40GB SSD practical to use for ' / ' for some ways of using the SSD and HDD for Ubuntu.

Hope this helps


You may need to manually create a DSL connection, start nm-connection-editor, go to the DSL tab and click Add:

Then enter your username, password and service name you got from your Internet Provider. I think that the service name is optional. Go to the Wired tab and choose the Device MAC address from the network card you connected the modem to. From what I see in your output of nmcli dev, it should probably be 00:1B:9E:bC:0D:DA (eth1).

Then go to IPv4 settings and make sure that the Method is Automatic (PPPoE). Check Connect automatically, click Save and see if it connects.


Find source of Partial Upgrade dialog in 12.10

Partial Upgrade (and apt-get dist-upgrade) don't upgrade your system to the new development version. There are sometimes certain dependency chains which may require a partial upgrade (or dist-upgrade) for packages to install or remove, to ensure the upgrade will work. In these cases, the software updater says you need to do a "Partial Upgrade" (which is perhaps quite bad wording). If you use PPAs for various packages, this may happen more often, as the PPA might diverge a bit in what dependencies are used in some packages.

You should probably go ahead and do it. The updater should notify you of what extra packages would be installed or removed (apt-get dist-upgrade will for sure), and unless there is a specific problem with that, it's safe to go ahead with it.


how to configure firewall between two machine?

Choose the port that you would use; for that, control which port are already used on your computers using netstat. Here is an example :

damadam@Pc:~$ sudo netstat -ntlp
Connexions Internet actives (seulement serveurs)
Proto Recv-Q Send-Q Adresse locale          Adresse distante        Etat       PID/Program name
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      657/systemd-resolve
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      5195/cupsd
tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN      916/postgres
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      1553/exim4
tcp        0      0 127.0.0.1:5000          0.0.0.0:*               LISTEN      10231/python3
tcp6       0      0 ::1:631                 :::*                    LISTEN      5195/cupsd
tcp6       0      0 ::1:25                  :::*                    LISTEN      1553/exim4

Now, choose a port not used (I would use the 89362 port for example). Use these commands :

sudo ufw allow out 89362 on the 1rst machine -> out allow to talk, but not to listen
sudo ufw allow in 89362 on the 2nd machine -> in allow to listen, but not to talk

NB : you can also choose to restrict communication using only tcp/udp, you just need to add it after the port number, like that (here is only tcp accept):

sudo ufw allow out 89362/tcp


sudo nautilus results in "cannot open display" error

From Arch Wiki:

  By default, and for security reasons, root will be unable to connect
  to a non-root user's X server. There are multiple ways of allowing
  root to do so, if it is necessary.

Before running gksudo nautilus you should allow root access.
To do this run:

xhost +SI:localuser:root

These also works: xhost local:root or just xhost +.

You can disallow with xhost -SI:localuser:root and xhost -.

See more here.


script auto accepting EULA / license agreement

so as it turns out installing the app using the GUI once will allow you to then use debconf-show to determine the correct syntax for your "auto-accept" for example :

sudo debconf-show ttf-mscorefonts-installer
  msttcorefonts/dldir:
  msttcorefonts/error-mscorefonts-eula:
* msttcorefonts/accepted-mscorefonts-eula: true
* msttcorefonts/present-mscorefonts-eula:
  msttcorefonts/dlurl:
  msttcorefonts/baddldir:

or

sudo debconf-show steam
* steam/question: I AGREE
* steam/license:
* steam/purge:

stars show modified entries,

among those there are modified entries that took no value.

For these, you'll have to enter :

echo steam steam/license note '' | sudo debconf-set-selections

for the one's where you want a value :

echo steam steam/question select "I AGREE" | sudo debconf-set-selections

or

echo msttcorefonts msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections

depending on the value type.

once you've perfectly matched the expected.

sudo apt install thing-with-eula-normally

should breeze right on through the middle of your script without stopping it.


Wireless networking is faster when lid is open than closed?

The antenna for the wireless in your laptop is probably in the screen. I have noticed that the connection on my laptop is slightly slower with the lid shut but by nowhere near the amount you describe.


./configure Permission Denied when try to build llvm

You need to put it on a Linux file system. Microsoft Windows file-systems do not support setting the executable bit.

Try these workarounds:

You could run it like (with bash in front, assuming it opens with bash)

bash ../llvm/configure --prefix=/usr/clang_3_3 --enable-optimized --enable-targets=host

You could create a small ext4 partition on an external hard drive and put the files on there
See here: How do I use 'chmod' on an NTFS (or FAT32) partition?


NFS4 + idmap, incorrect user name mapping

The file looks correct, perhaps the idmapd daemon is not running on one of the machines (check with pgrep rpc.idmapd)?

Is the mount actually done with NFS4? Check the output of mount on the client.

It might be possible to block the idmapd daemon with the TCP wrapper. Do the files /etc/hosts.deny and /etc/hosts.allow exist and have any content?

Note that even if you get it to show the correct user names on the client, it will not work as you want. Whenever you try access the files, the permission checking is done only with the numerical ids (without any translation between client and server). The translation is only done for the output of ls, not for the actual file accesses. So I guess you can stop trying at all, because this is probably not what you want.

The only solution for this is to sync the ids on client and server, or use Kerberos (which is very complex).

The source of my information is this bug report on Launchpad and this thread in the linux-nfsv4 mailing list


No module named MySQLdb when trying to load the OpenStack dashboard

With virtualenv, you have your own environment specifically for that application. If you use --no-site-packages, it won't use system modules installed beyond the standard library.

The solution is to activate the virtual environment and install them there. Try something like this:

cd (project directory)
source bin/activate
easy_install MySQL-python

In doing so, you will install MySQLdb inside that project's own virtual environment, and it will be separate from the system-wide installation. The advantage of virtualenv is that it lets you keep multiple versions of software contained exactly where you need them.


The Issue due to ruby-ffi package dependency and the ruby version,

sudo apt-get install build-essential
sudo apt-get install ruby2.0 ruby2.0-dev
sudo apt-get install ruby-ffi

gem install sass


How do I restore my system OS back to its original condition after attempting to install Kali linux tools onto Ubuntu 16.04?

Start Ubuntu from a virtual console

Open a text-only virtual console by using the keyboard shortcut Ctrl+Alt+F3.

At the login: prompt type your username and press Enter.

At the Password: prompt type your user password and press Enter.

Now you are logged in to a text-only console, and you can run terminal commands from the console.

Warning about updates after installing Kali linux tools
The LionSec Katoolin GitHub webpage clearly warns Katoolin users to be careful when updating software.

Before updating your system, please remove all Kali-linux repositories to avoid any kind of problem.

All kinds of problems can occur if you don't do this.

Make a backup copy of sources.list.
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

Open /etc/apt/sources.list for editing in nano text editor:
sudo nano /etc/apt/sources.list

Replace the entire contents of your existing sources.list with the following default 16.04 sources.list:
deb http://archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu xenial partner

Press the keyboard combination Ctrl+O and after that press Enter to save the file being edited. Press the keyboard combination Ctrl+X to exit nano.

Run this command after changing sources.list to refresh the list of available software. This is the most important step, so please don't skip it.
sudo apt update

Remove Katoolin.
sudo rm -r /usr/bin/katoolin

Reinstall the Ubuntu desktop system.
sudo apt-cache depends ubuntu-desktop | grep '[ |]Depends: [^<]' | cut -d: -f2 | tr -d ' ' | xargs sudo apt-get --reinstall install -y

Install grub to the MBR of your boot drive with these commands:
sudo apt-get --reinstall install base-files/xenial-updates
sudo os-prober
sudo update-grub

Reboot.
sudo reboot

Run autoremove.
sudo apt autoremove

Install deborphan.
sudo apt install deborphan

Run deborphan to show a list of packages orphaned after uninstalling Katoolin. These orphaned packages are no longer necessary except if you are still using any of the packages that were installed by Katoolin.


Thanks to @Hi-Angel for the link in the comment

Using Gimp, open the picture; in the menu, go to Color -> Composants -> Decompose and decompose with RGB mode (don't forget to check the option Decompose in trace).

You will get 3 composants, 1 of each color (red, blue and green), but red and blue are still inversed. To remedy that (with a single composant window), do the same thing but select Compose.

Let the color model to RGB, but inverse Red and Blue, and validate; let see the result below

As you can see, the picture is not read in BGR mode, but red and blue composant had been inversed so the picture had been transformed from BGR to RGB (the car is well colored now)

PS: don't bother me about luminosity level, I was testing it ;)


Usually the Laptop battery is labelled BAT0. Have you tried running:

cat /proc/acpi/battery/BAT0/info

Also have you tried adding acpi=force onto your GRUB command line?

Open a terminal and run the following commands:

sudo gedit /etc/default/grub
Go to the line GRUB_CMDLINE_LINUX_DEFAULT=""
Replace it with GRUB_CMDLINE_LINUX_DEFAULT="acpi=force"
Save your changes.
Run sudo update-grub and reboot.

(If there is something already within the "" at Step 2 just add a space after it and add acpi=force)


Can't print any more "Stopped - Filter failed"

I assume that the printer worked before. Check your /var/spool/cups directory, and empty it.

If that does not help, see the instructions for install the necessary plugins for your HP printer here.


How to setup TL-WR1043ND router on 12.04

Usually routers are set up by accessing a web interface by entering their ip address in a web browser while being connected to the router. In the case of your router the default IP address is 192.168.1.1.

The default username and password is "admin" for both.

Once you're in the admin panel you can change all the settings as you wish.


You should place the following command for your custom shortcut:

$HOME/.dotfiles/local/scripts/outputDVI0-1.sh

See the next answer to understand why:

Difference between $HOME and '~' (tilde)?


After installing a lens you must log out and back in before it works.


Execute "complex" command in .desktop file (Unity Quicklist)

I would use

Exec=sh -c "xdg-open 'https://twitter.com/#!/' && sleep 3 && xdotool key n"


Installing GRUB on an USB stick: Keep having this "cannot find EFI directory" error

I can't provide a complete answer to your question because some aspects of GRUB configuration and installation are beyond my skill level and because of some ambiguity about what you want to do (as specified by sudodus in his comment to your question). That said, I can make several observations and suggestions that may be helpful:

When you install GRUB to a normal running EFI system from Ubuntu, GRUB will become EFI/ubuntu/grubx64.efi on the EFI System Partition (ESP), with an NVRAM entry pointing to that location.
EFI-bootable USB drives, by contrast, typically boot from a boot loader called EFI/BOOT/bootx64.efi on the USB drive's ESP. This filename is typically called the fallback filename, and EFIs are supposed to look for that filename as a last resort if no NVRAM entry points to a valid boot loader, or if the user selects the boot medium from a built-in boot manager menu. Thus, to install to this location you must either adjust the grub-install command (and I'm not even 100% positive that it supports this) or copy the files manually.
Complicating the preceding, if the computer uses Secure Boot, Ubuntu installs a program called Shim (shimx64.efi), and creates an NVRAM entry pointing to it, rather than to grubx64.efi. Likewise, to boot an external medium, the original shimx64.efi must be named EFI/BOOT/bootx64.efi. In either case, Shim then launches grubx64.efi in the same directory as Shim.
When not using Secure Boot, Ubuntu's GRUB looks for a grub.cfg file in the /boot/grub directory, which is not likely to be the ESP. When booting with Secure Boot active, though, grubx64.efi looks for grub.cfg in the same directory as grubx64.efi. That grub.cfg, though, looks for and loads /boot/grub/grub.cfg, so the effect is the same, but the path is more complex. In either case, there's a dependence on both the ESP and whatever partition holds /boot/grub. Some distributions set things up differently; Fedora, for instance puts the final grub.cfg and all related files on the ESP.
The /boot/grub/grub.cfg file is built (or re-built) by configuration scripts that run whenever you install a new kernel or GRUB binary. This works fine for a single-boot system, but if you're multi-booting with another Linux distribution, things get messy fast. In particular, if Distribution A's GRUB controls the boot process and you update the kernel for Distribution B, GRUB won't show the new Distribution B kernel until you run update-grub (or something similar) in Distribution A.

Between these factors, to do what you want with GRUB, chances are you must install to the fallback filename rather than to the standard filename; you might or might not need to squeeze Shim into the picture; and you may need to tweak your grub.cfg for your two-distribution setup. That's a lot to do. If I needed to do all this with GRUB, my approach would be to install both distributions to the USB drive as if it were an internal hard disk and then move/rename GRUB (or Shim) to the fallback filename. This will have the advantage that you shouldn't need to monkey with the grub.cfg file. One big caveat is that if you wanted to use something that installs in an unusual way (like via UNetbootin or Rufus rather than Ubuntu's Ubiquity installer), that might change the equation in a way that will require some completely different approach. It looks like you're trying to use Ubuntu on your hard disk to install GRUB to the USB drive to be used in booting from the USB drive. This approach might work if you're far more of a GRUB expert than I am, but there are enough obscure variables at play that your approach is likely to be a mine field of complications.

Another method is to use my rEFInd boot manager. You'd need to install it to the fallback filename, but rEFInd scans for kernels at boot time, so it's less likely to be disrupted by installing a new kernel in one distribution when you used the other distribution to install GRUB or rEFInd. OTOH, if you want to use Secure Boot, you'll need to jump through extra hoops (documented on rEFInd's Secure Boot page) to get it working, likely on every computer that you use to boot the USB drive. You might also need to create /boot/refind_linux.conf files for both your distributions to handle distribution-specific kernel options. (See the rEFInd Linux documentation, and especially the bottom half or so of that page, for information on this.)


Update PHP 7.2.19 to 7.2.24 on Ubuntu 18.04.2 server

I think that fix for CVE-ID: 2019-11043 which is on the mainstream PHP 7.2.24 has not made it yet to the php7.2 7.2.19-0ubuntu0.18.04.2 version that is maintained by the Ubuntu team:

https://launchpad.net/ubuntu/+source/php7.2/7.2.19-0ubuntu0.18.04.2

https://people.canonical.com/~ubuntu-security/cve/2019/CVE-2019-11043.html

So I guess we need to wait a little more for it.


The rendering is not broken at all. What you see is the HTML code showing up in a different, monospace font compared to e.g. tab titles.

If it really is an issue, you can try a different devtools UI theme as described here: https://stackoverflow.com/questions/25473766/changing-developer-tools-font-face-family

In short, the steps are:

Enable devtools experiments at chrome://flags/#enable-devtools-experiments, restart Chrome
Allow custom UI themes in devtools settings
Browse devtools themes and pick one


Seems to be a reported bug (#1554803)

It can be solved installing apparmor-easyprof-ubuntu or creating the folders by hand.

sudo apt-get install apparmor-easyprof-ubuntu


This issue is present in 375 and 378 drivers...

Given that simply killing compiz process fixes the bad border problem, I have tested a solution that works on my Ubuntu 16.04 system every time after the system wakes.

Step 1:

I created a script called fixbadborders in the directory /lib/systemd/system-sleep.
It contained the following:

#!/bin/sh
## This file (or a link to it) must be in the folder /lib/systemd/system-sleep/
## Purpose: Kill compiz after system wakes up from sleep.
## This will fix bad window borders caused by Nvidia driver 375.39.
kill $(ps -C compiz -o pid=)

Step 2:

Allowed the script to have execute permission with:

sudo chmod +x fixbadborders

To remove this script:

sudo rm /lib/systemd/system-sleep/fixbadborders

All credits go to Sun Bear who created this script comment 13


how do I find openjdk-11 that I just installed?

Since you have previously checked with whereis whether your binary is installed,
now you can check if it can be executed properly :

does its location belong to your PATH variable ? try the command which java and it should return something like /usr/bin/java

is it a valid binary then ? try to display its version using the command java -version and it should display something like

openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.04)
OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)

also keep in mind that some java applications may need to set the JAVA_HOME environment variable. Then you can set it to the home dir of your java install, for example JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64

To help you to retrieve the java home path you can use which java  | xargs realpath which provides a path like /usr/lib/jvm/java-11-openjdk-amd64/bin/java (or you can use ls -l several times on the path provided by which) from which you need to remove the latest part /bin/java.
PS :
be careful with the fact that if you need several java runtimes on your system, then the PATH resolution and the JAVA_HOME must match to the same version.
At your  convenience, you can unzip any specific version in any folder like /my/custom/install/jdk15/
and override the system paths :
  export JAVA_HOME=/my/custom/install/jdk15
  export PATH=$JAVA_HOME/bin:$PATH


So which directories are save to put on the SSD?

Any directory you want on it. I would advice the whole system and store your private data on a partition on the HDD.

  Can I move /home to SSD?

Yes. I myself only put the directories in /home/$USER/ onto a partition. Since those directories are maintained from a config file (~/.config/user-dirs.dirs) I keep a copy of that on the partition and on re-install copy it over the new one.

  Which steps should I take to optimize for performance and longevity?

All I would worry about is "tmpfs". I'd move those into RAM. And make sure "trim" is enabled/working.

  And are there any things I should be super cautious about?

I am prepared for the SSD to fail. And that preparation is: have an SSD in the cupboard still in its packaging, install the disk. Install Ubuntu on disk. Mount partitions. Copy /discword/user-dirs.dirs to ~/.config/user-dirs.dirs. Install some extra software.

Takes about 30 minutes in total.


Can I remap the Caps Lock key to play audio?

evtest and dbus

Here is a version involving a small script running in the background. A few easy steps need to be taken:

Install the evtest program: sudo apt install evtest. This program is able to decode and print raw events from the /dev/input/ hierarchy of devices.
Add your user account to the group input. Logout and login again. (This is needed because we are going to read from some device under /dev/input/, which normally can only be done by root or users in group input. We could run the script as root, but then we would have to find a way to tell it which user dbus instance it needs to talk to.)
Disable the capslock key like you did or use the corresponding Mate preference. It would also work if you map the capslock key to ctrl, like many people do.
Store the following script somewhere, e. g. $HOME/bin/capshack and make it executable:

#!/bin/bash

KEYBOARD=/dev/input/by-path/platform-i8042-serio-0-event-kbd
EVENT="type 1 (EV_KEY), code 58 (KEY_CAPSLOCK), value 1"

toggleVLC () {
        dbus-send \
            --type=method_call \
            --dest=org.mpris.MediaPlayer2.vlc \
            /org/mpris/MediaPlayer2 \
            org.mpris.MediaPlayer2.Player.PlayPause
}

evtest "$KEYBOARD" | \
while read line
do
    if [[ "$line" == *"$EVENT" ]]
    then
        toggleVLC
    fi
done

The above script will listen to your keyboard events and execute a command when the capslock key is pressed. The command that is run is using dbus to send a play/pause event to a running VLC instance. You might have to tweak the KEYBOARD variable to point to your actual keyboard, but it is likely the above value will work.

If you prefer the toggleVLC() function to be called when you release the capslock key, you can change the EVENT variable in the script such that it ends with value 0 instead of value 1.

Also, it is possible that for you the keycode of the capslock key is different from 58. You can check this by running evtest, look at the output when you press capslock, and adjust the EVENT variable accordingly. You do not even have to match by the keycode and set EVENT simply to (KEY_CAPSLOCK), value 1.

Instead of using evtest and above script you could use thd from the triggerhappy package (something like thd --dump /dev/input/* would give similar output) but I found that a little bit less educational.

Now we create a user systemd unit to start the script automatically in the background:

Create the user systemd hierarchy: mkdir -p $HOME/.config/systemd/user
Add the following text to the file $HOME/.config/systemd/user/capshack.service

[Unit]
Description=Abuse capslock key

[Service]
ExecStart=%h/bin/capshack

[Install]
WantedBy=default.target

Enable the service unit you just made: systemctl --user enable capshack
Start the service: systemctl --user start capshack

From now on you should be able to toggle play/pause in VLC using the capslock key. The background script should be automatically started when you log in.

triggerhappy

As mentioned already you could also use the triggerhappy package to do this. This is the preferred method for people who want to fiddle less with the system and rather like a more solid solution.

Add user to the input group like above
Install the package: sudo apt install triggerhappy
Add a configuration for triggerhappy to ~/.config/thd/capslock.conf:

KEY_CAPSLOCK    1   dbus-send --type=method_call --dest=org.mpris.MediaPlayer2.vlc /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause

Run thd like this: thd --triggers ~/.config/thd/capslock.conf /dev/input/event*
Make thd run for your user in a similar way like described for capshack already.
Make sure you have only one of the mentioned methods (capshack or thd) running, to not double toggle which each key press.

I tested all this on 18.04 under the standard session and 16.04 mate. But it should theoretically also work under wayland or with other desktop environments.


How to completely remove Phoronix Test Suite?

The installation script installs the same as the deb package. Therefore install and remove the deb package.

Download the deb package

cd
wget http://phoronix-test-suite.com/releases/repo/pts.debian/files/phoronix-test-suite_5.8.0_all.deb

Install the test suite

sudo dpkg -i phoronix-test-suite_5.8.0_all.deb

Remove the test suite

sudo apt-get purge phoronix-test-suite


Why Oracle discontinued Oracle Java (JDK) Installer PPA?

Oracle is no longer maintaining OpenJDK 8 and OpenJDK 11. Red Hat is providing bug fixes and security patches for OpenJDK 8 and OpenJDK 11, taking over from Oracle. If you are using OpenJDK from the default Ubuntu repositories, Oracle's license cancellation doesn't matter at all because Ubuntu will continue to support their Java packages the same way they support every other package in their repositories.

Although the Oracle Java packages have been discontinued, Java packages maintained by Ubuntu Developers can be installed from the default Ubuntu repositories instead. Run this command to list the available Java packages in the default Ubuntu repositories:

apt search openjdk-*

A JDK package from the default Ubuntu repositories has a package name that has the following form openjdk-X-jdk where X is replaced by the Java version number.


I found this question searching the same.
I fixed it copying my node installation in the path that code-server search node.
I have code-server in /usr/lib/code-server/bin/code-server (because I used the installation script), if I search my node installation with whereis node, reports node: /usr/bin/node.
Such my error was /usr/lib/code-server/bin/code-server: 36: exec: /usr/lib/code-server/lib/node: not found, I copied /usr/bin/node in /usr/lib/code-server/lib/node and it works now.
Maybe for you works sudo cp /usr/bin/nodejs /usr/lib/node


Well, to my experience, (I’ve destroyed my Unity twice ever!) there’s an inappropriate graphical update. Do you add any PPA for Unity which may contain an update for nux, for example? Anyway, all you need is (1) detect what causes the problem, and (2) remove the experimental/unsupported packages and/or add the default ones.

So, for now, open a Terminal using Ctrl+Alt+T, and type software-center to open Ubuntu Software Center. Then go to History and see what packages are upgraded or removed. Edit your question and write them down or make a screenshot if possible.

If you added a PPA, purging the PPA would be the simplest way possible through ppa-purge. You need to install it first: sudo apt-get install ppa-purge


Mobile broadband with Telecom E3531 T‑Stick

This usually doesn't work with wine. But often times surf sticks just work under linux without the need to install anything.

This website claims that it works with linux. In such cases you just have to search the web to find someone who already tested it under linux.

Installing windows drivers with wine is most likely not going to work and will definetly give you a hard time.


Troubleshoot keyboard shortcut: "View split on right"

I troubleshot this by checking all keybindings in gsettings and grepping the output for the binding that I sought ('<Super>Right'):
gsettings list-schemas | grep keybinding | while read SCHEMA; do
  gsettings list-keys $SCHEMA | while read KEY; do
    echo -ne "$KEY\t$SCHEMA\t"
    gsettings get $SCHEMA $KEY
  done
done | grep '<Super>Right'

...for me, this resulted in 4 different entries for the '<Super>Right' binding. Then I set them all to ['disabled']:
gsettings set org.gnome.desktop.wm.keybindings move-to-side-e "['disabled']"
gsettings set org.cinnamon.desktop.keybindings.wm push-tile-right "['disabled']"
gsettings set org.gnome.metacity.keybindings toggle-tiled-right "['disabled']"
gsettings set org.gnome.mutter.keybindings toggle-tiled-right "['disabled']"

...Then I used Settings > Keyboard Shortcuts to re-enable the one labelled View split on right.


It really seems to be a problem with an umlaut (a mark in German). It appeared only when I tried to login via firefox.

It appears that it is more a problem with firefox than with owncloud. I had a similar problem with the CUPS webinterface. Also solved by a new password without umlauts.


Clean install from Ubuntu 10.04 to LUbuntu 10.10 without losing data?

It's entirely possible to do just that. Simply run the installer, and when you get to the partitioning options, go for manual partitioning, and mark your single partition as root (/) BUT DO NOT FORMAT IT.

Proceed from here as normal and the installer will simply overwrite the existing system files, and anything else that isn't a system file (such as the contents of your home directory) will be ignored. I've done it myself, though I was reinstalling my Ubuntu 10.04 installation, rather than moving to a separate distro, but I can't see there being any problem with that.

Good luck.


If you're referring to display drivers that come with xorg, for example

xserver-xorg-video-apm
xserver-xorg-video-ark
xserver-xorg-video-ati
xserver-xorg-video-ati-dbg
xserver-xorg-video-chips
xserver-xorg-video-cirrus
xserver-xorg-video-displaylink
xserver-xorg-video-dummy
xserver-xorg-video-fbdev
...

You can remove some of them with apt-get remove <driver_name> if you want to but I'd advise against it. They are there in case you happen to change your display adapter and they don't take up very much space.

Removing one of them also removes xserver-xorg-video-all which is the metapackage containing all the display drivers that come with xorg. This shouldn't cause any problems, but I'd still play it safe and leave it alone.


WiFi icon missing, unable to connect to the internet, sudo not recognised, repeatedly have to fsck to boot

Based on the way you've been working around this issue in the past, I would bet money on a failing hard drive being the culprit. At this point the damage may be too severe for a simple fsck to resolve. You might get some indication by checking SMART status of the drive in question. Passing a SMART test doesn't guarantee that a drive isn't failing but failing one is pretty definitive.


It looks to me that the windows update has overwritten your grub.
Try this: How do I run update-grub from a LiveCD?
If it doesn't work, installing Ubuntu again is often the fastest solution, unless you want to learn how to fix this problems properly...


Dual monitors (60 hz and 144 hz) games can only run in 144 hz if I unplug the 60hz monitor

This has nothing to do with Ubuntu but with the hardware itself. I could infer that you're running on non-identical output ports (1 HDMI and 1 DP or 1 VGA and 1 HDMI...) on one graphics adapter (Before the comment and subsequent edit).

If you want true independent refresh rates, you will need either one the following:

An additional graphics card to run the existing monitor
A replacement monitor that runs at 140 Hz on the existing graphics card.


I met the same issue, and my problem is that I haven't install Gtk in ubuntu, you can try this:
sudo apt-get install libgtk-3-dev


Python problem during Bibus installation

See: https://bugs.launchpad.net/ubuntu/+source/bibus/+bug/849174

Looks like a workaround is to download from upstream.

http://packages.debian.org/sid/bibus


It adds the path to the mesa libraries to the library path. The library path contains all locations on the file systems where applications have too look for shared libraries.

The first command adds the location to the library path, the second command refreshes the cache and activates the new location.


Looks like you have a dual boot system and I'm assuming you have Ubuntu installed from a CD. I also suspect that you're wireless card was not detected, hence it is unable to download updates etc.

I've been in this situation a couple of times and the best thing to do is to find a way to connect your machine to the internet through a LAN cable. This will allow Ubuntu to connect and update to latest drivers. Hopefully it will ask you if you want to enable proprietary drivers. Select YES.

Once thats done, you can go back to using your wireless network.


Will downloading Ubuntu remove my current OS

Downloading will not. During installation be sure to understand what you are doing and read the installation guide.

Although rare, installing an OS is major surgery on your boxen.

If you value your data you have always have backup up, period.


How to workaround gettext dependency problem when installing wine?

This is a known dependency problem.

Issue the following command to install wine:

sudo aptitude install wine1.5-amd64 gettext:i386-

The "-" after gettext:i386 tells aptitude to remove (not install) that conflicting package.


Install ubuntu for example from USB key, (Unetbootin) and during instalation process choose your SD card as a destination for your system.


I need someone to talk me through how to "hdiutil convert" (ubuntu-12.10-desktop-i386.iso) to an .img file

Generally, your home user account (where you keep your data) is on the same drive as your boot drive, though it is possible to separate them. Also, be aware that if you create an Ubuntu Live CD/USB, nothing you do while logged into that drive will be saved. You have to perform a full install.

As for doing that and making the Live boot drive in the first place, I asked the same question last night and have spent much of the time in between hunting down the answer.

I've written up the answer here and hope it helps:

can't make bootable usb on mac


"Unable to locate package" when I try to install squirrelmail on Ubuntu 18.04

Note: Installing squirrelmail is not recommended since it is no longer being patched for vulnerabilities and hence would be security risk on an internet facing server, with critical exploits that have still not been patched. A better, more recent replacement that works identically with no problems is roundcube which is also found in the repositories for easy setup

However, you if for some reason you still do want to install it, you must do it from source as follows. Open up a Terminal ( Ctrl+Alt+T) and follow along

Install a a webserver as well as PHP (sudo apt-get install apache2 php libapache2-mod-php php-mcrypt php-mysql)
Install an IMAP server
Make a directory on the webserver root by using mkdir /var/www/html/sqmail
Download and extract sqmail by using

wget -qO- https://netix.dl.sourceforge.net/project/squirrelmail/stable/1.4.22/squirrelmail-webmail-1.4.22.tar.gz | tar xz -C /var/www/html/sqmail --strip-components 1 && chown -r www-data /var/www/html/sqmail
Select a data-dir and attachment dir, outside the webtree (e.g. in /var).
The data-dir (for user prefs) should be owned by the user the webserver
runs as (e.g. www-data). The attachment dir (for uploading files as
attachments) should be file mode 0730 and in the same group as the
webserver.
Configure sqmail by running /var/www/html/sqmail/configure

Now visit http://localhost/sqmail to use it


how to solve "/lib/modules/3.5.0-17-generic/build: no such file or directory" error

if the Internet is working fine using a LiveCD, first boot through the LiveCD. Then, mount your Ubuntu installed driver in any directory.

steps : 1) go to ubuntu.com 2) download any ubuntu (32bit is preferable ) 3) then copy it to any cd or dvd and copy to the usb stick using a unet boot tool 4)and then boot your system with live OS

so as you have mentioned in your question in live os network will work and once you have boot to live os check weather you are connected to internet

NEXT STEP :

sudo cat /proc/partions

This command will tell you all the partions which you have Now you need to find in which partion you have installed ubuntu

say for eg : the output of cat /proc/partions is this:

8 0 78150744 sda 8 1 3998720 sda1 8 2 1 sda2 8 5 37174378 sda5 8 6 36964352 sda6 8 16 31696896 sdb 8 17 31695872 sdb1

here sda is my hdd and sdb is my pendrive attached

now use "mount /dev/sda1 /mnt "

now move into the partion mounted using command "cd /mnt " and now do " ls " and this ls will list all your files and you can know weather you have linux installed or not using some file structure . eg when i do ls i get like this :

bin patches {bin,sbin,conf,samples} proc boot root cdrom run config sbin data selinux debug setup dev share doc src etc srv home sys initrd.img tmp lib usr

so if you have similar file structuer then this is your partion where you have linux installed in hdd

if not then do "sudo umount /dev/sda1" and then do "sudo mount /dev/sda2" etc like this try all your partions untill you see your files

so now you got to know your partion where the ubuntu is already install in you haddisk , say ex the hard disk is sda2

now do there comands to mount the proc and sys dirs,

sudo mount --bind /dev/ /mnt/dev sudo chroot /mnt "{you have gone into chroot env now you have to mount proc and sys"}

mount -t proc none /proc mount -t sysfs none /sys mount -t devpts none /dev/pts

Now, you will get command-like access to the installed Ubuntu's shell There you can try sudo apt-get install "linux kernel headers pkg name" sudo apt-get install build-essentials

once you have install exit chroot

by just typing exit

then reboot the machine and remove the live os to boot into your OS


Dell Laptop won't  shutdown / restart by itself

Try this in a terminal:

sudo gedit /etc/default/grub

Change the line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

with:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash noapic"

save the file and finally again in the terminal:

sudo update-grub

Restart your laptop and after the next boot check if your laptop is power down by itself.


How to add applications and GUI to the minimal Ubuntu?

A minimal installation is (or starts out as) a command-line only system, but it does include networking and apt-get. You can use apt-get to install whatever else you need (or if you prefer aptitude, use apt-get to install aptitude and then use aptitude to install whatever else you want).

Since a minimal Ubuntu installation is command-line only, you cannot use the graphical help viewer from the console to get help. But you can access manual pages with the man command. To get help on the man command, run man man. (Scroll per line with Up and Down, or per page with the PgUp and PgDn or b and Spacebar keys; search by pressing / and quit by pressing q.)

A minimal Ubuntu system will automatically access the Internet if you plug it into a wired Ethernet network providing an Internet connection. If you use wireless, you'll probably have to configure that manually. (If you're able to use a wired connection until you have your GUI installed, that might save you some hassle.) This question might help with that. Or if you're using Ubuntu 11.04, you can easily install and use cnetworkmanager (a command-line frontend for configuring Network Manager). If you need to install a package to get networking working, you can manually retrieve the .deb file from the CD or from https://launchpad.net/ubuntu, then install it with sudo dpkg -i ... (replacing ... with the name of the .deb file you want to install).

With networking working (which might be the case out of the box), you should first update all the packages on your command-line system:

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

Then you can install a GUI. If you want a fully-featured GUI as though you'd installed regular Ubuntu, Xubuntu, Kubuntu, or Lubuntu, but without the applications that come with them, then you can install one of these packages with the --no-install-recommends flag:

sudo apt-get --no-install-recommends install ubuntu-desktop

sudo apt-get --no-install-recommends install xubuntu-desktop

sudo apt-get --no-install-recommends install kubuntu-desktop

sudo apt-get --no-install-recommends install lubuntu-desktop

If you want something more minimal, you can install the X server xorg (which must be present for any GUI on Ubuntu):

sudo apt-get install xorg

Then install a window manager That must be present for any GUI on Ubuntu to be useful, since otherwise application windows pop up and cannot be moved, hidden, reshown, switched between, resized, and so forth. An exception are "kiosk" systems running only one application fullscreen all the time. Lightweight options for a window manager include twm, fluxbox, and openbox, which you'd install with (one of) these commands:

sudo apt-get install twm

sudo apt-get install fluxbox

sudo apt-get install openbox

To start your GUI, run startx. Note that it may require substantial manual configuration, for it to be to your liking, depending on your needs.

If you want something more sophisticated than X11 and a simple window manager, but less sophisticated than the whole interface provided by a -desktop package, then you can try installing desktop environment packages themselves (like xfce4 for Xfce, the GUI provided in Xubuntu)...but your mileage may vary, as these packages do not always include all the necessary components to make your interface reasonably powerful and useful in Ubuntu.

Since Ubuntu Server systems, like minimal installations of Ubuntu, are GUIless, the information on the ServerGUI documentation page is partially relevant (though not completely--for example, the arguments against having a GUI probably do not apply to your situation).

By the way, links to manual pages in this answer are to the 12.04 LTS version, for maximal usefulness to others...but you can click the 11.10 link at the top of the page to bring up to 11.10 version.


For all supported versions of Ubuntu
You can install TLP, a power management tool, to improve the battery life and reduce overheating.

TLP brings you the benefits of advanced power management for Linux
without the need to understand every technical detail. TLP comes with
a default configuration already optimized for battery life, so you may
just install and forget it. Nevertheless TLP is highly customizable to
fulfil your specific requirements.
You can obtain TLP in one of 2 ways.

Since Wily, TLP is available by enabling the Universe Repository and issuing the commands sudo apt-get update to update the package list
And to install tlp and it's recommended packages
sudo apt install tlp tp-smapi-dkms acpi-call-dkms

If you wish to install from the PPA.
Open a terminal an enter the following commands:
sudo add-apt-repository ppa:linrunner/tlp
sudo apt update
sudo apt install tlp


How can I download an HTML webpage including JavaScript-generated content from the terminal?

Since you have Google Chrome installed, you can get the web-page's inner HTML structure by running in the terminal:
google-chrome --headless --dump-dom 'URL' > ~/file.html

Replace URL with the URL of the web page you want. The HTML DOM of the page will be saved to a file named file.html in your home directory.