Multiple gateways with one ethernet adapter

First thing then you do is to set priority of you default gw route.
You can do this with adding a metric to route. You can do manually

sudo route add -net default gw 132.45.65.57 netmask 0.0.0.0 dev eth0:1 metric 10

or, you can write code to do this for you

sudo nano /etc/networking/interfaces

add at the end of interface configuration, but in the config of eth0:1 interface

up route add default gw 132.45.65.57 metric 10
down route del default gw 132.45.65.57

Some thing like this

auto eth0:1
iface eth0:1 inet static
     address 132.45.65.60
     netmask 255.255.255.0
     gateway 132.45.65.57
     dns-nameservers 8.8.8.8 8.8.4.4
     up route add default gw 132.45.65.57 metric 10
     down route del default gw 132.45.65.57

After this you must mark packet and routing marked packet via eth0:1

I give you example to route traffic for source port 8080 and you can implement for port you need for

Let’s start from the iptables. Here we shall take 8080 as the service for routing. Use mangle table of iptables for modifying the 8080 packets.

  sudo iptables -t mangle -A OUTPUT -p tcp –sport 8080 -j MARK –set-mark 0×1

We are marking all packets with source port 8080 as ’0×1′ .

Now save and restart iptables.

service iptables save
service iptables restart

To delete this entry from iptables we can use -D instead of -A.

Next, create a new IP route table in /etc/iproute2/rt_tables by just giving an entry

100 8080table

Write rule for 8080 packets.

ip rule add fwmark 0×1 lookup 8080table

Add route at new table 8080table. Here we shall use ’132.45.65.57′ as the gateway for 8080. Address ’132.45.65.57′, in this example will be gateway address for eth0:1 All other traffic will go through the
default gateway aka eth0, which can be seen by IP route show command.

We copy all entries except default gateway entry from main table.

 sudo ip route show table main | grep -Ev ^default | while read ROUTE ; do ip route add table 8080table $ROUTE; done

Add default gateway entry for 8080 packets to table 8080table

  sudo ip route add default via 132.45.65.57 table 8080table

Use ip route show table 8080table to show all routes at 8080table.

That’s it.

Edit 1

Maybe is better to mark and route traffic based on source route

auto eth0:1
iface eth0:1 inet static
     address 132.45.65.60
     netmask 255.255.255.0
     gateway 132.45.65.57
     dns-nameservers 8.8.8.8 8.8.4.4
     up route add default gw 132.45.65.57 metric 10
     down route del default gw 132.45.65.57

After this you must mark packet and routing marked packet via eth0:1

I give you example to route traffic based on ip, source ip 132.45.65.60

Again use mangle table of iptables for modifying the packets from 132.45.65.60

  sudo iptables -t mangle -A OUTPUT -s 132.45.65.60 -j MARK -set-mark 0×1

We are marking all packets with source ip 132.45.65.60 as ’0×1′ .

Now save and restart iptables.

service iptables save
service iptables restart

To delete this entry from iptables we can use -D instead of -A.

Next, create a new IP route table in /etc/iproute2/rt_tables by just giving an entry

100 132table

Write rule for  packets from source ip 132.45.65.60

ip rule add fwmark 0×1 lookup 132table

Add route at new table 132table. Here we shall use ’132.45.65.57′ as the gateway for 132.45.65.60. Address ’132.45.65.57′, in this example will be gateway address for eth0:1 All other traffic will go through the
default gateway aka eth0, which can be seen by IP route show command.

We copy all entries except default gateway entry from main table.

 sudo ip route show table main | grep -Ev ^default | while read ROUTE ; do ip route add table 132table $ROUTE; done

Add default gateway entry for 132.45.65.60 packets to table 132table

  sudo ip route add default via 132.45.65.57 table 132table

Use ip route show table 132table to show all routes at 132table.


Ubuntu Gnome 14.10 Upgrade to GNOME 3.14 Blank Screen, Can't Login

I had this problem too and I fixed it~
It's because the gdm package is broken.
login to terminal and temporarily change your greeting screen back to lightdm(you can change back to gdm later) by typing this:

sudo dpkg-reconfigure lightdm

and select lightdm thensudo shutdown -r now to reboot
and you can login normally. If you still want to use gdm as boot screen, reinstall it by sudo apt-get install --reinstall gdm and do a sudo dpkg-reconfigure lightdm again.

Please accept my answer if you found it helps, thx ~


The service you should check is openvpn@NAME where NAME is the name of your configuration file (without the .conf).

So if your openvpn configuration file is /etc/openvpn/client-home.conf you should use systemctl status openvpn@client-home.

Here is an example output:

● openvpn@client-home.service - OpenVPN connection to client-home
   Loaded: loaded (/lib/systemd/system/openvpn@.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2017-10-23 07:57:37 CEST; 2h 15min ago
     Docs: man:openvpn(8)

Where you can see the service is active and running.

IMHO, the best way to test a service is to test it's functionality, in this case accessing another machine connected through the VPN.


Can't etablish connection with Owncloud and Docker

I finally read the documentation where it clearly states the container was equipped to deal with port 8080 instead of 80.
The issue was a result of the wrong ports being used. Instead of 80 try 8080.


Can't run a fresh install of Ubuntu 14.10, shows kernel panic

After a long research, I eventually found this. According to the thread, there is a bug in the USB installer that prevents 64-bit systems from being installable (on some machines?).

I installed a 32-bit Ubuntu there and the problem didn't appear anymore. This can be an imperfect workaround, but the laptop has just 4 GiB RAM and it doesn't matter much in this case.


Sound problem in skype 4.2 in ubuntu 13.10

Changing Device Input values under gstreamer-properties fixed it for me

Find here

Answer Credit to @srinivas-gowda


Can't log in after removing input method

I assume that you removed English from input sources.
Worked on my PC.

During boot choose Advanced options then recovery mode. At the following screen choose Drop to root shell prompt. Run

su -l <user-name>

to login as user (root does not change input methods).
then run

gsettings get org.gnome.desktop.input-sources sources

the output is something like

[('xkb', 'gr+simple')]

Run:

gsettings set org.gnome.desktop.input-sources sources  "[('xkb', 'us')]"

input source 'English US' will be added. Then

sudo reboot

Or from login screen

Press Ctrl+Alt+F1 to enter tty1.

Run:

gsettings get org.gnome.desktop.input-sources sources

the output is something like

[('xkb', 'gr+simple')]

Run

gsettings set org.gnome.desktop.input-sources sources  "[('xkb', 'us')]"

input source will be added. From tty1 Press Ctrl+Alt+F7 to return to login screen and enter your password.

Or from root shell.
Delete the password for your user by running this command:

passwd -d <user-name>

and

reboot.

If you ever get prompted for a password, just type enter and it should work.

Once password is removed you can log in without it, you can add input method and change password.


Sharing mysql Databases with Windows
You don't browse the media to access the database.  You use an SQL client to access the database.  You provide the access information to the SQL client.
Windows has a GUI under Adminstrative Tools to add a Data Source which you configure for your SQL/MSQL client.
While the details are provided in the link, you can get support for configuring the client from your friendly Microsoft Support channel.
For the Ubuntu side use these steps:
Using MS Access to import from mysql
Configure the Mysql with these details:

Database Name
Username
Password

Enter that information along with the hostname or IP address of your database and use the Microsoft client to connect to it.
Automatically mounting your Windows NTFS folder
You can automatically mount your NTFS driver or partition, but adding an entry to your /etc/fstab file.
Add this endry.  Replace the "UUID" number of the UUID with the UUID of your NTFS partition.
UUID="3874F30874F2C820" /mnt2/windowsdrive    ntfs  defaults  0  0

The /mnt2/windowsdrive is a mounting point.  You can use any location on your hard drive for this point.  To create the location, use this command:
$ sudo mkdir -p /mnt2/windowsdrive

Run this command to find the UUID of this drive for your etc/fstab entry.
$ sudo blkid

Replace the /mnt2/windowsdrive and UUID="60292932-ae7d-4676-8f0f-7c319cb66fee" entries with the information from your system.
Now you can manually mount it (or test the configuration) with this command:
$ sudo mount /mnt2/windowsdrive

You should now be able to navigate to that mounted point.  When you reboot the point will automatically be mounted.


How to add support of windows-1251 encoding for mp3 tags for VLC player

One way of dealing with the problem is convert the tags to UTF. I've been successfully using tag2utf for that purpose.


bash, get all last files with first 3 same chars from begin in the name of file

I did it this way.
# find last file by 6 first chars, copy to archive
for i in $(find . -maxdepth 1 -type f | cut -c1-6 | sort | uniq)
do
    cp $(ls -t $i* | head -1) $path/archive | head -1
done

Thank you all.


ubuntu-dock settings not accessible in gnome-control-center by default

If you have upgraded from Ubuntu GNOME 17.04 the default GNOME session(s) will still remain for you to choose during login. On top of that the all-new GNOME session(s) customised by Ubuntu (simply named Ubuntu and/or Ubuntu on Xorg) will be added.

Ubuntu dock setting is accessible only from the GNOME session(s) customised by Ubuntu, not from the default GNOME session(s).

When you boot your system and get to the GDM login screen you should find a cogwheel (⚙) next to the sign in button. If you click on the cogwheel you should find an Ubuntu (and/or Ubuntu on Xorg) option.

Choose Ubuntu (or Ubuntu on Xorg) instead of GNOME (or GNOME on Xorg).

See this if you don't have Ubuntu Dock installed in the first place: Dock settings missing in gnome-control-center after upgrade to Ubuntu 17.10


Cannot kill `grep --color=auto` process in terminal

ps aux | grep -i apt

will return any process that has apt in the result returned by ps. It can be in the command, as in grep -i apt
So basically, your command returns only one result, which is... itself. When you try to kill it, it has already finished, so the process has gone.


fastboot not detect my android device - ubuntu

Maybe this question can help you...

  Try using sudo $(which fastboot)

  for instance sudo $(which fastboot) devices

Of course, if it's still actually at the moment...


How to "reinstall" the audio subsystem on kubuntu?

Do you have any other programs running that use sound?  I have one program that "steals" all of the audio subsytem and no other programs can play sound until I close that one program.

Almost all programs use sounds so think carefully about what else is running, especially background things.


I think you might have to go into ~/.config/tox/ and replace the existing tox_save.tox with the .tox file you exported from qTox.

It might be a good idea to rename the original tox_save.tox to something like tox_save_backup.tox in case something goes wrong.

uTox should then start using the profile you had on qTox.


Ubuntu replacement for an old XP computer with slower than 2.0 GHz processor speed

Xubuntu 18.04 needs at least 512 MB RAM, 700 MHz processor and 7.5 GB of free space on your hard disk (minimum) and 20 GB free space (recommended). This should work fine for a media center. Xubuntu 18.04 32-bit and 64-bit desktop images are available. For an old XP computer the 32-bit desktop image is probably the only one of the two available desktop images that is compatible with its processor. Xubuntu 18.04 is a Long Term Support release for which security and maintenance updates will be provided for 3 years until April, 2021.

Download the Xubuntu 18.04 .iso from here, and follow the instructions for making bootable installation media at How do I make a bootable Ubuntu USB?.

Xubuntu 18.10 whisker menu  (Click image to enlarge)


Unable to upgrade from 14.04 to 16.04. Could not calculate the upgrade. An unresolvable problem occurred while calculating the upgrade

I encountered the same problem using the 'About this computer' > 'Upgrade' route on a fully updated 14.04 LTS system.  I have software from quite a few alternative repositories, which several posts suggest might have caused the problem.

grep Broken /var/log/dist-upgrade/apt.log
reported 163 lines, many of which were gnuplot related.  I note a few other posts that reported gnuplot as a problem.

I deleted the two gnuplot packages installed on my system using Synaptic and then closed Synaptic.  Interestingly, when filtering with 'installed(upgradeable)' in Synaptic, only these two packages showed up (gnuplot and gnuplotX11) and both had an exclamation mark in the checkbox.

Then do-release-upgrade worked.


How to tell which of the two FTP server running is serving an FTP request?

sftp-server does not serve FTP requests. It is for SFTP, which is actually SSH and not FTP at all.


According to Elasticsearch page setting section, elasticsearch.yml file can be found on ES_HOME/config folder.

  elasticsearch configuration files can be found under ES_HOME/configfolder. The folder comes with two files, the elasticsearch.yml for configuring Elasticsearch different modules, and logging.yml for configuring the Elasticsearch logging.

If you have really look anywhere and come on the situation where elasticsearch.yml file missing, then you'll probably interested on creating new one.

Luckily someone has posted content of elasticsearch.yml on GitHub Gist, you may want to look at this elasticsearch.yml - GitHub.


Just installed 11.04, and web browsing is slow/nonexistent. Download speeds good

OP solved issue Thanks! That solved it. Awesome!!! – Brendon Aug 14 '11 at 23:07

by using this link:

What is the proper way to change the DNS IP?


Flash version 9,0 or greater required in Ubuntu 14.04

I think you should check again that Adobe Flash Plugin is installed and/or reinstall it:

sudo apt-get install --reinstall flashplugin-installer

You can check flash support on official site on this page.

On my 16.04 LTS system the site shows video and right-clicking on it shows Adobe Flash Player drop-down menu.
It works on Firefox, SeaMonkey and Opera.
But Chrome reports

Flash version 9,0 or greater is required
You have no flash plugin installed
Click here to download latest version

as you wrote.


How can I double every character in a file excepting newlines?

With sed:
sed 's/./&&/g' yourfile

Ex.
$ echo 'echo hello world' | sed 's/./&&/g'
eecchhoo  hheelllloo  wwoorrlldd

Alternatively, with Perl's string multiplication operator:
$ echo 'echo hello world' | perl -lne 'print map { $_ x 2 } split //'
eecchhoo  hheelllloo  wwoorrlldd

It's possible to do string concatenation in awk of course, but AFAIK not without an explicit loop over characters:
$ echo 'echo hello world' | awk 'BEGIN{OFS=FS=""} {for(i=1;i<=NF;i++) $i = $i $i}1'
eecchhoo  hheelllloo  wwoorrlldd


apt-get is the command-line tool for handling packages, and may be considered the user's "back-end" to other tools using the APT library. For installation, apt-get install is used. You can put multiple package names after the install i.e

sudo apt-get install gcc freeglut  (you can add more)

You can read more about apt-get from here


The "Open in terminal" right-click menu is provided by a nautilus extension, and hard coded to open gnome-terminal through dbus, so you cannot directly change that menu item.
There are a couple of approaches you could try:

Ubuntu 20.04: Install nautilus-extensions-fma. That was formerly known as "Nautilus actions". It allows you to add custom actions to the right-click menu. Ubuntu 18.04: You have to add a PPA.

Create a nautilus script. Nautilus scripts are scripts in the ~/.local/share/nautilus/scripts folder. They appear under a "Scripts" entry in the right-click menu. You can assign a shortcut key to such script that will work from within nautilus.

If you are sufficiently skilled with python, you may write a nautilus python script or change an existing one. nautilus-open-any-terminal supports a lot of terminal emulators, but xterm is not one of them.

To remove the existing right-click menu for "Open in terminal", remove the package nautilus-extension-gnome-terminal.


Configuring Compiz window manager using command-line utilities

Since it has taking me three days to resolve this, and only after being nudged in the right direction by a fellow user, I considered it would be appropriate to submit an answer.

As kindly pointed out by muktupavels, Compiz now uses dconf, not gconf. More info here.

In order to examine and set specific repository keys and new values for Compiz Manager, you would now use the Gsettings/DConf configuration API and system. The command line utility used for such a task is gsettings. This is the equivalent to the gconftool command line tool referenced in the question.

From the manual man gsettings:

DESCRIPTION

gsettings offers a simple command-line interface to GSettings. It lets you get,
set or monitor an individual key for changes.

The SCHEMA and KEY arguments are required for most commands to specify the schema
id and the name of the key to operate on. The schema id may optionally have a
:PATH suffix. Specifying the path is only needed if the schema does not have a
fixed path.

For the purposes of our example, we wish to activate the Compiz-plugin Wobbly Windows.

We can pull up a list in the terminal to see which of the Compiz-plugins are current active on the system, using the following:

dconf dump /org/compiz/profiles/unity/plugins/core/ | grep active-plugins

The output:

active-plugins=['core', 'composite', 'opengl', 'snap', 'commands', 'compiztoolbox', 'vpswitch', 'mousepoll', 'imgpng', 'grid', 'copytex', 'place', 'resize', 'move', 'regex', 'session', 'animation', 'workarounds', 'fade', 'cube', 'expo', 'unitymtgrabhandles', 'scale', 'ezoom', 'unityshell']

From the output, we can see that the Wobbly Windows Plugin is not currently enabled. To activate the Wobbly Windows plugin from the command line, we would use the gsettings utility, with the set command, as follows:

gsettings set org.compiz.core:/org/compiz/profiles/unity/plugins/core/ active-plugins "['core', 'composite', 'opengl', 'snap', 'commands', 'compiztoolbox', 'vpswitch', 'mousepoll', 'imgpng', 'grid', 'copytex', 'place', 'resize', 'move', 'regex', 'session', 'animation', 'workarounds', 'fade', 'cube', 'expo', 'unitymtgrabhandles', 'scale', 'ezoom', 'unityshell', 'wobbly']"

gsettings is the command-line tool, set the command, org.compiz.core is the schema, :PATH specifies the path, active-plugins is the KEY that you want to set, and ”[]” is the value you set to the key. Do not forget to place quotation marks around the array when overwriting the active-plugins value, e.g. "['wobbly']".

You will now see when moving a window that Wobbly Windows plugin is active, you can’t miss it!

You can also check it is active by using the dconf dump command as before or, alternatively, by using the get command with gsettings

gsettings get org.compiz.core:/org/compiz/profiles/unity/plugins/core/ active-plugins


forwarded port on localhost still up after closing session

It's likely that browser caching is providing the illusion of an ongoing connection. I performed a couple of experiments which seem to confirm that.

If I open the same page via localhost:12345 in a different browser (Firefox) after the ssh session exits (without opening it that way while the ssh session is active, that connection fails. If I open the page in Firefox while the ssh session is active, I see the same behavior I see in Chrome (the page loads again after the ssh session exits).

The other experiment was this command:

telnet localhost 12345

That connection succeeds while the ssh session is active, and gets the expected connection refusal after it exits. I suspect telnet is a more reliable test for whether the port forwarding is active than any web browser.


Juju Stuck on Fetching Juju agent version 2.0.0 for amd64

It looks like to me that your Juju node doesn't have internet connectivity. SSH to juju node with the following command:

$ ssh ubuntu@<juju-node-ip>
# where you can get juju node ip from maas
$ ping 8.8.8.8


I would recommend that you don't use the drive, and try TestDisk.  Also if you have room on another drive, you can try using dd.

Note: Keep in mind, that when it comes to data recovery nothing is guaranteed.  Also it can be a time consuming project, so be patient.


Upgrade Failed, can I reinstall over current installation?

Try running:

sudo apt-get upgrade

If it says "dpkg was interrupted you must manually run 'dpkg --configure -a'"
then do what is says: run

sudo dpkg --configure -a

Hopefully that will help.


Installing Ubuntu 14.04 in legacy mode along with Windows

Choose the option to install beside windows.  It will give you the option of resizing windows partition if necessary.

Also, you can open Disks or Gparted to see the list of partitions.


Seems to be a known bug - see here: https://bugs.launchpad.net/ubuntu/+source/vte/+bug/546021 and the upstream bug here https://bugzilla.gnome.org/show_bug.cgi?id=617646

Copy paste works with Ctrl-Shift-C and -V, respectively. Basically all relevant shortcuts you know from other Gnome applications can be applied in the terminal by adding an additional Shift- keypress... Ctrl-Shift-Q for quit, for example.


Problems with ubuntu after installing cinnamon, unity broken

Cinnamon 2.0 corrupts Unity on Ubuntu 13.10 – do not install. More information here.


Having two cursors when using a tablet in Wayland is by design, but the problem you describe could be due to the fact that you're using X applications on Wayland (using XWayland). Tablet support for X applications under Wayland will be included in the upcoming Xorg 1.20, which will be released in 2018. Until then, you're better of using Xorg. Now, I don't know or use MyPaint myself, so if MyPaint is actually a native Wayland application, my answer does not apply.


I'm not sure why this happens, but I've had it happen in a few odd circumstances. An easy way around it is to install every dependency manually. However, since it looks like Apt is having issues resolving dependencies in general, there might be a bigger problem at work here. While I can't help you with that specifically, you can use this to install snmpd:

sudo apt-get install snmpd libsnmp30 libsnmp-base

If that still gives you linux-image... errors and prevents installation (though, it doesn't look like it should -- that appears to be a different problem) try this:

sudo apt-get install snmpd libsnmp30 libsnmp-base linux-image-generic linux-image-3.13.0-40-generic linux-image-extra-3.13.0-40-generic


I think you cannot upgrade from an EOL version to another EOL version. 10.04 and 11.04 are both reached EOL and not supported anymore.

The best option you have now IMO , is to download the .iso of a supported version eg: Ubuntu 12.04 LTS , create a bootable DVD or USB and upgrade Ubuntu through the installer window. You will see the option "upgrade 10.04 to 12.04"

Following links will help you in case you don't know how to create a Live DVD or USB and how to install Ubuntu.

How to create a bootable USB stick on Windows
Installation from USB-stick
Ubuntu Installation
How to Upgrade to Ubuntu 12.04 From CD or DVD (external link)


bash --> perl command: print only the replaced text

The -p argument is like sed's default print - also like sed, if you want to suppress default print, you would use -n instead.
So you could do
perl -ne "print if s/^Val2 = '(.*)'/\1/" test.txt

You could also use a regex match rather than a regex substitute:
perl -lne "print \$1 if /^Val2 = '(.*)'/" test.txt

or
perl -nE "say \$1 if /^Val2 = '(.*)'/" test.txt

(the backslash is to protect $1 from being expanded by the shell, since the expression is in double quotes to allow use of lieral single quotes in the match).


Start here: https://launchpad.net/glibc

You will find packages and versions for various releases and architectures of Ubuntu. Each of these comes as a tarball that you can modify as needed.


With my limited knowledge I can recommend both Python and C. As you may know there isn't a 'the best' language.
You can see lots of discussion on the topic like the one in here or here or this link  or this one that might also be help to you.


Ubuntu 16.04: problem with multiscreens, is there a workaround?

I have the same laptop but with a 4k screen and i don't have this issue although my external screen is connected via displayport/thunderbolt.

I found that the HDMI socket was not as reliable for external screens and would struggle with my 4k external screen, that said your resolutions shouldn't be a problem.

There might be some issues with HDMI-CEC which can be used to control screens via HDMI - http://hdmicec.blogspot.co.uk/2012/05/how-to-find-out-if-your-device-is-hdmi.html

I found it was much more reliable on my setup if i used the graphics drivers ppa https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa

I use nvidia-367 and it seems to be much faster at initialising screens, previous versions often timed out getting 4k sync so would take ages to start and give me errors.


Is there a method to force delete or uninstall an app (i.e. dropbox ) other than removing it from Software Center?

Uninstall the desktop app on Linux

Depending on your operating system and the package used during installation, certain command lines inputted into your terminal window will uninstall the desktop app. Copy and paste the following commands one-by-one into your terminal window, hitting Enter after each command. If some of the commands listed produce an error, do not be concerned. By the last command, the desktop app will be successfully uninstalled from your computer.

dropbox stop dropbox status # Should report "not running"
rm -rf ~/.dropbox-dist
rm -rf /var/lib/dropbox
rm -rf ~/.dropbox*
sudo apt-get remove nautilus-dropbox
sudo apt-get remove dropbox
rm /etc/apt/source.d/dropbox

If this doesn't work, try;

sudo apt-get remove --purge nautilus-dropbox

Source: Link

ps. Afterwards you could try the installation again?


Following Toon's Unix Recipes, for example (and the above examples):

sudo apt-get install ffmpeg
ffmpeg -i track1.aiff -f mp3 -acodec libmp3lame -ab 192000 -ar 44100 track1.mp3

(Older versions of Ubuntu can use avconv instead of ffmpeg.)


How to install ASUS' AI Suite II program?

It is unlikely that this program will work in any form on Linux, even with wine, as it is probably too low level. You will only be able to use it on Windows.


Rearrange open programs in Xubuntu task bar

It should be possible with this configuration:


Wireless not working anymore on Acer Aspire 6930G when I upgraded to 12.04

I had a similar problem, and this helped.

https://help.ubuntu.com/community/WifiDocs/Driver/bcm43xx#Installing_STA_drivers

Note: In my case at this step  'System > Administration > Hardware/Additional Drivers,'  The driver failed to install correctly, but it starting working after rebooting the laptop.

Good luck.


bind Super key to control key Ubuntu 14.04

If you don't have installed Tweak tool install it and open it. In the Typing section you will see Alt/Win behavior and you can select Ctrl is mapped to Win keys. I think that's what you're looking for.


Vim not using 256 color, ncurses-term installed, "xterm-256color: command not found"

Turns out I didn't take a close enough look at the 256-color palette, the colors I was looking for are not in the palette, and thus that is the reason I was having a problem.


Command to open a program that doesn't come with Ubuntu?

Chromium's command is chromium-browser.

If you need to find the name of a command, you can right click your menu, click edit, and find the program's entry. Click edit on the entry and it will show you the command.

You can also begin typing the name of the program in a terminal (for example chr) and press tab to see a list of potential matches.


First of all install gnash , which can be used as a standalone swf player. As you said, you were using LaTeX, you can write something like \href{run:/tmp/test.swf} in your file.

These steps are explained in more details on tex.stackexchange.com.


Trying to replace Ubuntu with Kubuntu but "Replace" option does not show up?

I'm pretty sure that Ubuntu and Kubuntu are incompatible, seeing as they are different operating systems with different installers, slightly different core files, extremely different default software, etc.

I would recommend doing either:

backing up all your important files in a separate partition, then installing Kubuntu over the Ubuntu partition.
Just install Plasma and the KDE software that you want. You can change the desktop environment you want to login to from the login screen.


How to change font color of subtitles in totem movie player

No, I don't think so. Totem uses the "Pango" font description in order to specify the font to be used in the subtitles, and Pango doesn't include color as a parameter. The values you may change are "[FAMILY-LIST] [STYLE-OPTIONS] [SIZE]". Please check https://developer.gnome.org/pygtk/stable/class-pangofontdescription.html. Valid representations are: "sans bold 12", "serif,monospace bold italic condensed 16", or "normal 10". I use stock Totem in Ubuntu Gnome version 16.04.4, but since Totem has been rewritten or rebuilt with different names and frontends, I couldn't tell about other versions or spins.


Debugging the execution order of Upstart jobs

Boot your system adding '--debug' to the grub command line, and once the system has booted, look at your system log file (for example '/var/log/syslog' on modern versions of Ubuntu). This will give you information on events emitted and jobs changing state. Here's an example of the format:

http://upstart.ubuntu.com/cookbook/#if-job-is-not-currently-running

See also:

http://upstart.ubuntu.com/cookbook/#debugging


TP-Link TP-WN727N not working on Ubuntu 14.04.1

TP Link 727n v1 or v3. Ralink chipsets are rt3070 v1 and rt5370 v3.  The driver is rt2800usb.The version # can be found at the end of the FCC ID: ########V3 located on the back of the device. Also see https://wikidevi.com/wiki/Wireless_adapters/Chipset_table for more info.
As far as the chart states Mediatek chipsets don't work in permicuous mode or monitor mode.


List files/directories according to their modification time

To list files/dirs according to modification date, newest first

ls -lt

To list files/dirs according to modification date, oldest first

ls -ltr

Reading man page

man ls

 -t     sort by modification time, newest first

 -r, --reverse
              reverse order while sorting


This a bit non-specific, but in general you will need to

Run a firewall like iptables or ufw to manage connection to open ports.
Only install software your require.
Only run services that are essential to the running of the server.
Keep that software up to date with all security patches.
Set up new users with the least privileges they require to perform their duties.
Run denyhosts or fail2ban to check for brute force attacks.
Run logwatch to email you of any anomalies in log files.
Check your logs often for suspicious activities.
Use sudo always and use strong passwords.
Disable weak and medium strength ciphers in SSL for apache, exim, proftpd, dovecot etc.
Set services to only listen to localhost (where appropriate).
Run chkrootkit daily.
Run clamscan as often as is required to check for windows viruses (if appropriate).
Be vigilant, know your server, know what it should be doing and what it shoudn't be doing.

You will only keep things secure by constantly checking and securing. If you don't know what something does or how or why, or something looks suspicious, just ask others for advice.


If all you truly want to see is the pid then in the terminal type:

PS1="${PS1/\\u@\\h: \\w/$$}"

If you want this to be persistent every time you open your terminal then add the command somewhere near the bottom of ~/.bashrc after all the other PS1 definitions are set.


your acpi is complaining for some reason and the only workaround for this is to disable acpi on your system during the installation.

There are 2 ways to workaround this issue:

you can either set boot parameter to nomodeset (here are the steps/details):

ACPI : EC: Fail in evaluating the _REG object of EC device. Broken bios is suspected

Or set boot parameter to acpi=off

If you don't know how to set boot parameter follow the step by step guide of official ubuntu here:

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

This is probably due to driver incompatibility for acpi (newer), once you hace the system up and running without acpi you can find the correct drivers and update them.


Have you tried:

sudo systemctl reboot --firmware-setup

  --firmware-setup

  When used with the reboot command, indicate to the system's firmware to boot into setup mode. Note that this is currently only supported on some EFI systems and only if the system was booted in EFI mode


lampp is not starting because "Another web server is already running"

You have already installed and run apache httpd server. Better just remove XAMPP, install (if its not installed) mysql and php and voila, you have what you need


How do I reset the grub configuration files in /etc/grub.d?

If you dorked the grub...it's an easy fix.

First here are the Grub docs https://help.ubuntu.com/community/Grub2
Second here are the boot repair docs https://help.ubuntu.com/community/Boot-Repair


Accessing from another System with the same user

Basically, permissions are based on user (or group) ID, not their name or password. So I suspect your users A and B in both systems to have identical IDs (e.g. 1001), which makes possible any kind of modification in A's directories for B and vice versa.

You can check this by

id -u

for users on both systems. If necessary, user ID can be changed using

usermod -u <newID> <username>


Are there affordable and recognised Ubuntu/Debian online certification courses/exams?

If you have the opportunity to travel to conferences, occasionally Linux Professional Institute will offer their most basic exam on site, for free.  It is a first step towards full certification. Since the Ubuntu certification is based on the LPI, it may be possible for you to take several exams spread out over time to decrease the impact on your finances.


Sound not working and on-board audio seems to not be present

Sounds like your audio is turned off in the bios .

Or you need to find a driver for it. From lspci its saying that your audio device is a nVidia Corporation High Definition Audio Controller (rev a1)

01:00.1 Audio device: nVidia Corporation High Definition Audio Controller (rev a1)

I believe your mistaken about it being Realtek ALC889 . Realtek ALC889 is a common sound card device and ubuntu will have sound out-of-box.

If you need help finding the correct driver . Google your model# of your motherboard and research what sound card device it provides and then you can google the name of the sound card device  (example: type in the google search " Nvidia GeForce GT 220 Ubuntu driver " )  this should lead you to some pages that will help you figure out what driver you may need.


is it possible to upgrade to a new version via terminal?

Yes you can. And it's the best way (for me at least).

check for new versions:

do-release-upgrade -c

and then:

sudo do-release-upgrade

for more info:

man do-release-upgrade


I had this same problem, but I was using Privoxy with Dansguardian to filter content. If this is your setup, too, it is not Privoxy that is at fault, it is Dansguardian. I was thinking Privoxy, too, but a check of Dansguardian showed it was blocking yimg.com for a css.

To /etc/dansguardian/list/exceptionsitelist I added:

yahoo.com
yimg.com

Did a

# service dansguardian restart

And yahoo mail magically worked.

I hope this helps someone out there.


Here is a partial answer: once you remapped a different keyboard than your default one (I don't know how to remap to be honest), go to Settings > Region & Language > Input sources. You will find your two keyboard listed.

Go to Options above the keyboards list and select "Allow different sources for each window".

Once you open NoMachine for the first time, switch to your second keyboard, and that's it! That keyboard will work only when you open NoMachine.


If all you want is to send mails from your server, you don't need to install your own mail server, you can send emails by SMTP. For this you can try ssmtp (Simple SMTP). More details here: http://www.havetheknowhow.com/Configure-the-server/Install-ssmtp.html


Okay, so I found a solution for my problem.

I followed the instructions in this tutorial:  https://wiki.archlinux.org/index.php/PulseAudio/Troubleshooting#Setting_the_default_fragment_number_and_buffer_size_in_PulseAudio

If you interested in the logic behind the solution, feel free to check the link yourself. This answer will be purely technical.

in short, I first ran:

sudo gedit /etc/pulse/default.pa

and added tsched=0 to the existed line - load-module module-udev-detect.  meaning that the end result should be: load-module module-udev-detect tsched=0

according to the tutorial it turns off something called "timer-based audio scheduling".

afterwards I ran the command: pactl list sinks and got a long output of informations and parameters.

Sink #0
State: RUNNING
Name: alsa_output.pci-0000_00_1f.3.analog-stereo
Description: Built-in Audio Analog Stereo
Driver: module-alsa-card.c
Sample Specification: s16le 2ch 48000Hz
Channel Map: front-left,front-right
Owner Module: 6
Mute: no
Volume: front-left: 47842 /  73% / -8.20 dB,   front-right: 47842 /  73% / -8.20 dB
        balance 0.00
Base Volume: 65536 / 100% / 0.00 dB
Monitor Source: alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
Latency: 92790 usec, configured 99954 usec
Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
Properties:
    alsa.resolution_bits = "16"
    device.api = "alsa"
    device.class = "sound"
    alsa.class = "generic"
    alsa.subclass = "generic-mix"
    alsa.name = "Generic Analog"
    alsa.id = "Generic Analog"
    alsa.subdevice = "0"
    alsa.subdevice_name = "subdevice #0"
    alsa.device = "0"
    alsa.card = "0"
    alsa.card_name = "HDA Intel PCH"
    alsa.long_card_name = "HDA Intel PCH at 0xef328000 irq 131"
    alsa.driver_name = "snd_hda_intel"
    device.bus_path = "pci-0000:00:1f.3"
    sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
    device.bus = "pci"
    device.vendor.id = "8086"
    device.vendor.name = "Intel Corporation"
    device.product.id = "9d71"
    device.form_factor = "internal"
    device.string = "front:0"
    device.buffering.buffer_size = "17632"
    device.buffering.fragment_size = "4408"
    device.access_mode = "mmap"
    device.profile.name = "analog-stereo"
    device.profile.description = "Analog Stereo"
    device.description = "Built-in Audio Analog Stereo"
    alsa.mixer_name = "Conexant Generic"
    alsa.components = "HDA:14f11f72,104311b0,00100000 HDA:8086280b,80860101,00100000"
    module-udev-detect.discovered = "1"
    device.icon_name = "audio-card-pci"
Ports:
    analog-output-speaker: Speakers (priority: 10000)
    analog-output-headphones: Headphones (priority: 9000, not available)
Active Port: analog-output-speaker
Formats:
    pcm

you should focus only on these 4 lines:

  Sample Specification: s16le 2ch 48000Hz

  alsa.resolution_bits = "16"

  device.buffering.buffer_size = "17632"

  device.buffering.fragment_size = "4408"

using the information from these 4 lines, you're going to calculate 2 values :

value 1:

(in simple math: https://i.stack.imgur.com/CzEq3.png):

In the first line I got 2ch 48000Hz and in the second line i got the value "16" so I simply did 2*48000*16=1536000.

now divide the value from the forth line(for me "4408") by the result you've just calculated(for me 1536000), and multiply it by 1000.

meaning that for me: value 1 = 2.86979.

value 2:
simply divide the value from the first line by the value from the forth line.

meaning that for me: value 2 = 17632/4408 =4.

-

Finally run the command: sudo gedit /etc/pulse/daemon.conf

look for the lines:

; default-fragments = ---
; default-fragment-size-msec = ---

and Enter the values like that:

; default-fragments = value 1
; default-fragment-size-msec = value 2

Now all left to do is to restart pulseaudio. run:

killall pulseaudio
pulseaudio --check

and afterwards start pulseaudio from the run dialog (Alt + F2 by default)

Hope it was helpful :)


My Ubuntu 15.10 doesn't automatically lock

Brightness does not change due to unsupported hardware on laptops. In desktops hardware buttons exist. Searching display model for Linux support can provide more information


This works perfectly for me ..

Make some path under HOME. (I had many permissions problems when trying to do this under /media )

mkdir ~/myphone

Connect the device to the USB cable
Ignore any messages on Ubuntu, but take the "allow" option on the Phone, if it appears
Use jmtpfs to mount the mtp device

jmtpfs ~/myphone

Device 0 (VID=04e8 and PID=6860) is a Samsung Galaxy models (MTP).
LIBMTP ERROR: couldnt parse extension samsung.com/devicestatus:0

Although it gives an error, the device is available

jmtpfs -l

Device 0 (VID=04e8 and PID=6860) is a Samsung Galaxy models (MTP).
Available devices (busLocation, devNum, productId, vendorId, product, vendor):
1, 9, 0x6860, 0x04e8, Galaxy models (MTP), Samsung

Check with the mount command ...

mount

jmtpfs on /home/oygle/myphone type fuse.jmtpfs (rw,nosuid,nodev,relatime,user_id=1000,group_id=10 00)

Also the ls command

ls -al  ~/myphone

total 4
drwxr-xr-x 3 oygle oygle 0 Jan 1 1970 .
drwxr-xr-x 47 oygle oygle 4096 Sep 14 08:50 ..
drwxr-xr-x 15 oygle oygle 0 Apr 4 4460147 Phone

It can be accessed via Dolphin,etc
Unmount before disconnecting the cable

fusermount -u  ~/myphone

Disconnect the micro usb cable
I have no idea if all the various commands to modify files, shown in the tutorial at https://ubuntuforums.org/showthread.php?t=2226702 was necessary or were used by jmtpfs. Certainly in the early stages of attempting this, those modifications were done, but IMO the tutorial was for "connecting", not mounting.


How to run a Phantomjs server with an upstart script?

You can just use the console log stanza to have the logs stored in /var/log/upstart. console log is actually the default, so they should appear there with this job automatically:

start on runlevel [2345]
stop on runlevel [016]

respawn

exec phantomjs /path/to/the/server.js -host 127.0.0.1 -port 1337

I did not reset the respawn limti, as the one that Stef used is a little aggressive and could result in Upstart thrashing the respawn (doing it constantly even though it is probably best to just give up).


copy - text functionality is broken in 12.04

By any chance, are you copying and pasting between Atom and Chrome? A bug in 0.189.0 caused Chrome and Atom to hang if you were to copy and paste between them.

This has been fixed in release 0.190.0 (https://atom.io/releases) and it seems to be working fine now on my machine (albeit with fairly limited testing at this point).


What is the Difference Between `apt-get purge` and `apt-get remove`?

As the man apt-get page says:

  remove - remove is identical to install except that packages are removed instead of installed. Note that removing a package leaves its configuration files on the system. If a plus sign is appended to the package name (with no intervening space), the identified package will be installed instead of removed.

  purge - purge is identical to remove except that packages are removed and purged (any configuration files are deleted too).

This of course, does not apply to packages that hold configuration files inside the user's home folder (e.g. /home/SexyNoJutsuUser), these files will not be touched ( Why does "Purge" not remove everything related to an app? )

So for example, if you were to purge Chrome, Firefox, Kodi or any other that holds some configuration files inside your /home folder, these configuration files will stay there.

On the other hand if you were to install Apache, squid, MySQL or any other services similar that save their configuration files in /etc, these configuration files will be deleted if you use purge.


Problem after mysql-server installation I cant install any thing in ubuntu 12.04.1 now

It seems likely that you have added third party repositories or PPAs to your system improperly. If I were you, I would only install packages from the official Ubuntu repositories using the Software Centre, Synaptic or apt-get.

To remove third party repositories and PPAs, follow these instructions or look at this question

Open Ubuntu Software Centre.
Click Edit, Software Sources...
Click "Other Software" tab.
Untick all the software sources in the list.

Once you are sure this has fixed the problem, you can re-enable each repository one by one until you narrow down the problematic repository. On the command-line, you'll need to run sudo apt-get update after modifying the software sources list.

You probably want to take a look at ppa-purge. It has the added benefit that it will uninstall packages originating from the PPA as well.

In your case, you need to uninstall at least these packages:

 sudo apt-get -f remove mysql-server-core-5.5 mysql-server-5.5 mysql-server-5.5 mysql-server

If you find all this confusing, I recommend you go to the Ubuntu IRC channel or UbuntuForums Absolute Beginner section. AskUbuntu is designed around asking one specific question for one specific answer at a time, and may not be exactly what you're looking for in this case.


First of all repair your UNMOUNTED disk with a command started from your Live CD:

fsck.ext4 -cDfty -C 0 /dev/sd** (assuming ext4 partition)

If this succeeds, it should boot.


I need to download Ubuntu onto a USB drive to load it into a Toshiba Satellite 55c through BIOS

Download the Linux version you need. Then use LinuxLive USB creator to create a bootable USB get it here: http://www.linuxliveusb.com/fr/
You will need a working computer to do so.
When your bootable USB is done, boot your Toshiba with the USB stick in your computer. From the boot menu (You might have to use F12 or DEL to access it), select USB to boot from, install Linux. At the end of the installation, Linux will ask you to restart your computer. Do so and upon rebooting, access your boot menu again, then select your hard drive as a boot. You can now enjoy your new Linux computer.


Run in terminal

sudo tee /etc/modprobe.d/blacklist-acer-wmi.conf <<< "blacklist acer_wmi"

This will disable the acer_wmi module that blocks Wi-Fi.

Your previous command was wrong. You need to remove acer-wmi.conf by

sudo rm /etc/modprobe.d/acer-wmi.conf


Overheating is a hardware issue - software should be unable to make properly maintained hardware overheat.

The most common overheating issue for laptops is dust accumulation in the cooling system. For that, you should clear your heatsinks and airducts with some forced air. You may have to open the case to do this ; refer to maintenance manuals for your hardware if you can get them.

Disk space issues are nothing to do with overheating. It looks like your entire disk is allocated to the OS, so you probably have filled it up - I'd guess with video media, since few other things fill 640GB these days. If the lack of disk space is preventing you from booting the OS, boot from a LiveCD or LiveUSB, mount your OS drive, and delete some files.

Edit : since you edited your question things are clearer ; it's much more likely that you've filled your root partition. Your root partition only seems to have about 10GB of space, which is on the small side. One place you might look for data to remove is in /var/log, another is /var/cache, particularly /var/cache/apt where the package manager keeps archives.

You might want to consider backing up your home folder (I presume this is mounted in /dev/sda6) and repartitioning your disk so that more than 10GB is available to the root OS.


How can I install Seamonkey on Ubuntu 18.04 LTS?

I can recommend to install SeaMonkey browser using UbuntuZilla APT repository. This package will be updated on every apt upgrade.

You need to execute the following commands to add repository, its key and package installation:

cat <<EOF | sudo tee /etc/apt/sources.list.d/mozilla.list
deb http://downloads.sourceforge.net/project/ubuntuzilla/mozilla/apt all main
EOF

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 2667CA5C
sudo apt-get update
sudo apt-get install seamonkey-mozilla-build

You will get SeaMonkey 2.53.2 with this method.


Adding user with custom home directory, and setup mysql user/password

jiewmeng, thats generally how such things are done. You should note:

FTP is insecure, so the password used for that should not be
allowed to use SSH. I would suggest using SSH keys only for shell access, and putting people in full chroot jail.
MySQL is NOT safe to expose on the internet. Connections take up a lot of RAM, and it is very easily DoS'd off the net. Also for multi-tenant mysql, its nearly impossible to limit one user's ability to completely use up all of the resources of the box.
proftpd actually lets you store users/passwords in mysql.. so you can maybe leverage that to have only one place to manage the password.


How to add decorative borders in LibreOffice Writer?

I googled and found this comment on their independent QA site:

Defining Graphics or Colors in the Background of Pages (Watermark)
1. Choose Format - Page.
2. On the Background tab page, select a background color or a background graphic.

Edward (May 22 '13)

See also:
This and that.
manj_k (May 22 '13)


this is how I fixed this. Turns out the nvidia drivers were not working for whatever reason.

sudo apt-get remove --purge nvidia -*

then reinstall

sudo apt-get install nvidia-331 nvidia-331-uvm nvidia-opencl-dev nvidia-modprobe


Maximize Terminal Window on Launcher where Terminal=True

First open the vim. Then maximize it.
Type

  :set lines
  :set columns

Remember the numbers. For me, 44 lines and 168 columns are there in maximized terminal.

You can set up an auto command in your ~/.vimrc such that terminal maximizes every time when You open a file.

 :au BufEnter *.* :set lines=44 columns=168

Now, every time when you open a new file, the window will be expanded automatically.

Or, you can put a command like this in ~/.vimrc

 :command! Max :set lines=44 columns=168

Then, you can expand the window by typing

 :Max

It will be expanded.


Why does chmod 777 -R / leave the system unusable?

There are a couple of reasons.

First in addition to the usual read/write/execute permissions there are some other bits that file permissions contain. Most notably setuid and setgid. When a program with one of these permission bits is set is run it gets the "effective UID" and/or "effective GID" of the program's owner rather than the user that ran it. This allows programs to run with more permissions than the user that ran them.  It is used by many crucial system utilities including su and sudo. Your chmod command clears these bits leaving the utilities unusable.

Secondly some programs (notably ssh) do a sanity check on file permissions and refuse to use files with permissions they see as insecure. This reduces the risk of careless admins accidentally leaving security holes but it makes dealing with wiped-out file permissions all the more painful.


Ok, I solved it. The french message is just wrong, it's not "but 3.13.0.39.46 will have to be installed", it's "but 3.13.0.39.46 IS installed", so it was requesting for a downgrade.

When u do the same with aptitude, u get the right message, and it proposes you to downgrade.


How to initialize a GTKDialog in Python (Gtk3+)

I can't reconstruct your problem, but I would assume this should fix it:

Gtk.Dialog.__init__(self, _t("URL_DLG"), parent, 0)
self.add_buttons(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
                 Gtk.STOCK_OK, Gtk.ResponseType.OK)

EDIT: as pointed out by OP

Gtk.Dialog.__init__(self, title = _t("URL_DLG"),
                          parent = parent,
                          flags = 0)
self.add_buttons(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
                 Gtk.STOCK_OK, Gtk.ResponseType.OK)


Ubuntu is not Detecting my Graphics Card

Solution (By Pilot6):
Run the command: sudo ubuntu-drivers autoinstall
And Reboot


Unable to download anything from apt-cacher-ng proxy

you can increase limits like this:

edit file /etc/security/limits.conf

# vi /etc/security/limits.conf

Set program_user soft and hard limits as follows:

program_user soft nofile 4096
program_user hard nofile 10240

Save and close config file. Check limits, try this:

# su - program_user
$ ulimit -Hn
$ ulimit -Sn


I need a serial port program with logging timestamp

If you don't need a terminal emulator, you can use socat with the -v option which logs all i/o with a timestamp. For example,

socat -v READLINE /dev/ttyS0,b19200,raw,echo=0 2>/tmp/log

Whatever you type on the stdin of this command will be sent to the serial port ttyS0 at the given baud rate etc. And any input from the serial port will appear on stdout. In /tmp/log you will find lines like

> 2019/11/06 13:56:27.996129  length=6 from=0 to=5
hello
< 2019/11/06 13:56:37.024451  length=8 from=0 to=7
my reply

which corresponds to typing "hello\n" and getting "my reply" sent back.


Dual boot USB memory stick with file partition

Ventoy
I think Ventoy will do what you want

Ventoy will boot the Windows installer ISO and almost any Linux ISO: https://www.ventoy.net/en/index.html

Ventoy will boot a Linux ISO either Live or Persistent modes. It will boot multiple ISO's, just drag and drop the ISO's onto the USB.

Ventoy will make persistence files greater than 4GB and having exFAT file system has "unlimited storage". Information on the persistence plugin is on this page: https://www.ventoy.net/en/plugin_persistence.html

Ventoy uses the familiar GRUB2 bootloader.

There is a Windows version and a Ubuntu version of Ventoy.


You might try the command

$ amixer -c 1 set Master 10%-

The parameter -c specifes another audio card.


Maverick userland under Lucid 10.04 for newer X11 and graphics use

You certainly could install and use Maverick userland.  Check out my answer to a similar question for a brief howto.

It's likely that some of the performance improvement you noticed in 10.10 is due to the newer kernel, and 10.10 userspace might not work properly on the 10.04 kernel.  Fortunately, it's quick, easy, and safe to have multiple kernels installed in parallel.  Grab the linux-lts-backport-maverick kernel from lucid-updates and you'll be able to boot into the newer kernel.


I followed some threads and changed /etc/default/grub file to reflect the following:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

Change to

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi=force"

Don't forget to run sudo update-grub afterwards to commit the new configuration.


what is the difference between freerdp and xrdp?

FreeRDP is an implementation of the remote desktop protocol (http://www.freerdp.com/) to connect to RDP-Servers. The software remmina seems to use it.

XRDP is an server software to allow other clients connect to the system using a rdp client.


I had the same problem .The problems seem to vanish when i used pppoeconf to connect. install pppoeconf and connect using it.


I went into /etc/default/grub and uncommented the line

GRUB_TERMINAL=console

and it worked.  That is, on bootup I got and old-school list of possible boot options, and I was able to choose my old partition (sda1).  It booted into that partition without any error, so far.  So it appears that for whatever reason, my configuration did not like the graphical terminal.


Keep session on while in virtual terminal

You may have enabled the screensaver and the "lock screen" option; you can verify this by waiting for the screensaver timeout while you stay in the KDE screen (instead of switching to a virtual terminal), which should result in the same behaviour. To solve this, either switch of the screensaver altogether, or disable the lock option - which may not be what you want for security reasons.


How do I make bash warn me when overwriting an existing file?

You should use the interactive mode which makes sure you get a 'prompt before overwrite'

cp --interactive
mv --interactive

Or in short

cp -i
mv -i

Type man cp or man mv on your command line to find out more.


Help with syntax and customization of .desktop files for Unity

Limiting/changing your question a bit into "What are the different sections in a .desktop file for?"

Explanation of different sections in a .desktop file

In my answer, I will use a simple .desktopfile, since the example of firefox has many distracting lines, not making the answer any clearer.

The principle however is exactly the same for all .desktop files, to be used in Unity.

1. The "body" of a basic .desktop file

Say you have an application (gedit in the example), but no .desktop file. You could simply create a file:

[Desktop Entry]
Name=Gedit
Exec=gedit
Type=Application

name it e.g. gedit_starter.desktop. To use it from your desktop (double-click to run the command gedit), simply make it executable. To make it appear in Dash, save it in either /usr/share/applications (for global use) or ~/.local/share/applications (for local, personal use).

Adding extra options (entry keys)

The example above is a .desktop file in its simplest form; a simple command, a generic icon. You can add additional lines, to give the .desktop file an icon, add extra options or localized names etc. See this link to find options to add entry keys, such as a customized icon.

Note that the (possibly set-) icon and the set name (in the Name= line) will not show on the file if you store it on your desktop, unless you make it executable. See below the example of firefox:

non-executable

executable

2. Adding right-click items (from the Unity Launcher)

The section, as mentioned in [1.] contains the "main" command of the launcher file. This will run if you click on it (Unity). To create right-click items, you need two additional sections:

a line, listing those additional right-click options, separated by a ";". From the "real" gedit``.desktop file's example:

Actions=Window;Document;

Each of these items corresponds to:
a shortcut section, like:

[Desktop Action Window]
Name=Open a New Window
Exec=gedit --new-window
OnlyShowIn=Unity;

Looking into this section:

[Desktop Action Window]

refers to the name, as listed in the Actions= line. The name may contain spaces, e.g.Recently used, as I did in this answer.

Name=Open a New Window

refers to the name, as it appears in your interface

Exec=gedit --new-window

refers to the command to run on right-click

OnlyShowIn=Unity;

refers to the desktop environments that should display the desktop entry

That is basically how it works.

Your example

If I understand your question well, and you want to add both Persistent and unsafe to your firefox quicklist (as a right-click option), you'd need to change the line:

Actions=NewWindow;NewPrivateWindow;

into:

Actions=NewWindow;NewPrivateWindow;Persistant;unsafe;

and add to the bottom of the file two shortcut sections:

    [Desktop Action Persistant]
    Name=Persistant
    Exec=<command>
    OnlyShowIn=Unity;

    [Desktop Action unsafe]
    Name=unsafe
    Exec=<command>
    OnlyShowIn=Unity;

where you need to replace both <command> by the commands you want it to run.

Note

If you want to edit a .desktopfile, always copy the default (global) file from /usr/share/applications to ~/.local/share/applications (for local, personal use), and edit the local one. After log out / in, the local one will overrule the global one.


Package 'libudev0' has no installation candidate

You can download libudev0 from:
http://packages.ubuntu.com/precise-updates/amd64/libudev0/download

And install it by:
sudo dpkg -i libudev0[verion-and-stuff].deb

And then install reditr.deb


Unable to boot from USB/SSD on ACER Nitro 5 AN-515-42 with Radeon RX560

It looks like Acer Nitro need pci=noacpi boot parameter. Many systems need one or several boot parameters. If nVidia nomodeset parameter required.

https://wiki.ubuntu.com/Kernel/KernelBootParameters

https://ubuntuforums.org/showthread.php?t=2413504 &

https://ubuntuforums.org/showthread.php?t=2412117 &

https://community.acer.com/en/discussion/555251/unable-to-install-ubuntu-in-my-nitro-an512-42

Most new system, even though new, need UEFI update from vendor and if a SSD firmware update to SSD.

Acer also needs "trust" setting in UEFI for ubuntu entry.
Acer Trust Settings - details, some now report that then secure boot has to be on to set trust:

https://ubuntuforums.org/showthread.php?t=2297947&p=13369742#post13369742 &

https://ubuntuforums.org/showthread.php?t=2297947 &

Acer Aspire E15 will not dual boot, many details Trust settings in step 35

http://askubuntu.com/questions/627416/acer-aspire-e15-will-not-dual-boot


Can I share workspace in eclipse in dualbooting system?

As long as the partition is NTFS you can share the workspace. Linux partition are difficult to load in Windows.

Just set the workspace to a directory off the root of the NTFS root drive so in Windows it will be c:\workspace and when you boot into Ubuntu and click on the Windows Partition via Nautilus it will have that directory in /media/username/drivename/workspace or whatever Nautilus decides to call the drivename


How do I fix a dark screen on HP Folio 13?

A quick search yielded this post in the forums: http://ubuntuforums.org/showthread.php?t=1913496

Try using this command on the shell:

sudo setpci -s 00:02.0 F4.B=90

If you want you can change the last number for any hexidecimal number from 00 to FF.


How to install X11 legacy apps (desktop apps) on the M10 aquaris

Using apt-get can break your system (no more OTA updates at least, and potentially more breakage) and it wouldn't help you anyway because legacy apps need Libertine/Puritine to run. You would need to enable r/w access to your system partition for apt-get to work at all, but that seems to be strongly discouraged.

There is currently no supported way to install legacy X11 software, but it should all be ok in a few weeks when OTA11 comes out and we get the Libertine GUI app and other tools to make it work.


Copy files from remote Ubuntu to local Mac

@ovc had it right, but there is a syntax error, and my edit got rejected for some reason. You need to have a colon between the user and filepath on the ubuntu side, and on the mac side you need to have the /Users/username/ portion in the filepath. Like so:

scp username@192.168.1.111:/path/to/myfile.txt /Users/Jamie/local/path/to/myfile.txt

This assumes you have private key authentication set up.


You don't need to remove Windows 7. During the installation you will be prompted, if you want to remove it.

Simply download the iso of Ubuntu (e.g. Ubuntu 14.04 desktop from here http://releases.ubuntu.com/14.04/). Then you can burn it to DVD or make liveUSB (How to create liveUSB on WINDOWS http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows).

Then just restart your computer and boot form DVD/USB.
You will be prompted if you want to install Ubuntu alongside your current OS, or to erase whole disk and install Ubuntu. You want the second opinion. Warning, this will delete every single file from your Windows installation.

Then just follow the on-screen instruction to finish the installation process.

Enjoy Ubuntu and welcome to the community! :)


Found it out myself.

Due to 'protection' subfolders aren't readable by default. You need to chmod (777) all folders with the following command:

sudo chmod -R 777 folder.

In my case:

sudo chmod -R 777 /home/username/folder


Can I extract a printer driver from a package?

I just got a new Xerox and I downloaded the linux driver package from Xerox extracted it and used a file called modelname.PPD.
New to Linux so I don't know if it's the right way but it works :)

Link to driver


wget-command for downloading more than one page

wget -Ek https://example.com/foo/bar/{,2}

The last bit {,2} is a brace expansion which instructs wget to download:

https://example.com/foo/bar/
https://example.com/foo/bar/2

To download pages 3 through 6, use either of these commands:

wget -Ek https://example.com/foo/bar/{3,4,5,6}
wget -Ek https://example.com/foo/bar/{3..6}

And there are a couple of really useful wget options: -E and -k.

-E: If a file of type "text/html" is downloaded and the URL does not end with the regexp `\.[Hh][Tt][Mm][Ll]?', this option will cause the suffix ".html" to be appended to the local filename.

-k: After the download is complete, convert the links in the document to make them suitable for local viewing (i.e., convert relative links to absolute links).

Please read the wget man page and manual for more information.


How do I view contents of Android(4.1.2) folders on Ubuntu?

So I switched to Lubuntu 13.04 and now my android, and OS effortlessly work perfectly!
This is for a Compaq nx6325 notebook.


Ubuntu 12.04 LTS: Error message "Failed to execute child process"

Add a desktop launcher following this tutorial. In the command field enter matlab -desktop and choose a name and comment of your liking. You can add it to the launcher simply by dragging and dropping it.

Edit: If you installed matlab in your home folder or any other custom directory, replace matlab -desktop with /path/to/matlab -desktop.


How to make VMware player virtual machine to use eth0 IP address from host machine (Ubuntu 14.04) instead of VMnet?

You can make the virtual interface of the guest a member of the "outside" network by selecting bridged mode. That way you can assign an IP-address that is valid there.

But you cannot assign the same IP-address that the host is using to the virtual interface. Two interfaces in the same network cannot have the same IP-address.


Start by removing the flgrx applications:

sudo apt-get remove --purge fglrx-core fglrx

The load ppa-purge  sudo apt-get install ppa-purge  -  this program will attempt to remove applications installed from a ppa, and mark the ppa as being unused.

sudo ppa-purge ppa:ubuntu-x-swat/x-updates

Remove and re-install the xorg drivers:

sudo rm /etc/X11/xorg.conf

sudo apt-get install --reinstall xserver-xorg-core libgl1-mesa-glx:i386 libgl1-mesa-dri:i386 libgl1-mesa-glx:amd64 libgl1-mesa-dri:amd64

Finally, run sudo apt-get update && sudo apt-get upgrade


I've found a simple workaround.

The problem only appears if I turn off the computer from Windows and start Ubuntu on the next power-on. Then we got into that "Invalid ROM contents" message. If that happened, it's enough to first start Windows and restart the computer from Windows. Ubuntu starts without problems after that.

Since I encountered this problem, I added an SSD into the computer, reinstalled Windows once again, moved Ubuntu to the SSD, changed the monitor (the old one was connected through DVI, the new one through Display Port). None of this affected the problem. It's still easily reproduced on my computer. Steps are simple: start Windows, turn off the computer from Windows, turn on the computer and try to start Ubuntu.


Isn't python-is-python3 just creating a symlink from /usr/bin/python to python3?

Yes it is.

Is it any different from the alias approach I tried?

Yes it is - bash aliases are only expanded in an interactive bash shell. The shell used by make is /bin/sh by default, and is not interactive. Symbolic links are handled at the filesystem level and are hence independent of the shell.
For further discussion about shells and Makefiles, see How can I use Bash syntax in Makefile targets?


two things can cause this problem:

dont start Ubuntu after you hibernate windows. Always do proper shutdown before you start Ubuntu.
Disable Hybird Shutdown in windows. Here is how you can do that.

now all you can do is shutdown Ubuntu and start windows then follow the second method and restart and switch to Ubuntu

Hint: Please read the last sentence from the error you got:

Please resume and shutdown Windows fully (no hibernation or fast restarting), or mount the volume read-only with the 'ro' mount option.


If you have Windows also (Dual Boot). This may be due to Windows fast boot. Disable it.

Go to control Panel.
Click Power Options.
Click Choose what the power buttons do.
Click Change settings that are currently unavailable.
Uncheck Turn on fast startup (recommended).
Click Save changes.
Reboot


How can I tell whether a package was installed by dpkg or apt?

Compare the log of /var/log/apt/term.log, which is the log file generated by apt and /var/log/dpkg.log, which is the log file generated by dpkg. If you note a package name which can be found in /var/log/dpkg.log but not in /var/log/apt/term.log, it is very likely that you installed the package by dpkg that time.
Please remember apt is a frontend for dpkg. Thus, it is recommended to remove any package by apt rather than dpkg, because apt will handle the dependency to remove those packages which will not be used by any other packages (, or mark them as "not use anymore" to let you remove them later. It depends on the exact apt options you actually use). However, it is no harm to you to remove your package by dpkg if you want. You will just likely leave many packages that you won't use anymore.


How do I fix broken dependencies after aborted installation of gnome/libreoffice?

Following this thread and do next:

sudo rm /var/cache/apt/archives/* -vf
sudo apt-get update
sudo apt-get dist-upgrade

if required:

sudo apt-get install --reinstall libreoffice

or purge it and install it back with:

sudo apt-get remove --purge libreoffice
sudo apt-get install libreoffice


Wouldn't that run it before there's an X Server around for it to interface with?

The simplest way to get this to work would just be to add sh -c "xinput set-button-map 10 1 2 3 4 5 6 7 9 8" to your start-up applications and that'll run it when you log in.

There's also /etc/xdg/autostart for all users, into which you can write .desktop files (look at the existing ones for syntax help).


Solved entering in shell from installation media.
Thanks


copy file from folder in user abc to a root folder

if you, as user abc, type the command pwd (print working directory), it will show you the path to the directory you are in

Also using sudo in front ofthe mount command will execute the command with "root rights".


mapping problem : "go back" button opens a dialog box in 12.10

I used this command:

dpkg-reconfigure keyboard-configuration

to reset the keyboard layout and choose another layout. Now it is ok.


Remapping keys: Caps Lock to Escape and vice versa in Ubuntu 13.10

You can still directly access the underlying dconf key from the command line, as follows:

dconf read /org/gnome/desktop/input-sources/xkb-options
dconf write /org/gnome/desktop/input-sources/xkb-options "['caps:escape']"

(It takes effect immediately.)

To enable multiple XKB options, list them as comma-separate quoted strings; for example, I also use Menu as my compose key:

dconf write /org/gnome/desktop/input-sources/xkb-options "['caps:escape', 'compose:menu']"

See the xkeyboard-config manual page for a full reference of the XKB options you can use.


Disable WiFi on each boot using systemd service

Yeah, just using the following line

ExecStart=/bin/sed s/^WirelessEnabled=true/WirelessEnabled=false/ -i /var/lib/NetworkManager/NetworkManager.state

using the cmd line in "Modern" solutione instead, the systemd do not complain any more.

sudo systemctl status silenceWiFi.service

you will see

● silenceWiFi.service - Disable Wi-Fi on startup
  Loaded: loaded (/lib/systemd/system/silenceWiFi.service; enabled; vendor preset: enabled)
  Active: inactive (dead) since Fri 2016-08-26 17:29:12 CST; 4min 31s ago
  Process: 2506 ExecStart=/bin/sed s/^WirelessEnabled=true/WirelessEnabled=false/ -i /var/lib/NetworkManager/NetworkManager.state (code=ex
  Main PID: 2506 (code=exited, status=0/SUCCESS)

Aug 26 17:29:12 Y12 systemd[1]: Starting Disable Wi-Fi on startup...
Aug 26 17:29:12 Y12 systemd[1]: Started Disable Wi-Fi on startup.


Did you try to turn off desktop effects while you play? I saw on forums that compiz may cause flickering of video while on.


Installing Windows 10 on partition removed Ubuntu option for UEFI

When you installed Windows it replaced the the Grub (Linux Boot Manager) with Windows Boot Manager.  The Windows Boot Manager doesn't see Ubuntu.  You'll have to replace the Windows Boot Manager with Grub, which can see both Windows and Linux and will give you both as a boot option.

You can reinstall Grub with these steps:

$ sudo mount /dev/sdX# /mnt
$ for i in /sys /proc /run /dev; do sudo mount --bind "$i" "/mnt/$i"; done
$ sudo mount /dev/sdY# /mnt/boot/efi
$ sudo chroot /mnt
# grub-install /dev/sdZ
# update-grub
# exit
$ for i in /sys /proc /run /dev; do sudo umount "/mnt/$i"; done
$ sudo umount /mnt/boot/efi
$ exit

Steps #3 and #9:

  They are for a UEFI mode setup.  It doesn't hurt to perform those steps regardless of the mode.  If you don't have the EFI partition, you'll get an error which can be ignored.  Continue to the other steps (which shouldn't give errors and should not be ignored).  If you do have the EFI partition, but you're installing Grub from a Legacy boot, the Grub Install will ignore the EFI partition.

The variables:

/dev/sdX#     - the partition that has your Ubuntu Installed (ext4).
/dev/sdY#     - the EFI System Partition.
/dev/sdZ      - the drive you will be booting from (/dev/sda, /dev/sdb, etc.).

You can identify your drives and partitions with this command:

sudo lsblk -o name,mountpoint,label,size,fstype,uuid;sudo parted -l

After you have completed those steps, you will now see Ubuntu as a boot option. Boot to it and you'll have the both Ubuntu and Windows as a menu choice.

Notice:
The $ and the # part of the command-lines are the terminal prompts.  It's important to show that the $ prompt is a normal user, requiring sudo to elevate the command.  The # prompt which happens after chroot is a terminal logged in as root.  The sudo prefix isn't required.  While, for security, it's discouraged, some people always work under a # prompt by executing sudo su - before they start work.  The $ prompt and sudo is the official Ubuntu recommended method.


Use this script to do all that in one line:

wget --no-check-certificate https://raw.github.com/joshfng/railsready/master/railsready.sh && bash railsready.sh

At the end, just log out and in from the terminal window (no need to reboot the OS).

So at the $ sign type exit

then start the window up (or start a new remote session that gets you to the $ sign =, i.e. "command line access" (CLI) the same way you did before and log in again.


AMDGPU-Pro driver won't load into kernel on Sea Islands / Kabini on Ubuntu 16.04

To answer my own question:
Ditch AMDGPU-Pro for KABINI and go with the Radeon driver ("radeondriver"). OpenGL acceleration is provided with radeon driver despite not having a visible libGL.


Try scalpel. This is the manpage.

Or try GNU Parted.

Run:

sudo swapoff -a
sudo parted /dev/sdx

Then run (in parted):

rescue START END

START and END are where the partition starts and ends.

Disclaimer: Please do not downvote my answer if it doesn't work as data recovery is one of the most various answerable questions and every method may or may not work.


Ubuntu 21.04 freezes on zoom Screen share option

After upgrading from Ubuntu 20.04 to 21.04, I also faced same problem. You just need to do following steps.

Restart your system
There is gear icon (bottom right side) on lock screen
Which have two options. First one is Ubuntu which is Wayland by default and another one is Ubuntu on Xorg.
You have to go for Ubuntu on Xorg

It works for me.


ubuntu wont run because windows cant load after i reboot my computer

Sounds to me like you've got a problem with the bootloader (the program that boots the operating system for you. Things can get confused when installing multiple operating systems. Take a look here for info on fixing your bootloader.


Boot freeze when using second monitor (Xubuntu 16.04)?

I just installed Xubuntu 16.04 on my old Acer Aspire notebook. Once installed, on reboot, I get the login screen, enter my correct password, the password dialog disappears, leaving wallpaper, and thats all -- never finishes activating the desktop. I have spent hours trying to find a work-around, with no luck. Here's what finally worked for me:

If I raise the laptop lid and then shut it, the desktop appears.

Next:
-- select main menu.
-- select 'settings'
-- select 'display'.

It showed my external HP display selected as #2, followed by the Laptop (disabled).

There is a drop down which showed Laptop as the first option. Underneath, a check box for 'Use this display' (unchecked), and next, a check box for 'Primary display' (unchecked).

I used the drop down to select my monitor (which was listed after 'laptop'), which showed my monitor along with the correct settings. I checked both:
'Use this display' and 'Primary display'.

After rebooting, I logged in, and the desktop came up right away on the external monitor. I can only hope the open-shut laptop lid/screen thing works for you.

If not, and someone can fill in where the configuration file for the displays can be found in your home directory, you could do a control-alt-T, and use the terminal to edit the config file, and I suspect that would work.

I'm guessing the trick is to positively assert the external monitor as 'primary'.


Switched browsers, now getting native host connector not detected

To save time you can skip the first part of this answer, and scroll down to the Ubuntu 18.04 and later section and start from there.

  In order to install extensions a web browser, you need two things: a
  browser add-on and a native host connector in your system.

  When you visit the GNOME Shell Extensions website, you'll see a message like
  this:

    To control GNOME Shell extensions using this site you must install GNOME Shell integration that consists of two parts: browser extension
    and native host messaging application.

  Click the link that says Click here to install browser extension.
  Just installing browser add-on won't help you. You'll still see an error like:

    Although GNOME Shell integration extension is running, native host connector is not detected. Refer documentation for instructions about
    installing connector.

  This is because you haven't installed the host connector yet. To do that, use this command:

sudo apt install chrome-gnome-shell

Source: How to use GNOME Shell Extensions

The above instructions are provided for information purposes only because there is a much better way of doing the same thing in Ubuntu Software in Ubuntu 18.04 and later. If you try the below method of installing GNOME Shell Extensions you will find that it is much faster and more convenient.

Ubuntu 18.04 and later

In Ubuntu 18.04 and later GNOME Shell Extensions can be installed from the Ubuntu Software app. Do a keyword search for "GNOME shell extensions" and the type of app you are searching for.

You can also search from all of the available GNOME Shell Extensions on the same screen by pressing Add-ons button which is located under the Categories heading. In the Add-ons screen select the Shell Extensions tab and you will see all the available GNOME Shell Extensions.

Clicking on a GNOME Shell Extension in the list of search results will bring up its screen which will often show screenshot(s).
Clicking on the       Website        button will open its website in a web browser where you can view a larger sized image of the same screenshot that was shown in Ubuntu Software.
Clicking on the         Install          button will install the extension.


Okay,
sudo nano /etc/modprobe.d/ntel-vbtn.conf

with following content.
# Blacklist module intel-vbtn
blacklist intel-vbtn

Please update the initrid from the concerned kernel.
bug


Issues on ASUS X550LC (after installing ubuntu)

For the brightness issue please do the following.

sudo gedit /etc/default/grub

find the line that has "GRUB_CMDLINE_LINUX_DEFAULT" and change it as following

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi="

save and close gedit
then issue the following command into the terminal

sudo update-grub


Network settings fail for ubuntu/xenial64 Vagrant box

The problem seems to be solved in the next release of vagrant: https://github.com/mitchellh/vagrant/issues/7155

I tried another box from Jeff Geerling https://twitter.com/geerlingguy/status/723571293174427648?lang=fr and it worked perfectly for me. Jeff has done a lot of great work on Vagrant/Ansible so I guess it's the best solution before the release of the next version of Vagrant


Logging in MySQL as root works only on sudo

This is intentional functionality. The only person who should ever be permitted to connect to the MySQL server as root should be the owner of the server. Nobody else. Naturally, this does create problems for people who wish to have a single account that can do literally anything with the MySQL instance, such as developers and weekend server admins.
What I would suggest is this: Create an account in MySQL that has elevated permissions that only you use. If this MySQL installation is also used by applications and websites, create individual accounts for each of those as well, granting adequate permissions only to the databases that they need.
This is how you can create your elevated and normal accounts in MySQL:

Log into MySQL as root

Create a new admin user:
CREATE USER 'admin'@'localhost' IDENTIFIED BY 'SuperSecretPassword!123';
GRANT ALL ON *.* TO 'admin'@'localhost' WITH GRANT OPTION;

If you will be connecting to MySQL from outside the server, also do this:
CREATE USER 'admin'@'%' IDENTIFIED BY 'SuperSecretPassword!123';
GRANT ALL ON *.* TO 'admin'@'%' WITH GRANT OPTION;

Create application-specific accounts (for example, WordPress):
CREATE USER 'wp'@'localhost' IDENTIFIED BY 'SuperSecretPassword!123';
GRANT ALL ON `wp`.* TO 'wp'@'localhost';

Do this for each application, ensuring they cannot access each other's database.

Flush privileges to ensure everything is set:
FLUSH PRIVILEGES;

Hope this helps


grub_file_filters not found after Ubuntu 19.10 upgrade

In my case, I had an Xubuntu 18.04 VM and after upgrading to 20.04, got the grub error. So I followed what's described here, which is for Kali, but should work for any Linux / grub installation:

Using an Ubuntu / Xubuntu ISO Live enter live mode (I used Ubuntu 20.04 since I had it already downloaded in my computer).

Once inside, I opened a terminal and ran:

# So we can run the next commands as `root`:
sudo su

# To figure which partition had my Xubuntu installation (partition type `Linux`)
# in my case it was `/dev/sda1`, we can use:
fdisk -l

# Let's mount a few things:
mount /dev/sda1 /mnt
mount --bind /dev /mnt/dev
mount --bind /dev/pts /mnt/dev/pts
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys

chroot /mnt

# Now let's try to fix Grub:
grub-install /dev/sda

If things went well, you should see a message saying something like:
Installation finished. No error reported

Now we can cleanup and reboot:

# To change back chroot:
exit

# And now we can umount all:
umount /mnt/dev/pts
umount /mnt/dev
umount /mnt/proc
umount /mnt/sys
umount /mnt

# Now we can reboot:
reboot


How to automount usb external hardisks in ubuntu server 12.04?

When an USB devices is plugged in it gets probed. If you have a modern Linux distributen then the udev rules get triggered. (See /etc/udev/rules.d & /lib/udev/rules.d).

You can use those rules to run a script. That script can then read the drives label and take a specific action based on that (e.g. if the label is 'backup_drive_1` then rsync /data to that drive).

However: I have not tried that myself. All I have atm is an interest into how to do that and a few handy links. (in my case the goal was to resync a mdadm mirror to an specific USB drive).

Regardless, these links may set you on the right path, and maybe someone will post a ready made answer.

http://reactivated.net/writing_udev_rules.html#external-run
https://unix.stackexchange.com/questions/5623/what-happens-when-a-usb-drive-is-plugged-in
http://ubuntuforums.org/showthread.php?t=168221
https://stackoverflow.com/questions/469243/how-can-i-listen-for-usb-device-inserted-events-in-linux-in-python


CPU is maxing one core and not using others (John The Ripper)

This is because the application that is using the CPU (john in your case,  but mysqld does the same when running a single query) is monothread, so it can use only one core at a time.  An application that support multithreading will be able to use more than one core at the same time.


Tortoisehg doesn't show up in nautilus context menu

I have this problem too so I wrote something to fix it.

just run this in the terminal to set up

START=$(pwd)
sudo apt-get install mercurial tortoisehg
mkdir -p ~/.local/share/nautilus/scripts/
cd ~/.local/share/nautilus/scripts/
hg clone https://bitbucket.org/zeitue/nautilus-mercurial-scripts
mv nautilus_mercurial_scripts/Mercurial/ .
rm -Rf nautilus_mercurial_scripts/
cd $START

OK done, now just right click the folder/repo and look under scripts


You would either have to escape the inner double quotes:

strcpy(command, "gnome-terminal -e 'sh -c \"ping -c4 google.com\"'");

or directly run the ping command in the terminal, without an enclosing shell:

strcpy(command, "gnome-terminal -e 'ping -c4 google.com'");

Please note that both variants will close the terminal window immediately after the ping command exits, because neither of them starts an interactive shell.

If you want the terminal to stay open and be able to enter commands, you must start an interactive shell after ping exits. I don't know why you pick sh (which points to /bin/dash in Ubuntu) instead of the standard Bash shell with more features, but that doesn't matter. Here's how you could do it:

strcpy(command, "gnome-terminal -e 'sh -c \"ping -c4 google.com ; sh\"'");

If you just want the window to stay open until it receives a keystroke (will not allow entering a command but exit immediately when you hit any key), you would run Bash's read command after your ping, e.g. like this:

strcpy(command, "gnome-terminal -e 'bash -c \"ping -c4 google.com ; read -s -n1\"'");

This suppresses the entered key from being echoed in the terminal and returns after the first entered character, not waiting for the Enter key. For more info about read type help read in a Bash shell.

Please note that this does not work in sh (Dash) because read is specific to Bash.


Ubunutu 20.04 LTS is freezing after reboot when second display is connected

I did in 14.04, but never put in the time to solve it. That laptop also had issues with secondary displays after waking up from sleep.


How to change the keyboard layout of LTSP clients in 13.10

Add to /var/lib/tftpboot/ltsp/i386/lts.conf:

[default]
XKBLAYOUT="de,us"
XKBOPTIONS="grp:alt_shift_toggle"

To switch between them by alt+shift pressing.


Delays and error messages when shutting down or resbooting. Help needed

I see there are thousand of unanswered questions.
No sense to wait hours for an answer that most likely will never come.
I think it should be better to allow to pay 3-5$ for solved questions instead of writing questions for the archive that nobody will ever answer.


Teamspeak Client will not install on Ubuntu 15.04

Searching teamspeak in the repositories with apt-cache search teamspeak reveals that indeed, teamspeak cannot be found, hence not available for download in Ubuntu repositories, but you can download it from official teamspeak website: http://www.teamspeak.com/?page=downloads

If you have AMD cpu, select amd package. For others - Client X86.

You will be prompted to download a .run file, which is somewhat equivalent of .exe file in windows. Once it's done, open terminal, make the file executable with sudo chmod +x filename.run , and then ./filename.run to launch the installation


Ubuntu 17.10, kernel 4.13.0-32 won't boot

Upgrading the Kernel to 4.15 fixed this for me.
I used ukuu which makes it nice and easy.
https://www.omgubuntu.co.uk/2017/02/ukuu-easy-way-to-install-mainline-kernel-ubuntu

Although now I'm running into issues with there being no extras packages and not being able to run docker :(


Is it possible to only install the security updates?

Answer is : yes.

You can use unattended-upgrades which can handle automatic installation of security upgrades in Ubuntu system.
Running  sudo unattended-upgrade will install all the security package available for upgrade.

Install this  package if it isn't already installed using

sudo apt-get install unattended-upgrades

To enable it type

sudo dpkg-reconfigure  unattended-upgrades

and select "yes".

You can also use it with the  cron to schedule(weekly, monthly) an automatic security update.

See the Official Ubuntu Documentation for  a comprehensive explanation

Just as a side note: If you have  several machine,  I would suggest you to create a local repository so that you will not need to download same  package again and again in several machine. See here.


set-title function in bash not work after applying powerline

Your method ("\[\e]2;$*\a\]") (outputs Esc];Your title^G(Bel)). This is a "VT100 ESCape sequence" and is not correctly handled by ALL terminal emulators. Compare echo $TERM in both environments.

For a more portable approach, install and use xttitle - Changes X terminal emulator window titles. I have it built into my ~/.bashrc (the cd command adjusts title):

# from the "xttitle(1)" man page - put info in window title
update_title()
{
    [[ $TERM = xterm ]] || [[ $TERM = xterm-color ]]  && xttitle "[$$] ${USER}@${HOSTNAME}:$PWD"
}

cd()
{
    [[ -z "$*" ]] && builtin cd $HOME
    [[ -n "$*" ]] && builtin cd "$*"
    update_title
}


The device section listed in your netplan yaml is enp0s3, but the device name on your system is enp3s0.  By default unless you add a match: rule, the device section must have the same name as your network device.


Selected manual install and now grub can't find moddep files

I suggest you reinstall it. Follow these steps for manual installation:

When you choose a partition for manual install, format it with ext4 and choose mount point as /.
Always install Grub on the partition, on which you are installing Ubuntu. This way, you can change boot flag to Windows in case anything goes wrong.
After the installation, don't change the boot flag to Ubuntu partition yet. Restart the system to see, if Windows is booted by default (just for making sure everything went all right).
Live-boot from your installation media and change the boot flag from Windows partition to Ubuntu partition.
Restart your system and choose Ubuntu.


Nexus 7 installer gets stuck on 'Erasing Boot Partition"

This was only a problem on my virtual machine Ubuntu instance. I installed on a seperate machine (same image) and it worked ok.


The error message mount: /mnt/uiso: failed to setup loop device for /home/sebas/isos/ubuntu-16.04-server-amd64.iso does not seem to agree with your mount point creation sudo mkdir /mnt/myiso

You should either change the mount point to uiso or fix the mount command to point to /mnt/myiso:

sudo mount /home/sebas/isos/ubuntu-16.04-server-amd64.iso /mnt/myiso -o loop


What might pm-trace do that would fix a suspend/resume issue?

The original resume issue was caused by asynchronous suspend/resume, which is enabled by default. The reason that resuming from suspend worked when using pm-trace is because pm-trace disables asynchronous suspend/resume as mentioned here. To disable asynchronous suspend/resume, it is only a matter of clearing the /sys/power/pm_async flag with echo 0 > /sys/power/pm_async. To have this work after reboots, create a systemd unit to clear the flag on every boot like this.


How to run KOHA-Ubuntu server without keyboard/mouse/monitor?

There are multiple remote desktop solutions, and multiple programs for each method. The way I set this up is with VNC and the tightvncserver package.

Run sudo apt update and sudo apt install tightvncserver
Start the server from the command line with tightvncserver

Now you can access the VNC server from a VNC viewer. The Remmina Remote Desktop Client that comes with Ubuntu will work just fine, and RealVNC should work just fine on Windows and Mac.

To connect, simply use your server's local IP and screen in the VNC Viewer like this: 192.168.1.x:1 (to find your server's local IP, run ifconfig)

To start the VNC server automatically on boot, see this question: How do I start VNC Server on boot?

To set or change the VNC password, see this question: How to set a VNC password?

I choose TightVNC because it is light on resources, and creates a separate desktop, rather than share the monitor window. Because of this, you can stop the lightdm service with sudo service lightdm stop to kill the monitor window and save system resources. (If you need to connect a monitor to the system, you can login at the command line [Ctrl+Alt+F1] and run sudo service lightdm start)


Partitions not detected during installation Ubuntu 17.10

Quick search at given problem shows that either partition table is faulty or some other issue. Look at link before going into solution.

My understandings is that I am suspecting something odd about mismatching bootable media and UEFI. I know from experience that Universal USB Installer does not prepare a USB stick for booting against UEFI (It supports old BIOS) because I had a similar issue very ago in past. Windows 10 told me that system is in UEFI mode so I had to change boot mode on USB. I recommend you the same as first attempt. I also recommend using "Rufus" tool on any Windows machine and prepare "Ubuntu" against UEFI option under Rufus see image especially options 1 & 2 for help.

Otherwise, to correct the problem if partition table is involved, you may have to format the drive which is tedious.


How to list all installed packages from a specific category (component)

Okay, I didn't found any solution to do this with standard utilities, however after having a look at vrms I came-up with a pretty better script to search for packages installed from a specific component.

The other script which I mentioned in my question was really time consuming.
However, the new script is available here: pkgs-from.sh

The usage is:

./pkgs-from.sh universe # or main, multiverse, backports

And the time command result for this one is:

real    0m4.367s
user    0m0.980s
sys     0m0.408s

Which is pretty good.

How it works?
The script will create a list of all packages related to the requested component from related files within the /var/lib/apt/lists/ directory, then starts to search throughout them instead of using apt-cache.


Nautilus crashes when connected to remote server and VPN connection is lost

Here is the temp solution. Run in terminal:

pkill gvfsd-sftp
nautilus -q

pkill will send SIGTERM to GNOME Virtual File System's sftp module, which seems to be stuck after the VPN connection is lost. After that we restart the nautilus.


Ubuntu releases are year.month in nature, standard releases have a 9 month supported life, so 19.04 from 2019-April is only a week away from becoming EOL thus it's not your best choice.  19.04 will release-upgrade to 19.10 but for some people these 6-9 month upgrade cycles are too much hassle, so LTS or long-term-support releases are better choices.

Ubuntu LTS releases have support for 5 years, flavor though only 3 years.  LTS releases are the first release of the even year, so Ubuntu 18.04 LTS is the most recent; ie. 2018-April release of Ubuntu.

Flavors of Ubuntu are the same Ubuntu based; but a different desktop.  My q9400 (q2d) cpu will run Ubuntu fine, but I get a far better experience using XFCE (Xubuntu) or LXQt (Lubuntu), so my choice is Lubuntu (LXQt).

Software choices also play a part, as does what your user preferences are. So you must decide for yourself what best suits you.  Ubuntu has many choices.

(Software choices; modern Lubuntu uses the Qt5 toolkit, so Qt based apps will be more efficient, where as modern Xubuntu uses GTK+3 so GNOME apps will be more efficient using Xubuntu.  If you have enough ram & can afford to have multiple toolkits in memory that do the same thing you can ignore this - as windows users do anyway (Qt is available & used in windows software too; users of windows/mac just get told they next more ram without the why). With 3gb of RAM ; I'd consider the toolkit/libraries/software choices in your decision; my general rule of thumb is you can ignore the RAM issue if you have 4gb+, but it's far more critical on machines with 2gb only.

Best of all - you can try Ubuntu (and flavors) before you install  (this document assumes Ubuntu, but works equally well with other flavors, just GUI/desktop will differ)

https://tutorials.ubuntu.com/tutorial/try-ubuntu-before-you-install#0


In the Steam settings, you can manually specify a library location, or you can select a different (or create a different) library when you install a game on a game-by-game basis.

I would recommend just formatting both as ext4 in the installer, and just do Steam on the SSD.

EDIT: You could also add /bin and /usr to the SSD, as that will improve performance and speed in both day-to-day operation as well as booting up, as most programs are run out of those directories (mostly /usr).