Start Up Terminal With Command; Then Go To Bash Shell

You have to make the launcher using this:

gksudo "gnome-terminal --execute bash -c 'apt-get "update"; bash'"

Edit after definition of not opening terminal as root (to leave it in unelevated privileges after running the command:

gnome-terminal --execute bash -c "sudo apt-get 'update';bash"

This way, the terminal will open, ask for password (if needed) and continue.

Obs: if your command doesn't need sudo, just remove it from the command. I used gksudo on the first answer because your example was using it so I thought it was needed for the whole process (and leaving the terminal in elevated privileges).

Both launcher will work but 1st one will ask password with in GUI and run the whole process as sudo leaving the terminal open in "sudo mode" and 2nd launcher will open terminal, ask for password there, run command as sudo and leave terminal in "user mode".

You can edit sudo (with visudo) to make it use sudo without password (and maybe restrict this user to run only a few command if not only this one) but this is not the most recommended thing to do.

If you can give more info about what you are trying to do, maybe there is a different way to do it? (can be better... or worse... of course :) )


Stupidly moved a .pdf file to /dev/sda1 and Ubuntu crashed

You have essentially destroyed whatever file system was on /dev/sda1. What was it? Ext? Btrfs? Was it root or boot partition? May be you could try to boot from USB stick to fix the filesystem with fsck. Anyway, we need info about partition to provide you with exact commands.
EDIT: After a bit of thinking: even if you would repair the file system, you will still be missing some crucial system files most likely. In short, you should better reinstall Ubuntu. It will take less time than finding out what is missing and where to get it.


Problem in Graphics with my new Ubuntu system

Have you tried using gksudo nvidia-settings to make your changes? You might also want to look at the Binary Driver Howto.


Ubuntu Installation : Ubuntu does not show up

Turn off the Fastboot option in windows 10 under Settings>Power options> and try to reinstall grub with the ubuntu disc or USB you used to install it.


How To Install Unbuntu Along Windows Sharing 2 Hard Drives

So I managed to do what I wanted. Unbuntu installed itself on the 2TB HDD. From inside windows I shrunk the windows partition to 200GB on the SSD. Then I deleted the 2TB partition from the unbuntu installer. Then I installed unbuntu on the 300GB cleared from the SSD. Then I went into windows and used diskmgmt.msc to claim the HDD for windows.
But now the new install of Linux has been really buggy.


Chinese instead of Japanese character in firefox

Adding Japanese as Preferred Language in the Firefox settings
resolved the problem.
Thanks to a tip in https://community.wanikani.com/t/two-different-versions-of-%E7%9B%B4/46339


Grub chainloader doesn't work with Windows 8

menuentry "Windows 8 (loader) (on /dev/sda2)" --class windows8 --class os {
        insmod ntfs
        set root='(hdo,2)'
        search --no-floppy --fs-uuid --set 5e32cd5e32cd3bb1
        drivemap -s (hD0) ${root}
        chainloader +1
}


Cannot find Dash in Lubuntu... first time user

According to a web page, you can autostart programs in Lubuntu 16.04 this way:

Go to the menu button → Preferences → Default applications for LXSession
Click Autostart
Click Add
Type in the command to run
Click Add again


Can the dd command be used to copy clone only certain folders?

You can use dd (or better ddrescue which tries to read data several times before it fails) only on files or similar file-like objects. On UNIX systems, a file-like object can be for example a partition (e.g. /dev/sda1), an entire disk (e.g. /dev/sda), a virtual character device (e.g. /dev/zero or /dev/random) or the input/output streams (e.g. STDIN, STDOUT and STDERR).

Directories are also represented by file descriptors in your file system tree, but are not counted as file-like objects in the case of dd because they can't be read as single object.

So using dd (or ddrescue) only works either on single real files that have to be located on a mounted and working file system, or on an entire disk or partition which it would then copy rawly no matter what file system it is formatted with and whether it is mounted and working or not.

To conclude: No, you can't dd a folder.


Errors in updating/configuring amdgpu-pro driver on Ubuntu 16.04 for RX 480

Is your card actually working with the driver? Try lspci -k and look for your card in the output (mine is usually at 01:00.0) and shows this output 01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480] (rev c7). Importantly you should also see this in the output in the same section 'kernel driver in use: amdgpu'

Also check OpenGL is using your card glxinfo | grep -i opengl. I'm re-installing my system at the moment so I don't have the exact output but you should see something along the line of OpenGL version 4.5 core profile and Gallium 0.4 on AMD something something

Anyway I had that same error message previously from apt The repository 'file:/var/opt/amdgpu-pro ./ Release' does not have a Release file. but it didn't stop my card from working correctly. I think a line gets added into your sources.list for apt so you could google to see how to remove entries from that file.


How can I prevent unwanted double key actions?

A partial solution to my problem is to install the program touchpad-indicator. This can be done like this:

sudo add-apt-repository ppa:atareao/atareao
sudo apt-get update
sudo apt-get install touchpad-indicator

The installed program can be started from a command line using this command:

/usr/bin/touchpad-indicator

After it has been started, a small symbol shows up among the indicators (notification area for Bluetooth, WLAN, SplitScreen and the like).

Clicking on that one can choose whether the touchpad shall be deactivated while a real mouse is connected to the computer (I moved this switch to the left position which is ON), one ca further select for when touchpad-indicator starts or ends, whether the touchpad shall be left as it is enabled, disabled. I switched them both on “enabled”.

Then there is an option which I enabled in order to have the touchpad disabled for a given time (preset to 800 ms) after each keystroke. This is the setting for my computer if no mouse is attached to it and it works well.

On the second tab one can determine whether touchpad-indicator is started automatically with additional options whether to show a message that this has happened.

When I tried touchpad-indicator first I found out that it resolves 80% of my typing related issues, so I made an autostart entry for it by hand. Later after some searching I only found a Spanish instruction of use for the program at https://www.atareao.es/aplicacion/touchpad-indicator-para-ubuntu/ and only then I looked at the second tab which would have saved me some manual work. There is an excellent translation tool at https://www.deepl.com/en/translator and only later I read about the possibility to set touchpad-indicator for an automatic autostart without having to go through system functions, editing files and the like.

What is left: Occasionally I do not touch the key I mean exactly in the middle, but also slide the adjacent key. Its signal comes a few ms later and actually I want to suppress such keystrokes which appear within a predetermined time after their predecessor.

xfce4-accessibility-settings would be the right place for that, but the minimum times which can be set there are far too big for my purpose. They are meant for really handicapped people and for those one needs Slow keys and Bounce keys intervals in the settable range. If the lower bounds for them would be lowered to say 10 ms, my preferred setting of say 20 ms would be in that range and my other keyboard-related problem would also be solved.


How to create a user that can login via SSH, but can't use shell commands?

You can create a new, small, "shell" (I used quotes because is not a real shell) as follow:

As root, create a new file in /bin directory, let say fakesh.
Add the following code inside /bin/fakesh file:

#!/bin/bash
echo -n "$ "
while read cmd ; do
    if [ "$cmd" = "exit" ]; then break; fi
    if [ "$cmd" != "" ]; then echo "The only one available command is: exit"; fi
    echo -n "$ "
done

Save the file and make it executable for everyone:

chmod +x /bin/fakesh

After these, just set /bin/fakesh as the default shell for your user. The user will be available to login his account via ssh, but he will not be able to execute any command except for exit.


Run programs that require a window manager, on the CLI

You can install the xvfb package, and use xvfb-run /usr/bin/program to run that program under a virtual X framebuffer session. You won't have any UI to poke at if you need to, though.


How can I configure DansGuardian to filter https traffic?

HTTPS provides an encrypted channel from end to end (S in HTTPS is for SSL; Secure Sockets Layer). So no, there's no way to inspect the contents of anything over an HTTPS connection. That's the whole purpose of it in the first place!


For processes to be up and running all the time

Put the script in /etc/init or read cookbook section about enabling user jobs: http://upstart.ubuntu.com/cookbook/#id96


Is there a way to open DRM protected books?

I hate to answer my own question but I found a couple of solutions. The first was to download "Adobe Digital Editions" using the "Play on Linux" Wine program. The Adobe website wont let you download it directly but it will let you download the "Windows Installer" if you click on having trouble downloading the program. It was almost automatic using the "Play on Linux" version from the developers website plus it has a step by step tutorial on how to use it for people that are afraid of "Wine," like me. The second solution is to go to https://read.amazon.com/ it's an on-line version of "kindle" that will allow you to read DRM protected books and it has an off-line reading mode included, it basically turns your browser into a "kindle," the only drawback to this solution is that you have to purchase the book from Amazon.


I don't believe it's possible to tell what files are in the SSD cache.  I ran the hybrid drive at a previous job on Win7 and I know it did make a difference in boot time.  Supposedly the drive firmware is supposed to figure out what files are most frequently used and/or used to boot and put them in cache.  It would be quite a destructive experiment but I wonder if a full format would clean out the cache?


Joomla Configuration File writing issue with Ubuntu 16.04 and nginx

The NGINX web server runs as the user www-data and the group www-data by default on Ubuntu systems.  (So does Apache2 but that's not necessarily relevant to this question)  And the default configuration of PHP also has such setup to use the www-data user/group as well.

The typical way to set up your website 'directory' and files is to set the user ownership to root (or your own user), and the group ownership to www-data and provide the www-data group with read/write.

We can do this with only a few commands:

Change user/group ownership for all files and folders to root:www-data.

sudo chown -R root:www-data /var/www/websitecom.com/html

Set proper permissions for directories and folders.

Folders: 775 (rwxrwxr-x) - allow owner access and group members read/write access to folders, and allow 'other users' to traverse the directory tree

sudo find /var/www/websitecom.com/html -type d -exec chmod 775 {} \;`

Files: 660 (rw-rw----) - allow owner access and group members read/write access to files, disallow all other users access to the files themselves.

sudo find /var/www/websitecom.com/html -type f -exec chmod 660 {} \;`

Set the setgid bit on the directories.  This way, when files are created by either root or the web server, the 'group' ownership of new files will remain www-data.

sudo find /var/www/websitecom.com/html -type d -exec chmod g+s {} \;

Make sure the docroot actually has the proper permissions.

sudo chmod 770 /var/www/websitecom.com/html
sudo chmod g+s /var/www/websitecom.com/html

Now, your webserver should be able to write to the new configuration file.


How do I reset gnome-open/xdg-open to actually open with my preferred browser?

There are several ways to control what browser will open links, and a given application can also choose to prefer a different method, apart from the usual conventions.

If you are clicking on an html file from the desktop or from within Nautilus, you can control how the browser will open it by right-clicking on the HTML document and choosing properties.

From the command line, try sudo update-alternatives --config x-www-browser .
This uses Debian's alternatives system.   It will present you with a list of reasonable options from which you can choose to select.

To see what is available to the alternatives system, you will use the --list argument on the target component.  For example:

% update-alternatives --list x-www-browser
    /usr/bin/chromium-browser
    /usr/bin/epiphany-browser
    /usr/bin/firefox
    /usr/bin/firefox-4.0
    /usr/bin/google-chrome
    /usr/bin/midori

This can be different from the Gnome 'Preferred Applications' setting.  Another potential source of conflict exists if you have the BROWSER environment variable set.   You can see if you have anything defined for it by typing env | grep BROWSER .

It appears that xdg-open and gnome-open don't follow the settings in the alternatives list.  sensible-browser (which can be also launched via the command-line or from a script) does, but xdg-open and gnome-open should already be looking at the choice you made in 'Preferred Application.'   (This should be the same GUI you get when running gnome-default-applications-properties.)


I can't upgrade from Ubuntu11.10 to 12.04

Try upgrading using a Live CD or USB.  You can use unetbootin UnetBootin to install it on a USB.  It's usually a good idea to do a clean install when upgrading.


bulk/batch convert mp4 and m4v files to webm via command line?

Yes, with ffmpeg and bash this is not only possible, but very easy.

Here is the command for variable bit-rate conversion for .mp4 -> .webm:

ffmpeg -i input.mp4 -c:v libvpx -b:v 1M -c:a libvorbis output.webm

You can then use the command in a bash script to batch covert your files. Here is an example of how you could do that:

#!/bin/bash

for FILE in *.mp4 ; do
    OUTNAME=`basename "$FILE" .mp4`.webm
    ffmpeg -i $FILE -c:v libvpx -b:v 1M -c:a libvorbis $OUTNAME
done

Keep in mind that depending on your computer, this may take a very long time.

And of course, this can be done for the m4v files as well. I won't guarantee everything will work since I don't have ffmpeg installed on this machine to test it, so you may need to modify the script and/or the conversion settings to suit your needs.

Documentation for the webm encoder can be found here: http://trac.ffmpeg.org/wiki/vpxEncodingGuide


Changing hostname without restart via cloud-init isn't working correctly

I actually discovered after a lot of tinkering and researching that what I am seeing is the intended behavior, although it is different from what I am used to on CentOS/RHEL systems.

To summarize this from here:

  CentOS & RHEL deployment guide
  say the hostname should be the FQDN; Debian specifies
  the hostname should NOT be the FQDN.

  The kernel maintains the system hostname.
  This file should contain only the system hostname,
  not a fully qualified domain name.

I'm fine with it this way (sure makes shell prompts shorter!) I just wanted to make sure I wasn't doing something wrong.


Is there a way to downgrade Ubuntu without losing any files?

Downgrading is very tricky and it is very un-recommended. However if you insist, you can follow the guide from Ubuntu community page:

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


How to change system background color 16.04

Unix is not Window but you can get more themes. And hopefully, find one that meets your needs.

The Themes Collection by NoobsLab PPA has an interesting selection of themes for all currently supported versions of Ubuntu up to 16.04. To add this PPA to your software sources open the terminal and run the following commands:

sudo add-apt-repository ppa:noobslab/themes
sudo apt-get update
Then you can install popular themes from the Ubuntu Software Center, like MBuntu, which resembles Mac OS X Yosemite, Numix and several other themes.

Hope that helps.


Keyboard shortcut to "Show Applications"

What you're describing is a standard behaviour.

Pressing Super brings up the "Activities" overview (same as clicking "Activities" in the top-left). Pressing Super again brings you back to the desktop.
Pressing Super+A brings up the applications list (same as clicking "Show Applications" icon in the Ubuntu dock).
But pressing Super+A again or pressing Escape won't take you back to the desktop, it takes you to the Activities overview instead (standard behaviour from GNOME shell). Press only Super when you have the applications list open to get back to your desktop.


ModuleNotFoundError: No module named 'pyautogui' in all IDEs no matter what I try

https://pyautogui.readthedocs.io/en/latest/install.html#linux
suggests
python3 -m pip install pyautogui

but have you tried
pip3 install pyautogui

it might help.
I would not recommend removing python2 as Ubuntu still needs it to patch itself.
The difficulty is in setting up the right environment to separate whatever it is you want to do with pyautogui from other functional parts of the system.
That's where package management systems like anaconda really excel.
https://docs.anaconda.com/anaconda/install/linux/


Lenovo G505, Windows 8 pre-installed; are my reasons for switching over to Ubuntu "reasonable"?

It is not possible to give a clear recommendation, but I can comment on your tasks and you can decide based on it:

@1 This works equally good on Windows and Ubuntu, no real reason to chose one over the other for this task.

@2 This is also possible on both operation systems. No real reason to chose one over the other.

@3 I personally really prefer to develop in Linux, but this is also something you can do perfectly fine in both operation systems.

@4 Works fine on both operation systems, but personally I think this is preferred to do on Linux rather than Windows.

@5 I have not used Matlab for a long time and never on Linux, but for what I hear this application works way better on Windows than on any Linux distro.

In regard to performance, Ubuntu will often perform slightly better than Windows, but for most cases this in not something most people will notice.

The openness of Linux is a huge plus for anyone who likes technology.

To sum up my thoughts: If Matlab is an imporatant part of your day - consider sticking to Windows. Otherwise go for Ubuntu.


Ubuntu 18.04 drains battery very fast after wake up from a deep sleep

Short answer: It turned out to be a problem somewhere between kernel 4.15 and the touchpad.

Disabling the touchpad solved the problem:

sudo rmmod hid_multitouch

This is an acceptable workaround for me, since most of the time I use an external mouse. In rare cases, when I don't have a mouse at hand, I solve the problem by disabling + enabling the touchpad after waking up:

sudo rmmod hid_multitouch
sudo modprobe hid_multitouch

EDIT March 2020: Some time ago, I've realized that a moment of using the touchpad, after resuming the laptop also solves the problem.

Long answer

The top command showed a low overall CPU usage (below 8%), but surprisingly the following command:

watch -n1 "cat /proc/cpuinfo | grep \"^[c]pu MHz\""

revealed that all CPU cores were running at the highest frequency (~3.8 GHz)!, while I was expecting to see the lowest possible frequency (0.8 GHz) due to the idle state. The sudo powertop has proven that the high power consumption indeed was coming from the CPU.

So I came back to the results of the top command, watched it closely, and one process looked suspicious: irq/51-SYNA2393:

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
21874 root      20   0       0      0      0 I   2.0  0.0   0:03.18 kworker/0:0
    1 root      20   0  225780   9392   6472 S   1.0  0.0   0:21.78 systemd
  513 root     -51   0       0      0      0 D   5.3  0.0   1:00.15 irq/51-SYNA2393
 2673 greg      20   0 4569240 205392  73916 S   1.0  0.6   1:54.94 gnome-shell
 ...

The dmesg | grep SYNA output:

[148428.423272] input: SYNA2393:00 06CB:7A13 Touchpad (...)
[148428.423893] hid-multitouch 0018:06CB:7A13.0001: input,hidraw1: I2C HID v1.00 Mouse [SYNA2393:00 06CB:7A13] on i2c-SYNA2393:00

revealed that IRQ 51 comes from the laptop touchpad. That's how I found the culprit.

To be honest, I'm not sure it it's a bug inside Linux kernel, or simply my touchpad is not top-notch supported. When I'll try a newer Ubuntu version with newer kernel I'll update this post.


Setting up NAT for internet access on a connected router

You also need to tell the machine that's acting as a router to forward the packages it receives and configure the default gateway, use this command:

sudo sysctl net/ipv4/ip_forward=1

To add a default gateway, also add:

sudo route add -net default gw X.X.X.X

Where X.X.X.X is the IP of your wireless router.


Turns out it was just an issue with the Razer mouse, once unplugged and uninstalled everything functioned correctly.


Screen: Cannot exec '/path/to/file': Permission denied

As Android Dev said in comments, you must set execution properties for your file, by chmod +x path-to-file or by chmod 777 path-to-file.


How to fix compilation errors that mention "stray ‘\342’" and "stray ‘\200’"?

The problem is that you have Unicode quotation marks instead of ASCII quotation marks; probably your editor automatically changed them, or you copied the text from a site that does this automatically in its authoring software. Replace the quotes with normal ASCII quote (0x22, ") and it should work.

Fixed source:

#include <stdio.h>
int main()
{
    printf("Hello World\n");
    return 0;
}


The error says it so

failed to write (No space left on device)
No apport report written because the error message indicates a disk full error

Check your free space on your main partition, please. Probably you don't have enough space in your partition.
You may simply type df -h to terminal to find out.


How do I execute a program with default variables?

You could execute your command in an empty environment:

env -i _xterm

A quick test harness:

$ export TMUX=3
$ bash -c 'echo $TMUX'
3
$ env -i bash -c 'echo $TMUX'
# nothing echos

Preserving $DISPLAY, $USER, etc:

$ env -i bash -c 'echo $DISPLAY'
# nothing
$ env -i DISPLAY=$DISPLAY bash -c 'echo $DISPLAY'
:0

Or you could explicitly exclude just some variables with the env -u option:

$ export TMUX=3
$ env -u TMUX bash -c 'echo $TMUX'
# nothing


How do I add unallocated space to my distro?

You need to boot with Ubuntu or Lubuntu LiveUSB and do it from there.

After you boot from LiveUSB first disable swap by right-clicking it in gparted or run

sudo swapoff -a

in terminal.

Then extend sda2 left, then extend sda6 left.

You will also need to update grub, because the starting point ot the boot partition will change. Run in terminal.

sudo mount /dev/sda6 /mnt
sudo chroot /mnt
sudo grub-install /dev/sda
exit

Then you will be able to boot normally.


How to edit files in a terminal with nano?

Ctrl + G will let you read the help. nano can do some pretty nice things so you might want to pootle around in there for a bit.
When you see ^G (et al) it means Ctrl + G. In the help pages, M-H means Alt + H.
How can I open text files for editing?
This is the default in nano. Open and file and you're set to start editing:
nano filename

Note: you won't be able to save unless you have write permissions for that file.
How can I save the file?
F3 will let you save without exiting. Otherwise, Ctrl + X will prompt you if you've made changes. Press Y when it asks, and Enter to confirm the filename.
How can I quit the editor without saving the changes?
Ctrl + X, then N when it asks if you want to save.
How to edit? I heard that you've to enter some commands to begin editing in vi, is this true for nano too?
As above, no. nano is simple. It drops you in edit mode as soon as it opens. You can use arrow keys, Page Up / Page Down and Home / End as in gedit. You cannot use the mouse for moving the cursor position.
Sometimes, if I manage to open a file, the text is unreadable due to its colors. How can I disable these colors?
Colours are loaded through the nanorc framework. These are files that are loaded when nano loads which basically spell out the syntax highlighting. To toggle syntax highlighting, press Alt + Y. To disable it permanently for certain file types, edit /etc/nanorc and put a hash mark (#) before include "/usr/share/nano/*.nanorc".
In the some files, lines are truncated because those do not fit in the screen. How can I prevent that from happening?
Well I've been trying to find something but the best I could see was enabling soft-line-wrap with the funky key-combination of: Alt + $ (Alt + Shift + 4).
To enable soft line wrapping by default, add the below line to ~/.nanorc:
set softwrap

More information about this configuration file can be found at man nanorc.


How to add current date or current time stamp to a manual useradd script?

Try

echo "$1:x:50$int:50$int:$(date +%s):/home/$1:/bin/bash"

Enclosing a command in $() will return its output


Move a webservice (Matomo) to a new server

I'd get everything setup configuration wise. Get a good backup of your database stuff. Migrate all your files over and change any configurations for anything IP related as needed. You may also have to check the version differences between your environmental in case you need to tweak additional settings.


Since nobody has x permission, nobody except root can traverse the directory www to access any file inside... See "Accessing files in a directory without x-permission" on this board.


Installed Ubuntu on USB stick and my boot options are scrambled

Grub has its own boot record which can be put to MBR (master boot record) or to the boot record on some partition that is in turn set active, with fdisk, for example.

One possible configuration is to put grub into SSD drive MBR and create grub menu that has 2 positions:

your Windows
your Ubuntu on USB stick

Alternatively you can leave SSD MBR intact and put grub to the MBR of the stick with just one option of booting Ubuntu from the stick. Than you can just boot Windows or press F12 and select the stick from BIOS boot menu to boot Ubuntu.

Refer to the grub docs for more details.


How much space does extended partition take to store logical partition table?

It takes almost next to nothing, a few bytes, a single 512 byte sector, but only because a sector is the smallest unit.

However it's a linked list so there is one such structure before each logical partition.

In conjunction with partition alignment to MiB boundaries which is common nowadays, you may end up with 1 MiB gaps between partitions, which seems to be your case.

As for unallocated / usable gaps, parted will show them (but not the alignment gaps).

# parted /dev/loop0 unit s print free
Model: Loopback device (loopback)
Disk /dev/loop0: 976773168s
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start       End         Size        Type      File system  Flags
        63s         2045s       1983s                 Free Space
 1      2046s       976771071s  976769026s  extended               lba
 5      2048s       39999487s   39997440s   logical
 6      40001536s   42000383s   1998848s    logical
 7      42002432s   62001151s   19998720s   logical
 8      62003200s   78002175s   15998976s   logical
 9      78004224s   976771071s  898766848s  logical
        976771072s  976773167s  2096s                 Free Space

You could probably make 1 and 9 larger by 2048s (1MiB) but it's probably not worth the effort and leaving 1 MiB free between partitions and at the beginning and end of the disk does not have to be a bad thing.


Grsync is meant as a GUI to rsync. You can use it also very easily to "compose" The command, to use on startup (e.g. if you are unsure how to create the rsync command):

in Grsync, choose source and destination, as well as your options:

Choose "File" > "Command line":

A window will popup with the command you are looking for:

Copy the command you created in Grsync and add it to your startup applications:

rsync -r -t -s /home/jacob/Dropbox /media/jacob/'My Passport'

Add to Startup Applications: Dash > Startup Applications > Add

Notes

After login, you might have to wait a number of seconds for the (external?) drives to be mounted. If so, you can do that as in the command below:

/bin/bash -c "sleep 10&&rsync -r -t /home/jacob/Dropbox /media/jacob/'My Passport'"

If you'd like to log your backups, simply add to you command:

>> /path/to/logfile 2>&1

so the command would be for example:

/bin/bash -c "sleep 10&&rsync -r -t /home/jacob/Dropbox /media/jacob/'My Passport' >> /home/jacob/Bureaublad/log.txt 2>&1"

If your command includes names with spaces (in the directory), place those names between quotes. From the example: My Passport should be: 'My Passport'


Why are 'source' and '.' not always the same, when they're supposed to be identical?

They are exactly the same, as explained in man bash:

.  filename [arguments]
source filename [arguments]
    Read and execute commands from filename in the current shell
    environment and return the exit status of the last command executed
    from filename.  If filename does not contain a slash, file names in
    PATH are used to find the directory containing filename.  The file
    searched for in PATH need not be executable.  When bash is not in
    posix mode, the current directory is searched if no file is found in
    PATH.  If the sourcepath option to the shopt builtin command is turned
    off, the PATH is not searched.  If any argu‐ ments are supplied, they
    become the positional parameters when filename is executed.  Otherwise
    the positional parameters are unchanged.  The return status is the
    status of the last command exited within the script (0 if no commands
    are executed), and false if filename is not found or cannot be read.

The issue here is that source is a bash thing, the standard is actually .. Your .profile is only read by login shells and by some (not all) login managers. However, login managers (such as lightdm) will attempt to read (source) the file using the system's default shell, normally /bin/sh. On Debian-derived systems, /bin/sh is a symlink to /bin/dash and dash is a very simple, POSIX-compliant shell that is not bash and has no knowledge of the source keyword.

Therefore, the command is ignored, the file is not sourced and the variable is not defined. To illustrate:

$ cat foo
myvar='foo1'
$ source foo
$ echo $myvar
foo1

The same thing in dash:

$ echo $0
dash
$ source foo
dash: 11: source: not found
$ . ~/foo  ## dash needs the full path
$ echo $myvar
foo1


Merge partition with partition on the left

As oldfred pointed out:

You have to use live installer. You cannot modify mounted partitions & little key icon says it is mounted. I do not like moving left as any interruption power failure, impatient user, etc totally corrupts it. So have good backups. I prefer to have smaller system partitions like 25GB and larger /home or data partition(s). I use a data partition, but newer users find setting up /home easier. Question #743095


Try fprint from the fprintd package.  That worked on my Upek fingerprint sensor.  But you will still need to type in a password to decrypt anything in your keyring, for use in things like email, so the fingerprint sensor may not be as useful as you'd like.


Typing `unity` in terminal crashes current session

The reason it crashes is because that command will try to start a new unity session but you're already running one. An easy workaround would be to add these lines to your ~/.bashrc:

unity(){
    read -p "Launch a new unity session? [y/n] " re
    if [ $re = "y" ]; then /usr/bin/unity; fi
}

Now, when you run unity you will be asked whether you actually want to launch a new unity session and, unless you answer y, nothing will happen. Alternatively, you can choose whether to run unity or unity3D:

unity(){
    read -p "Launch a new unity session? [y/n] " re
    if [ $re = "y" ]; then
        /usr/bin/unity;
    else
        unity3d
    fi
}


Grub2 is not being installed within installation of Ubuntun 14.04.3 and Win 10 set before

Look , if you installed Ubuntu using UEFI boot configuration then you can easily change the boot config to start Ubuntu from your BIOS configuration menu :

set the first EFI boot priority to :

Ubuntu boot manager

Save & Exit

then u can boot up you Ubuntu

and when you're done and have access to your terminal you can install grub using this command :

sudo grub-install /dev/sdX  # Example: sudo grub-install /dev/sda

and don't forget to update grub

sudo update-grub

Source :

Ubuntu Official help content

the above didn't work out you can try to fix boot using your installation disk/usb after booting into your installation media to "Try Ubuntu before installing" you can use  :

Boot-Repair

installation :

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

Source:

Ofiicial Ubuntu Boot-Repair

at last if none of the above works you can use a software :

  EasyBCD

for Windows ..
you can modify windows' boot manager very easily and you can add ubuntu to it but you'll get to your ubuntu using Windows' boot manager not ubuntu's grub .


error while loading shared libraries: libzip.so.2

You have to install libzip.
Maybe try the command:
sudo apt install libzip4

Also I had to install libcurl to get the program to work.
sudo apt install libcurl3


nfs is blocked by ufw even though ports are opened

I did some more research into this. Ubuntu is using the UFW, which is extremely easy to configure, yet very potent, at least for soho needs. So, the rpc.mountd listens on multiple ports by default thus you have to bind rpc.mountd to one port, then you can add an additional UFW rule to accept incoming connection on that particular port.

To do so, open /etc/default/nfs-kernel-server and comment out the line

RPCMOUNTDOPTS=--manage-gids

and add the following line

RPCMOUNTDOPTS="-p 13025"

13025 is just a randomly selected port, something that is available and isn't already defined in /etc/services.

Restart NFSd with sudo /etc/init.d/nfs-kernel-server restart

Now configure the UFW to accept incoming connections on port 13025, 2049 and port 111.

ufw allow from 192.168.1.0/24 to any port 111
ufw allow from 192.168.1.0/24 to any port 2049
ufw allow from 192.168.1.0/24 to any port 13025

That's it. You should now be able to mount your exports form another machine. :-)


Okay, after tinkering and looking around, I found this article on how to, and I figured out that this computer had a 32 bit uefi and 64 bit os capabilities.

So after reloading ubuntu onto the usb, I installed using safe graphics mode, and went into the kernel and changed the default ubuntu to nomodeset, so it always boots correctly and can work without a usb and disabling grub using this. I can now now turn on and boot without grub and issues so far with windows completely removed from drive partitions.


Linux search for text in files of same name in multiple folders (maxdepth 2) and generate a report file

I just found the solution.

grep -nr -E "legend|assetID|name" /dir/to/the/*/asset.xml > /dir/to/the/ReportFile.txt

The * in the path is the "wildcard" I needed to go through each directory. I think it only goes to that directory and not into any deeper folder...?


Boot from livecd (same version of your distro) and mount (get your sdaX with sudo fdisk -l) then

sudo mount /dev/sdaX /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo mount --bind /etc /mnt/etc
sudo chroot /mnt

don't forget to comment the line that starts with deb cdrom: under /etc/apt/sources.list then

Back up the /var/lib/dpkg/status file
Open original file and clean only the content after Depends: (all lines) use a editor like vscode
Then sudo apt-get update && sudo apt-get -y upgrade

This will force all packages upgrade they dependencies and fixed hdaudio hdaudioCOD3: unable to bind the codec


How to compensate for an unstable wifi connection in Ubuntu? (Many lost packets and timeouts)

It's possible that the dropouts are due to the NIC invoking power saving. The first thing to try in order to stabilise your connection is to turn off power saving. In a terminal:
sudo sed -i 's/3/2/' /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf

The above will change the default power saving mode for your WIFI adapter. To revert the change, just swap the positions of 3/2.


Alternative of Microsoft silverlight on ubuntu

install pipelight instead:

sudo add-apt-repository ppa:pipelight/stable
sudo apt-get update
sudo apt-get install pipelight
sudo pipelight-plugin --update
sudo pipelight-plugin --enable silverlight


Ubuntu Quickly: How do I set a button to launch a specific Ubuntu Application

Had to boot up Ubuntu in a VM for this one, I don't use Unity ;)

You can set up custom keybinds by opening the launcher (top left-hand button) and going to "Keyboard." From there you can go to the "Shortcuts" tab and create a custom shortcut. Name it whatever you wish, but make the command "hardinfo" (no quotes). After that's completed, click the right-hand side of the line that was just added to set your keystroke.


How to quietly install LDAP on Ubuntu client

You need to set the debconf frontend to noninteractive:

 sudo DEBIAN_FRONTEND=noninteractive apt-get install -qq libpam-ldap


It seems that you are owner a device with chip ath9k: http://wireless.kernel.org/en/users/Drivers/ath9k

There are several ways to handle the problem, for example turning off a hardware encryption:

http://www.emmolution.org/?p=253


how to install language-selector-gnome correctly in Ubuntu

Version 0.129.3 is the current version in trusty-updates, while 0.129 is the version in trusty-release. This makes me believe that you previously had trusty-updates enabled, but have disabled it for some reason.

So to fix it, open Software & Updates, select the Updates tab, and enable trusty-updates. Then close the window and click the Reload button. After that you should be able to install language-selector-gnome 0.129.3.


Is there a way to use multi-finger gesture controls using a multi-touch touchpad?

synclient is a application for the command line to control synaptics touchpad driver There used to be a gui-program to called Synaptics or so, where you could control regions and sensitivity for the touchpad. In gnome settings  and in gnome tweaks there are some settings for the periferial...
You could open a terminal shell and type the command:
   'man 1 synclient'
and see what gives, or
   'synclient --help'


How to invert Ctrl and Cmd on a Macbook Pro keyboard?

I found out a workaround. The solution is to use the xmodmap utility and make it load a personal file with the correct mapping for the keyboard.

Open a terminal and create a new file in your /home folder, lets call it .Xmodmap

nano .Xmodmap

(I use nano as a nice text editor inside the console, you can use Gedit instead, install nano with the command sudo apt-get install nano if you'd like to test it, it's quite obvious to handle.)
Copy/paste the following content to the new file:

clear control
clear mod4

keycode 105 =
keycode 206 =

keycode 133 = Control_L NoSymbol Control_L
keycode 134 = Control_R NoSymbol Control_R
keycode 37 = Super_L NoSymbol Super_L

add control = Control_L
add control = Control_R
add mod4 = Super_L

Make the file executable.

chmod +x .Xmodmap

Test it now with the following command:

xmodmap .Xmodmap

The dash should now appear with Ctrl instead of CMD, hurra!
Now we want the file to be executed each time the system starts up. Open the Startup Applications utility and add a new entry, name it as you want and put the following comand in it:

/user/bin/xmodmap /home/YOURUSERNAME/.Xmodmap

Reboot, it should be ok. If it is not, you should add a .xinitrc file in your /Home folder, and add the command inside it. The .xinitrc file will be read by the system while loading the desktop environment.


Perhaps you have apache2-utils not installed.
Try searching apache-utils in software manager or with command line:

sudo apt-get install apache2-utils


'overlay' not found as a supported filesystem on this host when running dockerd

Please check with this link
https://github.com/moby/moby/issues/33689
if you don't find it helpful then
check with the fresh installation steps(please consider as it is written, you have to add docker repo not docker ubuntu16.04 repo , it had worked for me)

Add gpg key
Add docker repository to the APT sources
Update your system
apt-cache policy docker-ce //install docker repo
output of the above command will give you something like
display of candidate key & version table
sudo apt-get install -y docker-ce
check docker status by sudo systemctl status docker


Why does resolution not fit within display's screen

You may have an overscan/underscan issue with the monitor.  I have the same but it is only slightly off.  To fix I run the following command.  Perhaps you can adapt it to your situation.

nvidia-settings --assign CurrentMetaMode="DVI-D-0: nvidia-auto-select +0+720, HDMI-0: 1360x768 +0+0 {viewportin=1360x768, viewportout=1312x748+25+10, ForceCompositionPipeline = On}"


Once you have installed openstack you don't need to re-run conjure-up.  Conjure-up uses juju to do the install and if you want to add new resources you need to use juju to do it.


Rename root user's home directory in Ubuntu 14.04

Use 'ps' to find out what PID 1794 is.  You can't do this if you're logged in as the user in question.  You could create another user, log in as them, and su to root, or reboot to single-user mode.


Ubuntu 14.10 is ignoring touchpad settings

I was only able to fix this by changing to using the ChromeOS touchpad driver instead of synaptic:

$ sudo add-apt-repository ppa:hugegreenbug/cmt
$ sudo apt-get update
$ sudo apt-get install -y libevdevc libgestures  xf86-input-cmt
$ sudo mv /usr/share/X11/xorg.conf.d/50-synaptics.conf /usr/share/X11/xorg.conf.d/50-synaptics.conf.old
$ sudo cp /usr/share/xf86-input-cmt/50-touchpad-cmt-peppy.conf /usr/share/X11/xorg.conf.d/
$ sudo reboot


Let's try to solve this.

I guess that your vpn server have tunX interface and all vpn client are  connect to this interface.

Set traffic forwarding on server.
This is done either by using

 echo "1" > /proc/sys/net/ipv4/ip_forward

After that

add a rule telling to forward the traffic

sudo iptables -A FORWARD -i tunX -o eth0 -j ACCEPT
sudo iptables -A FORWARD -i eth0 -o tunX -m state --state ESTABLISHED,RELATED -j ACCEPT

Because you router/firewall do not known for network on you vpn lan on interface tunX we must do masquarade for trafic from vpn clents to internet, with ip address from interface eth0

sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

On this way traffic from tunX can go to rest of the network through eth0.


I guess this is how you fix this.

  You can change the locale in /etc/default/locale. You can try setting
  the contents of that file to:

LANG="en_US.UTF-8"
LANGUAGE="en_US"

source

Blog post


I'm getting a typed character every second or so on the console in Server 17.10

I also had this special character typed every second in different tty (ubuntu 17.10 desktop version)

I solved the problem by installing a newer version of the Kernel (4.15).

Sources:

Bug report
Kernel build 4.15
Install Kernel


How to get grub2 to remember last choice?

The documentation in this case is wrong. All variables in /etc/default/grub start with GRUB_, so it's GRUB_DEFAULT=saved, not DEFAULT=saved. I've corrected the Ubuntu wiki to reflect that.

The official grub manual describes this correctly: http://www.gnu.org/software/grub/manual/grub.html#Simple-configuration

Put the following in /etc/default/grub (command line: gedit admin:///etc/default/grub):

GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true

Then run:

sudo update-grub


How can I run a simple text to speech command?

There is a link which will give detailed text to speech command line tools.

http://elinux.org/RPi_Text_to_Speech_%28Speech_Synthesis%29

The first speech package I tried was Festival. It worked fine and produces a voice like a rough sounding robot.

Festival Text to Speech

Install Festival with:

sudo apt-get install festival

Try out Festival with:

echo “Just what do you think you're doing, Dave?” | festival --tts

Espeak Text to Speech
Espeak is a more modern speech synthesis package than Festival. It sounds clearer but does wail a little. If you are making an alien or a RPi witch then it’s the one for you! Seriously it is a good allrounder with great customisation options.

Install Espeak with:

sudo apt-get install espeak

Test Espeak with: English female voice, emphasis on capitals (-k), speaking slowly (-s) using direct text:-

espeak -ven+f3 -k5 -s150 "I've just picked up a fault in the AE35 unit"


Guest os is not going to start on VirtualBox

I'm sorry that this problem is occurring.

Try installing the VirtualBox Kernel Module, if you haven't already. (Google it)

If that hasn't fixed your problem, try some of these webpages

- https://askubuntu.com/questions/581301/virtualbox-stuck-on-starting-virtual-machine?rq=1

 - https://askubuntu.com/questions/675458/ubuntu-freezes-when-starting-virtualbox?rq=1

Hope this helps.


How to add open vscode with GTK_IM_MODULE="xim"

I needed to add export GTK_IM_MODULE="xim" in my /etc/profile. That way I open vscode anywhere and not just depend on an alias in the terminal.

Then you have to run it to take effect using source /etc/profile or . /etc/profile. But in my case even after running the profile and reopening Vscode, it didn't recognize Ctrl+Shift+e. I had to restart the computer.


Ubuntu 20.04 themes and icon are not expected

Try these settings...
In Tweaks... choose a Yaru variant theme... light or dark, depending on your taste... and choose the Adwaita icon theme... choose a different background Desktop image, if you like...

In Appearance settings panel...
Choose a light/standard/dark theme, depending on your taste...


How long does it take to compile a kernel (linux 3.2.5)?

It depends on the hardware especially the CPU. Here is a poll result which might help you to see. But, normally it is between 1-2 hours.


Install dataStax java-driver on ubuntu 15.04

Usually you would add the java driver as a Maven dependency when you build your Cassandra client application.  That would pull in the jar file for the driver and you could package it with your client application as you see fit.

So in your Maven pom.xml you'd add the version you want as a dependency like this:

<dependency>
  <groupId>com.datastax.cassandra</groupId>
  <artifactId>cassandra-driver-core</artifactId>
  <version>2.1.3</version>
  <scope>compile</scope>
</dependency>


Chrome/Chromium makes unity effects laggy,when used with nvidia proprietary driver

disable hardware acceleration

Settings > Advance Settings > System > uncheck the hardware acceleration

2.enable smooth scrolling for screen tear and scrolling lag

Go to: chrome://flags/#smooth-scrolling and Enable it.


Essentially, here's whats going on:

The package linux-image-virtual is for virtual machines. Virtual Machines are traditionally servers.

However, if you installed the linux-image-2.6.35-30 package, it should install the normal Kernel.

Hopefully that answers your question.


How to change font of language using IBus?

That definitely sounds like a bug in either gnome-settings-daemon (which saves settings) or gnome-control-center (which presents the user interface).


Turning off SSL certificate check when adding PPAs

There's no option to disable checking of certificates for add-apt-repository, and the URL is hard-coded. You can change it, but it will be lost the next time python3-software-properties is upgraded. Edit /usr/lib/python3/dist-packages/softwareproperties/ppa.py and change LAUNCHPAD_PPA_API to 'http://launchpad.net/api/1.0/~%s/+archive/%s':

sudo sed -i.bak '/^LAUNCHPAD_PPA_API = /s/https/http/' /usr/lib/python3/dist-packages/softwareproperties/ppa.py

The PPA repository URLs themselves are not be HTTPS. You can fetch the key yourself. So, you can add the PPA manually. For example, for the GNOME3 PPA, expand the section named Technical details about this PPA. You'll see something like this:

The URL seen there is what you actually need. Using it, you can add the repository yourself:

printf "%s http://ppa.launchpad.net/gnome3-team/gnome3/ubuntu $(lsb_release -sc) main\n" deb deb-src |
  sudo tee /etc/apt/sources.list.d/gnome3-ppa.list

Click on the link underneath Signing Key, and you'll be taken to the GPG key for this repo. If the link doesn't work because of a firewall/proxy, etc. (it's on a non-standard port), you can go to http://keyserver.ubuntu.com, and manually search for 0x3B1510FD (0x followed by the key fingerprint), select the public key (aka pub), and copy the text from the begin line to the end. Then do:

sudo apt-key add -

and paste the key. Press Enter and CtrlD to complete adding the key. Done!


How can I turn off the screen of my laptop while using an eGPU?

I found this solution.

Switch to tty1 by hitting Ctrl+Alt+F1
Login
Force the display to turn off, by calling setterm -blank force
Switch back to X by hitting Ctrl+Alt+F7

I will try to write an upstart script to automate this.

Much, much more simpler :

sudo vbetool dpms off


How do I Merge Partitions to use Unused Available HD space in Ubuntu?

There isn't a merge; and anyway, you have sda5 (swap) in between these two. You would have to copy your data from sda6 to sda1, remove sda2-6, expand sda1 & add a new swap partition. Assuming you have space on sda1, otherwise you may need a second (USB?) drive.

That said, it is generally recommended to have at least a 3rd partition for /home as well, so you should end up with /sda1 (system folders), sda2 (user data - /home), & sda3 (swap) with sda2 being the larger.

A backup is obviously a good idea first!

You haven't said how much free space exists, nor if sda5/6 are logical partitions; assuming you have enough room, and that sda1 is not full, and 5/6 are logical (not physical) partitions. This wants doing as a live CD ideally, or you'll need a reboot halfway when your home folder moves:

Run sudo gparted & shrink sda1 to 20G; remove sda5 (swap) & make a new one, the full space between sda2 & sda6; you may be stuck with sda2 if it's in logical partitions. Format this new sda3 to ext4;  quit gparted at this point, mount sda3 & sda6, and copy the contents of sda6 to the new sda3 like this:

shopt -s dotglob; cp sda6/* sda3  - replacing the drives with where they are mounted. This ensures all the hidden files get included.

Then, back to gparted & remove sda6, expand sda3 to max-3Gb, make a new swap partition as sda4, activate it, have sda3 mounted at /home; & you're done.


18.04 - Unable to boot with Athlon 200GE and Ryzen APU after upgrading from 5.1.* to 5.2.* kernel

It seems that graphics off functionality is not working properly (see phoronix forum). Usage of kernel parameter amdgpu.ppfeaturemask=0xffff3fff fixed the issue for me.


If what you're searching for is how to restore your LibreOffice to its original look with the old Toolbar layout, then follow this steps:

Click on the upper left icon of LibreOffice.

A menu will appear, choose the option "Menubar".

With this you can enable the old menu

Go to View --> Toolbar Layout --> Default

After choosing that option, you will recover your old LibreOffice.

Finally, you can press ALT+F12, this will open the "Options" menu, where you can disable the "experimental features".

And reboot.

NOTE: If you're using Groupedbar Full Ribbon Layout, see the image below, it's easier, just move to the left the LibreOffice Window and expand it, then you will see the other buttons:

Hope this helps, good luck!


GRUB Error during update. Syntax errors are detected in generated GRUB config file

Since I was able to access the system despite the error, I didn't have to chroot into it which will be necessary if you cannot boot into the system.
What I did was purge and reinstall grub which did the trick.

The steps I used are as follows:

I confirmed that I had an internet connection with sudo apt-get update   # ***
I purged grub-pc and grub-common with sudo apt-get purge grub-pc grub-common
I read the warning about removing the bootloader, hit TAB to highlight "OK" and pressed ENTER.
I issued the command apt-get install grub-common grub-pc and when prompted I hit TAB to highlight "" and pressed ENTER
When presented with the device option, I used the UP/DN keys to select the correct drive (sdX) NOT a partition.

I made sure the installation drive [] /dev/sdX had an asterisk next to it ( in my case: [] /dev/sda ). If it doesn't, highlight it and press the SPACE bar to select it. Then I hit TAB to highlight "OK" and pressed ENTER

I tested that the installation was complete and working by issuing the command sudo update-grub and everything worked error free as expected.

Sources: https://ubuntuforums.org/showthread.php?t=1581099


Copy/paste and drag&drop not working in VMware machine with Ubuntu

I had the same problem and found that this can be fixed by executing the following commands:

sudo apt-get autoremove open-vm-tools
Install VMware Tools by following the usual method (Virtual Machine
--> Reinstall VMWare Tools)
Reboot the VM
sudo apt-get install open-vm-tools-desktop
Reboot the VM, after the reboot copy/paste and drag/drop will work!


Can't I write 'True' or 'False' in lowercase or sentence case in LibreOffice Calc?

If you want to save arbitrary text in a LibreOffice Calc cell, you should prepend the text with '. Otherwise the text will be considered as a formula and some appropriate conversions will be applied.
Another method would be to first select the cell you want to enter text, then go to Format → Cells... → Numbers and in Category select Text, so that the data you will later enter into the cell will be interpreted as arbitrary text and not as a formula.


The monokrome/docker-wine image is based on Ubuntu and should work.

Dockerfile :

FROM monokrome/wine
ADD ./App.exe /

Note that I've tested it with 64bit executables, not 32bits.


You can try:

sudo dd conv=sync,noerror bs=8k if=/dev/sda6 of=/home/backup-file

Then you can copy backup-file to external drive and later use it to get your saved data.

When later you want do that you would need to mount it, so run:

sudo losetup /dev/loop1 /home/backup-file

sudo mount /dev/loop1 /mnt/backup

If you have not much data to backup with low dispersion over the drives/partitions, if it's all rather in one or a few folders then wouldn't it be easier to save those folders/files straight to the external disk?

You can read more on all of these popular threads.

Installing Ubuntu on a Pre-Installed Windows 8 (64-bit) System (UEFI Supported)
How can I install Windows after I've installed Ubuntu?
Installing Ubuntu 13.10 alongside Windows 8.1
How can I install Ubuntu without removing Windows?
Why don't I have the option ''Install Ubuntu alongside with them''
Ubuntu install and dual Boot with Windows 8 UEFI
Ubuntu 13.10 installer/live fails to boot from DVD/USB on UEFI
Install Ubuntu next to Windows 8 (UEFI dual boot)
Windows 8 removes Grub as default boot manager
Windows 8 deletes GRUB when booting


Windows is not booting any more after resizing "/"

Do sudo update-grub and, if it don't work, edit grub.cfg manually with sudo nano /boot/grub/grub.cfg from a terminal. This last option requires some knowledge. I suggest you to read this basic guide before doing any change.
Always remember to use update-grub after each change, it's very important.Have a nice day.

Edit in response to the comment: you should find the "BEGIN /etc/grub.d/30_os-prober" string in the file. There should be the Windows entry.
Verify that the data there is right:
(it should be like this, except for the last line)

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows NT/2000/XP (su /dev/sda2)' --class windows --class os $menuentry_id_option 'osprober-chain-C2F0E263F0E25D63' {
        insmod part_msdos
        insmod ntfs
        set root='hd0,msdos2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2  C2F0E263F0E25D63
        else
          search --no-floppy --fs-uuid --set=root C2F0E263F0E25D63
        fi
        drivemap -s (hd0) ${root}
        chainloader +1
}
### END /etc/grub.d/30_os-prober ###

No, your data doesn't seems right (from the pastebin):

menuentry 'Windows 7 (loader) (on /dev/sda2)' --class windows --class os $menuentry_id_option 'osprober-chain-909C7C3E9C7C20C0' {
        insmod part_msdos
        insmod ntfs
        set root='hd0,msdos2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2  909C7C3E9C7C20C0
        else
          search --no-floppy --fs-uuid --set=root 909C7C3E9C7C20C0
        fi
        chainloader +1
}

...because Windows should be on sda3 and not on sda2! (see sda3 on bootifoscript.txt)
Try to use this specific software to fix your problem, it should be a better alternative to manual grub.cfg editing in this specific case.
If you still don't solve feel free to write it.


If you deleted the partition that the only OS was on, then it would give you that error, or if you deleted the "boot" partition and did not run update-grub on the main disk. You need to reinstall ubuntu at this point and set the main disk itself as the device for bootloader installation, keeping the /boot partition on the same disk as the system, or create boot on a separate partition and don't touch it unless you are specifically adding files, or are wiping the OS off. It seems, from your post, that you have deleted the main partition the OS was on. If you can get a grub-rescue disk burned and are able to locate and boot into your Ubuntu installation, then simply run "sudo update-grub /dev/sda" and reboot, that is if it was simply an old installation that you deleted, causing grub on the mbr to throw that error. SOrry if I can't offer a particularly useful or specific answer, but you were very vague in describing what partition you deleted


failing to install sagemath on ubuntu 18.04 LTS

The PPA you mentioned does not have packages for 18.04 LTS.

In case of Ubuntu 18.04 LTS Bionic Beaver you do not need any PPA to install SageMath.

You can simply remove the PPA (if added before):

sudo apt-add-repository -r ppa:aims/sagemath

and then install sagemath from repository:

sudo apt-get install sagemath


Ubuntu 16.04 Display Setting while Ubuntu 18.4 scalling is missing, Where is the Scalling?

Ubuntu switched from the Unity desktop to the Gnome Shell Desktop. Scaling works differently in Gnome Desktop than it did in Unity.

You can set overall scaling, but only by integers (i.e. 100%, 200%) in Settings - Displays
You can further adjust font scaling after installing Gnome Tweaks by changing "Scaling factor" on the Fonts tab.


how to add lxc containers to host's DNS so that getaddrinfo() can resolve them?

The following works on 12.04 with the 3.11 kernel.  On the host, add this to /etc/resolvconf/resolv.conf.d/head:

nameserver 10.0.3.1

and then run this on the host to update your /etc/resolv.conf:

sudo resolvconf -u

After that, remove this from the container's /etc/resolvconf/resolv.conf.d/original:

nameserver 127.0.0.1

and then run this in the container to update its /etc/resolv.conf:

sudo resolvconf -u


How can I make an Ubuntu recovery image on external media?

Remastersys is the tool to go for. It allows you to make an ISO image of your system including if you want your data. You can than create a bootable USB stick. My last experience was that the live usb/cd didnt work, but installation worked. In conclusion a perfect toll for your needs and or if you want to transfer a system to a friends computer.


Double Desktop icons after installing DESKTOP ICONS NG (DING)

Duplicate desktop icons are because you have both the standard system desktop-icons extension and the DING extension installed at the same time. You need to uninstall this...
sudo apt purge gnome-shell-extension-desktop-icons
With X11, you may have to restart gnome-shell with ALT+F2 (or ALT+FN+F2), then "r", then ENTER. Or reboot (or logout/login) if you're running Wayland.


Unable to connect through Java programs in Ubuntu

Method1 First try to ping destination host , if host is ping-able it means client and server machine are in network.

Method2 Try connecting to server host and port using telnet. If you are able to connect means something is wrong with your client code. Also by observing telnet output you will come to know whether server is running or not or server is disconnecting the connection.

If you would like to know more about this error I mean why it is happening and how then please click the following

http://javarevisited.blogspot.com/2013/02/java-net-ConnectException-Connection-refused.html

hope that helps.


USB Boot Drive is not recognized from Windows computers

From your comments above, it looks like you did a complete install of Ubuntu on the 16GB USB drive.

There are two methods to put Ubuntu in an USB. The first is a LiveUSB that is used to install Ubuntu in the hard drive. The second is a full install, where the USB works like a hard drive. See What would be the differences between a persistent USB Live Session and a installed Ubuntu in a USB drive?

A full install on a 16GB USB, formatted the USB drive ext4. This is the format Ubuntu (Linux in general) requires. Ubuntu cannot be installed in NTFS. The ext4 partition where Ubuntu is installed cannot be changed to NTFS. If you do, you will lose all the ownership and permission information Ubuntu needs to work properly. Then Ubuntu won't work.

On the other hand, Windows does not know about ext4 format and thus can't read.

Solutions:

There are third party extensions you can install in Windows to make it read ext4 partition. See 3 ways to access your Linux partition from Windows.

Alternately, recreate the USB drive.

You can create a small (say 512MB) FAT32 partition in the beginning of the USB drive to share some data. This should be the first primary partition partition for Windows to see it. You can leave the rest of the 16GB unallocated for Ubuntu installation to find it. Or you can choose "Something else..." during Ubuntu installation and format the remaining part of the drive ext4 and select mount-point /.

Hope this helps


installed ubuntu 12.04 on a hp 14 chromebook.. there is no ubuntu software center, or browser

It should be

sudo apt-get install software-center

you forgot the "install" in your command


How can I change the wireless pasword from the terminal?

Press Alt+F2, try running gksudo nm-connection-editor. That should allow you to edit and save everything.


apt-get is "Unable to locate package [package-name]" after upgrade to 15.04

Just remove the content of /var/lib/apt/lists directory:

sudo rm /var/lib/apt/lists/*

then try to run again :

sudo apt-get update


sporadically i get kernel panics Ubuntu 14.04 64 bit on my samsung

This is a protection mechanism that kicks in, see links below. Either something evil is going on or some software is broken, check the logs if it always happens when using the same program.

Also verify if the processor in your laptop is suitable for NX at all.

Relevant: http://en.wikipedia.org/wiki/NX_bit
http://en.wikipedia.org/wiki/Executable_space_protection


Ubuntu 14.04

You're getting the unmet dependencies error message because you're trying to install the wrong package for Ubuntu 14.04. The correct package to install for Ubuntu 14.04 is ibus-avro-trusty. The complete instructions for installing ibus-avro-trusty in Ubuntu 14.04:

sudo add-apt-repository "deb http://download.opensuse.org/repositories/home:/sarimkhan/xUbuntu_14.04/ ./"
wget -q http://download.opensuse.org/repositories/home:/sarimkhan/xUbuntu_14.04/Release.key -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get install ibus-avro-trusty

If you get any dependency error, then also run the following command:

sudo apt-get install -fy

Ubuntu 16.04 and later

wget "https://github.com/ugcoder/avro/releases/download/v2.0/avro_2.0-1_all.deb"
sudo apt install ./avro_2.0-1_all.deb

If you get any dependency error, then also run the following command:

sudo apt install -fy


If you used the default install paths that come with apt-get install samba then go open the config file

sudo nano /etc/samba/smb.conf

And look for the line

  server role = active directory domain controller

Make sure that "active" is correctly spelled in this file, then restart the samba services

sudo service smbd restart
sudo service nmbd restart
sudo service winbindd restart

That should fix your issue


All files gone in 16.04 after adding write privileges to home

It seems you have deleted something from your encrypted filesystem. Don't panic. Load Ubuntu from Live USB. Mount partition where your encrypted home directory reside (from Nautilus for example). Assume the home directory mounted to /media/ubuntu/myHome. Then try in terminal:

ecryptfs-unwrap-passphrase /media/ubuntu/myHome/.ecryptfs/toby/.ecryptfs/wrapped-passphrase

You'll be asked for your user password and then you'll see your encryption real passphrase - copy and save it to a text file. Next run:

sudo ecryptfs-add-passphrase --fnek

Enter you passphrase obtained from previous command. You'll see two lines with Inserted auth tok with sig with something in square brackets like this [7897fd8789g7dfg] - copy and save it to text file. We'll need second of keys in square brackets. Next make directory:

sudo mkdir /media/ubuntu/decryptedHome

and run

sudo mount -t ecryptfs /media/ubuntu/myHome/.ecryptfs/toby/.Private/ /media/ubuntu/decryptedHome/

You'll be asked for some questions - allow default answers except file names decryption - allow file names encrypted and when you'll be asked for files names passphrase enter second key from square brackets [].

If everything was OK you have to find your home directory files in /media/ubuntu/decryptedHome/ directory.


Klarmobile SurfStick - XS Stick W14 Networkmanager

How I got it working for me was:

Using this config for wvdial.conf:

[Dialer Defaults]
Phone = *99#
Username = "klarmobil"
Password = "klarmobil"
Stupid Mode = on
Dial Command = ATDT
Modem Type = USB Modem
Modem = /dev/ttyUSB2
Init1 = ATZ

[Dialer klarmobil]
Carrier Check = on
Init3 = ATS0=0
Init4 = AT+COPS?
Init5 = AT+CGDCONT=1,"IP","internet.mobilcom"
ISDN = off
Dial Attempts = 3

[Dialer nopin]
Init2= AT+CPIN=""
Init3= AT+CLCK="SC",0,""
[Dialer umts]
Stupid Mode = on
Carrier Check = on
# Abfrage der hinterlegten APNs. Der erste Eintrag wird zur Einwahl verwendet.
Init2= AT+CGDCONT?
# Beispiele zum Setzen eigener APNs, zur Aktivierung Strichpunkt entfernen!
;Init3= AT+CGDCONT=1,"IP","APN"
;Init3= AT+CGDCONT=2,"IP","surfo2"
;Init3= AT+CGDCONT=1,"IP","internet.mobilcom"
ISDN = off

And this Commands

sudo usb_modeswitch -c /etc/usb_modeswitch.conf -v 0x1c9e -p 0xf000
sudo modprobe usbserial vendor=0x1c9e product=0x9603
sudo wvdial umts

Then went to SystemConfig -> NetworkConfig -> Mobil Broadband -> New Connection

Provider -> other: "klarmobil"
APN : "internet.mobilcom"

(Just an example, settings vary depending on the ISP)

After this steps the Connection was fully established. Which means the LAN/WLAN Icon changed to something link an "Mobile" like icon in the top right corner.


Upgrade from 16.04.2 to 18.04 fails to boot

I'm afraid you will not be able to easily go back to 16.04 without a fresh install.

For your information, I have a Macbook Pro 7.1 and I experienced a very similar problem which seems to be linked with the kernel 4.15. This kernel doesn't support well the nouveau driver for Nvidia graphic card. Maybe that is what stucked your laptop. If your lucky, you have another kernel installed and then you can boot with this kernel selectionning it in the GRUB menu at startup. I'm not sure however that your system will work fine with this older kernel but you can make a try.

If you want something newest than 16.04 : my Macbook Pro 7.1 is working fine with Ubuntu 17.10 and kernel 4.13.


Epson EPL-6200L doesn't print the test page on Ubuntu 16.04

Here is how it worked out for me:

Download "epsonepl" driver from here, at the moment Version 0.4.1 is actual

Let's assume you have all your downloads in 'downloads' folder

Install ubuntu package build-essential

Install below commands as root, EPL-6200L is taken as example, corresponding changes should give you a solution for other Epson EPL-5xxxL and 6xxxL models:

$ sudo tar zxvf  /downloads/epsoneplijs-0.4.1.tgz
$ cd epsoneplijs-0.4.1/
$ sudo ./configure
$ sudo make
$ sudo make install
$ sudo mkdir -p /usr/share/cups/model/foomatic-ppds/Epson/
$ sudo mkdir -p /usr/share/foomatic/db/source/driver/
$ sudo mkdir -p /usr/share/foomatic/db/source/opt/
$ sudo mkdir -p /usr/share/foomatic/db/source/printer/
$ sudo cp -av {*full path to folder on your machine*}/foomatic_PPDs/Epson-EPL-6200L-epl6200l-cups.ppd.gz /usr/share/cups/model/foomatic-ppds/Epson/
$ sudo cp foomatic/driver/epl6200l.xml /usr/share/foomatic/db/source/driver/
$ sudo cp foomatic/opt/epsonepl-* /usr/share/foomatic/db/source/opt/
$ sudo cp foomatic/printer/Epson-EPL-6200L.xml /usr/share/foomatic/db/source/printer/
$ sudo ln /usr/local/bin/ijs_server_epsonepl  /usr/bin/
$ sudo cp /usr/share/cups/model/foomatic-ppds/Epson/Epson-EPL-6200L-epl6200l-cups.ppd.gz /etc/cups/ppd/EPSON-EPL-6200L.ppd.gz
$ sudo gunzip /etc/cups/ppd/EPSON-EPL-6200L.ppd.gz
$ sudo /etc/init.d/cups restart

Then create a new printer named "EPSON-EPL-6200L" via the cups web interface on http://localhost:631

Should be done. Now your old-fashion printer should work as you expect.
In case it still does not, download from direct link PDD file from here, and via 'Printers' system setup choose this file as driver. Please notice that some Ubuntu versions don't have test print page template for old-fashioned printers at all. So try to print any text document instead.
The above has been successfully tested on 18.04 as well


Reinstalling Gnome doesn't fix broken/corrupt gnome

First confirm that this is a system related issue, and not due to your user configuration. Temporarily create a new user account and log on there. If it also happens in a fresh default account, then the system is broken indeed.
If the system is broken, you can proceed to a system reinstall without - at this point - removing current configuration. As a well kept secret, you can reinstall the system without formatting the current system. Doing so will keep all currently installed applications and current user configuration intact.
Obviously, the target file systems have to be healthy. Before proceeding to the install, check the file systems. You could do so from a live session using the terminal, or using the tool "Disks" if that is available in the live session.
Then start the installer, and select "Something else". Manually assign the partitions the same way they are assigned in your current system, but make sure to uncheck the checkbox "Format". That way, the partition will not be erased: installed applications, user data and configuration data will remain, and system files will be overwritten.
If that fails, (or if you make a mistake) your only option will be a fresh reinstall. Needless to say that you should make sure your user documents and data are safeguarded on an up to date backup.


How To safely uninstall Ubuntu and restore Windows 8?

Simply use this tool from a live disc: OS-Uninstaller


Is there a way to enable the keyboard numblock?

Try Alt+NumLock, Ctrl+NumLock, Fn+NumLock... one of these may enable NumLock again.


allowing user to run systemctl/systemd services without password

The sudoers file is fairly flexible, and with that comes complexity. What you want here is to permit access to the command /bin/systemctl, with specific parameters:

%LimitedAdmins ALL=NOPASSWD: /bin/systemctl restart unicorn_my_app.service

Basically you just take the exact command line that you would type, hard-code the path name for safety's sake, and put that into your sudoers file (or /etc/sudoers.d). And note that 'start' and 'restart' are completely different as far as sudo is concerned; permitting one won't grant access to the other.


List of installed fonts that support a certain character

May be there other tools but hb-shape gives some results, Example (\u2192, \u107, \u106 and \u2191 respectively):

$ hb-shape .fonts/Roboto-Light.ttf "→"
[NULL=0+498]

$ hb-shape .fonts/Roboto-Light.ttf "ć"
[cacute=0+1054]

$ hb-shape .fonts/Roboto-Light.ttf "Ć"
[Cacute=0+1313]

$ hb-shape .fonts/Roboto-Light.ttf "↑"
[NULL=0+498]

As you notice, available ones results return with their Unicode name Cacute otherwise NULL.

I have entered Unicode using Ctrl+Shift+u , or you may want this way for making shell script to loop through fonts:

$ hb-shape .fonts/Roboto-Light.ttf `echo -ne "\u2192"`
[NULL=0+498]

For reference, hb-shape is a test tool from HarfBuzz Project a Unicode text shaping engine.


sudo apt-get update fails. Software and updates not opening either

You have to disable the problematic repositories by using Software & Updates (software-properties-gtk).

You need to open Other software tab and then disable the following repositories:

http://archive.canonical.com/dists/precise (as your distro is 16.04 LTS that is Xenial Xerus)
https://packagecloud.io/computology/apt-backport/ubuntu (even the browser says 404 for this page)
http://ppa.launchpad.net/picaso/octave/ubuntu (it does not provide packages for versions after Lucid Lynx 10.04 LTS)

and then confirm reloading package caches.

If issue persists - please run sudo apt-get update manually and add error output to the question. I'm ready to assist you more if any.


Arc Menu GNOME extension won't install in Ubuntu 17.10

Arc Menu depends on gir1.2-gmenu-3.0 package. Install it first by running the following command in Terminal

sudo apt install gir1.2-gmenu-3.0


VLC playlists don't work after restarting ubuntu

Once you add files needed to your playlist then you can save it using the shortcut Ctrl+Y, or from the menu Media -> Save Playlist to File

Note you have always to load again the playslist once start VLC again, you can load it using Add file from playlist right click and load the playlist file.
use the shortcut Ctrl+L. This will open the playlist then right click Add File
Change file type from Media Files to ALL files so you can load the playlist files saved before


Ignoring BGRT: invalid status 0 (expected 1)

As an alternative to waiting,  add the boot parameter nomodeset to grub during boot. This can be done by pressing e on the grub menu entry and then inserting nomodeset on the Linux line.

This seems to be a problem caused by the most recent kernel and Nouveau, not Ubuntu.


How do I replace a string on a large file?

you can use sed with inplace editing

sed -i -e 's/dev\.example\.com/example\.com/g' filename


Installed older kernel in 20.04 but wireless, bluetooth and ethernet adapters are missing

You have to do the following:

Reboot the system into GRUB and hit Shift, then select Advanced options for Ubuntu line, and then choose line with oldest Linux 5.4 and hit Enter to boot system using it.

Login to the system, open terminal to execute commands below to get General Availability (GA) 5.4 kernel back:
sudo apt-get purge linux-generic-hwe-20.04 linux-image-generic-hwe-20.04 \
linux-headers-generic-hwe-20.04 "linux-*5.8*"

sudo apt-get update
sudo apt-get install linux-generic linux-image-generic linux-headers-generic

Reboot to use latest GA Linux 5.4 kernel version.

Note: to revert the changes and to use 5.8 HWE kernel execute sudo apt-get install linux-generic-hwe-20.04 linux-image-generic-hwe-20.04 linux-headers-generic-hwe-20.04 .


Disable onscreen keyboard Lubuntu at login

This works for me:

sudo gedit /etc/sddm.conf

Then in the General section add:

InputMethod=

Save and restart


I could recover grub many times by following these instructions at: https://wiki.ubuntu.com/Grub2#Recover

First of all, you must start your system from a live cd. Then

"METHOD 3 - CHROOT

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

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

2) Open a terminal - Applications, Accessories, Terminal.

3) Determine your normal system partition - (the switch is a lowercase "L")

sudo fdisk -l

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

4) Mount your normal system partition:

Substitute the correct partition: sda1, sdb5, etc.

sudo mount /dev/sdXX /mnt   # Example: sudo mount /dev/sda1 /mnt

5) Only if you have a separate boot partition:
sdYY is the /boot partition designation (for example sdb3)

 sudo mount /dev/sdYY /mnt/boot

6)
Mount the critical virtual filesystems:

 sudo mount --bind /dev  /mnt/dev
sudo mount --bind /dev/pts  /mnt/dev/pts
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys  /mnt/sys

7)
Chroot into your normal system device:

sudo chroot /mnt

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

update-grub

9)
Reinstall GRUB 2:

Substitute the correct device - sda, sdb, etc. Do not specify a partition number.

grub-install /dev/sdX

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

12)
Unmount virtual filesystems:

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

13)
If you mounted a separate /boot partition:

sudo umount /mnt/boot

14)
Unmount the LiveCD's /usr directory:

sudo umount /mnt/usr

15)
Unmount last device:

sudo umount /mnt

16)
Reboot.
sudo reboot "


Can anyone with physical access to my computer access my files?

Linux systems do not protect against abuse through physical access. An admin password can be changed through grub and through a live session without supplying the previous admin password (this is intentional: having ownership allows you to do anything with it).

Your data is not accessible if you use encryption for at least your private data or for your whole system. However, I believe more people lost their data by forgetting their access key than through theft. Plus in general it is the hardware they want, not your data. And it is always smart to format a disk without accessing it if it was not yours: a simple keylogger is enough to send details about the connection it is using to your mail account so you can track the system down.


Searching previous command history with PageUp in 14.04

Try this in ~/.inputrc

"\e[5~": history-search-backward
"\e[6~": history-search-forward

and reopen terminal.


How do I stop the battery from charging?

Actually, discharging your battery doesn't necessarily help your battery life. Batteries are rated for x (usually 500 or so) discharge/recharge cycles before they suffer large performance decreases.

If you really want to extend the life of your battery you should take it out when you're plugged into the wall. Heat is what really kills battery life.

It's also worth noting that leaving your battery in while connected to the wall doesn't over-charge and harm your battery. Your computer/battery has built-in safeties that prevent that from happening, so when you're on wall power the batter is only being charged when it's below its maximum charge. But like I said above, if you really want to increase battery life you should take the battery out while on wall power as heat is a big toll on batteries.

I think you were misunderstanding what what happening with the Fn+F3 combination. I've never heard of a battery discharging while the power was plugged in - unless the power cable was broken of course. The cable provides enough juice to both power the laptop and charge the battery at the same time. If you're plugged into the wall, you're only using wall power, not battery power to use your machine - so when it's plugged in no battery power is being used, how could it discharge?

If I'm not mistaken (and I very well may be - I haven't used Windows since 2007) Fn+F3 does different power modes in Windows. There's Performance mode, Power Save, and Balanced. I believe Fn+F3 cycles between these profiles in Windows, but when you're plugged in they don't make a difference. The only thing close to this in Ubuntu is CPU frequency scaling which is set to a governor of ON_DEMAND be default, meaning your computer runs at the lowest frequency (My Inspiron 1525 w/ 2.4Ghz Core2 Duo is 800Mhz lowest freqency) until more power is needed for a task. This helps with head and overall wall power usage when plugged in. It is possible, however to override it to use the POWERSAVE or PERFORMACE governors using the cpufreq-set command like so: cpufreq-set -c 0 -g performance (replacing -c 0 with -c 1, -c 2, etc for all your cores). That will set your computer to use its max frequency all the time.


is this "Extended Partition" really necessary? (what's it do?)

Extended partition is just like a container which holds all the logical partitions.

  can I get rid of it?

First you have to delete all the partitions which resides inside the extended partition inorder to  delete the extended partition.

If you want to increase the size of your root partition then decrease the swap space, get the shrinked space out of the extended partition and add it to the root partition.


Small update, I noticed a very short frame before the loading screen that is :

http://i.imgur.com/R9cS57A.jpg


If you are looking for the netboot images, they can be found here.

Some more information can be found here.

In either case you can select which software you want to install.


Logitech X52 HOTAS not working after suspend

I finally resolved my problem by disabling then enabling te device at USB level.

Used lsusb to identify the Bus and Device of my HOTAS
Used lsusb -t to identify the port corresponding to the device
Tried echo 'a-b' |sudo tee /sys/bus/usb/drivers/usb/unbind and echo 'a-b' |sudo tee /sys/bus/usb/drivers/usb/bind where a is the bus number and b is the port number --> MY HOTAS WORKED AGAIN !
Automated the disable/enable in systemd by

sudo touch /lib/systemd/system-sleep/joystick

sudo chmod +x /lib/systemd/system-sleep/joystick

sudo gedit /lib/systemd/system-sleep/joystick
Adding the following script to the previously created file

#!/bin/sh
case $1/$2 in
  pre/*)
    echo '1-2' |sudo tee /sys/bus/usb/drivers/usb/unbind
    ;;
  post/*)
    sleep 2
    echo '1-2' |sudo tee /sys/bus/usb/drivers/usb/bind
    ;;
esac

where a is the bus number and b is the port number


Change the terminal color profile and font size permanently


Skype version not supported any more in Ubuntu 16.04 LTS

You need to get the current Linux/Ubuntu version of Skype from the Skype web site.  Download it, follow installation instructions, and (if necessary) change any launchers to point to the newly installed version.


How to create colored borders for all windows?

Yes these files are located in (e.g for default Ambiance theme) :

/usr/share/themes/Ambiance/gtk-3.0/apps/

you can edit nautilus.css or unity.css as you wish

How do I add a border around windows but keep the current theme?

Good practice is to copy theme you wish to modify to ~/.themes/ and than making changes.
At the end you can use Unity Tweak Tool to change to your modified theme.

After copying your Ambiance theme to ~/.themes/Ambiance2, change in:

~/.themes/Ambiance2/gtk-3.0/apps/unity.css :

  -UnityDecoration-extents: 28px 0 0 0;

to

  -UnityDecoration-extents: 28px 10 10 10;

then:

UnityDecoration.bottom {
    background-image: none;
    background-color: #ff0080; /* shade (@bg_color, 0.7); */
}

UnityDecoration.left,
UnityDecoration.right {
    background-color: #ff0080; /* shade (@bg_color, 0.7); */

Also change in UnityDecoration.left* and UnityDecoration.right* sections to background-image: none;

It will give you pink border. You can change it to what ever you want. Just change this hex #ff0080 to another.


Unable to type polish characters after upgrade to Ubuntu 18

Go to Settings, Language and Region, Input Sources.  If the only item in the list is "English (US)", then this is the cause.

Click the "+" button, and -- assuming your keyboard has English US layout, and you type diacritics using modifier keys -- click on English (United States).

  Yes, this is surprisingly counterintuitive. English (US) is precisely the one you are trying to get rid of, so this is the last one you'd pick. Also, it isn't apparent from the UI that a new selection list will appear. This needs UI redesign, IMO.

Anyway, a new list appears, and from this you can select, for instance, English (intl. with AltGr dead keys).

Once you have selected that, you can remove the English (US) input source using the "-" button.  You can use the little button with the keyboard icon to see that the new source has the desired layout.

If diacritics still don't work, then your AltGr key may be remapped. In Settings, Devices, Keyboard click "Reset All". If you have made any xmodmap or setxkbmap settings, undo these too.


Is there a default shortcut for System Monitor?

There isn't a default keyboard shortcut for the System Monitor application (gnome-system-monitor), but you can make a custom keyboard shortcut for it. To make a custom shortcut go to System Settings -> Keyboard -> Shortcuts tab -> select Custom Shortcuts. To add a custom shortcut, click the + button at the bottom of the window. To edit a shortcut, click the row and hold down the new keys or press Backspace to clear.


What is a good AMD Phenom compatible motherboard to use?

Nvidia with AMD is not a combination that i would recommend, especially since many superb AM3 motherboards have excellent ATI onboard graphics and also support ATI Hybrid Graphics when teamed with a ATI graphics Card. You Wont get that with a Nvidia Card. Plus with the latest catalyst releases amd has caught up a lot with nvidia as far as Linux Support is concerned ( Though definitely no VDPAU support). My personal suggestion is gigabyte GA-890GPA-UD3H + Radeon 6850. Even if you want to stick with nvidia go for the 890GX Chipset.

Put simply, VDPAU uses the stream processor on your nvidia hardware for HD video decoding thus putting very less strain on your CPU. XVBA the competing solution from AMD has very limited support on linux. So if you are into HD videos you should go for nvidia. The open source Radeon driver works beautifully with slightly older ATI Cards (R500/R600/R700) with support for evergreen and barts on the horizon. Even the performance of fglrx is now at par with nvidia imho. I have a radeon hd 4670 which works beautifully on ubuntu 10.10. I am a huge AMD/ATI fan and i have 3 systems running athlon II/Phenom II and opteron respectively. If you have the budget go for phenom II x6 1090t+ hd 6850/70. Killer combo


I'm guessing this is a permission issue. Try running the command as sudo:

sudo echo low > /sys/class/drm/card0/device/power_profile

Or change the permissions on the power_profile file allowing people to write to this file.


iirc DWL-G122 uses the rt73 kernel module so should work as far as I can tell. boot the installer best way to find out IMO.


How to install pip (python) to user without root access

I hope I'm right and the problem is with your PATH, try this

You can add this to your ~/.bashrc file:

PATH=$PATH:~/.local/bin

If you don't know how, you can just execute this line in a Terminal:

echo "PATH=\$PATH:~/.local/bin" >> ~/.bashrc

You can also check what's in your PATH by typing in the Terminal

echo $PATH


How to read systemd journal file on system that has no systemd?

chroot into the Arch Linux system:

cd /location/of/arch/root
chroot /location/of/arch/root /bin/bash

journalctl looks for the journal files in /var/log/journal/machine-id/. If you boot up with a rescue OS that has a different machine ID or a different root it hence won't find any data there.

Hence,

a) use journalctl --directory=/var/log/journal/<machine-id>

b) or journalctl -m

The "-m" swicth merges the journals of all directories in /var/log/journal/*, hence makes it unnecessary to figure out the machine id of the host.

Source


I found what I was looking for within the passwords and keyrings section under preferences:
I totally missed the menu bar at the top with file, edit, blah blah blah.  Anyways, I went to file, new and created a new keyring.  After that I could connect perfectly fine with no issues.  So creating a new keyring (or changing the password) fixed my problem.


Nautilus sorts the Name-column "mysteriously". How can I change the collating sequence?

This answer is a workaround.
I've put this information forward because it seems that Nautilus just can't sort in the manner I prefer / want / need.

PCMan File Manager has a similar look and feel to Nautilus, yet it sorts the detaill view in a "by the column" fashion...

It sorts with most of the "special" characters to the top, and a few to the very bottom..  It is case insensitive, and is very close to what I was looking for (..."approximate ASCII"? followed by the remaining normally-sequenced Unicode Codpoint values/characters)..

It is available in Synaptic Package Manager under the name: pcmanfm


Sort files on nth character of name in a filemanager?

One way to do this would be to rename your files to make them more easily sortable using GUI tools. To test this, I created a few files with ascending numerical prefixes and random names:

for i in {001..005} {150..155}; do
    n=$(cat /dev/urandom | tr -dc _A-Z-a-z-0-9 | head -c 10);
    touch $i"_"$n.ext;
done

That created the following files on my system:

$ ls
001_zxUBrPQEEt.ext  003_crMQ1lLrPA.ext  005_t3gf-X2N82.ext
151_aKDwJu7phP.ext  153_SSqGdDLOmO.ext  155_mlnSjEGdCF.ext
002_cmAdbTcm0L.ext  004_-39-uI6G9e.ext  150_Vft6mVa5LN.ext
152_5QNPNYdqDj.ext  154_A3EQG1_idu.ext

In order to sort them as you want, it should be enough to move the numerical prefix to the end of the file name. You can do this using the following rename command (to test the name change without actually modifying any names, use -n instead of -v):

$ rename -v  's/^(.+?)_(.*)/$2_$1/' *
001_zxUBrPQEEt.ext -> zxUBrPQEEt.ext_001
002_cmAdbTcm0L.ext -> cmAdbTcm0L.ext_002
003_crMQ1lLrPA.ext -> crMQ1lLrPA.ext_003
004_-39-uI6G9e.ext -> -39-uI6G9e.ext_004
005_t3gf-X2N82.ext -> t3gf-X2N82.ext_005
150_Vft6mVa5LN.ext -> Vft6mVa5LN.ext_150
151_aKDwJu7phP.ext -> aKDwJu7phP.ext_151
152_5QNPNYdqDj.ext -> 5QNPNYdqDj.ext_152
153_SSqGdDLOmO.ext -> SSqGdDLOmO.ext_153
154_A3EQG1_idu.ext -> A3EQG1_idu.ext_154
155_mlnSjEGdCF.ext -> mlnSjEGdCF.ext_155

The rename command essentially reads Perl. Here, we are giving it a substitution operator (s/original/replacement/) which it will apply to each file name and rename it to the result of said operator. The regex used will match everything from the beginning of the file name (^) to the first _ ((.*?)_). The ? makes the match non-greedy, forcing it to find the shortest possible matching string. The parentheses "capture" the matched substrings, making them available in the right hand side of the operator. The 1st captured pattern will be $1, the 2nd $2 and so on. The result is that the numerical prefix ($1) is moved to after the rest of the name ($2).

Once you have run this command, you can open the directory and do your thing with the GUI editor. To reverse it and go back to the original names use:

rename 's/(.*)_(\d+$)/$2_$1/' -- *

Here, the regex is matching everything up to a _ and then one or more numbers (\d+) until the end of the string ($). The -- at the end is a general feature of many command line programs and it signifies the end of options. That ensures that any file name starting with a - is not mistaken for an option.


Ubuntu 12.04 64bit Can't connect to WPA2 Personal WiFi

That can be originated from your modem. I have been where you are (when changing wpa/wpa2 to wep or no auth, it was working) and fixed the problem by changing my modem...


Problem updating in Ubuntu: E: Problem executing scripts APT::Update::Post-Invoke-Success

Looks like appstream bug. You can purge libappstream3 completely, but if you still need appsteam, try to comment last 3 lines in file:

/etc/apt/apt.conf.d/50appstream

This solution doesn't fix the bug, but hides the appstream error message during apt updates disabling refresh appsteam cache when apt's cache is updated.


(Ubuntu 16.04) Issues with wireless connection

I've had a similar problem with Ubuntu 14.04, I wasn't able to connect to any wi-fi network.
Have you tried updating the driver?

If not, try to run the following command while connected with ethernet:

sudo apt-get update
sudo apt-get install bcmwl-kernel-source

After the installation is finished, you should be able to connect and test if its working.


How do I remove old kernels despite 100% inode use in /usr?

I was running out of options and time so I tried this and it worked:

I figured out what kernel I was using:

$ uname -r
3.16.0-44-generic

I decided to move the really old kernels to my external storage:

sudo mv linux-headers-3.8* /media/housni/linux-headers

df -i then showed that a significant amount of inodes have been freed so I quickly uninstalled the headers I knew I wouldn't need:

sudo apt-get purge linux-headers-3.8*

After which, I updated grub and rebooted

sudo update-grub2 && sudo shutdown now -r

I then did some extra clean up like cleaning up my cache (sudo apt-get clean) and running autoremove (sudo apt-get autoremove) just to be safe and now everything seems to be back to normal :)


That mean that 1 process is in running state
Others are in sleep mode, stopped or defunct (zombie) mode

Linux process states:
    Running or Runnable
    Sleeping or waiting
    Stopped
    Zombie

More information:
 - https://en.wikipedia.org/wiki/Process_state
 - https://peteris.rocks/blog/htop/#r-running-or-runnable-on-run-queue


It can be that there is other server with same IP in your network... and that is why you get connection refused. Other case can be the way you have routing setted at your host. Please consult this documentation. So... you can have NAT for your virtual box, and "by accident" that is same address range as for host's NAT. Change connection settings to bridged, and retry.


How to get Discord 0.0.2 to work on Ubuntu 16.04?

I encountered the same issue today. Here is how I managed to solve it.

Remove discord
Download the discord .deb file and install it:

sudo dpkg -i my_discord_deb_file.deb

fix missing dependencies:

sudo apt-get -f install

re-run:

sudo dpkg -i my_discord_deb_file.deb

N.B: I don't know if all the steps are necessary, but it worked for me.


Which ubuntu version suits best my configuration?

You have pretty week CPU there, but good enough for Xubuntu (Ubuntu with light XFCE desktop environment).

I would go with Xubuntu 14.04 because it will be stable in 17 days from now as it provides the newest software and it is LTS (long-term support) version, so you will be good with it for long time.


Ubuntu unresponsive 'bad sector' warning in virtual console

It's most likely your hard disk dying.

Firstly, make sure you have a backup of your important files, then have a closer look at what's smartmontools is telling you. I had a similar problem recently, and as I remember SMART status of the drive was "good" long after I started having those errors - I had to schedule a full drive self-test to make the status to change.