Overriding Samba calls to unlink and unlinkat

(I know this is 2 years later. It might still be useful to somebody else.)

LD_PRELOAD is an environment variable, which needs to be set in smbd's environment.

Since the service is not called from the shell, you have to work with your distribution's startup/service system.

Quick web search tells me Ubuntu 14.04 is using upstart, so you'll probably need to put something like:

env LD_PRELOAD=<my shared library>
export LD_PRELOAD

into /etc/init/smbd.conf.

Note that this is an educated guess, so you might need to change a thing or two.


There is no menu button anymore in 12.04, just the Unity launcher.

To access settings you would press the Meta key(Windows key) and start to type "system" and you should see the "System Settings" shortcut appear.


unable to enable sierra modem due to policykit

Uninstalled policykit and re-installed with
sudo apt-get install policykit-1

and the command then worked.


Computer fails to wake up after hibernate

I had the same problem. I think i found the resolution, installing Ubuntu on machines with Nvidia driver screws up the display. By default Ubuntu uses its own video drivers, thats why im having issues with hibernation.

I fixed it by  going to Software & Updates > Additional Drivers > change driver to NVIDIA binary Xorg driver, im using Nvidia Xorg driver VDPAU library nvidia-319, and now it hibernates and wakes up correctly. If you have other video drivers change it to whatever you have.


How to configure a LAN connection between two Ubuntu machines?

If both are directly connected to the router and can access internet, then they already are in LAN. Maybe you want to share files and folders, right?

If so, its easy: right-click any folder you want to share, go to "Sharing Options", check the "Share this folder" box, choose a share name, and youre basically done.

If Samba support is not already installed by default, Ubuntu will offer you to install it on-the-fly. Just accept it. Oh, by the way: "Samba" is what enables Ubuntu (and other Linux distros) to share folders and files in a LAN, using the same protocol used by Windows. Meaning any folders you share will also be accessible by Windows machines in your LAN (if there is any)


Make an install CD for 10.04. Backup your data. Install 10.04 -- the installer will prompt you for how you want the hard drive to be partitioned, choose to use all the space, deleting the previous OS.


Package 'libmyodbc' has no installation candidate

Thanks for advice. I found a solution on:

https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-2017

sudo su
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -

#Download appropriate package for the OS version
#Choose only ONE of the following, corresponding to your OS version

#Ubuntu 14.04
curl https://packages.microsoft.com/config/ubuntu/14.04/prod.list > /etc/apt/sources.list.d/mssql-release.list

#Ubuntu 16.04
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list

#Ubuntu 18.04
curl https://packages.microsoft.com/config/ubuntu/18.04/prod.list > /etc/apt/sources.list.d/mssql-release.list

#Ubuntu 18.10
curl https://packages.microsoft.com/config/ubuntu/18.10/prod.list > /etc/apt/sources.list.d/mssql-release.list

exit
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get install msodbcsql17
# optional: for bcp and sqlcmd
sudo ACCEPT_EULA=Y apt-get install mssql-tools
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
source ~/.bashrc
# optional: for unixODBC development headers
sudo apt-get install unixodbc-dev


Installing Java Automatically (With Silent Option)

If OpenJDK/OpenJRE works fine for you, I recommend using that package instead as suggested by @SAM. However, some software really requires Oracle's JDK/JRE. This answer is how to silence the license question with the Oracle package from the PPA.

First, let's recognize the question asked is a feature of the package, created by the developer.

oracle-java7-installer (7u7-0~webupd8~4) maverick; urgency=medium

  * removed cookie file use or else the PPA stays disabled
  * request the user to accept the Oracle license before installation
 -- Alin Andrei <webupd8@gmail.com>   Tue, 04 Sep 2012 14:18:29 +0200

As @Nate indicated in his answer, there should be a silent option. And there is. Do this before installing it:

$ echo debconf shared/accepted-oracle-license-v1-1 select true | \
  sudo debconf-set-selections
$ echo debconf shared/accepted-oracle-license-v1-1 seen true | \
  sudo debconf-set-selections

This sets the value of the debconf key to true, but also marks it as seen by the user. Now this question should not appear!

How did I find this?

In the source of the package, I tracked this down in the oracle-java7-installer.preinst file:

license=oracle-license-v1-1

# snip

db_get shared/accepted-$license
if [ "$RET" = "true" ]; then
    echo "$license license has already been accepted" >&2
    exit 0
fi

Apparantly, it uses debconf's value for the key shared/accepted-oracle-license-v1-1 to check whether the user has already accepted the license. If it is, the script will exit gracefully and allow the installation to continue without asking you the question. We should now just tell debconf you already accept the Oracle Licence 1.1.

Please refer to the manpage of debconf-set-selections on more details, but this is the example for your issue and works similar for other packages. What other keys do you have on your system in debconf's database? Install debconf-utils and do

$ sudo debconf-get-selections

Then grep for more keys you need to set in your automated installation. This is way more flexible than using -y with apt-get as it gives you the opportunity to set other than default settings on installation times.


Copy lines in a file and paste it into a new file

Try this:

cat 1.txt > new.txt
for f in 2.txt 3.txt 4.txt 5.txt 6.txt 7.txt 8.txt 9.txt 10.txt 11.txt 12.txt; do tail -5 $f >> new.txt; done

This copies the contents of the first file to new.txt.
Then the for extracts the last 5 lines (6 to 10) of your files (excluding the first file) and appends to new.txt
If the file names following a certain pattern, you don't need to list all of them by name in the for, but use e.g. *.txt. But the pattern would also need to exclude the first file and new.txt.


-s is not a command by itself, but an option for the test command, which can also be written as [ condition ]. Maybe you thought the brackets to be unnecessary, but they are not. The return value of test depends on the condition inside being true or false.

From the manpage test(1):

  -s FILE
         FILE exists and has a size greater than zero

So you can use e.g. the following:

if [ -s "$file" ]; then
    echo "$file is not empty."
elif [ -e $file ]; do
    echo "$file is empty."
else
    echo "$file does not exist."
fi

Or something like this:

[ -s "$file" ] && echo "$file is not empty." || echo "$file is empty."


No connection between Ubuntu 18.04 and Arduino

Your user currently doesn't have permissions to access the device. To gain those permissions, simply add your user to the dialout group (replace userName with your user name):

sudo usermod -a -G dialout userName

You need to log out and back in for the changes to take effect.


How to disable 3 finger drag on macbook air trackpad. I'm a novice with command line

In the post you're quoting, the right way of doing things is to use synclient.

The command line posted in How can I disable the multitouch gestures in Ubuntu? should do the trick. If you want to test it, just execute this line in a terminal :

synclient ClickFinger3=2 && synclient TapButton3=2

If the behaviour is OK with these parameters, you have to execute this piece of code at each system startup. This is done easily. First, create a text file that you can name touchpad.sh for instance. Inside, you put this code :

 #!/bin/sh
 sleep 10;
 synclient ClickFinger3=2;
 synclient TapButton3=2;

The sleep command is to delay the call of synclient. If it's called too early in the startup process it will have no effect. Try larger numbers than 10 if this doesn't work.

Then, you must grant execution rights to this script and execute it at each boot. See this page for information on how to do this : how can i write a shell script that will run at startup and introduce a delay in the start of an application

Ben


Ubuntu installation on external hard disk drive

Move the external drive to the top in the boot order. Here's a guide for modifying the boot order and applying it.


Installing mysql causes Error 2002 error

You've corrupted your packages I see. You said you cancelled the installation of MySQL server, which is the package mysql-server-5.1.

Try clearing your MySQL configuration and reinstalling it:

sudo rm -rf /etc/mysql /var/lib/mysql
sudo apt-get install mysql-server-5.1

Note that the first command clears previous settings and passwords of the MySQL database including the MySQL database itself. If you've just installed the server (as I can make up from your question), this is not an issue.

As SpamapS noticed, you can use apt's purge feature to get rid of the MySQL server and its settings. The commands for purging and installing follows:

sudo apt-get --purge remove mysql-server-5.1
sudo apt-get install mysql-server-5.1


What is saved when you upgrade and should you upgrade or wipe clean the disk?

All your data, settings and all applications still present in the 11.04 repository (so probably all of them, seeing as you started out with 10.10) will carry over with an upgrade.

Answers to the question of upgrading or installing from scratch: Is it better to upgrade through the Update Manager or re-install from scratch?


Run a command with the argument from the last command

For example, if you run this command:

mkdir long_path_here/new_dir

most likely you'd want to go in the recently created directory. You can do this using next "shortcuts":

cd Esc. - type cd and after press Esc followed by . (not in the same time). If the previous command has no arguments, you will get the previous command itself.
cd !* - in this case you will get all arguments from the previuos command.  If the previous command has no arguments, you will get nothing.
cd Alt+. - type cd and after press Alt and . (in the same time). In fact, using this way and continuing to  press . (without to release Alt), you will get the last argument for every command from history. If a command has no arguments, you will get the command itself.

In general: <command> Esc. or <command> !* or <command> Alt+..


Run this command in the terminal-

  sudo dpkg-reconfigure lightdm

You will get the following screen:

then enter on OK and you will get a screen similar to this with listings as KDM and LIGHTDM

scroll down the navigation to lightdm and press enter.

you will get the ubuntu login screen back.


How can I start a Qt GUI application on boot without a display connected?

I don't think you can run Qt without X, so you need to run X. It won't start by default if a monitor is not detected.

I found this Ubuntu Forums thread (link to exact answer) that might help you get over the problem of not being able to connect a monitor:

I am not that great with Ubuntu (been using it for past 2 years), so there might be other options to do the same.

  I was having the exact same problem - I want to run X on a machine that (for now) doesn't have a monitor attached.

  Using the intel driver, X was finding no monitors attached, and giving up:

(II) intel(0): Output VGA disconnected
(WW) intel(0): No outputs definitely connected, trying again...
(II) intel(0): Output VGA disconnected
(WW) intel(0): Unable to find initial modes
(EE) intel(0): No valid modes.
(II) UnloadModule: "intel"

  I stumbled across a solution pieced together from several different threads on these and other forums.

  First I needed to make a basic xorg.conf file, in which I specified the VESA driver rather than the intel one (see bottom of post for my xorg.conf)

  This led to me seeing a different error:

(EE) VESA: Kernel modesetting driver in use, refusing to load
(WW) Falling back to old probe method for vesa
(EE) No devices detected.

  I then had to add nomodeset to my GRUB boot options (used to be in /boot/grub/menu.lst but now in /etc/default/grub)

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"

  ...and run sudo update-grub.

  With some basic settings for the (non-existent) monitor, the result is that I get X running with no monitor plugged in, using the VESA driver, and with a decent resolution - which is fine for what I wanted it for.

  The xorg.conf file:

Section "Monitor"
  Identifier   "Monitor0"
  HorizSync    31-81
  VertRefresh  56-75
EndSection

Section "Device"
  Identifier  "Card0"
  Driver      "vesa"
EndSection

Section "Screen"
    Identifier "Screen0"
    Device     "Card0"
    Monitor    "Monitor0"
EndSection


How to permanently remove update for Gwibber Facebook plugin

Open the terminal (Ctrl+Alt+T) then type/paste

sudo apt-get remove gwibber-service-facebook

should do it.


12.04 freezing, no mouse control, and desktop freezes when laptop is on battery power

The bug is addressed here and is solved by updating the kernel to 3.3.6; the system seems stable, no freezes. Here is the link for the required kernel update.


Adaptador WiFi USB 300 Mbps with TP-LINK TL-WN822N not working properly

I get the same behaviour with a TL-WN821N. I notice it only happens when I use something that floods my net, like amule or an unthrottled scp. I'm on 12.04 but this would happen sometimes on Arch too (but more rarely - in fact, the unthrottled scp on Arch was almost guaranteed to freeze my wifi).

In this state, iwconfig hangs without any response.

I have to unplug and replug the usb wifi to have the net reattempt connection. Connection is usually established then within seconds.


error while loading shared libraries: libEGL.so.1: cannot open shared object file: No such file or directory when launching game

I managed to fix it myself. My friend told me to use aptitude to install the packages, so I ran sudo aptitude install libegl1:i386, then I used sudo aptitude install libc6-i386 libx11-6:i386 libegl1-mesa:i386 zlib1g:i386 libstdc++6:i386 libgl1-mesa-dri:i386 libasound2:i386 libpulse0:i386


It may be the case that this just takes a long time and isn't hung. I was having a similar problem, and finally after leaving it for a long time and I realized that it just is taking a really long time to finish and giving with no output. This gives the appearance of having hung because typically Linux and apt are both verbose and take roughly similar amounts of time to do things.

EDIT: upon further investigation, I believe that this is because apt autoremove is (unfortunately for us) smart enough to run update-grub each time it modifies a kernel, even if it is a redundant one. I realized this by running sudo update-grub manually afterwards, and sure enough, same huge waiting period.

For example, here is some output from my autoremove:

    Removing linux-image-extra-4.8.0-36-generic (4.8.0-36.36~16.04.1) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.8.0-36-generic /boot/vmlinuz-4.8.0-36-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.8.0-36-generic /boot/vmlinuz-4.8.0-36-generic
update-initramfs: Generating /boot/initrd.img-4.8.0-36-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.8.0-36-generic /boot/vmlinuz-4.8.0-36-generic
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.8.0-36-generic /boot/vmlinuz-4.8.0-36-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.8.0-36-generic /boot/vmlinuz-4.8.0-36-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.8.0-36-generic /boot/vmlinuz-4.8.0-36-generic
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.8.0-52-generic
Found initrd image: /boot/initrd.img-4.8.0-52-generic
Found linux image: /boot/vmlinuz-4.8.0-46-generic
Found initrd image: /boot/initrd.img-4.8.0-46-generic
Found linux image: /boot/vmlinuz-4.8.0-45-generic
Found initrd image: /boot/initrd.img-4.8.0-45-generic
Found linux image: /boot/vmlinuz-4.8.0-36-generic
Found initrd image: /boot/initrd.img-4.8.0-36-generic
Found linux image: /boot/vmlinuz-4.4.0-78-generic
Found initrd image: /boot/initrd.img-4.4.0-78-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin

done
Removing linux-image-4.8.0-36-generic (4.8.0-36.36~16.04.1) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.8.0-36-generic /boot/vmlinuz-4.8.0-36-generic
update-initramfs: Deleting /boot/initrd.img-4.8.0-36-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.8.0-36-generic /boot/vmlinuz-4.8.0-36-generic
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.8.0-52-generic
Found initrd image: /boot/initrd.img-4.8.0-52-generic
Found linux image: /boot/vmlinuz-4.8.0-46-generic
Found initrd image: /boot/initrd.img-4.8.0-46-generic
Found linux image: /boot/vmlinuz-4.8.0-45-generic
Found initrd image: /boot/initrd.img-4.8.0-45-generic
Found linux image: /boot/vmlinuz-4.4.0-78-generic
Found initrd image: /boot/initrd.img-4.4.0-78-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin

In my frustration I entered a few commands (not the right approach, but we have all been there...), just to see if things would respond. It did not. Going from the output "Found memtest86+ image: /boot/memtest86+.bin" to "done" took about 15 minutes. No idea why it takes this long, but patience may help you, it did me!


Ubuntu doesn't have a true secure boot option (it switches to insecure mode right away when secure boot is properly set up with it), but you can use the secure boot shim anyway if you need to turn on secure boot in BIOS/UEFI (like if you dual boot with an OS like Windows 10 that requires it).

Try this:

Switch back to legacy boot in the UEFI/BIOS menu.
Boot Ubuntu.
In a terminal, run:

sudo apt update; sudo apt install shim-signed

Switch back to secure boot in the UEFI/BIOS setup. You may need to pick a bootloader to use for the Ubuntu boot menu option. If so, it's EFI/ubuntu/shimx64.efi.
Attempt to boot Ubuntu.


How can I run an executable file named "c2p.i696"

If it an exe, and it is for your architecture (i686), a simple chmod +x [file] in terminal and then ./[file] will execute the file.


If you log in to ssh probably user root cant log (security reason), so , the procedure is log as other user and type "sudo su root".
Hope it helps.
sMl


Try reinstalling ubuntu desktop.

First, access tty command line by pressing on the login screen Alt+Ctrl+F1. And you'll need internet connection, which you can get in the login screen.

Reinstalling ubuntu desktop:

sudo apt-get install --reinstall ubuntu-desktop
sudo shutdown -r now

Last command reboots the system.

This might be a graphics driver issue as well, so if reinstalling ubuntu desktop didn't work, you could try moving onto graphics drivers. Of course it's much more lengthy process and a little more tricky. Do you know what's your graphics card ? If you dont you can find out using sudo lshw -C video | grep product.

I've found how-to thread on ubuntuforums about nvidia drivers: http://ubuntuforums.org/showthread.php?t=2081649
And for ati driver: How to install Radeon Open Source Driver?

Let me know if that helps


SDDM uses the system-wide keyboard layout on the login screen, but inherits the session keyboard layout on the unlock screen. This is a bad design that causes friction and failed login attempts, as you describe. This isn’t configurable in SDDM. You can try switching to something else, however. GDM, for example.


If you need a "quick fix" and you currently can not use screen. Have a look at tmux.

Not a great solution, but it might just help you for the moment.


How do I  prevent .xsession-errors from eating disk space?

I found an interim solution.

I put a small script in /etc/X11/Xsession.d called 91redirect-xsession-errors that does the job for now, but if you want to have your own custom symlink for .xession-errors it does not work for that (I tried and it did not output any data).

#!/bin/sh

# Redirect $HOME/.xsession-errors to /dev/null.
# BJEM 11 January 2012

XSESSION_ERRFILE=$HOME/.xsession-errors

# This does not seem to work for a regular file,
# i.e. if you want to symlink $HOME/.xsession-errors
# to another file.  I do not know why.
XSESSION_ERRFILE_FINAL=/dev/null

# Creates target file if it does not exist.
touch "$XSESSION_ERRFILE_FINAL"

# Link .xsession-errors file to the desired target
# no matter what.
ln -sf "$XSESSION_ERRFILE_FINAL" "$XSESSION_ERRFILE"

# Test case.
#gedit &

##### END OF FILE #####

It's a bit 'rough and ready' but it does the job for me.  Note that this is the only file that has been altered.


How to fix missing menus in non ubuntu maverick apps

This appears to be a wxWidgets bug and the affected apps are updating to work around the problem.

http://forum.filezilla-project.org/viewtopic.php?f=2&t=18444

If you've tried all the fixes mentioned in your question without a result, waiting for the latest version of these applications would seem to be your only option.

Sorry.


Probably the issue is that your grep returns multiple matches, and the unquoted $g inside [ ! -z $g ] is undergoing word splitting.

Ex. given

$ cat myfile
foo
bar
Foo
Bar

then

$ g=$(grep -ni foo myfile)
$ echo $g
1:foo 3:Foo

so

$ [ ! -z $g ]
bash: [: 1:foo: binary operator expected

The error message is because -z is a unary operator i.e. it expects a single argument; since you have given two arguments to [ ... ] it expects you to have used a binary operator (like -eq).

If you quote the variable expansion  i.e. "$g", all the matches returned by grep will be treated as a single argument, so the -z unary test will work:

$ [ ! -z "$g" ] && echo "non empty"
non empty

However you don't need any of this - instead, just check the exit status of grep itself:

$ if grep -qi foo myfile; then echo "foo is in myfile"; fi
foo is in myfile


When you booted the computer the Unity desktop environment did not load correctly, so the Launcher isn't working properly. To fix this problem restart Unity. Open the terminal and type:

setsid compiz --replace && setsid unity

I have seen this problem occur on an older version of Ubuntu. The problem disappeared by itself after doing a fresh install of Ubuntu 14.04. After installing Ubuntu 14.04, I sometimes got an error message after updating the kernel, without any other problem occurring. This problem also disappeared after my Nvidia graphics card driver was updated by the Software Updater.


How can I disable and enable SSL in Apache (without a command if possible)?

As far as I know there is currently no way to disable SSL without command. With command, simply launch your terminal and enter

sudo a2dismod ssl

and restart apache2

sudo service apache2 restart

To do the opposite, use this command

sudo a2enmod ssl

and also restart apache2


You can do it easily. Install wine and PlayOnLinux. Download the game, and use the Miscellaneous tab of playonlinux to run the exe.

The process could be as follows:

Install playonlinux:

sudo apt-get install playonlinux

If the program can't be found in your software sources, download from here: PlayOnLinux

Install wine:

sudo apt install wine
Download the game
On PlayOnLinux, go to Configure -> General tab
In the left side panel, click on New, to create a new virtual disk.
Select the new created disk, and go to the Miscellaneous tab.
Click on Run a .exe in this virtual drive, and select the diablo installer.
Follow the installation program, and install it normally.
Once finished, go to the General tab, and click on Make a new shortcut for this virtual drive. Follow the instructions and search for the diablo executable.
Finish and close the Configuration window.
The diablo shortcut should appear in the main screen of PlayOnLinux, select it and click on Run.


Installed windows 8 alongwith existing ubuntu 13.04 ubuntu grub not installing

Installing Grub manually is fairly simple, and once you get it, there shouldn't be anything keeping you from dual-booting successfully.

First, boot the computer up off of your standard Ubuntu installation disk. You should be using the same version (e.g. 13.04) and the same architechture (e.g. amd64, 64-Bit) as your currently installed Ubuntu. If you need to download an old version, you can do so at http://releases.ubuntu.com.

Once you've booted the disk up, press Ctrl+Alt+T to open a terminal window. In that, type in the following commands:

sudo mount -t ext4 /dev/sda1 /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo cp /etc/resolv.conf /mnt/etc/resolve.conf

Note that that last command may fail if you aren't connected to the network. It isn't strictly necessary, so if running it gives you an error, you can simply ignore it.

Also, you may need to replace /dev/sda1 with something else, depending on the hard disk partition you have Ubuntu installed on. You can get help with determining the exact line in This Question.

Once you've done all of that, we're ready to proceed. In the terminal, enter in this command:

sudo chroot /mnt

You'll see the prompt in the terminal change from ubuntu@ubuntu:~$ to something like root@ubuntu:~#. It may be different for your specific machine. This tells us we're ready to install grub. Run this command to do it:

grub-install --force /dev/sda

Once you're finished with this, reboot your computer. It should boot back up into Ubuntu.

Next we need to add an entry for Windows 8 into Grub, and remove any Windows 7 entries that are still there. To do this, open another terminal window, then enter this command:

sudo update-grub

This command will take a minute or two, then you're all set. If you reboot your computer, you should be prompted to boot either Ubuntu or Windows 8.


Can Ubuntu Server be run through Ubuntu Desktop

You can chroot into the server system, but getting it to work properly as a server this way would be complicated and unworthwhile.
Instead you should probably simply install the packages you need in the desktop system.
The only difference between Ubuntu Server and Ubuntu desktop is what packages are installed. An Ubuntu desktop system can be used as a server (and likewise, a GUI can be installed in Ubuntu Server).
For example, if you need the Apache web server, you can install the apache2 package.
For nginx (you tagged your question nginx but didn't mention it explicitly), you can choose between the following packages: nginx-full, nginx-light, and nginx-naxsi. Related packages you may want or not want (depending on your needs) are nginx-naxsi-ui and nginx-extras.
If your goal is to create a teaching/learning or development box:
You later mentioned:

This isn't for production, but due to my job, I will need to learn how
to setup/update/manage servers, so I thought I would turn an old PC
into a server. I haven't used anything like virtual box as you cannot
access it remotely (as far as I am aware).

VirtualBox (or another virtualization solution, if you prefer) is actually the best thing to use in this situation.
You can actually use VirtualBox and access it remotely, and since your goal is to practice with a system that works like a production server, it seems that's probably what you ought to do. The simplest and easiest way to make services on a virtual machine accessible to the outside physical network is to set up the VM's internet connection as bridged (rather than NAT).
As the VirtualBox manual says:

[...] open the Settings dialog of a virtual machine, go to the
"Network" page and select "Bridged network" in the drop down list for
the "Attached to" field. Finally, select desired host interface from
the list at the bottom of the page, which contains the physical
network interfaces of your systems.

Feel free to post a new question about this if you have trouble getting servers on a VirtualBox guest system with a bridged network adapater accessible from the outside. Usually, there are no complications.
While VirtualBox and other virtualization solutions generally can use an entire physical drive as a "virtual" device for a virtual machine--even, usually, an internal drive--you're not likely to succeed at making a VM use the single partition of a pre-existing system as its hard drive. So you'll have to create a new VM and install Ubuntu Server; you probably will not be able to make your VM run the copy of Ubuntu Server that is already installed. (Installing in the VM is easy though--it's the same procedure as installing on a physical machine, like you have done.)


I used https://github.com/StAlphonsos/scriptologie/blob/develop/scripts/tomboy2org.pl which is mentioned in http://orgmode.org/worg/org-tools/.

Here is how to proceed. (Note, however, that you may want to clean out your notes before so that you do not migrate unwanted notes.)

Install the dependencies for running the script:

sudo apt-get install libxml-twig-perl libtext-format-perl

Download the script from https://github.com/StAlphonsos/scriptologie/blob/develop/scripts/tomboy2org.pl.
Close Gnote so that any changes is written to its database.
Run the script. I chose to run the script with the option -notebooks to make one .org file out of each Gnote notebook:

perl tomboy2org.pl -notebooks -verbose


Why physical host nic can't be used in KVM

Because it is a virtual machine.  That means it doesn't have access to the real hardware.  Thus qemu must create a virtual nic in the vm and ferry the packets to the real nic.


Additional drivers: "You are not authorized to perform this action"

It's called jockey, so just do gksudo jockey and that should work


Why can't files be renamed by using F2 on the open files dialog screen?

This is a very old bug in Gnome. In the past it has seemed that the Gnome/GTK developers believe users should just use their File Manager to manage files and use the "file-chooser" to choose files for opening or saving, but not renaming or deleting.

Perhaps the developers can be convinced otherwise.


How to make `apt-get upgrade` use less resources?

The command nice can be used to manipulate process CPU scheduling priorities. The command assigns a "niceness" value from -20 (most important) to +19 (least important) to the process. Root can assign any value, other users only positive ones (minor importance). The default value is 0.

nice -n <niceness> <command>

To set the priority of an apt-get command to the least value, you can use the command

sudo nice -n 19 apt-get upgrade

To set the priority of an already running process, the command renice can be used:

renice -n <niceness> -p <pid>

Edit: Thanks to @David for mentioning the ionice command, which lets you manipulate disk I/O priority. It can put a process into three different classes:

Idle only gives the process disk time, if no other process claims it at the moment.
Best-effort (default class). This allows you to assign priorities from 0 to 7, where 0 is most important and 7 least. You may try assigning -n 7 as the priority level.
Realtime processes are handled before everything else, suspending disk I/O for other processes, as soon as they require it for themselves. Use with care!

IOnice combines the syntax of nice and renice:

ionice [-c class] [-n level] command             #To start a new process
ionice [-c class] [-n level] -p pid              #To change a running process

Both commands can be combined, e.g.

sudo ionice -n 7 nice -n 19 apt-get upgrade      #Omitting the -c switch will assign Best-effort
sudo nice -n 19 ionice -n 7 apt-get upgrade
nice -n 19 ionice -n 7 sudo apt-get upgrade
...


GUI problems: black boxes and bottom menu bar

When you installed kvm some other packages probably got upgraded (probably xorg or the kernel) and those packages are buggy, resulting in your graphics problem. You are still running 12.04.2, try upgrading to the latest release (12.04.4) by doing apt-get update && apt-get dist-upgrade


One alternative may be to use DavMail, but be warned it's IMAP implementation is extremely limited, in that it lacks support for a number of important IMAP extensions, including UIDPLUS and the lemonade profile set.

As for sites using Exchange, you best bet will likely be to ask your administrators to enable IMAP support in MDaemon directly.


The Translations page in the Ubuntu Wiki explains the process very well.


What is mean by application must run out of /opt?

In general, apps running from /opt are self-contained, i.e. they don't spread their footprint far and wide into /bin, /lib, /usr, etc. like normal APT-installed packages do. Basically, your app should stick to /opt except for any user data in /home/user as @konrad suggested.


Cached:          3634908 kB

This is your HDD read/write cache. Linux and most other OSs will use all available memory for drive cache. This cache size is not fixed. If your programs need  more memory then some it will be flushed to disk to make room for the running program.


New web control panel for KVM Ubuntu 18.04

Cockpit has an option to see virtual machines.


Boot process idles for 60s doing nothing

It seems I'm hitting Bug #906358: udev and lvm2 hang at boot.

I found it when looking at /var/log/syslog - the first line in there after the gap was

lp: driver loaded but no devices found

Searching for it gave me [xubuntu] Boot hangs for 60 seconds under 3.0.0-14-generic, which in turn linked to the bug.


SSH shell launched using "expect" doesn't have full width. How can I make fix it?

Use following on the top of your expect script:

#trap sigwinch and pass it to the child we spawned
trap {
 set rows [stty rows]
 set cols [stty columns]
 stty rows $rows columns $cols < $spawn_out(slave,name)
} WINCH


Firefox also uses ~/.mozilla folder

You should make sure that the permission of the ~/.mozilla folder is correct, using:

sudo chown -R $USER:$USER ~/.mozilla


How can I open Terminator with mutiple windows already open

After setting up your terminals how you want them, right click anywhere, select preferences, then go to the layouts tab. From here click “Add”, and a layout will be created with your current settings, so if you have the six split when you do this, you can save it to load it like that everytime. Hope this helps


To start Ubuntu into safe mode (Recovery Mode) hold down the left Shift key as the computer starts to boot. If holding the Shift key doesn't display the menu press the Esc key repeatedly to display the GRUB 2 menu.  From there you can choose the recovery option.


First download the deb package from repository

apt-get download <package_name>

Install the deb file ( it should be in current folder )

sudo dpkg -i <downloaded_package_deb_file>


Intel HD-Grafik 4400 black flicker on external monitor (Ubuntu 18.04)

Did you ever find a solution to this? Seems to be a similar issue here https://github.com/rolandguelle/razer-blade-stealth-linux/issues/18.


I downloaded Ubuntu from the web, but it wants to install by rebooting from the CD

Ubuntu 13.10 can no longer be installed within windows. Please read : Installation Instructions

and How to create a bootable USB
stick on Windows


There is a button on the top of the Launcher.  When you hover the mouse over it, it'll say Search your computer.  That search area will remember the things that you run and documents that you work with.  Those items will eventually scroll off and be replaced by your more recent activity.

You can remove items from your history by clicking on the Unity Button and typing: security & privacy to bring up the tool.

It'll search as you type a key.  You should see it by the second or third key.

If you click the button Clear Usage Data, you'll get another menu giving you an option of how much you want to remove.  The menu is:

In the past hour
In the past day
In the past week
From - To (you specify an interval of time)
From all time


As the log indicates - you're going to want to have a look at Dovecot Wiki: Time Moved Backwards The article details that this is due to ntpdate running and updating the time in chunks too big for Dovecot to handle. It also lists several alternatives - primarily running ntpd which will simply slow or speed the clock up and not preform a hard reset.

It also provides methods for disabling this check in Dovecot itself.


External Hard drive no longer registering as a block device. What can be done?

This is a hardware failure. When you get the drive recognized backup all important data with whatever method you desire so that you can replace the drive. (Personally I would recommend rsync for this task in this case as you likely have it on both your Mac and your Xenial installations and will be able to immediately begin when you get the drive recognized. I would avoid dd in this case because you would need to read every sector to get a successful image and you are better off recovering some data than no data. Based on your recent comments there is likely a bad solder joint somewhere that is interfering with your ability to access the drive when it's warm. It's rare, but I've seen it before.


You should always use HTTP. In this sense I found this nice answer:

You're not going to save much time using one over the other, but if efficiency is what you care about, use HTTP. An FTP client has to send a username and password and receive acknowledgments for those, and then issue several commands to set up the file transfer and receive acks for those, too. All this back and forth magnifies the effect of network latency; with 100-200ms ping times to the server you could waste a second setting up the transfer. With HTTP, the client opens the connection, sends one command and the file transfer starts immediately.
(Thanks to Kyle Jones for this answer)

Also, I will add that I personally always use the best server found by Ubuntu (in System Settings... → Software & Updates → Ubuntu Software tab, and choose Othher...):

You may be also interested by:

How do you select the fastest mirror from the command line?
How can I get apt to use a mirror close to me, or choose a faster mirror?
Making mirror://mirrors.ubuntu.com highly available


I Enable IPMI Over LAN on iDRAC Setting - Network.

It's worked for me and able to manage power from "ipmipower" command.

Thanks


"No network connection" in Lubuntu 14.04

With @Sneetsher help I managed to get this working. By setting /var/lib/NetworkManager/NetworkManager.state file from:

NetworkingEnabled=true
WirelessEnabled=true
WWANEnabled=true
WimaxEnabled=true

to

NetworkingEnabled=false
WirelessEnabled=false
WWANEnabled=true
WimaxEnabled=true

then rebooting and then setting it back to the initial setting and rebooting it seems to work again.


Real time audio visualization program to use with any sound source

https://wiki.archlinux.org/index.php/ProjectM
ProjectM is an open source music visualizer based on the Milkdrop plugin for Windows/Winamp. It now has a Qt GUI that can visualize your audio output through either JACK or PulseAudio, in addition to a libvisual component. This wiki currently focuses on the PulseAudio standalone GUI.
LK


No route to host error when trying to login in a public wifi hotspot

Finally, I found the issue. The problem was the docker daemon creating network bridges that claimed the subnetwork 172.16.0.0, 172.17.0.0, ... and the wifi-hotspot-service I needed to connect to had an IP that was in one of the above subnetworks.

What helped me:

Remove the docker containers I didn't need anymore
Run sudo docker network prune to delete unused docker networks
Change the default docker0 bridge IP address (in my case docker was installed via snap, i.e. add "bip": "192.168.154.1/24", to the file /var/snap/docker/current/config/daemon.json)
Restart docker-daemon (or your system)


Seeing the same issue and found the solution from this page, by use following instead:
curl -L https://github.com/docker/compose/releases/download/1.27.4/docker-compose-`uname -s`-`uname -m` > ~/docker-compose
chmod +x ~/docker-compose
sudo mv ~/docker-compose /usr/local/bin/docker-compose
docker-compose run test

In my original case which cannot reproduce at the later time, I cannot even use sudo rm -f /usr/local/bin/docker-compose to remove the original downloaded docker-compose file.  Finally I used sudo lsattr /usr/local/bin/docker-compose, then sudo chattr -a /usr/local/bin/docker-compose to clear the attributes that blocked the removal.


Gnome 3.30, which is what Ubuntu 19.04 is using, has disabled the desktop icons. To add them back you have to install the Desktop Icons extension from the Gnome Shell Extensions website.

Using Tweaks you can open the Desktop Icons extension preferences and select the option to show the trash icon on the desktop.

Update

I found that other users have left comments that state this problem on the extension's website. This means that it is a Desktop Icons extension bug that affects multiple people.

However, I did not find a bug report on the  extension's gitlab about this issue. Perhaps you could add one to let the developers know about it, if they don't already.


Firstly, sorry to hear you're having problems. It would be worth contacting the U1 support team who are excellent because they may be able to help. However, there are other ways to access Ubuntu One. The U1 website is one of those ways: you can upload and download your files there. You may also find u1ftp (tutorial and instructions at http://www.kryogenix.org/days/2012/09/11/accessing-ubuntu-one-file-storage-via-ftp-from-any-os) an interesting approach if you're happy to access your data directly in your personal cloud without syncing. I'd recommend contacting the support team, though, if you could; we'd certainly like to fix your problem if we can, and it may help other users with similar problems if there are any.


Do apps designed for a different desktop environment (GNOME, XFCE, LXDE, ...) break?

No. Well generally the answer is 'no'.

A program depends (for instance) on libraries and those libraries get installed with the program. And since those libraries are unique for the desktop environment (DE) they are intended for they will most likely not break the DE you install it on since the maker of said software will try to create unique file names or use general libraries and use general toolkits (and those should be unique too).

If by accident the creator of the program creates something that has the same name and is also saved into the same directory as the software on the DE you want to install it it will get tricky. Sometimes the installer will warn you and quit.

I have seen 1 time where this happend but that was because a piece of software was forked and the person forking it decided to keep names identical instead of actually making it into a new independent program. But you are likely to then choose one over the other so it was basically a non existing problem.

I remember another one: on SCO you have a command called enable that has 2 functions: it is part of a printer setup where you disable and enable a printer. But it also a function for something else (and this one comes first). So you can do disable /dev/kyo0 but need to do /usr/bin/enable /dev/kyo0 to enable the printer (this was later fixed by renaming enable to cups-enable) (from memory so specifics might be off ;) ).
But this is just annoying and was not a big problem: since both reside in different directories the command further up the PATH directive needs to have the directory in front of it).


windows 7 not loading after installing ubuntu 12.10

I had the same problem. It appears that either grub2, or the way Ubuntu implemented grub2, does not detect Windows partitions properly. I had a co-worker help me with this. First get grub working. Then I added the code below in /etc/grub.d/08_custom. Then update-grub. This puts Windows above Ubuntu so it will boot by default.

If you wish to boot Ubuntu by default, modify 40_custom instead. This will create a new entry for Windows along with the useless entry that was originally found. Select the custom entry to boot Windows. My new grub.cfg is at http://paste.ubuntu.com/1368590/.

Here is the contents of my 08_custom:

# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry 'Windows 7 (customized entry)' {
    insmod part_msdos
    insmod ntfs
    set root='(hd0,msdos1)'
    chainloader +1
}


How to Roll Back to Original Plymouth Splash

Sounds like your default.plymouth alternatives links are broken.

cd /lib/plymouth/themes
ls -l default.plymouth

Should give you

lrwxrwxrwx 1 root root 34 Oct 25  2011 default.plymouth -> /etc/alternatives/default.plymouth

And

cd /etc/alternatives
ls -l default.plymouth

Should give you a link pointing to a .plymouth file in the /lib/plymouth/themes directory. E.g. For the default splash this should be pointing at:
    /lib/plymouth/themes/ubuntu-logo/ubuntu-logo.plymouth

If not fix the links. You should then be able to configure plymouth in the normal way.


Problems in Gnome-shell and GNOME3 in ubuntu 11.04?

Gnome3 (Gnome-shell) works perfectly well under natty. I did a Ubuntu-minimal installtion and started from scratch that way. This is the best way imho. Otherwise you get other, residual stuff from the Unity installtion. It's worth doing if anything to get practice with the terminal commands, and it's fun in to the bargain.

Gnome3.shell has a long way to go before its fully ready to be shipped as default. I know fedroa 15 has it but fedora is meant to be bleeding edge. There aren't enough utilites for it yet but it is perfectly stable to use. If anything I've found it more stable than Unity has been on natty.


Accidentally made a file disappear using mv. Where should I look for it?

The issue here is that the behavior of commands like mv source target, when target does not end with a /, depends on whether there is an existing directory (or an existing symbolic link that points to a directory) called target. Sometimes that makes them do a different thing than what you expect.
You showed four commands. The first command is the important one:
mv sample.txt Downloads

That command moved or renamed sample.txt.
If there was nothing called sample.txt in the current directory in the first place, then mv sample.txt Downloads failed and no change was made. But based on your description, it sounds like there was such a file. So:

If there was a directory called Downloads in the current directory, then mv sample.txt Downloads tried to move sample.txt into the directory called Downloads, and probably succeeded. This also happens if Downloads is a symbolic link to a directory rather than an actual directory.
If there was no directory called Downloads in the current directory, then mv sample.txt Downloads tried to rename sample.txt to be called Downloads. (Not Downloads.txt, just Downloads.)

If this was in a Desktop directory, the second scenario is probably what occurred, since you probably don't have a Downloads directory in a Desktop directory. But if you do, you're in the first scenario.
So you should look inside the directory you were in when you ran mv sample.txt Downloads for an entry called Downloads. Depending on what existed before, this should either be the file formerly known as sample.txt, or it should contain sample.txt.

As for the other three commands you showed, they should've made no changes at all, and they also should not be expected to have revealed any useful information about the effect of the first command.
find sample.txt won't show anything unless there's something called sample.txt residing directly in the current directory. If you want to find files contained anywhere, directly or indirectly, in the current directory, whose names are sample.txt, you would use find . -name sample.txt. (Of course, that won't find a file whose name is no longer sample.txt.)
In mv .. sample.txt, .. is a name for the parent directory, which is the directory that the current directory resides in, or if the current directory is /, then the parent directory is / itself. Every directory has a .. entry with this meaning. That command tries to rename the .. entry for the parent directory to be called sample.txt. This should simply fail with an error, which in this case will somewhat confusingly be reported as "Device or resource busy".
In mv ... sample.txt, ... is not treated specially. Directories always contain the special entries . and .., but the name ... is not special. So you probably didn't have a file called ....

Assuming you didn't, that command failed and made no changes.
If you did have a file called ... in the current directory, and no directory called sample.txt (and no symbolic link called sample.txt that points to a directory), then ... would be renamed to sample.txt. If sample.txt already existed and was neither a directory nor a symbolic link to a directory, it would be replaced and (unless there are other hard links to it) it could be difficult or impossible to recover depending on how much the filesystem has subsequently been written. However, this is unlikely, since you probably never had a file called ..., and since that command was run after a command that probably succeeded either at renaming sample.txt in place or putting it somewhere else, and since you don't currently see a file called sample.txt in the directory where you ran the commands.
In the unlikely event that you had both an entry in the current directory called ... and another entry sample.txt that was a directory or a symbolic link to a directory, mv ... sample.txt would try to move ... into the sample.txt directory (or into the directory targeted by the symbolic link).


Here are examples for a file that is called myvhdxfile.vhdx that is mounted to /mnt/vhdxdrive
Example 1. Where guestmount is inspecting (-i) the disks looking for an operating system and mount filesystems:

Install sudo apt-get install libguestfs-tools
Create a mountpoint e.g. sudo mkdir /mnt/vhdxdrive
Run sudo guestmount --add myvhdxfile.vhdx -i --rw /mnt/vhdxdrive
(optional when you are done inspecting the files) To unmount run sudo guestunmount /mnt/vhdxdrive

Example 2. If you run into the error: guestmount: no operating system was found on this disk you can mount individual partitions by following these steps:

Run sudo guestfish --rw -a myvhdxfile.vhdx
Type in run and hit enter
Type in list-filesystems and hit enter and note the path to the partition
Type in exit and hit enter

The output of the above steps might look like this:
><fs> run
><fs> list-filesystems
/dev/sda2: ntfs
><fs> exit

Finally, you can mount the partition /dev/sda2 by running:

sudo guestmount --add myvhdxfile.vhdx --rw /mnt/vhdxdrive -m /dev/sda2

If you got a different partition path from running the list-filesystems command in guestfish than you should replace /dev/sda2 with this path in the above command.
Example 3.
If you want the mounted partition to pup up in files (nautilus) and be able to access it with your personal user account:

Create a mountpoint in media sudo mkdir /media/vhdxdrive
Mount with user permissions sudo guestmount --add myvhdxfile.vhdx -o uid=1000 -o gid=1000 -o allow_other --rw /media/vhdxdrive -m /dev/sda2

Change the uid and gid values to the corresponding ids of your user in above command.


How can I set my laptop to remember my multiple display configuration?

These settings are stored in your xorg.conf file. I'm guessing you have an intel chip (you say netbook). Look here for some good information on making that permanent (it's easier with ati/nvidia, since it's mostly driver specific.


What you could try to do is to create a new admin user from terminal. Then, once you are sure that the new account works properly, delete the old admin account.

Here's how:

adduser <username> admin


Error while formatting an SD card with GParted

i am referring you my previous answer related to problem above, please follow the steps and your problem will be solved.

best way to getback your sdcard


Ubuntu 16.04 Front Panel audio does not work

Type alsamixer to the terminal and using left and right arrow keys in to the Headphones selection if is muted (shows MM on above) press M to unmute and press the up arrow to volume up

Afterwards insert the following command to the terminal:

alsactl --file ~/.config/asound.state store

To store the settings into a file to your home folder. Then in order to restore it every time you login (is the best option I've tried) use this command:

echo "alsactl --file ~/.config/asound.state restore" >> ~/.bashrc

Update

Also the source of the problem, in my case is that the Front Panel uses AC'97 instead of IntelHD one, so setting the appropriate setting into BIOS settings also fixed the problem whithout the need to do the following fix above.

So have a look first whether your motherboards Supports the older AC'97 format as well alongside with IntelHD, especially if you custom-built your desktop computer.


Bash: ./filename : Cannot execute binary file

As you can see from the output of file um that you posted in a comment, your binary is a 64-bit binary.

32 bit systems cannot run 64 bit binaries, it only works the other way around.


All you have to do is create another liveUSB, not the one where you want to install it.

Boot from it while having the other one connected as well. Once in the live desktop environment open Disks and check  the path of the drive you want Ubuntu on (/dev/sdb for example).

Launch the installation and then make sure you select the something else option.

Choose the correct drive where to install and create the partition table you wish. I suggest three partitions:

Ubuntu
Swap
Fat partition for documents (to share with Windows)

You may opt not to have this third one if you do not need to share files.

When you're asked for the installation of the bootloader, make sure you select /dev/sd?, where ? is your installation media.

That's it.


Try this, from a command line:

gsettings set org.gnome.settings-daemon.peripherals.touchpad scroll-method "disabled"

If your hardware support it, you can try

gsettings set org.gnome.settings-daemon.peripherals.touchpad scroll-method 'two-finger-scrolling'

which I find much less invasive. With my touchpad, the options are:

% gsettings range org.gnome.settings-daemon.peripherals.touchpad scroll-method
enum
'disabled'
'edge-scrolling'
'two-finger-scrolling'

I am not sure about which flavor of Ubuntu/DE you have, so I explain how I found it: I launched dconf-editor (if you do not have it, install the package with the same name), and using Find -> "edge" I had (after clicking three or four times "next") this screen:

For using the command line gsettings you have to look at the Schema: path in the description of the key.


That very same thing happened to my Ubuntu 11.10  after I had installed BleachBit and ran it..!! I did wonder if it was a coincidence.
I reinstalled the Light Themes package and it sorted itself out after a log out and back in. Again.. Coincidence..??
Alls well now though.


Is there an alternative to Windows Hello for Linux?

If anyone is still searching for a solution, i got my own script working on the same principles as Windows Hello (using the IR camera and face recognition). It's customizable, integrated with the PAM and works basically everywhere: Login, lock screen, sudo, su, etc.

It's available as a PPA on github if you want to give it a spin.


Which package do I have to install to get `gjslint` in Ubuntu 21.04?

You have already found many parts of the puzzle.
Below are last bricks. Source package for Ubuntu 18.04 LTS mentions project page - https://developers.google.com/closure/utilities/ .
It has the following:

Closure Linter is deprecated
[...]
For teams using the Closure tools, we recommend they use the new linter based on the Closure Compiler instead. You can do this by passing --jscomp_warning=lintChecks to the compiler, or building the standalone linter binary; see the Closure Compiler wiki for details. The rest of the information on this page will be kept up for a while, for teams who are still using Closure Linter.


If you are on a 64bit machine then you will probably
find the files under /usr/lib/x86_64-linux-gnu/

See also this for an explanation of what this folder is for.


How can I return to an application in the background?

Run fg to put the job back onto the foreground, i.e. give it back control of the terminal. If there are multiple background jobs, run jobs to see a list and fg %1, fg %2, etc., to select which job to put back to the foreground.
See the Wikipedia article on job control for more information.

If a program is running on the foreground, press Ctrl+Z to suspend it. When you do this, you'll get a shell prompt. Run bg to make the program keep running, but in the background.

If a background job terminates, the shell will print a notification the next time it displays a prompt. If a background job requires input from the terminal, it will automatically be suspended (“stopped”); fg (or fg %42 if necessary) resumes it.

If you want to trigger a more visible notification when the program finishes, you can run something like

fg; play bell.ogg & xmessage "torrents downloaded"

The fg command returns when the program that it resumes finishes, so whatever you told the shell to run after fg will run when the program finishes. Note that if you press Ctrl+Z to put the job back into the background, then the shell stops waiting and runs the following commands immediately.


No need to uninstall snap after removing vtop. If you do sudo snap remove vtop It will remove the package and you do not need to worry. Snap packages are sandboxed and do not interfere with your system and the installed libraries. They will stay out of your way and would be easily managed independent of the Operating System. In short you do not need to uninstall snap


Boot into your live usb and Repair your boot with using boot-repair


Not all BIOS have a boot selection choice. If yours does, you probably have to call for it at boot time with a function keystroke. This all depends on your motherboard's BIOS design.


Problems with Ceph installation in Juju deployed OpenStack environment

Deploy cinder, cinder-ceph and ceph charms:

juju deploy cinder
juju deploy cinder-ceph
juju deploy ceph

Relate cinder with cinder-ceph and cinder-ceph with ceph:

juju add-relation cinder-ceph cinder
juju add-relation cinder-ceph ceph


Does Ubuntu 14.04 support advertisement of more specific routes?

That radvd configuration does work, but Ubuntu 14.04 act as what RFC 4191 call a type B host.

The types defined in RFC 4191 are as follows:

Type A - no support for preferences or more specific routes
Type B - support for preferences but not more specific routes
Type C - support for both preferences and more specific routes

The radvd version on Ubuntu 14.04 can be configured to send both preferences and more specific routes. But when Ubuntu 14.04 receives such routes it will ignore the more specific routes and only pay attention to the preference.

One way to solve this is to upgrade the hosts to Ubuntu 16.04 (or later) which will act as type C host with full support for advertisements of more specific routes.

For backward compatibility with type A and type B hosts RFC 4191 recommends the use of redirect messages. If all IPv6 routers on your network have the full routing table they can send redirect messages when a host on the network use the wrong gateway for a packet.


Check brightness levels by running this command as root:

cat /sys/class/backlight/acpi_video0/max_brightness

(my laptop max brightness is 20)
Set you screen brightness to minimum and check current level by evoking next command

cat /sys/class/backlight/acpi_video0/brightness

(my laptop min brightness level is 0;)
Edit /etc/rc.local and add before exit 0 the following line:

echo YOUR_VALUE > /sys/class/backlight/acpi_video0/brightness

From now on this brightness level will be set every time you start your computer.


Can't seem to get my login screen back after installing slim

Assuming GDM is still installed:

sudo dpkg-reconfigure gdm

will let you select what your default display manager is.  If it's not installed...well, install it.

It'll go into effect on reboot.


Can't verify ubuntu 19.10 download on Mac os x

I fixed it by adding .txt to the end so the command ended up looking like this (gpg --keyid-format long --verify SHA256SUMS.gpg.txt SHA256SUMS.txt)


Ubuntu 16.04 server on ODROID XU4 - hangs on shutdown/restart

I had the same problem too.

As I looking on the Internet, I found a similar problem where have a solution for not XU4: http://mylinuxexplore.blogspot.hu/2011/11/solved-ubuntu-doesnt-shutdown-properly.html

Unfortunately that solution may working with GRUB only (the XU4 has different method to boot the OS).

While I used Ubuntu 15.10 I had a problems with eth0 interface and I found a solution here: http://forum.odroid.com/viewtopic.php?f=95&t=19034

So, I combined about it and as I thought maybe have something with the power-saving / power management function in Ubuntu 16.04 and XU4 too.

I edited the /etc/default/tlp/ file to disable USB auto-suspending mode

From:

USB_AUTOSUSPEND=1

To:

USB_AUTOSUSPEND=0

After I restart the tlp service:

sudo service tlp restart

I can reboot the XU4 without hangings:

sudo reboot -h now

Maybe important this is only a temporary workaround for this issue I think.
While we disabled USB auto-suspend totally we do not reduce power consumption of device, and the USB devices will have full power all time which increasing the heath of the devices.

If somebody have more usable workaround, please do not hesitate to share with us.


Press esc after boot bios, before booting the kernel.
And select the boot safemode.


E: Unable to locate package php5-intl Ubuntu 16.04

Ubuntu 16.04 comes with php7.  So unless you've gone out of the way to install php5, you're trying to add a module in the wrong version.

Try...

apt-get install php7.0-intl


To answer your question literally: edit /etc/grub.d/10_linux and change ro to rw, then run sudo update-grub. This regenerates the file /boot/grub/grub.cfg which is used at boot time.

But don't do this! ro is the right setting. Changing ro to rw cannot help. Your problem was not solved by changing the boot option, it was solved by running fsck. Now that this is done, the filesystem is usable again.

Filesystem corruption isn't supposed to happen. You should look for the cause of the corruption. This could be a memory problem; run a memory test (select “memory test” at the Grub prompt and leave it running for at least one full pass, e.g. overnight).


To do this from Unity you can use the software center as in the following:

Press Super (the Windows key).
Type software center and press Ubuntu Software Center.
In the search dialog of Ubuntu Software Center type ubuntu-restricted-extras
This should show you the package containing the codecs. Mark it and press install.


Remove Windows 10 from 18.04 desktop boot menu

First list your boot entries:

$ efibootmgr
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0001,0000,0003,0007
Boot0000* Windows Boot Manager
Boot0001* ubuntu
Boot0003  Onboard NIC (IPV4)
Boot0007  Onboard NIC (IPV6)

In my case it is Windows 10 is Boot0000.

Using these instructions: How to delete boot managers from a UEFI boot menu, I would type:

efibootmgr -b 0000 -B

Please read the linked article very carefully and make sure you fully understand the process. If not ask below or post a new question if your rep doesn't allow posting comments.


install TLP Battery saving tool  :- sudo add-apt-repository ppa:linrunner/tlp

sudo apt-get update && sudo apt-get install tlp tlp-rdw

After installation type :-

sudo tlp start


Running as a host user within a Docker container

This answer was posted on StackOverflow by Robert:

You can share the host's passwd file:

docker run -ti -v /etc/passwd:/etc/passwd -u `id -u`:`id -g` -v `pwd`:`pwd` -w `pwd` -v pydeps:/usr/local -p 8000:8000 python:3-slim ./manage.py runserver

Or, add the user to the image with useradd, using /etc as volume, in the same way you use /usr/local:

docker run -v etcvol:/etc python..... useradd -u `id -u` $USER

(Both id -u and $USER are resolved in the host shell, before docker receive the command)


Macbook Air freezes while running Ubuntu 13.10

I had the exact same freezing issue with Ubuntu 13.10 and my Macbook Air 3,2.  It seems the culprit was whatever display driver was installed by default. Doing the following seems to have fixed it:

sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install nvidia-331 nvidia-settings-331


Directed back to login screen every time after upgrade to 12.04 from 11.10

I was able to pass the login screen. All I needed to do was to remove the .Xauthority file in my home directory and after that it logged in fine. Now tha only issue is that I am spammed with ubuntu errors that require me to send a report, but this is good and it will help resolve them.


down vote
I found this answer on the net and it work for me

In 13.04, unity  use the following:

dconf reset -f /org/compiz/
unity --reset-icons &disown


Package colord being held back due to wrong version of libsane-common

I eventually took a leap of faith and fixed the problem by running

sudo dpkg --purge --force-depends libsane libsane-common

to forcibly remove the offending packages without uninstalling any core Ubuntu packages, and then

sudo apt --fix-broken install

fixed everything for me.


SSID of my wireless network is missing in Ubuntu 12.04 I can see other SSID's

Try this magic trick: Change your wireless channel to a number different from 13. Disable the automatic channel.

There are regulations regarding the use of WLAN channels. Channels 12, 13 and 14 are not allowed in North America. For more information: http://en.wikipedia.org/wiki/List_of_WLAN_channels#Interference_Concerns

From your router configuration, I assume that you are not in North America, but some wifi cards (and drivers) by default enforce the North America regulations. Some cards allow you to change this setting, and some don't. You can try this solution and see if it works for you: How to use Wi-Fi channels above 11?

I have the same problem with an Asus EEEPC, but I cannot change the country with those instructions. Not sure if it's a driver or hardware issue in my case...

If you are unable to make that changes, you can always configure you router to assume North America regulations, and set the channel to "automatic".


Ubuntu can't login after disabling auto login

Try to open a shell or terminal. Use this:

ctrl + alt + F1-F7

Log in and try to launch the GUI with this command:

sudo lightdm or sudo service lightdm restart


How to enable 5.1 channel playback on a Realtek ALC887-VD chip?

In addition to changing default-sample-channels in /etc/pulse/daemon.conf, it was also necessary to launch alsamixer and change the number of channels to 6:

Note: you may need to restart between changing daemon.conf and using alsamixer.


evolution plugin for exchange missing in 14.04

run in termina:

sudo apt-get install evolution-ews

After that you can select new, Exchange Web Services server type in new account dialog.


Shutdown after idle (but not if the SAMBA server is in use)

I have set up my own cron job to deal with this.

What I achieved

Suspending/shutting down the machine if it has been idle (no keystrokes or mouse moves) for a certain amount of time, unless there are files being accessed in its SAMBA server.

Requirements

root access.
xprintidle (install it by executing in a terminal: sudo apt-get install xprintidle)

How to

Save the following script in a location of your choice (in my case, /home/user/.useful-scripts/idle.sh):

#!/bin/bash

# Checks the time the computer has been idle (no keystrokes or mouse moves)
# If it's greater than the set limit, it will suspend the machine if no
# files are being accessed through the SAMBA server.

# The maximum number of milliseconds the computer is allowed to be idle before
# it is suspended (set to 20 minutes)
IDLE_LIMIT_MS=1200000

# How long the machine has been idle for
IDLE_TIME_MS=$(/sbin/runuser -l ic -c "DISPLAY=:0.0 /usr/bin/xprintidle")

if [ $IDLE_TIME_MS -gt $IDLE_LIMIT_MS ] ;
then
    # If there are no files locked by SAMBA, suspend the machine
    FILES_LOCKED=$(/usr/bin/smbstatus | /bin/grep 'Locked files:')

    if [[ -z "${FILES_LOCKED}" ]] ;
    then
        /bin/systemctl suspend -i
        # If you prefer to shut down instead of suspend, comment the
        # previous line and uncomment the following one:
        # /sbin/poweroff
    fi
fi

Be aware that this script will be run by cron. This has certain implications, but mainly that DISPLAY and PATH environment variables are not set. Therefore, we need give the full path when invoking a command. The paths might change in your machine, so make sure they match your configuration (for example, to find the path for xprintidle execute in a terminal which xprintidle).

We also need to specify the DISPLAY for which we want the xprintidleinformation. It is normally :0.0, but you can be sure of that by running w from a terminal while logged in and checking the FROM column. Read these three links (1, 2 and 3) for more information about PATH and DISPLAY under cron.
Make sure you make it executable:

  chmod +x /home/user/.useful-scripts/idle.sh

Set up the job to run periodically using cron. smbstatus requires to be run as root, so we need to invoke crontab using sudo:

  sudo crontab -e

Add the following line to run the script periodically:

  * * * * * /home/user/.useful-scripts/idle.sh

This sets up a cron job to run every minute and execute our script. You can set up the periodicity to a higher value if you don't care about smaller precision (see this link for more information on the necessary syntax).

This is it. cron will check the idle state of the machine every minute, and if it has been idle for more than 20 minutes (can be adjusted with the IDLE_LIMIT_MS variable) it will make sure that no files are being accessed through the SAMBA server; in that case, it will suspend the machine.


Installed Ubuntu 14.04 LTS, set a password, and when computer restarted, I typed in a password that Ubuntu said is incorrect

You need to Restart Ubuntu
Hold Shift key during boot to start Grub menu
Highlight your image and press E to edit
Find the line starting with "Linux" and add rw init=/bin/bash to the end of that line
Press Ctrl + X to boot
Type in passwd username
Set your password

Info gathered from
 How do I reset a lost administrative password?


If no commands can be run using ↑ or ↓ that indicates that your history file is empty or you have no read-permissions. Check that.

Maybe you run the commands as another user. If so do:

su otheruser
history 10

and look at the output.

If you change $HISTFILESIZE the changes will be overwritten, whenever you invoke an other shell. To prevent that you should change that variable in your .bashrc. Also you should set the variable $HISTSIZE  to a larger value.

Generally usefull tips using histories:

Ctrl+R does a reverse search of your history for you. Alt+. pastes the last argument of the last command into your prompt at cursor position.

Also the bang (!) operator will repeat commands for you in terminal (if it's just about saving you some typing. Example:

confus@confusion:~$ echo "bang + letters will repeat the last command starting with these letters."
bang + letters will repeat the last command starting with these letters.

confus@confusion:~$ clear

confus@confusion:~$ !ech
bang + letters will repeat the last command starting with these letters.

All those histroy related things are stored in the home directory of any user in a file called .bash_history. You can look them up by using the history-command. Her is a small tutorial on howto use history.

confus@confus:~$ history 4 #will print last 4 commands
 1848  ls
 1849  clear
 1850  vi /home/confus/.local/share/applications/nautilus-home.desktop
 1851  history 4

Another very usefull thing is to create a .inputrc file in your home directory with the following content:

"\e\e[C": forward-word
"\e\e[D": backward-word
"\e[A": history-search-backward
"\e[B": history-search-forward

This way you can use the ↑ or ↓ to complete commands you started to type from history. E.g. when you type a rather lenghty command such as rsync -a -v --human-readable --prune-empty-dirs -e 'ssh -i .ssh/id_rsa' --include="*/" --exclude="snapshot_*" --exclude="restart.*" /scratch/ x@cluster1:/home/x/runs/ and want to run it a second time you can just type rsy and then ↑ an it will complete to the last command that started with rsy. Another press of the uparrow will complete to the second-last and so on. I don't know why this isn't the default.


Why is my 100GB hardrive showing as 1GB now

FAT16 is a file system introduced in 1984 for DOS.
The max partition size using FAT16 (32KiB clusters) is 2GB.  Roughly the size of your current 1.81GiB partition.
Use Gparted or Disks to format the drive with a modern file system.


Find a file which contains a string and delete it in Ubuntu

You can try the following command which will call a perl find/replace command for every file matching the "eval(base64_decode" pattern:

sudo find . -type f \( -name '*.php' -or -name '*.node' \) -exec grep -li "eval(base64_decode" {} \; 2>/dev/null | xargs perl -i -p0e 's/<\?php.*?\?>//s'

The perl part will just remove the first <?php ?> block in the files returned by the find command.


How to disable/skip advance welcome page on Ubuntu Server 14.04?

The USB/CD from which the installation is made is still in the computer so it boots from there. Remove it.


Sound and Video Skips on Ubuntu 11.10 64 bit

I had the same problem... It’s a known bug and there’s a easy fix for it as mentioned by virgil brumond on ubuntu bug report

open /etc/pulse/default.pa by issuing the command

sudo gedit /etc/pulse/default.pa

and find the line:-  load-module module-udev-detect (Line 53 on my system. Yours will also be somewhere around that)

and change it to

load-module module-udev-detect tsched=0

save the file and reboot.


I don't receive any MMS on Ubuntu Touch mx4

The issue are going to be resolved, just check https://bugs.launchpad.net/ubuntu/+source/messaging-app/+bug/1439101 for advancement.


allow directory browsing in the apache2.conf file - not working

First of all there is a typo in your code. AllowOvveride  should be AllowOverride.

Here are few other tips:

Alias /nytest /var/www/nytest                              # this directive will make the directory accessible at http://localgost/nytest in case that your DocumentRoot is not '/var/www/' but '/var/www/html/' as it is by default
<Directory /var/www/nytest>
    Options +Indexes
    IndexOptions FancyIndexing FoldersFirst NameWidth=* DescriptionWidth=* # better appearance
    DirectoryIndex Disabled                                # disable the 'execution' of the index files
    AllowOverride None                                     # disable .htaccess files
    AddType text/plain .html .htm .shtml .php .phtml .php5 # display these file types as plain text
    php_admin_flag engine off                              # don't run arbitrary PHP code; if you've other scripting languages, disable them too.
    Order allow,deny
    Allow from all
    Require all granted
</Directory>


I successfully updated my Ubuntu 14.10 installation to the 3.17.8 kernel using the Mainline builds. To update to 3.17, you have to:

Download the corresponding linux-image-*-generic-* package:

on a 32-bit system:

$ wget "http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.17-utopic/linux-image-3.17.0-031700-generic_3.17.0-031700.201410060605_i386.deb"

on a 64-bit system:

$ wget "http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.17-utopic/linux-image-3.17.0-031700-generic_3.17.0-031700.201410060605_amd64.deb"

Install the package with dpkg:

$ sudo dpkg -i linux-image-3.17.0-*

For some configurations (special drivers, manually compiled kernel modules), you also need the linux-headers-*-generic-* packages.


update-manager doesn't request PW - just NOOPs

It looks like you're experiencing a valid bug. This behaviour isn't easily explainable by anything you might have done, it looks like it's simply an error in 'update-manager'.

Please report your bug to  update-manager in Ubuntu. Include all of the steps to replicate the problem on your system. The Ubuntu Wiki has a very nice   guide on how to report bugs.

In the meantime, it looks like you have to manually update by doing sudo apt-get upgrade in a Terminal.


Want to get Desktop Environment on VPS when accessed by web browser, how do I do it?

You can't get the desktop environment when accessing the remote server via HTTP/HTTPS. You're looking for something called 'VNC' which doesn't run by default and doesn't operate over a webpage.

The Desktop Environment is designed to operate self-contained from web browsers' abilities to access it.  Therefore, it doesn't have any 'web' interface you can use.  Attempting to use a web browser to get a VNC connection to your server is dangerous as well, because even if you set up VNC through HTTPS, on its own it is horribly insecure.

What you're looking for is, essentially, installing a VNC Server or setting up VNC on the Desktop GUI within the Server.  However, most VPSes do not come with the Desktop environment available, and unless you're paying for more than 1GB of RAM on the VPS, you will not be able to properly install or run the GUI either.

(In both cases, there's other questions on Ask Ubuntu which touch about how to do VNC, or install the GUI; however for your core question of "How do I get to the Desktop Environment when accessing the VPS via a web browser", the answer is in a nutshell "You can't in any reliable or secure way".)


Try calling /usr/bin/awk instead of just awk.


A last page with a word "secret" is printed

In the print dialog, check the Job tab for any Before/After cover page:


How to autologin (without entering username and password)(in text mode)

To boot into text mode

sudo vim /etc/default/grub

and change the following line:

GRUB_CMDLINE_LINUX_DEFAULT="text"

exit and enter:

 sudo update-grub

Automatically login in text mode without specifying userid or password

Upstart Versions of Ubuntu

Add -a <your-user-name> to the line:

exec /sbin/getty -8 38400 tty1

in file /etc/init/tty1.conf

like so:

exec /sbin/getty -8 38400 tty6 -a gruber

/etc/init/tty1.conf is the upstart job that runs at the appropriate time to start the terminal session on tty1. Adding the -a option tells getty to call the login program with the -f option to sign that user in, bypassing the user prompt from getty and the password prompt from login.

Upstart is the Ubuntu system that operates as the kernel init process (process 1).

I tested this on my tty6 and it worked great. Because of the upstart respawn line if you exit the shell it will start back up again automatically.

Systemd Versions of Ubuntu

Newer versions of Ubuntu use mostly systemd to manage system processes. Therefore there are new ways of doing things.

systemd tty usage is also a little different with graphics terminals possibly running on the first few virtual terminals. tty6 is reserved to be a text virtual terminal with systemd and there will probably be others as well.

To have tty6 come up signed on as you enter:

sudo systemctl edit getty@tty6

A nano editor will come up in a temporary file. Enter the following into that editor:

 [Service]
 ExecStart=
 ExecStart=-/sbin/agetty -o '-p -f gruber' -a gruber --noclear %I $TERM

Exit the editor.

Putting in the extra ExecStart= line is not a typo. it's very important as it tells systemd to forget about the original ExecStart parameter it already knows about (from /lib/systemd/system/getty@.service) so you can replace ExecStart.

You can check the results with the following command:

 systemd-analyze verify getty@tty6.service

I see some warnings there when I try this, but not about what we are doing here.

If there is already a tty process going on tty6 you'll have to restart it to see the results.

To figure this out I referred to the excellent answer at https://askubuntu.com/a/659268/63886. There Muru happened to use the same goal as an example on how to tailor systemd. His ExecStart line is:

 ExecStart=-/sbin/agetty -a muru --noclear %I $TERM

The difference appears to be a couple more systemd related environmental variables appear in my version.

The end result of the above edit is the creation of a file called override.conf in /etc/systemd/system/getty@tty6.service.d/ containing just what you typed above. If you were to create such a file yourself you would need to run the systemctl daemon-reload command to get systemd to recognize it, and again then possibly restarting any existing agetty process on that virtual console. systemctl --edit takes care of the daemon-reload for you.


Unable to choose desktop environment 14.04

I usually just install the desktop after. Have you tried just finishing the install and running:

sudo apt-get install unity #or preferred desktop

And then restarting?


Ubuntu is sending IPv6 packets with hop limit 0

I came up with a temporary solution, that works until you reboot the PC.

#echo 64 > /proc/sys/net/ipv6/conf/eth0/hop_limit


Release upgrade for Ubuntu EC2 AMI launches SSH on a different port

It is safe to continue, this is opening a second SSH daemon on port 1022 in case SSH fails/crashes during the upgrade you have the ability to ssh in to port 1022 if need be to repair. (The likelihood of something failing w/ssh is very very low)


how do i run main file which function is store in another file and also the header file too?

This looks like c sourcecode, which needs to be compiled first.

gcc -o programName maiNfunction.c maiN.c

This creates an executable file, which already should have the permission to be executed. You can run it by typing:

./programName

Maybe you should consider reading more of the compiler documentation.

In case, you didn't do that yet, you of course need to install a compiler (e.g. gcc).


Usually problems that are with installation are a per-version issue. Try either using a different Ubuntu version or try installing it from a USB drive and see if that helps. I am 95% positive this will fix it :)


How can I merge unversioned MonoDevelop code back into a git repository?

His code, and your code, should share a common origin.

What you need is a git repository with this common origin as a revision.

His code state should use this common origin as a parent, so should yours.

That copy he gave you should do - if you still have an archive of it.

Create a new git repo
Copy the origin code into it
Add and commit
Now create and check out a new branch for his code (git checkout -b his-code)
Delete all the origin code, put his new code in
Add and commit
Check out the origin code again (git checkout master)
Make a new branch for YOUR code (git checkout -b my-code)
Delete the origin code, put in your code
Add and commit

Now you have a repository with the history of both your changes from a common origin. Merging these two branches should produce the desired result.

git checkout master
git merge his-code
git merge my-code


Why is my video RAM 256MB when it should be 2GB?

Just go to the CCSM (Config Compiz Settings Manager) OpenGL-> Uncheck "Sych with VBlank"


There's yet another GUI solution, which might come handy for you ;)

Try opening the properties (right click -> Properties) of the file type you want to be always played by VLC.

Choose the Open with tab and either choose from a list or add one (by choosing from an extended program list or simply typing vlc as the command)

EDIT:

... and click on Set as default


How can I restore my sublime text after upgrading from 13.04 to 13.10?

What about launching Sublime from a terminal say like 'sublime-text-2 & ' and then right click on the icon in the Unity bar and select 'Keep in the launcher' (or something like that since I am not localized in english) ?
It may do the trick.
:)


Is there any way to send and receive SMS through my Prolink PHS300 3g modem?

You could try the Gnome Phone Manager - package gnome-phone-manager

http://live.gnome.org/PhoneManager


How do I disable time synchronization in Lubuntu

In your Lubuntu main menu there is an entry called Time and Date under System Tools.  Select this and then a new Window will open.  Select Unlock.  You will be asked for your password.  Under configuration select Manual.  Make your adjustments and then close.


How can I prevent accidental execution of the rm -r *command?

You could alias the rm command to rm -i in your shell, so it will ask your confirmation for each file.

However, some consider this to be harmful. See alias rm=“rm -i” considered harmful? on Superuser.com

Other thoughts are in How do I prevent accidental rm -rf /?* on StackOverflow.com.


First, what tools and procedures did you use to get to the point of the "backup GPT table is corrupt" message, and is that error message reproducible by reproducing those steps? It could be that you did something wrong in creating the partitions, and that this is causing problems, but without knowing how you created the partition table and filesystems, that's impossible to know for sure.

Second, if the error is reproducible and if you're using common partitioning tools (such as Disk Utility in OS X, GParted or gdisk in Linux, etc.), then it's very unlikely that you'd get a consistent and reproducible problem in the partition table. This makes me think that you may have a defective USB flash drive on your hands. I can't be sure of that, though, particularly if you used some oddball tool to create the partitions.

Third, if a partition (such as /dev/sdb2) is inaccessible, you may need to use filesystem repair tools such as fsck on it. Further diagnosis would require knowledge of what filesystem it is (I'd guess HFS+, if you intend to put OS X on it). The output of sudo fsck /dev/sdb2 and/or sudo blkid /dev/sdb2 would be useful in further diagnosis.

Fourth, if you're trying to create a bootable OS X disk, you should probably be doing this in OS X, not in Linux. Is there some reason you're trying to use Linux for this task?

I recommend you edit your question to provide all this additional information; it's too much to fit in comments.


Gnome-shell notifications in the tray gets overcrowded

Yes: you can right-click your icons and select "Remove" from the pop-up list:

Alternatively, you can left-click each one and click on its notification bubble to acknowledge and clear it.


Formatting windows 7 partition to give it to ubuntu?

This is not difficult to do; but you will need to create a bootable Ubuntu CD or USB, as you cannot edit or remove a partition you are currently using. Once you have done this, boot into it and open Gparted then delete the partition you no longer want. You can then right click on the other and expand it to fill the remaining space.

Reboot into Ubuntu and run

sudo update-grub

to remove the old Windows entry from your boot menu.

WARNING 1:

Resizing partitions always has the potential to cause data loss, although such loss is very unlikely.

WARNING 2:

Resizing and moving partitions CAN (depending on your exact partition layout) confuse GRUB and render your machine temporarily unbootable. This is easily fixed by using something like the Super Grub Disk to boot back into your machine, though that requires you having a separate working machine to create a Super Grub Disk with. You can then run sudo update-grub to restore normal booting.

ALSO CONSIDER:

Consider reinstalling Ubuntu over your entire disk, which will result in a cleaner system overall. This will, however, wipe all data on your disk.


After trying various key combinations I figured it out that pressing 5 times SHIFT reverts the issue.


Why is bash the default shell in most OS?

I did some reading on this and the conclusion seems to be that it is the default shell of GNU (used by most Linux based OS), and therefore simply comes packaged as part of GNU, while also having 20 years of development behind it making it stable and well rounded, it is simply the best all rounder, meeting the needs of all but the most advanced users.

For more, read Why is bash standard on Linux? (the same question on Unix & Linux).

Just to add a bit more to this, there are many other shells to try, if you are interested, here's a few from this answer:

  Zsh has more advanced
  interactive facilities, but a few quirks when it comes to scripting
  (less so now than back in the days). In the early to mid-1990s when
  Linux was in its infancy, zsh was virtually unknown.
  Ksh was the de facto
  standard on commercial unices since the mid-1980s, but it was
  proprietary software until 2000, so not an option on Linux. Also, ksh
  had subpar command line editing capabilities, compared with bash.
  Pdksh, a free clone of ksh,
  would have been an option, but it was not well-known and had poor
  command line edition capabilities. (Pdksh is no longer a very active
  project, even though it's still used in some BSDs, now that ATT ksh is
  free.)
  Some distributions install an
  ash variant as
  /bin/sh. Ash (by which I mean any of the loose family of shells
  called ash) is designed to be small and fast, with no interactive
  features (it's only for editing scripts). The ash revival is
  relatively recent; in the 1990s the existing variants lacked a lot of
  features.
  Tcsh was the most advanced
  interactive shell until zsh came along, but it's incompatible with sh
  and not so good with
  scripting.


NFS not mounting since upgrading from 14.04 to 16.04

I saw the same problem in 16.04 and recently "fixed" it (with a workaround to disable a kernel module).

If you manually mount the filesystem, then check /etc/mtab, you'll probably see a bunch of junk added to the options, e.g. mine became:

rw,relatime,vers=4.1,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=172.24.25.xx,local_lock=none,addr=172.24.23.xx

The key insight is the sec=sys bit, that means NFS isn't using any of the GSSAPI/Kerberos authentication stuff. (From context in mailing list issues, I've gleaned the the "-512" error is a generic error for when the "AUTH_GSS upcall" fails.)

You'd expect passing sec=sys yourself in /etc/fstab would fix this, but it didn't work for me. Nor did explicitly putting NEED_GSSD=no in /etc/default/nfs-common.

What did work, following this thread was just blacklisting the rpcsec_gss_krb5 module via modprobe.d:

echo 'blacklist rpcsec_gss_krb5' > /etc/modprobe.d/blacklist-rpcsec-gss-krb5.conf
reboot

The other caveat is that this is probably a bug, and should just work. There is, for example, this recent Redhat bug report for "nfs4_discover_server_trunking unhandled error -512" which has been marked as a duplicate of a non-public bug.


How to control power of MAAS nodes via the CLI?

maas imran machine power-on w3qbqc is what you want.

A node is an instance to provide image/service. A machine is an instance to take care of physical (bare metal) items (like power on/off and the other bare metal configuration). So nodes have only "power parameters" to show, which is a part of the current service status, and machines control the power on/off, which is a part of the bare metal setup.

What maas does is to abstract the operation of the node, focusing on the power on/off action (namely start/stop the node) so you don't need to take care of the power parameters if you have setup them already at the very beginning.


Why does my desktop background keep changing?

I forgot that I had installed Webilder, which pulls photos from Flickr and webshots.


Ubuntu Oneiric has better support for brightness function keys, you may want to try that.


Disable CTRL+ALT+F4 switching to virtual terminal

You can modify the keymap, with the following command:

xmodmap -pke | sed -n 's/ = .*VT_4.*/ = /p' | xmodmap -

Tested on 14.04, and 14.10, and it works.  To have the command work even after restart, use upstart.  For additional ways, and info see here


can't change file permissions of key file

maybe you should try changing the ownership first and then try to manipulate the chmod

How about sudo chown [yourusername] file.pem and then chmod


It doesn't look like vlc was ever installed. To fix the issue, you might want to try (in a terminal):

sudo apt-get update && sudo apt-get install -f
sudo apt-get install vlc

For more information about the apt-get package manager, you can also run:

man apt-get


How to debug hibernate-wakeup problem in 17.10?

After installing kernel 4.16.0-041600rc5-generic it worked.

I went to http://kernel.ubuntu.com/~kernel-ppa/mainline/
and changed into the directory v4.16-rc5/.
From there I downloaded

linux-headers-4.16.0-041600rc5_4.16.0-041600rc5.201803112130_all.deb
linux-headers-4.16.0-041600rc5-generic_4.16.0-041600rc5.201803112130_amd64.deb
linux-image-4.16.0-041600rc5-generic_4.16.0-041600rc5.201803112130_amd64.deb

and did

sudo dpkg -i linux-*


Screen has broken color set after a while - Ubuntu 14.04

Some drivers don't respond well to returning from suspend. Turn that option off in System Settings -> Power:


Can't write on ntfs partition shared with Windows 10

In most of the cases the problem is with fast startup feature of Windows 10.
If it is the case you have to simply disable fast startup on Windows.

Here are the steps.

Type Control Panel in the search box.
Click Control Panel.
Click Power Options.
Click Choose what the power buttons do.
Click Change settings that are currently unavailable.
Scroll down to Shutdown settings and uncheck Turn on fast startup.
Click Save changes.


Generally, you don't log out of Xorg.  Xorg has no account management capabilities at all.  The wording of that document is inaccurate.  It probably really means to log out of your window manager, and exit Xorg.

In practice, this probably means killing your X display manager (xdm, kdm, or gdm).  Do this by hitting Ctrl-Alt-F1, to switch to a text console.  Then log in and issue one of the following commands (depending on which display manager you use):

sudo stop gdm
sudo stop kdm
sudo stop xdm


I am also a newbie but after much frustration and through our friend Google, I managed to find this work around. I tried this on 12.04.01 LTS 64bit server.
It seems to me that this is an issue with intel graphics chipsets.
I found that inserting the nonmodeset string in the Grub boot command solved this problem for me.
When the server boots up the Grub menu appears for a couple of seconds. Press any key to stop it from completing the boot sequence. You will have the Grub loader screen. Select the first entry then press e to edit boot commands.You will then have a screen with the boot command sequence. on the 10th line(mines is the 10th line yours might be different after 'yourservername-root' there's 'ro'. Insert the 'nomodeset' command (without apostrophes).
Press Ctrl and x keys together or F10 to complete booting.
It should boot to the user login or command prompt
This is not permanent, if you want it to be permanent you will have to edit the Grub boot command sequence configuration.


How to run a script when a directory is changed by another user?

Using inoticoming:

You can put a script in /etc/init.d/ that runs inoticoming at boot time.

Create a new folder to hold the inoticoming log / last pid for the watched folder: sudo mkdir -p /var/log/inoticoming/watched/
Create a script inoticoming_watched in /etc/init.d/:

* Remember to change <path_to_folder> and <path_to_script> to match the full path of the watched folder and the full path of the script to execute

#!/bin/sh

case "${1}" in
    start)
        inoticoming --logfile '/var/log/inoticoming/watched/inoticoming.log' --pid-file '/var/log/inoticoming/watched/inoticoming_last_pid.txt' <path_to_folder> <path_to_script> \;
    ;;

    stop)
        kill -15 $(< /var/log/inoticoming/watched/inoticoming_last_pid.txt tee)
    ;;

    restart)
        ${0} stop
        sleep 1
        ${0} start
    ;;

    *)
    echo "Usage: ${0} {start|stop|restart}"
    exit 1
    ;;
esac

Mark the script as executable: sudo chmod u+x /etc/init.d/inoticoming_watched
Make sure that the script called by inoticoming_watched is executable.
Update rc.d to make the service inoticoming_watched start at boot time: sudo update-rc.d inoticoming_watched defaults

You can check the inoticoming log in /var/log/inoticoming/watched.


Found this on Ubuntu forum.

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

Simply installing proprietary fglrx drivers seems to solve the problem.

It is about the same problem you have, but on a Macbook Pro 8,2 with AMD Radeon HD6470M graphics and Natty. I havent tested it myself. But I'm gonna. Have the same card on my ASUS laptop.


Somethign similar to notification center?

What is about indicator provided, following screenshot:


You are using the wrong command.

To check hadoop version, type hadoop version in the terminal.
Here is the sample output

$ hadoop version
Hadoop 2.4.1
Subversion http://svn.apache.org/repos/asf/hadoop/common -r 1604318
Compiled by jenkins on 2014-06-21T05:43Z
Compiled with protoc 2.5.0
From source with checksum bb7ac0a3c73dc131f4844b873c74b630
This command was run using /usr/local/hadoop/share/hadoop/common/hadoop-common-2.4.1.jar


How to install Ubuntu 16.04 next to Windows 10

for your situation there you must change theboot files so you have the option to boot either on windows or ubuntu and to do that you have two choices:

First:

you install EasyBCD on windows and add the boot entery for ubuntu.

Second :

you use boot-repair you download the iso , make a bootable stick then boot and choose "Recommended repair" and it will fix the problem for you.


installation stuck at detecting file system

If I were you, I'd:

Take a full system backup
Download and burn a DVD of 14.04.2 32 bit version as you seem to have a need for OpenOCD which doesn't seem to like 64-bit versions.
boot and follow these instructions,
at step 8 take "something else",
delete the 200GB /dev/sda6 partition and create a 32GB / and 128 GB /home in ext4 format.
leave the rest unallocated (to add to something when that one becomes full somewhere in the future)