Personally I find LXC is in rapid development and documentation lags.

I personally use openvz on "production servers" and do not think LXC is yet mature enough to use in "production".

I suggest you look at proxmox

http://pve.proxmox.com/wiki/Main_Page

Offers a Debian host, web interface, and KVM and openvz. They are planning to use LXC once they consider it stable.


Accidentally deleted /etc/resolv.conf and now can't access any domain

To fix this you should recreate the link how it was. On 18.04 /etc/resolv.conf points to ../run/systemd/resolve/stub-resolv.conf.

So to fix your problem it should be enough to do the following:

sudo rm resolv.conf
sudo ln -s /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf


This question is the only meaningful mention I can find about this usb.id 0b05:17eb. I am unable to find any Linux driver for the device. We might then consider ndiswrapper, the package that uses Windows XP driver files. I checked on the Asus site and they only offer Windows 7 and 8 driver packages. ndiswrapper will not work with 7 or 8 drivers.

I regret that there is no method I can find to get your device working.


This is just my opinion.

As an IT Systems Engineer I try to keep all of my gear at the latest stable release for a variety of reasons.  Because your server is running some very legacy hardware I'd be inclined to retire it.  I definitely wouldn't upgrade it to the latest LTS.  With a 2 Ghz CPU and 1 GB RAM the performance will be pretty bad.  Perhaps not a huge issue if all it does is provide web proxy and print services but still.

A more sensible plan (IMO) would be to upgrade the kernel, squid, cups and iptables.  Then you could continue to use the machine as you have been but with all the security holes patched.  You might find it easier to do these upgrades from source.

Changing file system types could open up a huge can of worms and given how old your hardware is, doesn't seem worth the risk or effort.  Personally I would not attempt it unless I didn't care if I permanently broke the machine.

As an aside, if there is any ability to bump up the RAM in that box, I'd definitely do it.


Look on the HP website for drivers and then goto System Settings>Networking>Wireless. Here is the url for the website: http://www8.hp.com/us/en/support-drivers.html


Samba - accessing LAN shared folders - Troubleshooting

Found it! As I suspected, it was due to samba v1.0 being used, which was deprecated.
Solution was to add --option='client min protocol=NT1':
smbclient //192.168.0.254/My\ Book -A ~/.boxcredentials --option='client min protocol=NT1'

as explained here: https://forum.hackthebox.eu/discussion/2848/having-smb-enum-issues-read-this.


It depends on the requirement of you.

Usually slowing fan speed slows down CPU. If you are a heavy user who needs more CPU power, then I suggest you to remove thinkfan. On the other hand, If you can't see any radical difference in performance, You might want to keep it.


How to make the command line history apply across all terminals

Thanks to the link provided by gertvdijk above I am posting my favorite solution from it.

Here is my attempt at Bash session history sharing. This will enable history sharing between bash sessions in a way that the history counter does not get mixed up and history expansion like !number will work with some constraints.

Using Bash version 4.1.5 under Ubuntu 10.04 LTS (Lucid Lynx).

HISTSIZE=9000
HISTFILESIZE=$HISTSIZE
HISTCONTROL=ignorespace:ignoredups

history() {
  _bash_history_sync
  builtin history "$@"
}

_bash_history_sync() {
  builtin history -a         #1
  HISTFILESIZE=$HISTSIZE     #2
  builtin history -c         #3
  builtin history -r         #4
}

PROMPT_COMMAND=_bash_history_sync

Explanation:
The function history() overrides the builtin history to make sure that the history is synchronised before it is displayed. This is necessary for the history expansion by number (more about this later).

Append the just entered line to the $HISTFILE (default is .bash_history). This will cause $HISTFILE to grow by one line.

Setting the special variable $HISTFILESIZE to some value will cause Bash to truncate $HISTFILE to be no longer than $HISTFILESIZE lines by removing the oldest entries.

Clear the history of the running session. This will reduce the history counter by the amount of $HISTSIZE.

Read the contents of $HISTFILE and insert them in to the current running session history. this will raise the history counter by the amount of lines in $HISTFILE. Note that the line count of $HISTFILE is not necessarily $HISTFILESIZE.

More explanation:
Step 1 ensures that the command from the current running session gets written to the global history file.

Step 4 ensures that the commands from the other sessions gets read in to the current session history.

Because step 4 will raise the history counter, we need to reduce the counter in some way. This is done in step 3.

In step 3 the history counter is reduced by $HISTSIZE. In step 4 the history counter is raised by the number of lines in $HISTFILE. In step 2 we make sure that the line count of $HISTFILE is exactly $HISTSIZE (this means that $HISTFILESIZE must be the same as $HISTSIZE).

About the constraints of the history expansion:
Generally, once you have more than one Bash session, there is no guarantee whatsoever that a history expansion by number will retain its value between two Bash prompt displays. Everytime PROMPT_COMMAND is executed some command from another Bash session may snuck in your current session history and then the history numbers will be different. That means you always have to look up the number immediately before using it. I find this constraint reasonable. I have to look the number up every time anyway because I can't remember arbitrary history numbers.

Usually I use the history expansion by number like this

$ history | grep something #note number
$ !number

I recommend using the following Bash options.

## reedit a history substitution line if it failed
shopt -s histreedit
## edit a recalled history line before executing
shopt -s histverify

Strange bugs:
Running the history command piped to anything will result that command to be listed in the history twice. For example:

$ history | head
$ history | tail
$ history | grep foo
$ history | true
$ history | false

All will be listed in the history twice. I have no idea why.

Ideas for improvements:
Modify the function _bash_history_sync() so it does not execute every time. For example it should not execute after a CTRL+C on the prompt. I often use CTRL+C to discard a long command line when I decide that I do not want to execute that line. Sometimes I have to use CTRL+C to stop a Bash completion script.

Commands from the current session should always be the most recent in the history of the current session. This will also have the side effect that a given history number keeps its value for history entries from this session.


Automate the mysql secure installation using shell script

Try this as it is, seems like there is a some issue with ( and pipe | so I had to escape them.
Source Code
#!/bin/bash

      MYSQL=$(grep 'temporary password' /var/log/mysqld.log | awk '{print $11}')
      MYSQL_ROOT_PASSWORD="test@123"

      SECURE_MYSQL=$(expect -c "

      set timeout 10
      spawn mysql_secure_installation

      expect "Enter password for user root:"
      send "$MYSQL\r"

      expect "Change the password for root ?\(Press y\|Y for Yes, any other key for No\) :"
      send "y\r"

      expect "New password:"
      send "$MYSQL_ROOT_PASSWORD\r"

      expect "Re-enter new password:"
      send "$MYSQL_ROOT_PASSWORD\r"

      expect "Do you wish to continue with the password provided?\(Press y\|Y for Yes, any other key for No\) :"
      send "y\r"

      expect "Remove anonymous users?\(Press y\|Y for Yes, any other key for No\) :"
      send "y\r"

      expect "Disallow root login remotely?\(Press y\|Y for Yes, any other key for No\) :"
      send "y\r"

      expect "Remove test database and access to it?\(Press y\|Y for Yes, any other key for No\) :"
      send "y\r"

      expect "Reload privilege tables now?\(Press y\|Y for Yes, any other key for No\) :"
      send "y\r"

      expect eof
      ")

      echo "$SECURE_MYSQL"

Debug execution
root@5015a2757ac4:/# bash -x secure.sh
++ grep 'temporary password' /var/log/mysqld.log
++ awk '{print $11}'
grep: /var/log/mysqld.log: No such file or directory
+ MYSQL=
+ MYSQL_ROOT_PASSWORD=test@123
++ expect -c '

      set timeout 10
      spawn mysql_secure_installation

      expect Enter' password for user 'root:
      send r

      expect Change' the password for root '?(Press' 'y|Y' for Yes, any other key for 'No)' ':
      send yr

      expect New' 'password:
      send test@123r

      expect Re-enter' new 'password:
      send test@123r

      expect Do' you wish to continue with the password 'provided?(Press' 'y|Y' for Yes, any other key for 'No)' ':
      send yr

      expect Remove' anonymous 'users?(Press' 'y|Y' for Yes, any other key for 'No)' ':
      send yr

      expect Disallow' root login 'remotely?(Press' 'y|Y' for Yes, any other key for 'No)' ':
      send yr

      expect Remove' test database and access to 'it?(Press' 'y|Y' for Yes, any other key for 'No)' ':
      send yr

      expect Reload' privilege tables 'now?(Press' 'y|Y' for Yes, any other key for 'No)' ':
      send yr

      expect eof
      '

couldn't read file "password": no such file or directory
+ SECURE_MYSQL='spawn mysql_secure_installation

Securing the MySQL server deployment.

Connecting to MySQL using a blank password.

VALIDATE PASSWORD PLUGIN can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD plugin?

Press y|Y for Yes, any other key for No: '
+ echo 'spawn mysql_secure_installation

Securing the MySQL server deployment.

Connecting to MySQL using a blank password.

VALIDATE PASSWORD PLUGIN can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD plugin?

Press y|Y for Yes, any other key for No: '
spawn mysql_secure_installation

Securing the MySQL server deployment.

Connecting to MySQL using a blank password.

VALIDATE PASSWORD PLUGIN can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD plugin?

Press y|Y for Yes, any other key for No:
root@5015a2757ac4:/#

And I have verified the login with new password test@123.


I managed to solve this problem I had usb formatted as ntfs and not fat took a fat32 usb stick and It worked great


How do I get Ubuntu to ignore power button presses?

Bruno Pereira has made a thorough post about the power button and how to customize the actions.
In short:
By using dconf-editor (either you'll have it or you'll need to install it) and navigate to org/gnome/settings-daemon/plugins/power and choose power-button as blank.


Blank screen in Ubuntu 13.10 after login; missing opengl

I had the exact same problem and after searching for hours i got the solutions. Just follow these simple steps :

Press Ctrl+Alt+F1
Provide Login details
type     sudo apt-get remove --purge nvidia-*
type     sudo reboot
Done!

Enjoy !


Huge performance issues with nVidia GeForce 7100

Here's another bug report to add to the list:

https://bugs.launchpad.net/unity/+bug/987469


What you are seeing are the errors, being printed to stderr (standard error). By default stderr is printed to the terminal used to start the program. We can change this easily though, to point to /dev/null, which is basically a black hole. It's a device that doesn't do anything, so when you write to it, nothing actually happens. The following command will redirect ALL output (stderr and stdout) to /dev/null and then give you back your terminal.

firefox &> /dev/null &

The &> is the redirector, /dev/null is where we are redirecting to, and the last & means to "background" the process, so we can have our terminal back.

On a side note, if you ever want to bring a backgrounded program back to the terminal, you can use the fg (short for foreground) command to bring it back. And if you type the combination of keys Ctrl+Z you will be able to "suspend" the process, then you can type bg to send it back to background.


Mind mapping-like app from Ubuntu Software Center - I don't remember its name

I think you mean Zenkit.

It is not a "simple" mind mapping software, rather a project management tool to manage milestones, to-do's etc. (Yes, these can then be displayed as a mind map.)


OpenCV-Python installation - CMake error missing vtkRenderingOpenGL [16.04]

Taking advice given from the OpenCV community forum (post).

Add this to CMake options:

-D WITH_VTK=OFF -D BUILD_opencv_viz=OFF

"opencv_viz is the only opencv module, that depends on vtk, and you cannot use it from python"

Therefore it is fine to just disable it all together and after doing so CMake completes.


Bash: Trouble passing arguments to grep from script

Try this:

grep --color -r -n -i "${SEARCH}" $PWD

It will search for "qwe rty" as one, not as "qwe" or "rty"


Lost power while upgrading to 12.04, how do I fix the botched install?

Seemed to have fixed my problem, everything was installed fine it was just unity needed to be reset. I think it may have been an issue with compiz.

Just needed to reset unity using unity --reset and problem solved.


You could use a single cron entry with @reboot, and use a script to select the command. For example, in crontab:

@reboot bash /path/to/my/script.sh

And in /path/to/my/script.sh:

#! /bin/bash

case $(date +%u) in
    1)
        echo Monday
        command 1
        ;;
    2)
        echo Tuesday
        command 2
        ;;
    #   ...
    7)
        echo Sunday
        ;;
esac


Yet another "Internet is not working fine on 14.04" question.

This might help :Wireless networking not working after resume in Ubuntu 14.04
It contains many command line commands that might help


How to try ubuntu live image on acer iconia w4-820 Win 8.1 tablet?

I haven't tried but you can enter the BIOS by holding the volume-up and power button (to turn on device). For me it didn't work the first few tries, I guess you either have to hold or release the volume button.
When you are in the BIOS screen you can change boot-order to USB but you can also disable secure-boot.
With both of these options set and a USB-OTG + bootable-USB-drive it should work I guess.


How to self-sign OpenPGP key again with Seahorse after changing key preferences?

You need to perform advanced operations not possible with Seahorse, drop to the GnuPG command line.

Open edit key menu

gpg --edit-key [key-id]

Select user ID to edit (repeat for all if necessary)

list

Each of the user IDs is prefixed with a number. If you want to edit the first UID, respectively type 1 and press Enter.
Delete the self-signature.

delsig

An assistant will guide you through all incoming signatures.

Repeat steps 3 and 4 for all user IDs as necessary.
Save and exit the edit key menu.

save

Recreate self-signature, either using the GnuPG command line (gpg --edit-key [key-id], sign, save) or Seahorse.


Updater-notifier-common wont install on 16.10 OVH

A bit of a necro-post here, but if you remove apt-config-auto-update via

dpkg --remove apt-config-auto-update

then you can do your apt-get -f install.
(apt-get didn't remove it for me.)


You have three options:

Escape the spaces using a backslash character
Wrap the directory name in double-quotes ("")
Use TAB completion

Creating the directory:

user@pc:~/testfolder$ ls -l
total 0
user@pc:~/testfolder$ mkdir "foo bar baz blob"
user@pc:~/testfolder$ ls
foo bar baz blob

Method 1:

user@pc:~/testfolder$ cd foo\ bar\ baz\ blob/
user@pc:~/testfolder/foo bar baz blob$ echo "This works"
This works

Method 2:

user@pc:~/testfolder$ cd "foo bar baz blob"/
user@pc:~/testfolder/foo bar baz blob$ echo "This works, too"
This works, too

Method 3:

user@pc:~/testfolder$ cd foo<TAB><ENTER>

Based on your comment on the other answer: for accessing the file named, the escaping needs to be done as follows:

Eric\ Burdon\ -\ Starportrait\ -\ CD\ 1\ \(flac\).cue foo\ bar\ baz\ blob/

However, using TAB completion makes this process easier and avoids you having to escape the spaces manually.


I had this problem on a Debian system recently, and found the solution on Unix.se.

It was this bug, fixed by this patch.


Recovering from a move of /home when it's encrypted (ecryptfs)

sudo ln -s /home/.ecryptfs/$USER/.Private /home/$USER/.Private
sudo ln -s /home/.ecryptfs/$USER/.ecryptfs /home/$USER/.ecryptfs
sudo chown $USER:$USER /home/$USER

Then log out and log back in.  Note that these commands probably need to run as root (using sudo), as an unmounted /home/$USER might be readonly.


Snappy on Raspberry Pi 2 failing to boot

Power supply is at fault you need 2Amps for a pi 2 which is why you get the colored screen


/dev/sda2: clean, ***/*** files, ***/*** blocks

This message is normal. This message tells you that there are no errors in your disk.

I think your display drivers are corrupt. Also if your hardware is not Nvidia, why would you want to install Nvidia drivers?

You need to remove them and install the required drivers.

You need to edit your grub and boot without the display drivers by adding "nomodeset" and then fix your driver situation.

This has nothing to do with GDM. GDM is just a display manager. Try following the steps here.


disable bd prochot permanently or quickly lubuntu 18.04.2

I assume you used sudo, as described in the script, so the permission denied is not due to lack of userspace permission.

From https://github.com/tiziw/iuvolt/issues/11

  In the notebookreview thread linked in credits someone noted that if
  Secure Boot is enabled wrmsr does not work as the writes are blocked
  from userspace.

  In order for it to still work you'll have to either recompile the msr
  module or recompile the whole kernel if the module built into the
  kernel. You will have to either disable Secure Boot or recompile msr
  with the the patch mentioned here.

The line with "XX" did not work, as it is there as an example.


Black Screen when second external HDD is plugged in

Do it as the question is asked, plug the drive in afterwards and it will already know what it is booted from. The addition of the drive will not cause any changes then other than adding new drive in its own location. Either that or go into the boot menu and select the drive to boot from at boot time. This will have the same effect giving the machine no choice to make the wrong decision.


How to write a portable shell script with error handling

If you want to write a portable shell script you should stick with POSIX as that's the most reliable standard in the Unix world.

Relying in /bin/sh being anything but a Bourne shell is bad style and will likely break sooner or later.

As POSIX doesn't support the ERR trap you have to manually add your error handler to any command you want it for, using ||. For example:

#!/bin/sh

error(){
 echo "Error at $1"; exit 1   ## we don't have $LINENO in POSIX
}

while read LINE
do
  echo "+ $LINE"
  false
done < file.txt || error "while loop"


I love boot repair but ONLY as a live CD.  The one and only time I ever installed it on an installation intending to fix that installation, it rendered the installation completely unbootable, so I beg you, please do not install boot repair on the drive you are trying to fix.  Always run boot repair from a live booting boot repair cd or self booting usb flash drive.


Install Ubuntu on a tablet Asus TF 101 with Android

Try looking on this Ubuntu page about flashing.


Open a new tab in gnome-terminal and have it automatically connect via ssh

gnome-terminal → edit → profile preferences → title and command → run a custom command instead of my shell

you might want to make a new profile for using the local shell.

you can choose the default profile in edit → profiles

if you have to specify passwords when connecting over ssh, set up private/public key authentication.


try this and give us the output:

sudo apt-get remove --purge software-center
sudo apt-get install software-center


unmounted dev/sda1 with root filesystem is not working out

You cannot unmount the partition of the system you're running. If you want to modify the partition (like shrinking it), you have to boot a live USB or live DVD and use gparted on your system partition.


Battery not recognized on my laptop (and it recognizes my laptop as a desktop)

I suggest you file a bug report about this. I would use the ubuntu-bug linux command in a terminal and see what the bug triagers are able to figure out for you.


How do I configure background transparency for KDE's terminal?

I guess you mean Konsole by the KDE Terminal. Here's how to set background transparency:

Click Menu Settings
Click Configure Current Profile... / Edit Current Profile...
Choose tab Appearance
Click Edit...

Choose the background transparency you wish.
Enjoy.


Why does compiling C code on Xubuntu fail?

Why the code generates warnings

You want to pass temp_str without the & since arrays are passed by reference by default.

If you need to pass a specific member i of the array, you can pass &temp_str[i] without warnings, including &temp_str[0].

Why the code compiles on openSUSE but generates a warning on Ubunutu

I have both openSUSE 12.2 and Ubuntu 12.10 on my computer and tried it several ways. Both use gcc 4.7.1.

openSUSE does not generate the compiler warning because the appropriate warnings are not on by default. If you compile your code on openSUSE with warnings on (most commonly -Wall), you will see the same compiler warning as you do on Ubuntu.

Ubuntu uses dpkg-buildflags to set the default settings. By default, Ubuntu uses -Wformat (which is generating the warning about fscanf and would be included when using -Wall) and -Werror=format-security, which turns warnings from -Wformat-security into errors (and is not included in -Wall).

You can view these settings in the terminal with dpkg-buildflags --dump and dpkg-buildflags --status.

What are Compiler Warnings?

Coders learn about compiler errors quickly. When code has typos, syntax errors, or the compiler is able to detect certain other problems, the compiler issues errors and stops. In these cases, we say the code won't compile.

But there are many more cases where the compiler thinks there might be an error, or notices legal code that might have certain problems. In these cases, the compiler issues warnings but will usually finish compiling the code.

It's important to look at the warnings. Most of the time, the warnings should be treated as errors and fixed even when the code compiles. If the warnings are ignored or not seen in the first place, the programmer may falsely think there is nothing wrong with the code. The resulting code may run fine or appear to run fine. But these warnings very often mean there's a problem waiting to happen. When conditions change later on, the code might produce the wrong result or even lead to undefined behavior, causing crashes. It is very hard to find this kind of bug because the programmer is starting from an assumption that code has no problems.

In gcc, the command line option -Wall shows most warnings. Options that start with -W are about warnings. These are in the man page. In this case -Wall shows all (really most) warnings. It is a very good idea to always use the -Wall option. The GNU gcc documentation has a lot more information on warnings and settings.

An excellent new book that explains using Make files and other tools to set compile options is 21st Century C from O'Reilly Media, another very good book is Autotools from No Starch Press


How to Restore GRUB after installing Windows?

The guide do not say to use /dev/sda2: it is a partition.

You should install GRUB to the disk boot sector, I suppose in your case is /dev/sda.


I also had issues with installing this printer, but since 12.04 comes with the embedded driver that supports Canon PIXMA MX870, you shouldn't mess with other custom solutions in order to install this printer properly. Go to the router manager via your web browser and setup your printer's IP address as fixed.

Click "Dash Home" button
Type "Printing" and click at the icon
Add your Network printer here by using the dedicated IP address of your printer we've mentioned from above
Done.


I'm pretty sure you have to boot from bios again and choose boot from us drive again.
Or enter into bios and set for boot from usb or cd first before harddrive options.

Edit: You have to just install ubuntu on the usb flashdrive.
Reinstall ubuntu to the flashdrive not boot alongside windows xp.
So make sure your flashdrive is mounted


This could be a major bug in the software. Are you sure that it is deleted PERMANENTLY when you try to rename it? i.e. does it magically 'disappear' and 'reappear' (maybe after a few minutes) after you've renamed the file? If so, then i think you have a network problem (maybe your network is a bit too slow or you have very low latency).If not, then I think it is a bug in Ubuntu One.
P.S. Does this happen to ANY file in the ubuntu one folder? Or does it happen only to certain files (ie files over/below a certain size, files that are the same type etc)


Normally I would simply recommend you backup your files, wipe, install 12.04, and restore your files. However, there may be a more streamlined, albeit complicated, process as found: here.


How to access ubuntu server using just hostname and not hostaname.local

If you want the hostname and hostname.local to be resolved, and you use linux to access hostname, you have to add

search local

in your /etc/resolv.conf file. I am not sure how you do that if resolv.conf is generated. However, take a look at http://man7.org/linux/man-pages/man5/resolv.conf.5.html, where you can see directives for resolv.conf file.

You should always add your domain(s) with search if you want that also short names would be resolved correctly. If you computer is also in the same domain you can also use domain keyword. Since your top domain is local you do not have to change ndots option.

Probably the simplest way to make this work is to name your computer from where you try to access hostname to be yourcomputer.local. In that way, local will automatically be considered as your domain and both (hostname and hostname.local) will be resolved.

You did not give enough detail, what OS are you using to access hostname and how do you want to access it.


How do I locate all files that include specific word as part of name and end with specific extension?

locate -b '*Summer*.jpg'

The -b option tells locate to only match the file name and * in the pattern match any number of characters.


This is not a security risk at all, because you can always only set environment variables for your current environment (e.g. current Bash session) and, using the export command, its child environments (scripts you launch, subshells, etc.). It's impossible to escalate an environment variable created or modified into the parent environment. This includes that it's impossible for regular users to make system-wide changes, of course.

So the only environment that would be affected if you run export LD_LIBRARY_PATH=... is your current shell and any subshells of it you might spawn later. Let's say you change the lookup path to include infected libraries at the beginning i.e. with the highest priority. Then you run an executable that loads one of the infected libs without even knowing. What happens now?

You have malicious code (from the infected library) running under your own user account with regular non-admin privileges. This might sound bad, but actually... so what? It runs with regular user privileges which again means it can not affect the entire system. By the way, directly running an executable with the same malicious code would have been much easier than modifying the library lookup path and waiting for a normal executable to load it.

Conclusion: A regular user can only modify their own library lookup path, which means they can also only load those libraries themselves under their regular user account with regular non-system-wide privileges. That said, it makes no difference whether they force loading an infected library or directly run an infected executable. You would gain absolutely nothing if that environment variable could not be overridden by users.

PS: There are also executables which have the setuid or setgid flag set, which means they will not run as the user/group of the one who runs them, but of the one who owns them. For example the sudo executable is owned by root and has the setuid flag set, which means it always runs as root when executed. For security reasons, the $LD_LIBRARY_PATH variable is ignored by executables with one of the setuid/setgid flags set to make sure that the regular user can not make an executable running with root privileges to load arbitrary libraries.
(Thanks to @Rinzwind for pointing this out!)


How to delete a file from an external disk without moving the file from the external disk to the local disk?

When you delete a file on an USB drive, it is not moved to your local disk even if it shows in the trash. It is in an invisible folder on the USB drive (usually named .Trash-1000)

To immediately delete a file without using the trash, hold the SHIFT key and press DEL or send it to the trash and empty it.


I'm trying to set up a Samba share, and I can see the share from Windows but can't access it

At a guess, the Samba user may lack permission to that directory. As a test, try sharing a globally-readable directory (/usr, for instance) instead.

The general fix is to "map" the windows access to a good user. For instance, here is an example with a separate, dedicated user. Another option is to simply login with a Linux username and password: https://wiki.samba.org/index.php/Setting_up_Samba_as_a_Standalone_Server

If I interpret your comments above right, you may also want to mount your old disks in /etc/fstab -- you can set the users and group there (other examples, all options), make them read/write by everyone, set nofail to allow booting without them, ...


dnscrypt-proxy - find the best DNS resolver and update the dnscrypt-resolvers list

Of course. All things are possible given enough time and effort.

One way to accomplish DNS benchmarking is to utilize the namebench program as mentioned here. It hasn't been updated since 2010 but is available here

Another way to accomplish this on a recent version of Ubuntu  (limited testing accomplished on 14.04.5) is to:

1) Download  Gibson Research Centers DNS Benchmark (Granted this is also hasn't been updated since 2010)

2)Launch it with Wine with wine DNSBench.exe via the terminal in the directory you downloaded it to or right click on it in nautilus and select Open with -> Wine Windows Program Loader.

To add your custom list of DNS servers, Click the Nameservers tab and then the Add/Remove button.

Limitation: If Add System`s Nameservers doesn't do the trick you'll need to parse your csv file to obtain the IP addresses and add them (manually?) to the DNSBench list of servers.

Then Click Benchmark to complete the benchmark testing. This can take awhile so it's a good time to get up from the keyboard and stretch.

Once Benchmarking is complete you can click the Tabular Data button which will provide final bench mark results sorted from fastest to slowest.

Regarding the safety of updating your local list in /usr/share/dnscrypt-proxy/dnscrypt-resolvers.csv You can safely test updating any file on your system provided you have a good strategy. There's nothing quite like having a backup copy to insure that you can revert your changes if something goes awry. One way to accomplish this would be to simply issue the command sudo cp /usr/share/dnscrypt-proxy/dnscrypt-resolvers.csv /usr/share/dnscrypt-proxy/dnscrypt-resolvers.csv.bak


Wrong window gets focus when switching workspace

Disable "Click to Focus" On CCSM,

Go to; General -> General Options -> Focus & Raise Behaviour => Disable "Click to Focus"


Video problems with EFI boot on KVM/QEMU

Ok, after testing around with different kernel options - I found the solution:

I changed the VM video hardware to VirtIO-GPU.

Now the ISO boots without modification of the kernel command line.


Rearrange PDF pages using the command-line

pdftk is the one you're searching for. E.g. if you want to reverse the page order of i.pdf, do

pdftk i.pdf cat end-1 output o.pdf

Other examples showing pdftk's potential:

pdftk i.pdf cat 4-1 6 8-end output o.pdf # use ranges
pdftk i.pdf cat 1-6even output o.pdf     # print only even pages in the range
pdftk i.pdf cat 1-10 ~5-7 output o.pdf   # exclude pages in the range
pdftk i.pdf burst                        # extract to single-page pdf files

Read man pdftk for more information.

To install pdftk on 18.04 see: How can I install pdftk in Ubuntu 18.04 Bionic?

If you after all search for a GUI solution have a look at pdftk's GUI pdfchain or pdfmod.


Install Ubuntu with no access to BIOS and only boot from encrypted harddisk

This question ultimately becomes not a matter of policy within the company you are employed by.

You say this is a company laptop and the BIOS is not accessible (assuming administrative lockout), and the force boot to an encrypted hard drive.

There are two problems you have here then: (1) The company went to some decent (and possibly expensive, if PGP Desktop / Symantec PGp Encryption was used) lengths to encrypt the computer and put administrative lockouts on BIOS to prevent what you are trying to do; and (2) the laptop is not yours and is actually owned by the company.

In the IT Tech Support world these are red flags.  If someone comes to me and says "Hey this is my work laptop and its encrypted can you decrypt the files and give me a copy" I say "No, you don't own the machine.  Have your boss contact me if they want it."  This is a matter of system ownership vs. authorized user - you are an authorized user of the laptop but you are not the owner of the machine.

Attempting to bypass the encryption and access your files is almost definitely a breach of the Encryption Policy at your workplace, and a violation of approved terms of use.  Following a method like you request to alter the system like you want would most definitely result in heavy disciplinary action against you.

It is therefore not possible within the scope of this site and within the moral and ethical scope of the Ubuntu community to try as help you bypass the encryption and the BIOS lockouts as you do not own the laptop and because we do not typically assist individuals with bypassing such security measures that are in place.

You need to reach out to your company's IT support staff to have them fix the machine and attempt to recover files.  We cannot as a matter of policy, ethics, morals, and (in some countries, or in the case if some companies) law.


Based on your output you're sourcing /bin/activate not ~/sites/mysite.org/virtualenv/bin/activate where the file actually lives.

If you're in the ~/sites/mysite.org/virtualenv/ directory you could run it like:

source ./bin/activate
or
source bin/activate

Notice though, that in my examples I don't start with / because that would mean starting at the root of the Linux filesystem.


How to use minecraft_server.1.6.4.jar on Ubuntu Server 12.04 LTS

Just run java -jar minecraft_server.1.6.4.jar to run this. If you don't know - use commands:

ls for list current catalog
cd for change directory (.. is change to higher dir)
sudo gives you temporary root (superuser) priviligies

If this is small server, this is sufficient. But If you want host public server, read tutorials about iptables and safety. Tips:

Never run server on root user - make another user with small permissions
Configure iptables or ufw - it's firewalls; find tutorial and read it - don't just browse, read :)
Remove unnecessary software like cups, samba etc.
Read more about security - example disable root login via ssh

Clean? Feel free to ask.


Why does Ubuntu only support versions for a limited time (and what does it mean)?

I have to say this are all excellent question and I will go through your excellent questions one part at a time with the small knowledge I have about the Ubuntu ecosystem. I have divided your question into several smaller ones:

1. Does Ubuntu support a particular version with a limited time?

Before explaining the time limit for each version (9.10, 11.04, 12.10...) or type of version (Desktop, Server...) we need to first see some variables that are taken into consideration for this time limits. For example, some of them are:

Man Power / Geek Power / Amount of Developers - This is the amount of geeks, developers and in general people that work in the creation of Ubuntu. This is the amount of people that can put some of their time to work on the upcoming Ubuntu release, the current Ubuntu release and/or a previous version of Ubuntu. Right now, with the time periods for support pushed from Servers to 5 years and Desktop to 5 years in LTS and in normal versions to 2 years, this means that the Ubuntu devs have to work in around 9 versions of Ubuntu. As of this writing the versions of Ubuntu that have support are below (you can see a more current list here):

8.04 Server LTS
10.04 Desktop
10.04 Server LTS
11.04 Desktop
11.04 Server
11.10 Desktop
11.10 Server
12.04 Desktop
12.04 Server LTS

This does not include the work done in 12.10 which is the upcoming version (As of this writing). So in total, right now, there are 10 versions that are getting support. For what I have seen, the 2 versions that get more support are the 12.04 and 12.10 in a somewhat 70%-80% work for 12.10 and 30%-20% for 12.04. Of course if we take into account the other previous versions of Ubuntu that are getting support it would be something a percent bigger for the upcoming release, followed by the second biggest percent for the current release and then followed by several almost equal percents for each previous version supported. This means in plain english that devs focus more on upcoming and current releases but still do not abandon older, supported ones.

The point of all of this is to get a clear look into the amount of work that needs to be done for this 10 versions of Ubuntu to satisfy and to offer support for all the users of each version. With this in mind we jump to the second part.

Hardware Evolution / Software Evolution

With time comes new hardware, new software techniques and new innovative and smart ways to create new stuff and to make old stuff better. For example, when Ubuntu 5.10 came out, there was no USB 3.0, Sata 6G or NFC. This also applies to the hardware and software in that time frame. When a motherboard came out, around the time that specific version of Ubuntu came out there was no X hardware invented or developed. There was no GCC with better X properties and Y compiling times.

This means that for each new version that comes out, Ubuntu tries to absorb whatever new technology that comes out in the world. This helps the development a lot if the time frame between releases is short, since having a time frame between version of, let us say, 10 years, would mean that it would need to adopt all technologies in that time.. THAT IS A LOT!. Having it in one year also means that users might not get the updates they want or that special version of the program they use in time. A balanced time frame therefore is the release cycle of 6 months. That is why in this example the release cycle is a 6 month time period. So anything that happens in the next 6 months can be applied to the new version (To some degree of peace of mind for the developers I may add).

Basically we have a time frame that focuses on end users, developers and has an eye on new technology, new ideas, new software. Balanced if I can say so.

Ideas / New methodology / New techniques

In order to apply and work with the 2 points mentioned above, new ideas come out every so often (Can I say every 6 months ^^). So ideas for a better Gnome desktop, for a better way to integrate user actions, for a better and accessible computer experience. Having this also means that ideas that looked nice 2 years ago, might not look so much today, or maybe can be enhanced or changed for others. This affects they way for example the behaviour of a single program up to massive change like the transition from Gnome 2.x to Unity. This are also thought into the plan of development of Ubuntu.

With all of this points in mind we can actually say that having the support for each version of Ubuntu limited to an amount of years is a pretty good idea. This would make the developers focus more on applying their time on new technology, new hardware, new software and new and current Ubuntu versions. This might sound like a "abandon all hope to anyone that has a previous version" but no. The fact that Ubuntu has support for very old versions, like the 8.04 and even has a Long Term Support option with their Ubuntu versions every 2 years mean that they actually have a plan for older versions. They want to offer security, stability and a sound OS that can deliver when you need it. All of this while thinking of the 10 versions of Ubuntu that get worked done on them.

2. Do (Very Old) versions still get some kind of support and updates?

Yes. But not all. As I mentioned before, some versions like the 8.04 get support, but this is because they have LTS (Long Term Support) which gives you a guarantee that they will support it for the next 5 years, while other normal versions get a 2 year. Even in this case, if a particular security vulnerability arises your Ubuntu version will get an update for it. Keep in mind that, the older your Ubuntu version is, the less updates it will get. It will still get them, but they could come all in one big hunk of patches on the same day or small amounts every so often. This is one reason to update to a new release. You will get, not only the updates and changes on the new release but you will be assured that you will have support for new technology in the hardware and software parts of the computer world.

After the support time has ended, you are encourage to update since this is a normal behaviour on the software and hardware world. New stuff comes out to speed things up and make them easier, so we should take that into account. Just imagine, for example in my case, a world stuck with HTML 1.0 without Ajax, JQuery, Javascript and the likes. No HTML5 either. Same for hardware. No multi processing architectures, no AMD64, no Dual Channel memory and no Gigalan drivers. BTW, No Wifi or facebook either. The worst thing is... No askubuntu!!

3. Should users update from not support versions (Very old versions) and how?

Yes they should. The only exception is, if you live in a very remote, away from civilization, no penguins allowed place. But you should update to keep your system current and up-to-date. In the case of not support versions, what most people will tell you is to backup your files and do a clean installation. This helps solve any issues you might find while doing an upgrade from one version to the next and also the amount of information that you would need to download.

Is not the same to update from 9.10 to 10.04, 10.04 to 10.10, 10.10 to 11.04, 11.04 to 11.10, 11.10 to 12.04 and finally to 12.10 than to simply download the 12.10, backup your important files and do a clean install, then restore your backup files. Saves you time, bandwidth and you can start "working" sooner. The good news is that since a couple of version ago, new version of Ubuntu include in the LiveCD/LiveUSB an option in the installer to upgrade an existing older version of Ubuntu on the computer. So if you insert a LiveCD of 12.10 for example, and it detects an older version of Ubuntu, it will give you the option to upgrade it. Saving you tons of time and bandwidth along the way.

Of course if you are trying to upgrade from an EOL release to a newer version and the next version is also EOL (For example trying to upgrade from 6.04 to 6.10 where both are EOL) doing the normal procedure like using do-release-upgrade -d or apt-get upgrade will not work because they will look for the next version and since it is also EOL will throw an error. More information about this in How to install software or upgrade from an old unsupported release?
In those cases I also urge the user to download the latest and either upgrade from the liveCD or reinstall from scratch after doing a proper backup.

There is even a page dedicated to EOL (End of Life) releases: https://help.ubuntu.com/community/EOLUpgrades/

4. How does Ubuntu´s "life-cycle" differ from Windows?

I will compare the Windows XP to Windows 7 life cycle or release cycle to the Ubuntu one. I am skipping Windows Vista because, well, we all know what happen to it. Hasta la Vista, baby!.

Anyway, in the time frame between Windows XP and Windows 7, Ubuntu came out and then released 9 new versions of Ubuntu that each incorporated new technology to it, new software updates and techniques and new ideas from the community and devs. Read carefully, 9!. Before Windows 7 came out, did you know Ubuntu supported USB 3.0. Windows 7 did not support USB 3.0 when it came out. This gives you a direct idea of how, not only Ubuntu but software development in the open source world moves. It does not walk but runs. After the release of Windows 7 and before Windows 8 came out, Ubuntu had release versions 11.04, 11.10, 12.04 and 12.10 all of them incorporating new hardware/software.

This is all thanks to the direct link between all the points mentioned above and the time frame for development. The hardware and software worlds are moving very fast and for a Operating system to work in it, it has to develop and adapt according to this speed. This is a big benefit and attribute that benefits Ubuntu when compared to Windows. Although Windows has Service packs, they do not offer not even 10% of what happens in the time they release it and the time that version of Windows came out (2 years from the release of Windows 7 up until the SP1 for it just to give you an idea. That is about 4 versions of Ubuntu or 12 versions of the Linux kernel.).

So this way, you can see the benefits of a 6 months cycle versus a 2 year or 5/7 year one. Adds quicker support for hardware so the end user enjoys it. Adds new software techniques to it for less cpu/memory usage and it can be optimized quickly so the end user does not have to wait years for an official fix to appear.

Overall, I think you can see each question answered in a way that helps you know the WHY, WHEN and HOW Ubuntu only supports versions for a limited time. I wanted to add one more question that many users asks and many times confuse:

5 What is the difference in stability between LTS and Normal releases

If we are to talk about stability between both versions, then the answer is: The same. They both have the same stability because one of the main objectives to every Ubuntu version has always been Stability. If you install a LTS or a Normal release you will get the same stability. The actual difference between LTS and a normal release is what the LTS implies: Long Term Support. Which simply means, you will get updates for a longer amount time compared to a normal release. You will not get an enhanced performance, better graphics, more speed or anything else when comparing a LTS to a Normal release. This is not what a LTS offers in comparison.

For more information about the Differences between LTS and a Normal release (Which is also Stable) please see What's the difference between a Long Term Support Release and a Normal Release?


How to install the Darktable plugin for GIMP 2.10

Okay. After long 40 minutes of struggling, I managed to make Darktable work with Gimp.

I've tried installing Gimp with flatpak, removed Darktable from snap and installed the latest one from a ppa (personal archive). It did not work.

It seems that the gimp packages coming from snap and flatpak are completely broken but the reason is probably nobody uses them at all.

Even though flatpak is the "recommended way" of installing Gimp I would strongly advise against using it at all, simply because the packages coming from there are completely unusable out of the box.

(Gimp's contributors probably need to update Gimp's homepage because they are currently providing incorrect info.)

Once I installed Gimp from this ppa everything happened flawlessly:
sudo add-apt-repository ppa:otto-kesselgulasch/gimp

I can confirm that Darktable from ppa:pmjdebruijn/darktable-release and Gimp from ppa:otto-kesselgulasch/gimp work correctly together.

These were probably some internal configuration problems of Gimp but the thing is most open-source contributors are happy with "works on my machine" which is the case with Gimp sadly. No users should have the study the internals of an application, so they can configure it properly.

P.S I thought that during the years the standards have become higher in open-source development but they might have actually got lower. We as users are about to expect unhappy years of struggling to complete simple tasks with Ubuntu because of this attitude. This is the fact.


Hybrid Graphics. How to enable the second card

There are two ways to switch between the AMD v-cards with fglrs driver:

Use 'aticonfig' command with one of the options under your root:

--px-dgpu
       Activate discrete GPU (High-Performance mode), must re-start X to take effect

--px-igpu
       Activate integrated GPU (Power-Saving mode), must re-start X to take effect

Run 'amdcccle' under your user account and choose the v-card you want then re-start X-server.


None of those commands will show you if the swap is activated or not. To know whenever is the swap activated just run swapon -s:

swapon -s
Filename                Type        Size    Used    Priority
/dev/sda2                               partition   1052220 0   -1
/dev/sdb3                               partition   1047548 0   -2
/dev/sdb6                               partition   498684  0   -3

Another way is using free:

free
             total       used       free     shared    buffers     cached
Mem:       1552616    1394436     158180          0     116080     676940
-/+ buffers/cache:     601416     951200
Swap:      2598452          0    2598452

almost any process/system watcher has the swap values, htop in this example:

The swap is used only when the physical memory is not enough. Some people never gets the opportunity to use the swap while other just don't create it since they have heaps of RAM memory. I don't know why you want the swap into /tmp but there is not legit reasons why you would like to do this.


Upgrading MySQL 5.5 to MySQL 5.6 on Ubuntu 14.04 LTS

How can I securely safely install

It will always be tricky.

Please read the 5.5/5.6 compatibility page before doing anything. Mind 1 big difference between the 2:

  Beginning with MySQL 5.6.6, several MySQL Server parameters have defaults that differ from previous releases. The motivation for these changes is to provide better out-of-box performance and to reduce the need for the database administrator to change settings manually. These changes are subject to possible revision in future releases as we gain feedback.

1 of the big changes is that 5.5 uses 1 big file as a transactions log and 5.6 uses several:

  Therefore, if you are upgrading an existing MySQL installation, have
  not already changed the values of these parameters from their previous
  defaults, and backward compatibility is a concern, you may want to
  explicitly set these parameters to their previous defaults. For
  example, put these lines in the server option file:

 [mysqld]
 innodb_file_per_table=0
 innodb_checksum_algorithm=INNODB
 binlog_checksum=NONE

If you use replication pay attention to this part of the link:

  To upgrade servers used for replication, upgrade the slaves first,
  then the master. Replication between the master and its slaves should
  work provided that all use the same value of explicit_defaults_for_timestamp:

  Bring down the slaves, upgrade them, configure them with the desired
  value of explicit_defaults_for_timestamp, and bring them back up.

  The slaves will recognize from the format of the binary logs received
  from the master that the master is older (predates the introduction of
  explicit_defaults_for_timestamp) and that operations on TIMESTAMP
  columns coming from the master use the old TIMESTAMP behavior.

  Bring down the master, upgrade it, and configure it with the same
  explicit_defaults_for_timestamp value used on the slaves, and bring it
  back up.

If this is a production server I would advice to first attempt this on a testing machine. We have had a rather difficult transition from 5.5 to 5.6 and opted to install another machine that was installed with 5.6 and use mysldump to create backups and load them into our databases on that machine. Mind though that this will take a long time if you have a large database (due to the recreation of the innodb transactions files).

A general method:

use mysqldump to create backups of your database (users, trable structure and table data) and of your config file (probably /etc/mysql/my.cnf)
Remove 5.5. After removing 5.5 check that the innodb transactions files are gone (ibdata1, ib_logfile0 and ib_logfile1). As 5.6 uses the better version of transactioning I assume you also would to use this...
Install 5.6
Change the new config file and add in what you changed for 5.5 (mind though the link above and check if any of the changes have become invalid).
Upload your backup into 5.6 (users first). Mind that this can take a bit of time since it will recreate new transaction files.

In commands (after making the backup):

sudo apt-get remove mysql-server
sudo apt-get autoremove
sudo apt-get install mysql-client-5.6 mysql-client-core-5.6
sudo apt-get install mysql-server-5.6


Update available message after installing update

It looks like the culprit is /etc/update-motd.d/91-release-upgrade

This calls /usr/lib/ubuntu-release-upgrader/release-upgrade-motd

This file checks for the file /var/lib/ubuntu-release-upgrader/release-upgrade-available

If that exists, it goes in the motd. If it doesn't, it calls /usr/lib/ubuntu-release-upgrader/check-new-release.

That last command does give the right result, but the file was not removed for some reason. I removed the file and re-ran the commands. The msg-of-the-day wasn't put back.

So the final issue was the 'cache' of 'update needed' wasn't cleared.

I removed this file and it was fixed without breaking anything :)

sudo rm /var/lib/ubuntu-release-upgrader/release-upgrade-available

This was a 12.10 -> 13.04 upgrade. On my other box (12.04 LTS, having the same issue) I had to look in another location:

sudo rm /var/lib/update-notifier/release-upgrade-available


Has "==" and "-eq" changed behavior since early releases of bash:?

If you use a single [ you are using test and not the bash logical operator that requires the double [[.

In both bash and sh (which is dash in Ubuntu) [/test is optimized as a shell builtin but their behavior is not the same, in bash == is a strict equivalent of = but it is not so in dash.

And the shebang of the script you point to is #! /bin/sh so depending on platform it will be bash or dash.


Touchpad freezing, detection issues, 17.10 on Acer Swift 1

I had the same problem and took the following steps. http://www.cogitolingua.net/blog/2017/11/12/acer-swift-1/

apt install xserver-xorg-input-synaptics

for some reason this does not install with xserver-xorg-input-all. It’s presence opens up a bunch of configuration options regarding click behavior, scrolling, palm detection, etc.
Create a script that will cycle the touchpad when it freezes and create global keyboard shortcut to run it. If the touchpad freezes, at least you have a button to get it back.

#!/bin/bash

declare -i ID
ID=`xinput list | grep -Eio '(touchpad|glidepoint)\s*id\=[0-9]{1,2}' | grep -Eo '[0-9]{1,2}'`

xinput disable $ID
sleep 0.1
xinput enable $ID

I spent a day using this setup and must have hit the cycle button at least 50 times. Though it was quick, it got really annoying.
If the touchpad doesn’t come back after using the above script, then you can cycle the responsible kernel module.

sudo modprobe -r hid_multitouch
sudo modprobe hid_multitouch

Once the touchpad didn’t respond after resuming from sleep. So I dug deeper to see if I could virtually unplug and replug it.

Change the bios settings. During bootup press F2 to access the bios, then switch Main > Touchpad from Advanced to Basic.

I have not had to cycle the touchpad (step 2) since changing the bios flag (step 4).


Ubuntu 18.04 can't start nautilus or terminal

As Bernard said in a comment above, the windows were opening on another virtual desktop. Switching to my 3rd virtual desktop with CTRL+ALT+F3 let me uninstall the Chrome Remote Desktop package from the shell sudo apt remove chrome-remote-desktop.

Google may have taken over my machine, but Linux is strong enough to recover when the user can learn to control it :)


USB mouse is not working for Ubuntu 14.04 after updating

In my case, I have solved my problem with this solution :
 https://askubuntu.com/a/743481/332166

    This happens because the power management switches off usb devices in order to save power after a certain period of inactivity. Although there are solutions to solve this manually I recommend to install software called tlp.

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


Kubuntu 13.04 installer crashes on manual partition setup

I had the same error and after not finding a solution I decided to fix it myself. What I did:

open a konsole, become root and go to /usr/lib/ubiquity/ubiquity/frontend/kde_components/

sudo -s
cd /usr/lib/ubiquity/ubiquity/frontend/kde_components

open PartitionModel.py for editing:

nano PartitionModel.py

navigate to line 111 (navigate with pageUp, Down and the cursor keys and check where you are with Ctrl-c; nano is not the easiest). You should find something like this there:

def parent(self, index):
    if not index.isValid():
        return QtCore.QModelIndex()

    childItem = index.internalPointer()
    parentItem = childItem.parent()

    if parentItem == self.rootItem:
        return QtCore.QModelIndex()

    return self.createIndex(parentItem.row(), 0, parentItem)

the line "parentItem = childItem.parent()" should be line 111. Change it to this:

try:
        parentItem = childItem.parent()
except AttributeError:
        parentItem = self.rootItem

now the above method should look like this:

def parent(self, index):
    if not index.isValid():
        return QtCore.QModelIndex()

    childItem = index.internalPointer()
    try:
        parentItem = childItem.parent()
    except AttributeError:
        parentItem = self.rootItem

    if parentItem == self.rootItem:
        return QtCore.QModelIndex()

    return self.createIndex(parentItem.row(), 0, parentItem)

make sure you only use spaces not tabs
restart the installer, and it should now not crash...

Worked for me, YMMV...


what happens if ufw firewall is inactive?

Yes to your first answer, it inactive so all traffic goes through. Then See this excerpt:

  By default, UFW is set to deny all incoming connections and allow all outgoing connections. This means anyone trying to reach your cloud server would not be able to connect, while any application within the server would be able to reach the outside world.

So to answer your question: "That rule will be obeyed or honoured". Let's say the rule is set to allow a particular connection, then based on the default ufw rule to deny incoming connections, only that connection will go through... This ufw default settings is most useful for limiting access on a "need to" basis.

Source: https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-with-ufw-on-ubuntu-16-04


How to enable Root Login when installing Ubuntu 16.04.3

I've get one, install and use preseed file, config like  this could work, any else?

d-i passwd/root-login boolean true
d-i passwd/root-password password root


Yes you can do it. To do this we have tool named as gcalcli .
by typing as gcalcli editor you can have a calender which is editable.

Look at its manpage for more information : gcalcli-manpage

If its not installed , to install it type as sudo apt-get install gcalcli in your terminal and then you can install & use it.

to give  more understanding on usage I have found one good link which can help you.

google-calender-howto and this link have everything for you.


bash prompt chenged itself to a plain "#"

I'm guessing there is a problem with your user's .bashrc file.

Try copying the default .bashrc file into your home directory:

cp /etc/skel/.bashrc ~/.bashrc

After copying the file, restart your computer.


How to make a DNS server on Ubuntu server VM that accesible from hosts

Exposing a VM to your network requires Port Forwarding and NAT. In this case, over port 53/TCP using your system's firewall (iptables on Linux in most cases, On windows, you can use netsh to the same effect).

For your VM to be able to reach the internet, your hypervisor (VMBox) sets this up in one direction for you so that your VM's can share your internet connection, but for outside hosts to reach the VM, you must manually configure it the other way, or set up a bridge which will dedicate an entire interface to the VM. This is much easier to set up, but does not allow connection sharing and fully exposes your VM as though it were a real machine on your network, not just a DNS server.

NAT stands for Network Address Translation. It means that your host (physical machine) will recieve network packets, the firewall will scan them and determine whether or not they are destined to another network your host has access to (the "virtual" network your VM is connected to), and rather than allowing a direct connection to be established it will "stand in" for the outside host and use its own IP address, acting as a "middle-man". This allows you to filter down what connections can be made with hosts on an internal network, in this case ensuring that only DNS requests over the correct port reach the DNS server.

On the VM itself, you'll also need to edit its own firewall to ensure it is accepting connections on the desired port. Ubuntu has UFW (Uncomplicated FireWall), but for a simple operation like opening a port you can just run
iptables -I INPUT 1 -j ACCEPT -p tcp --dport 53
(just make sure you save your rules or they won't persist through a reboot).


error while loading shared libraries; cannot open shared object file: No such file or directory

Creating a symbolic link to /usr/lib/libfreetype.so.6 should not be applied if the error was thrown by a 32-bit application on a 64-bit Linux distribution. The library could be left 'broken'.

What you want on a 64-bit system is to install the necessary 32-bit dependencies around your 32-bit application, so that it will be able to detect and use the already existing libfreetype.so.6. This differs per application, but commonly missing are these:

sudo apt-get install libgtk2.0-0:i386 libidn11:i386 libglu1-mesa:i386

And these may possibly fix the problem too:

sudo apt-get install libpangox-1.0-0:i386 libpangoxft-1.0-0:i386

Regards,
Albert Kok


Ubuntu Apache2 DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot

The command

source /etc/apache2/envvars

sorted my problem out (after trying ALL the others).

To check whether all is well or not use the command

apache2 -S

I found that was quicker than using my DNS records.


Installing boost on 12.04- have ran "sudo apt-get install libboost-all-dev"- now what?

Boost header files are in /usr/include/boost.

When you install libboost-all-dev, a number of other specific packages are installed as dependencies.

These packages' also provide libraries and headers through an indirect mechanism. They declare packages with version numbers in their names as dependencies, and those packages are the ones that actually contain the library binaries and header files.

For example, libboost-dev is one of the packages installed as a dependency of libboost-all-dev.

libboost-dev declares just one package as a dependency. In 12.04, this package is libboost1.46-dev

libboost1.46-dev has dependencies too but its main purpose is to provide files directly. You can see these in its file list.

Boost header files have a .hpp extension. (Note that just .h is common for most other C++ libraries.) Many .hpp files are listed in libboost1.46 -dev's file list:

/usr/include/boost/accumulators/accumulators.hpp
/usr/include/boost/accumulators/accumulators_fwd.hpp
/usr/include/boost/accumulators/framework/accumulator_base.hpp
/usr/include/boost/accumulators/framework/accumulator_concept.hpp
  ....
/usr/include/boost/algorithm/minmax.hpp
/usr/include/boost/algorithm/minmax_element.hpp
/usr/include/boost/algorithm/string.hpp
/usr/include/boost/algorithm/string/case_conv.hpp
  ....
/usr/include/boost/aligned_storage.hpp
/usr/include/boost/any.hpp
/usr/include/boost/archive/add_facet.hpp
/usr/include/boost/archive/archive_exception.hpp
/usr/include/boost/archive/basic_archive.hpp
  ....

...and so forth.

You'll notice all those files are inside /usr/include/boost.

To find this information, I used packages.ubuntu.com, the online Ubuntu packages database.

People interested in finding specific information about what files are provided by Boost packages in their Ubuntu release, what packages provide them, and where they will be located on disk once installed can find that there.

Or, to get you started, here's a query that shows the libboost-all-dev package entries for all currently supported Ubuntu releases (and several others).

I got that by searching under Search package directories, changing Distribution to "any," and using libboost-all-dev as the search keyword.


Videos hang / freeze for a few seconds on Ubuntu 18.04

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


run a command when a specific folder is empty

This is not a 100% answer to your question, but...
There is a utility called inotifywait (sudo apt-get install inotify-tools) which allows you to listen for events on given files or directories. In the default mode, it listens for events on a given file or directory, and will exit when something is changed / read / deleted / etc. Definitely check man inotifywait for all the options.
I use inotifywait in some of my scripts inside a loop:

inotifywait <your dir>
Check if directory is empty, and run your command if it is
back to 1.

I think getting this to work 100% accurately is rather tricky, as there is a chance for race conditions going from step 3 to 1. But I thought I'd post this anyway, as it just might work for your situation.


Automatically recover previous state after reboot

Ubuntu 16.04 Guest Session

As others have pointed out the guest session available in Ubuntu 16.04 LTS may do what you need. The guest session has the following characteristics:

Does not have any password. Anyone can log into the guest session.
Guest cannot save any files in the computer (saving to attached USB drive is OK).
Guest cannot do anything that requires sudo such as install or uninstall any software.
Guest cannot view or access in any way the system folders and home
folders of standard users.
Any changes the guest makes to the desktop, such as change wallpaper,
add or remove shortcuts, etc. will be reverted back to original state
when the guest logs out and a new guest logs in.

Warning: Ubuntu 16.10 and above have the guest account disabled by default because of a systemd security bug that allows the guest to get into the home directory of any other users. See Guest session stopped working on Ubuntu versions later than 16.04 for more details.

How to modify Ubuntu 16.04 Guest Session

As an administrator you may want to change the guest session look and feel. For example:

You may want to remove Firefox from the launcher and put the Chrome
there. (You will have to install Chrome using the administrator
account first).
You may want to stop the backup software pop up and tell the guest to
back up things. (The guest can't use backup anyway.)

Follow these steps to make such changes:

Log on to the administrator account, the account you created when you installed Ubuntu and where you can use sudo and:

and open a terminal by pressing Ctrl+Alt+T and create the directory /etc/guest-session/skel

sudo mkdir -p  /etc/guest-session/skel

Do not close the terminal yet.
While logged to the administrator account, start a guest session. You will need to switch between the guest and administrator account later.
Make any changes to the guest session that you want using whatever
tools/utilities you wish
Wait for Backup setup to show up. Click on don’t show again. This will stop it from showing up every time a guest logs in.

Do not log out the guest session!

Switch back to admin account.
Using the open terminal, find the temporary guest home directory. It will look like guest-XXXXX, where XXXXX is a random bunch of numbers and letters. These change every time a new guest session is created.

ls /tmp/guest*
Copy the files in the temporary guest home directory to
/etc/guest-session/skel using the command:

sudo cp -rT /tmp/guest-XXXXX /etc/guest-session/skel

This will save all the changes you have made to the current guest session.
Log out of the guest session and login again to the guest session to verify the new guest session starts with all the changes you just made.

To make more changes, repeat steps 2-7 as necessary.

Source:  http://ubuntuforums.org/showthread.php?t=2152804&p=12687863#post12687863

Hope this helps


Execute these commands one by one in Terminal (Crtl+Alt+T) :

sudo apt-get install -f

sudo apt-get update

sudo apt-get upgrade

sudo apt-get dist-upgrade

sudo apt-get autoremove


Sluggish HD movies on Lenova Y550 with Geforce 240M

I'm not sure what video player you are using, but I'd recommend using VLC as it includes it's own codecs, and therefore handles just about any video format.

You can install VLC by going into Ubuntu Software Center, searching for VLC, then click Install.

Alternatively you can make sure you've installed all the correct codecs by going into a terminal window and typing:

sudo apt-get install gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ffmpeg


Error 'not supported' in Ubuntu Software Install when installing Zoom on Ubuntu 20.04.1 LTS

Try to install the GDebi tool and install the .deb file with it. It's the "original" GUI tool to install .deb files. For me, Ubuntu Software almost always failed to install offline .deb files.
Edit: I just noted that Ubuntu Software does not find GDebi by name. So you have to install it via terminal: apt-get install gdebi
The general description of it from apt show gdebi is:

Description: simple tool to view and install deb files - GNOME GUI
gdebi lets you install local deb packages resolving and installing
its dependencies. apt does the same, but only for remote (http, ftp)
located packages.
The package is also scanned via lintian before the install and its
possible to inspect the control and data members of the packages.
This package contains the graphical user interface.


Unity indicators slowly disappear after suspending laptop on dual monitor configuration

The same behaviour as described by you occurs when running the traditional notification area with white-listed icons.

That problem is already known as Bug 750481, I attached your probem to that report.


Changing the dark overlay background on the Activity- and Apps-overview screens, as well as behind dialog boxes (Gnome 3)

Answer compat:
Ubuntu 20.04.1,
gnome-shell version: 3.36.4
display server: X.Org Server
The dark background with a radial gradient comes from gnome shell UI's lightbox.js.
https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/gnome-3-36/js/ui/lightbox.js
There seem to be 3 approaches:

via parameters (?)
via js code override, utilizing "gresource overlays"
via css, through creating a custom gnome-shell theme

Via parameters supplied to gnome-shell UI's lightbox.js
I don't know much about this. I haven't found anything relevant in dconf-editor, plus two out of the three interesting parameters seemed to be hardcoded to me. So I went for the code.
Via overriding gnome-shell UI's lighbox.js code
Changing lighbox.js behavior impacts not only the Activity- and Apps-overview screens, but other dialogs too, such as: Run a Command, Authentication required, Power off, and more.
On Ubuntu 20.04, the file is normally packaged up inside /usr/lib/gnome-shell/libgnome-shell.so.
To override it, one needs to extract a copy of it, and ask Gnome to use this copy.
Create this directory structure, and cd there in a terminal:
~/.gnome-shell-custom-overlays/ui/

# You should be here:
~/.gnome-shell-custom-overlays/ui$

While in this directory, do the following:
# Make a copy of the resource:
cp /usr/lib/gnome-shell/libgnome-shell.so .

# To see all of its contents:
gresource list libgnome-shell.so

# To obtain lightbox.js:
gresource extract libgnome-shell.so /org/gnome/shell/ui/lightbox.js > lightbox.js

# If the extraction was successful, our copy of the resource can
# (probably should?) be removed.
rm libgnome-shell.so

Edit the lightbox.js file; change the three variables near the top, as follows:
// Old:
//var DEFAULT_FADE_FACTOR = 0.4;
//var VIGNETTE_BRIGHTNESS = 0.5;
//var VIGNETTE_SHARPNESS = 0.7;

// New:
var DEFAULT_FADE_FACTOR = 0.1;
var VIGNETTE_BRIGHTNESS = 0.8;
var VIGNETTE_SHARPNESS = 0.2;

Now we need to tell Gnome about our modified file. Put the following line into ~/.profile:
export G_RESOURCE_OVERLAYS="/org/gnome/shell=$HOME/.gnome-shell-custom-overlays"

The term "overlays" here doesn't refer to the lightbox overlay; rather, it suggests how this Gnome/GTK resource overriding feature works.
Important note: before I did all this, I already had the libgtk-3-dev package installed on my system. It's for development / debugging, just like the resource overlays feature seems to be so. Therefore right now I cannot determine whether respecting the G_RESOURCE_OVERLAYS environment variable depends on the presence of this package or not... Just in case be ready to install it...
Anyhow: for the changes to take effect, log out and log back in.
Further tweaking
To see the effect of further tweaks on the lightbox parameters, reloading the Gnome shell after each edit is necessary. It can be done by issuing the r command through the Run command dialog (revealed by Alt+F2).
Interesting: In my experience, when one saves the lightbox.js file with a syntax error within, the Run command dialog doesn't seem to appear any more. But it may be "there", just not "visible". In such case, proceed as if it was there: fix the syntax and save the file, hit Alt+F2, then r, then Enter.
Further important considerations regarding the resources overlay feature's potential impact on system stability are discussed in this answer.
References / literature:

Credit to Superuser Q/A
Gnome devs' reference
Gnome cookbook on Arch wiki

Via CSS (gnome-shell custom theme)
If you managed to override lightbox.js, then this part can offer just a few more adjustments to polish the experience a bit further.
If you did not override lightbox.js however, then this part can offer an additional workaround with limited usefulness for the Activity- and Apps overview screens.
(Also, the following was my original answer to the problem, before I could put my hand on the javascript override above.)
Using custom Gnome shell themes
The Gnome Tweaks app, as well as a Gnome shell extension, "User Themes" (part of the gnome-shell-extensions package, available via apt install), are needed for this.
sudo apt install gnome-tweaks gnome-shell-extensions

Open the Tweaks app, and enable the "User Themes" extension on the "Extensions" tab.
Creating a custom Gnome shell theme
This part is not proven to be the best method; it's just that I found this way.
Create the following directory structure:
~/.themes/my-gnome-shell-theme/gnome-shell/

copy this file (the default Yaru theme's shell theme implementation):
/usr/share/gnome-shell/theme/Yaru/gnome-shell-theme.gresource

into this newly created directory, so you end up with this:
~/.themes/my-gnome-shell-theme/gnome-shell/gnome-shell-theme.gresource

Opening this directory in the terminal, gresource list gnome-shell-theme.gresource reveals the contents of this newly copied file.
A custom-made script can help extracting all the contents.
The script's contents could be something like this, or better (I'm not a bash scripting expert) (I already know that people don't like backticks any more):
#!/bin/bash

currentdir=$(pwd);

# For regular themes:
# gresource_name="gtk.gresource"
# For shell themes:
gresource_name="gnome-shell-theme.gresource"

for resource in `gresource list ${currentdir}/${gresource_name}`;
do
    echo $resource
    filename=`basename ${resource}`
    gresource extract $currentdir/$gresource_name $resource > $currentdir/$filename
done

Note: this custom script does not reproduce the directory structure prescribed within the .gresource file; instead, it places the files in the target (current) directory in a flat fashion. However, it prints the definition of each resource it encounters, complete with its originally intended/defined path. While it does not seem to be always necessary, in some cases (e.g. when broken icons or widget backgrounds are encountered) it might be worth considering to rearrange the files into a directory structure according to what the definitions suggest. Note, that I left the original .gresource file in the directory.
Alternative extractor script: more such scripts can be found by searching for the string "do gresource extract" either on this site or elsewhere on the internet.
Having run the extractor script, and then quickly securing a backup of the original file,
cp gnome-shell.css gnome-shell.css.bak

the extracted gnome-shell.css file is ready for editing.
gnome-shell developer tool
It's called Looking Glass. It can be activated by issuing the lg command through the Run command dialog (revealed by Alt+F2).
CSS tweaks
Below changes worked best for my drab desktop background color; but with some color tweaks it may be useful for any case.
CSS works in such ways that definitions made towards the end of a file can override definitions written earlier in the same file. That's why it's not necessary to scatter edits all over the file; just appending the right thing at the very end does the job. That's what I appended to gnome-shell.css:
/* Activity-Overview-related */

/* Covers up the dark lightbox overlay with a lighter semi-opaque tone.
   This may be needed only if lightbox.js is not overridden. */

/*
#overview {
    background-color: rgba(210,202,194,0.6);
}
*/

.search-section-content {
    /* This has text on it; for eligibility, keep it more opaque. */
    background-color: rgba(29, 29, 29, 0.5);
}
.workspace-thumbnails {
    /* Plain background area, may be pretty transparent. */
    background-color: rgba(29, 29, 29, 0.25);
}

/* A less harsh workspace-switcher popup. */

.workspace-switcher-container {
    background-color: rgba(100, 96, 92, 0.45);
    border-radius: 10px;
}
.ws-switcher-active-up,
.ws-switcher-active-down,
.ws-switcher-active-left,
.ws-switcher-active-right {
    background-color: rgba(215, 86, 41, 0.8);
    border: 1px solid #cc4414;
    border-radius: 5px;
    color: #ffffff; }

/* Misc. */

.switcher-list, .osd-window, .resize-popup {
    /* A bit softer Alt+Tab popup.
     * This has text on it; for eligibility, keep it more opaque. */
    background-color: rgba(100, 96, 92, 0.85);
}

Enabling the custom theme
In the Tweaks app's "Appearance" tab, in the "Themes" section, there's a field labeld "Shell". The new custom theme should be available in the select widget. Remember, for this widget to be active, the "User themes" Gnome shell extension needs to be enabled.
Making CSS modifications to take effect
Method 1: Issuing the r command through the Run command dialog (revealed by Alt+F2) reloads the shell; it should also pick up the new CSS changes.
Method 2: Switching back and forth between the default and custom shell themes seemed to go more smooth and graceful in comparison to Method 1. The theme-switching can be achieved on the Tweaks app's UI, or via gsettings on the cli, as follows:
# For resetting to default, the argument can apparently be either
# an empty string: '' or: default.
gsettings set org.gnome.shell.extensions.user-theme name ''

# The custom theme's name is the name of its directory in ~/.themes/
gsettings set org.gnome.shell.extensions.user-theme name my-gnome-shell-theme

Recovery from a messed up custom theme
If needed, it's possible to switch back to the default theme by executing the above gsettings set command in a virtual console (e.g. Ctrl+Alt+F3) (without the need to start a graphical session).


How do I get a Samsung SCX 5737FW printer working?

Installing the Samsung Unified Linux Driver v3.00.xx Directly
This gives all instructions on installation.

http://www.bchemnet.com/suldr/smfpv3.html


Where are proxy settings stored in Ubuntu 12.10?

The idea of having a command like gsettings is that it doesn't matter where or how the settings are stored. Even if the actual location should change, gsettings will tell you the values. So have your program do something like

gsettings get org.gnome.system.proxy mode

and you're fine.


How do I change the window theme using bash?

You can use the gsettings command to change the theme now. This would be the functional equivalent to your command:

gsettings set org.gnome.desktop.wm.preferences theme Adwaita


Problems installing Ubuntu 64 bit dual boot with windows 8.1

while rebooting press F2. Then see if UEFI is enabled. Ubuntu does not install on your system with that enabled. Whilst Windows-8 requires UEFI.


Resolving:
Added this:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash amdgpu.dpm=0"

to: /etc/default/grub


I found this happened after deleting a massive number of files in Nautilus and sending them to the Trash bin. I couldn't dig further or find another explanation. I stopped having that behaviour to avoid crashes.


The easiest way is to start Ubuntu in recovery mode (akin to "Safe Mode" of Windows). Then do what you want — modify the configuration files back to the defaults and/or recover your files. Alternatively, if that doesn't work, you can start the Live CD instead of starting Ubuntu in recovery mode.


create link to folder thats useable with ftp

For ssh and ftp there are different security concepts. SSH uses the permissions of the user logged in. Thus via SSH a remote user can access all files the user can access locally on the machine.

Via FTP however, the access is restricted by folder. Thus you cannot / should not leave the directory through a link, else one could create a link to a file "whereever" on your computer via ftp and access it.

If you need file transfer I encourage you to use scp instead of ftp to copy files. Its fairly easy to use and more secure! E.g. you can use filezilla ftp client also with sftp (means ssh / scp)


Installed Precise on XP SP3 machine in a separate partition, on Reboot system boots directly to XP, Why? How do I fix this?

You probably just need to change the boot order in your bios menu. If you installed the Ubuntu bootloader on the second HDD and your computer boots from the first partition , first, it will come across Windows before it comes across the bootloader, meaning it will not give you the opportunity to choose. You should set it to boot from your second HDD first, which should lead you to the bootloader, which will give you your choice of OS. (Next time set the boot to your primary partition(: )


Remove Mac OS X entirely and install Ubuntu

There are two ways of installing Ubuntu on a Mac.

Legacy Boot - Use the Mac variant of Ubuntu which you can download from here.

Install rEFInd before you install Ubuntu. Now, create a partition for Ubuntu using either Disk Utility or GParted and install normally. When you reboot after the installation finishes, rEFInd will load and give you an option to select either OS X or Ubuntu.

This is the easier method and is convenient if you are dual booting.

EFI Boot - Use the normal variant of Ubuntu.

This method is slightly tough because you will have to delete the grub partition created by the Ubuntu installer (on a FAT partition) and install grub on an HFS partition, failing which your mac will not boot. However, this method works better if you want to completely replace OS X with Ubuntu.

Refer to my earlier post for steps to the EFI Boot method.


Copy large number of files of specific date to another directory?

Your selection finds all files newer than Feb 26. So you have to exclude the files modified after Feb 26:

find . -type f -newermt 'Feb 26' ! -newermt 'Feb 27' -exec cp {} 26Feb_UE_HISTORY/ \;


Drivers for TP-LINK TL-WN725N Nano USB Wireless N adapter

Even I had same problem and fixed it. Try the code below one by one in terminal having the adapter connected. You can see changes in terminal after each code.

sudo apt-get update
sudo apt-get install linux-headers-$(uname -r) build-essential git
git clone https://github.com/lwfinger/rtl8188eu
cd rtl8188eu
make all
sudo make install
sudo insmod 8188eu.ko

After this restart your system. You can find the network list. Hope this helps.

(More instructions in the package git.)


Ubuntu budgie 19.10 does not boot on battery power in Dell Precision 7740

I have the same issue on Ubuntu 18.04 pre-installed by manufacturer (as you mentioned).
Also I have a black screen after hibernate, on battery only again. I tried Ctrl+Alt+F1/F2 but nothing appended even after login and reboot blindly.

I also have a Nvidia GPU. This page show a configuration certified pre-install for Ubuntu, without Nvidia GPU. So I supposed the issue may comes from it.

I will notice if I find a solution...

Update : I solved it looking at here.

  Adding kernel parameters solves the issue. Posting solution:

  in /etc/default/grub add dis_ucode_ldr in this way

  GRUB_CMDLINE_LINUX_DEFAULT="quiet splash dis_ucode_ldr"

  then

  sudo update-grub

It solved both the boot and hibernate issues for me ! Hope it will help you too.

Update2: The grub menu is not visible (purple screen) but waiting or pressing enter do the job to boot on ubuntu.


Copy text between two different sessions of terminal for different users?

Install xclip (if not installed already) then from user 1's session save the text you want to copy as a file (e.g. test.txt) and then run the following:

cat test.txt | xclip -selection c

This will copy the text to the clipboard. Now from User 2's session you can just paste the text into vim by any usual method like <CTL>+<SHIFT>+v.


Is there pastebin software for Ubuntu 14.04?

You can try to set up Stikked:

  Stikked is an Open-Source PHP Pastebin, with the aim of keeping a
  simple and easy to use user interface.

  Stikked allows you to easily share code with anyone you wish.

The project seems to be actively maintained on GitHub.


What are the minimum System Requirements for 12.04 LTS on a 2GB environment

I wouldn't expect the lag to get better by upgrading to 12.04, although some recent changes in the kernel did improve the performance. I also would not expect it to get worse, though.
I have recently installed 12.04 on a few computers going further back than the core era of processors and generally only had 1G ram. I haven't had problems and it wasn't particularly slow (definitely way faster than an XP install on the same hardware).


Are you sure it's a system problem? Maybe a router problem. Can you access the WAN from other devices using the same LAN, or have you tried a ping to any website?

I suppose you've already tried but just in case, you could simply restart the router.


https://askubuntu.com/a/1074876/1013762
Basically, if ls -la /usr/bin/python shows a python2 version:
sudo rm -f /usr/bin/python
sudo ln -s /usr/bin/python2.7 /usr/bin/python

Good luck!


Right solution the next:

just replace 'bind_address' in couch db configuration with '0.0.0.0'.


Tool to convert accented characters to HTML entities?

Recode can convert to HTML entities:

$ echo "é" | recode ..html
&eacute;

There are a few slightly different HTML transformations available in recode; see info recode HTML.

If you want to recode a file or some files, you can use

$ recode ..html one_file another_file and so on

For recursive action, use the find command, e.g.

$ find your_directory -type f -name "*.html"

The above find command will only show the files. Please make sure that you have found only the right files, not any binaries and not any files in unwanted directories. It is also a good idea to make a backup or use a copy of your files, not the real files. If you have found the correct find command, append -exec your_command {} +, where your_command is the recode ..html from above and the {} denotes the file(s) which are given by find to recode:

$ find your_directory -type f -name "*.html" -exec recode ..html {} +

But wait a moment, there's one big caveat: recode ..html assumes that your input files are in the same character set (encoding) that you are using on the command line. If all of your files use the "modern" UTF-8, it will work fine, because Ubuntu used UTF-8 from the standard. But if some of your files use the older ISO-8859-1 or other charsets, it will be a lot more complicated.


Why does my TP link adapter disconnects from the AP when I change the mac address of wlan1

Don't quote me on this, but the router recognises your device using the mac address. If you change this, your router won't be able to send packets to your device. As for it changing back, maybe some setting for Mac address is on auto.


(initramfs) Unable to find a medium containing a live file system

My PC has built in graphics, but I had been using an external graphics card.

The installation was successful when I used the onboard GPU (without the external graphics card plugged in).


Ubuntu 20.04 LTS mouse and keyboard not working on login screen

I had the same problem and I tried several things, and finally, this is what worked for me:
First, you need to enter into recovery mode:

Enter the grub menu by rebooting and then pressing esc if you boot using UEFI or shift if you boot using BIOS. You may have to press the key multiple times or hold the key down.

When you see the menu, use the arrow keys to navigate and select Advanced options for Ubuntu.

Select the line containing the latest version of the kernel but with (recovery mode) at the end and press enter.

After you entered recovery mode you will see the Recovery Menu. Navigate to the line containing root Drop to root shell prompt. Press enter and then when you see a prompt press Enter for maintenance press enter again.

Run the following commands:

sudo apt-get update --fix-missing
sudo apt-get upgrade -y
sudo apt-get install -y xserver-xorg-input-all

Finally to restart run the command sudo reboot.

When the login page appears, your mouse and keyboard should work normally.


There are probably thousands of companies and organizations that donate time, money, and code to Ubuntu/Debian and various software. Of course the big one is Canonical.


Why does Google Chrome not close completely?

You have to set in the settings

'Settings' > 'Advanced' > Under 'System' untick "Continue running background apps when Google Chrome is closed"

Help page here

I think there is something else you may have to disable, search for "Background" in settings to see if there is anything.


unable to extract jdk7 in parent directory

Open a new terminal and find the file:

sudo updatedb && locate -b jdk-7u79-linux-x64

it will return the full path, for example:

/home/zanna/Downloads/jdk-7u79-linux-x64.tar.gz
               ^

Whatever the parent directory of the file is, you need to cd there. In my example, it is /home/zanna/Downloads also known as ~/Downloads so I would do

cd Downloads

(or cd ~/Downloads or cd /home/zanna/Downloads)

Now you can untar, but you need to use -C not -c to specify the output directory (-c is create an archive). You must also specify a directory that exists so create the directory first (you will get a harmless error if it already exists)

sudo mkdir /opt/jdk
sudo tar zxf jdk-7u79-linux-x64 -C /opt/jdk


Try this

http://johny65corp.blogspot.mx/2011/11/arreglar-suspenderhibernar-en-ubuntu.html

That works for me, try it

This is a more direct link to the fix:
http://thecodecentral.com/2011/01/18/fix-ubuntu-10-10-suspendhibernate-not-working-bug


How to activate a gnome terminal profile from the commandline?

This answer works but introduces bugs. But here is a better solution

# install
sudo apt install xdotool
# activate third profile
xdotool key --clearmodifiers Shift+F10 r 3

This simulates the keypresses of opening the profile selection menu and choosing an entry. The options to choose numerate from 1 to 9 and then from A to Z.
I'm not entirely happy with this solution because it seems like there should be a way to do this that is more builtin (less hacky) to the gnome terminal.
Source is this other answer I just found.
Here's the explanation for why we use --clearmodifiers:

Any command taking the --clearmodifiers flag will attempt to clear any active input
modifiers during the command and restore them afterwards.
For example, if you were to run this command:
 xdotool key a
The result would be 'a' or 'A' depending on whether or not you were holding the shift key
on your keyboard. Often it is undesirable to have any modifiers active, so you can tell
xdotool to clear any active modifiers.
man page

This means for a random color each time the terminal is opened, you can add to ~/.bashrc
# random color profile
profiles=('0' '1' '2' '3' '4' '5' '6' '7' '8' '9' 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'u' 'v')
random=$$$(date +%s)
xdotool key --clearmodifiers Shift+F10 r ${profiles[$random % ${#profiles[@]}]}

This causes slight lag before the color change though, which is noticeable. It also causes the complete OS to become unusable at times - not even alt tab working anymore. I think that is related to this open issue


After PIP install --upgrade Dpkg still lists old python packages

It is not the same if you use dpkg instead of pip. The first is a package manager for Debian based systems and provides means to handle packages and install packages from the repositories made by package teams. PIP handles Python only packages and installs them from the cheese shop PyPI.

The two methods differ to the versions which they install with PIP always installing the newest package version.

One method to list all installed packages is to install and use yolk: sudo pip install yolk and then issue yolk -l to list all packages.

Other methods are mentioned at the following SE question:

https://stackoverflow.com/q/739993/307826

Also these two questions talk about the difference of apt-get - pip for installing Python packages:

https://stackoverflow.com/q/6874527/307826
easy_install/pip or apt-get


Installing Windows alongside Ubuntu on last partition

Windows (usually) don't install on a HDD with other OS than Windows
Does your Windows installer have a utility to choose a partition? Some of them don't.
If it does, there's a big chance of recognizing your disc as broken since you have a partition of filesystem other than NTFS, FAT and FAT32.

But if you're not going to reinstall Windows (you can simply move it), it should be relatively safe. Well... Safe if you're good at reseting registry and rewriting boot sector. This is how: http://ubuntuforums.org/showthread.php?t=916146
If you're not, Windows recovery disc may save you.


Install xdotool : sudo apt-get install xdotool
Go to system connections -> keyboard -> shortcuts -> custom
Create new shortcut, binding bash -c "xdotool getactivewindow key End" command to some key combination


Looks like Discord is installed as a Flatpak on your system, and not natively through your package manager, thus apt and it's cow powers have no jurisdiction here. (run apt moo to help understand reference)

To simply remove:  flatpak uninstall com.discordapp.Discord
To remove Discord and it's related data (configs, etc.):  flatpak uninstall --delete-data com.discordapp.Discord


How to install Mac buttons and scrollbars on 12.10?

Try typing following command in terminal:

gsettings set com.canonical.desktop.interface scrollbar-mode normal

It should fix scrollbars to the normal mode.

Anyway, I think you won't get MacOS-like scrollbars and buttons, because it looks like they are not included in theme from noobslab (if you are using this theme).


If I install Ubuntu 10.10 over 10.04, will all my programs be erased?

If you install over it, yes they will.  If you upgrade, your programs should stay installed and keep on working if everything goes smoothly.


I think the compiz grid plugin does exactly that ... you can access it through the CCSM interface

If you do not have it then go to the software center and search for ccsm ( it will be the first one; starting with "Advanced")

Open it when/if installed and go to the "grid" plugin; insert wanted parameters to your choice.

Hope it works for you!

btw, CCSM stands for "Compiz Config Settings Manager"


The [1]+  Done ... part of your output seems to come from Bash's job control. You usually get it when a command that you have started in background terminates, like this:

$ sleep 1 &
[1] 20931

$
[1]+  Done                    sleep 1

One solution to suppress these job control outputs is to launch the background command in a subshell, by enclosing it in parentheses:

$ ( sleep 1 &)

$

I can't tell whether this is appropriate in your situation, because you haven't shown your actual commands yet and this approach comes with a few disadvantages:

The job can't be controlled any more (e.g. jobs, bg, fg commands), but as it runs from a startup script, I assume that wouldn't be intended anyway.
If the command were modifying its environment (e.g. setting variables or changing the working directory), that would only affect the subshell then and no longer the rest of the script.

Another way is to make the shell forget about the job after it started using disown, like:

$ sleep 1 & disown
[1] 27248

$

That way however, it will also no longer terminate when the shell exits, so it might keep running past the user logout, if I understood this right (correct me if not).

Sources and further reading:

Running bash commands in the background without printing job and process ids
Is there a way to make bash job control quiet?
How to /dev/null background processes “informational” output?
How to suppress exit code of finished background jobs