How to create shortcut for a command in terminal?

The shortcuts for commands are known as aliases.
The syntax to create an alias is:

alias custom_command='original_command'

Example:
For creating an alias for update and upgrade we should type the following in terminal,

alias update='sudo apt-get update'

alias upgrade='sudo apt-get upgrade'

So to create an alias for your command open the termianl and type:

alias user='ssh user@123.45.7.123'


Swap switch rearrange workspaces by hotkey?

There are additional shortcut keys that can be added.


Ubuntu Server 18.04.2 stuck on boot after install

Nevermind, I fixed the problem. For anyone with the same problem, here's what I did:

Go into "Machine" at the top in VirtualBox and press "ACPI Shutdown" then just start it again.


Are windows and ubuntu wireless firmware the same?

Installing the latest firmware is actually quite easy. It is the same as this: Ubuntu 16.04 LTS - WiFi not shown and no ethernet port available

Having said that, I doubt that your issue is firmware. I own and use successfully two Intel wireless devices, including a 7260. I have honed a few techniques in several years and thousands of forum posts.

First, check the settings in the router. WPA2-AES is preferred; not any WPA and WPA2 mixed mode and certainly not TKIP. Second, if your router is capable of N speeds, you may have better connectivity with a channel width of 20 MHz in the 2.4 GHz band instead of automatic 20/40 MHz, although it is likely to affect N speeds. I also have better luck with a fixed channel, either 1, 6 or 11, rather than automatic channel selection. Also, be certain the router is not set to use N speeds only; auto B, G and N is preferred. After making these changes, reboot the router.

Next, I recommend that your regulatory domain be set explicitly. Check yours:

sudo iw reg get

If you get 00, that is a one-size-maybe-fits-all setting. Find yours here: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 Then set it temporarily:

sudo iw reg set IS

Of course, substitute your country code if not Iceland. Set it permanently:

sudo nano /etc/default/crda

Change the last line to read:

REGDOMAIN=IS

Proofread carefully, save and close the text editor.

I suggest that you also disable power saving in Network Manager. From the terminal:

sudo sed -i 's/3/2/' /etc/NetworkManager/conf.d/*
sudo service network-manager restart

Any improvement?


Why doesn't Krename start in Ubuntu 11.10?

A bug report: https://bugs.launchpad.net/ubuntu/+source/krename/+bug/849882

It has the fix/patch, workarounds, etc.


Get the total listening time from the CLI with banshee

First, using the following command:

pgrep banshee

you can check if Banshee is running.

If yes, you can use:

banshee --query-current-state

command in your bash script to get the current Banshee state (if it's playing or not).

Here is some rudimentary bash code from which you can start and improve your script:

#!/bin/bash

seconds=0

while : ; do
    if ( pgrep banshee > /dev/null ); then
        if [ "$(banshee --query-current-state | cut -d' ' -f2)" = "playing" ]; then
            (( seconds++ ))
            echo "Total listening time: $seconds seconds"
        fi
    fi
    sleep 1
done


How to change Lubuntu's default terminal?

There isn't a single setting for this yet.  However if you change them all to  x-terminal-emulator, which is a symlink, you can then later easily change them all at once by using update-alternatives as you already tried.
To change the global shortcut key's terminal:
Open Preferences > LXQT Settings > Shortcut Keys and double click on the item that has the shortcut you wish to change.

And edit the command.

To change terminal used by PCManFM-Qt, (file manager and desktop):
From the PCManFM-Qt File Manager menu open Edit > Preferences and select the Advanced tab, and Terminal Emulator field.

Default for terminal based programs (.desktop files with Terminal=true):
Run from lxqt-panel (panel and menu):
Set by Preferences > LXQT Settings > Session Settings, Default Applications tab, and Terminal Emulation field.

Run from PCManFM-Qt (file manager and desktop)
Always xterm in Lubuntu 18.10!
Should use PCManFM-Qt settings, and has been fixed for 19.04.


Not waking up from suspend using wireless keyboard and mouse in Ubuntu 18.04

Was able to solve this issue by adding the following line to the root crontab file:

sleep 30 && echo XHC > /proc/acpi/wakeup

Without the delay, this didn't work because the wakeup settings were modified after the crontab commands were executed.


Pretty nice walk-through.....
https://help.ubuntu.com/community/PostgreSQL

First find the file pg_hba.config. Usually found here:

 /etc/postgresql/9.3/main/pg_hba.conf

OR

 /etc/postgresql/[VERSION]/main/pg_hba.conf

Find this commented-out line:

# Database administrative login by Unix domain socket

And Underneath Change '???' to md5:

local   all             postgres               probably 'peer'

To:

local   all             postgres                                md5

This is because Ubuntu uses md5 with postgres instead of peer authentication

Then run this command:

sudo /etc/init.d/postgresql reload


I want to download mysql workbench on ubuntu. And I keep getting an error

There are several things to consider here.
First, in this case apt doesn't download the package as it would do in most cases. It installs a package you've downloaded before. Please compare
sudo apt install ./mysql-workbench-community_8.0.20-1ubuntu20.04_amd64.deb

to, for example
sudo apt install mysql-server

The latter command tries to locate the package mysql-server in the repositories it knows about, then tries to download the package and install it.
In your command, you're providing a relative path, note the ./ in the beginning. This tells apt to use the package file that already is there in the directory where you execute the command.
Second, please check the exact filename. Maybe a newer version of the MySQL Workbench has been published since the tutorial was written, so the package isn't version 8.0.20 anymore.
Third, please check that you're executing apt from the directory where you've downloaded the package file to. Maybe you need to cd into your Downloads directory first, or something to that effect.
So, to summarize: First download the package file yourself, then go to the directory where the package file has been stored, then execute apt install with the filename the package file actually has.


Error splicing file: Value too large for defined data type

From the original bug #455122 on Launchpad, when mounting the share add ,nounix,noserverino to the options, i.e.:

mount -t cifs -o user=me,pass=secret,nounix,noserverino //server/share /mount


Update freezes after upgrade to Kubuntu 18.04

The upgrades I got today were:

Upgrade: libservlet3.1-java:amd64 (8.5.30-1ubuntu1.3, 8.5.30-1ubuntu1.4),
         intel-microcode:amd64 (3.20180425.1~ubuntu0.18.04.2, 3.20180807a.0ubuntu0.18.04.1),
         libgd3:amd64 (2.2.5-4, 2.2.5-4ubuntu0.2)

Because the Discover route is still a work in progress and there are reports of difficulties, I prefer the terminal. I get my clue from the "update" icon that appears in my panel and then open a terminal for the safer, in my opinion, sudo apt-get update and sudo apt-get dist-upgrade.

Discover is fine for installing new software though even that is quicker from the command-line.


Ubuntu 19.04 is sluggish on good hardware

Ubuntu 19.04 should be faster than 18.04 in general. The first thing I would look at, are drivers. Maybe for some of your hardware (network, graphics) are proprietary or different drivers available.

You can find additional proprietary drivers via:
Application Drawer –> Software & Update –> Additional Drivers –> Install Suggested Drivers. If none are found, I would google for the best drivers of your hardware.

Other possibilities are: Maybe, many programs are started automatically? You can find by searching in the Application Drawer for "Startup Applications".

In general you can also use the activity monitor to find out if there are certain applications/services taking up a lot of resources.


At last I found the problem...!Squid3 had caused that problem and when I removed it the shutdown speed became normal.


Why does my umask keep resetting to 000?

The issue for me was caused by a Sublime Text 3 plugin called Terminal, which is used to launch terminals from sublime files. When Terminal launched the first and only window of gnome-terminal, then it inherited the umask of 000 from sublime.

In the hopes that this answer can be useful to those who are not having the same problem as me, I will reiterate some suggestions for how to attack this problem, garnered from the comments above:

Look through your rc files (.bashrc, .zshrc) to see if there are errant umask calls.
If you're using bash, try bash -x -l -i -c 'exit' 2>&1 | grep umask to find call to umask from your rc files.
If you're using zsh, try zsh -x -l -i -c 'exit' 2>&1 | grep umask to find calls to umask from your rc files.
Check whether you are setting a umask value when mounting $HOME. Look in /etc/fstab
Check whether there is anything strange running in cron that could change your umask.
crontab -l and sudo crontab -l.
Perhaps try using audit to find the source of mysterious umask changes.
sudo auditctl -A auditctl exit,always -S umask and look in /var/log/kern.log


Ralink rt3290 - how to reach declared 802.11n speed on Ubuntu 14.04

As you can see here, your wireless device is clearly in N-speeds:

Bit Rate=65 Mb/s

The rate shown in scanning is always 54 Mb/s if the router is capable of at least G speeds and even if the router is capable of N and AC speeds. As you can see from your own iwconfig, the wireless device and the router will negotiate the best speed in the connection process.

I know of no method to force the hardware, driver and router to cease negotiations and force 300 Mb/s speeds. There are some things you can try in the router. WPA2-AES is preferred; not any WPA and WPA2 mixed mode and certainly not TKIP. Second, I have better luck with a channel width of 20 MHz in the 2.4 GHz band instead of automatic 20/40 MHz. I also have better luck with a fixed channel, either 1, 6 or 11, rather than automatic channel selection. After making these changes, reboot the router.

Next, I recommend that your regulatory domain be set explicitly. Check yours:

sudo iw reg get

If you get 00, that is a one-size-maybe-fits-all setting. Find yours here: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 Then set it temporarily:

sudo iw reg set IS

Of course, substitute your country code if not Iceland. Set it permanently:

gksudo gedit /etc/default/crda

Use nano or kate or leafpad if you don't have the text editor gedit.

Change the last line to read:

REGDOMAIN=IS

Proofread carefully, save and close the text editor.

Next, I'd set IPv6 to Ignore in Network Manager: http://docs.fedoraproject.org/en-US/Fedora/18/html/Installation_Guide/images/netconfig/network-connections-ipv6-ignore.png  This example is for ethernet, but you want wireless.


Jump to end of line, multiple contexts e.g. text editor, browser bar

Use the End key for jumping to the end of a line.


Cannot mount Windows partition in Ubuntu

As I mentioned in earlier comments, mounting your Windows C: drive, and then modifying it from Ubuntu, is asking for Windows problems. And you have multiple Windows problems.

First, boot into Windows, and run chkdsk /f c: and reboot. You've done this already once, at my suggestion, and there were lots of errors. Run it again.

Second, if you wish to share files between Windows and Ubuntu, create a separate NTFS partition on your hard disk. Call it "Shared_Data" if you wish. Then it can be accessed from both OS's.

Third, try changing your /etc/fstab:

Change:

UUID=01D5F7A77E62A210 /mnt/os auto noatime,user,nls=utf8,windows_names,dmask=022,fmask=111,uid=1000,gid=1000,x-gvfs-show 0 0

To:

UUID=01D5F7A77E62A210 /mnt/os ntfs-3g defaults 0 0

Then do a sudo mount -a or just reboot.

This forces the type to ntfs-3g instead of auto, and simplifies the options from that of the Disks application. You may need to further change "defaults" to some of the earlier options, if you have permissions problems accessing the data. But again, modifying your Windows C: partition can be problematic.


Ubuntu 18.04 installing nvidia-driver-440 forces me to install nvidia-driver-450

I have encountered a similar problem a while back. To solve this problem, I had to install the correct driver by using the Ubuntu "Additional Drivers" application.
Please ensure that the NVIDIA card is currently being used before opening the application or else the drivers may not show up in the application. This can be checked by using the "NVIDIA X Server" application.


How do you install an application that doesnt have makefile in folder?

applications and they don't include a makefile

That depends on what has provided the author of the program.
Use the script autogen.sh or configure
Read the instructions in INSTALL
Read the instructions in README
Create your own Makefile, eg:

nano Makefile

with the lines below

helloworld : helloworld.c
  cc -o helloworld helloworld.c

and run make

make

…

  install python programs instead of running them as "sudo python
  executable.py"

Create a desktop file ReadMe

  some distros like kali have tor pre-installed

sudo apt-add-repository ppa:webupd8team/tor-browser
sudo apt-get update
sudo apt-get install tor-browser


Ubuntu Svr VM in VirutalBox gets no IP on Bridged Network, unreachable via NAT IP

Make sure that sshd.service is enabled and listening on desired port on the VM. Also make sure that ssh ports are open in the firewall on both the host machine and the virtual machine. Or the firewall turned off on each.

If you use NAT then you must setup port forwarding on on the VM NIC through the VM Manager 'Machine->Settings->Network' Under advanced. Or by using vboxmange in terminal.

vboxmanage modifyvm "VM name" --natpf1 "guestssh,tcp,,2222,,22"

If you use bridged mode for the VM NIC, then it will receive an IP  address from your router. The same router that your host machine receives from. And there will be no need for port forwarding.
Default NAT internal address will be in the 10.0.*.* range.
Bridged address will be in range of your LAN router. Most home routers default to the range of 192.168.1.100

Oracle® VM VirtualBox®


Debugging a crash when keyboard is not responsive

You can view some messages from the previous boot through journalctl with e.g. journalctl -b -1 (the -1 means "previous boot", -b -2 would give you the one before that etc.). The journal won't keep logs across boots unless the directory /var/log/journal exists, so sudo mkdir /var/log/journal if it's not there (and then systemctl restart systemd-journald or reboot to make it notice it).

Magic sysrq doesn't work when the kernel has panicked, which seems to be your situation. (But in case you want to make sure you have it otherwise, do cat /proc/sys/kernel/sysrq to check whether sysrq is enabled. 0 is disabled, 1 is enabled, other numbers enable individual features.)

Another thing that may be useful is to try a live distro in order to test very recent kernels/drivers; live/resque distros may make it a bit safer to experiment with various driver versions. Of course, it helps if you're able to find a "minimal" or as minimal as possible situation that reproduces your crash, so you don't have to be in that live session longer than necessary to find out if it's going to crash or not :)


How can I connect 12.4 to the Internet with WEP key?

I'm a little confused.  A WEP key is a security code used on some Wi-Fi networks.  It is usually  a set of hex numbers 10 or 26 digits long.  A "wireless password" might mean you are using WPA encryption.  check out how to reset your router from the manual that came with it.  Usually this involves pressing a small button on the back of the router labeled "RESET" for several seconds then using the default password and username to set up your security--good luck!


Can't add as a comment, why are you using playonlinux? Steam has a native client. sudo apt-get install steam


The packages provided by the Ubuntu repositories can be found at http://packages.ubuntu.com/. If the packages you need cannot be found there, use your favorite search engine to search for PPAs (personal package archives) that host them. If such PPAs do not exist, then you will have to either download the debs and install them manually using dpkg or compile from source, both of which should be straightforward given your Arch Linux background.


Unable to remove OpenJDK from Ubuntu 12.04.01


How can I get anki to display images on the backs of cards? (Ubuntu 16.04)

I use Ubuntu 16.04 with anki as well and the described process is working fine. It looks like you customized the card layout further than only renaming Front Side to Deutsch and Back Side to Englisch. It should work if you just use the default layout.


Compiz problem in Ubuntu 13.10, ghostly stripes at the cube effect, How can i Fix it?

The issue it seems is to do with the Compiz GUI overlay that Saucy uses.  Specifically the animations and Fading Windows seem to be what's causing the issue.

Install the config manager

sudo apt-get install compizconfig-settings-manager

Open up the compizconfig-settings-managerGUI and Navigate to Effects and disable the "Animations" and "Fading Windows" check boxes.  Dont mess with any of the other settings in that tool unless you know what you are doing.

If you do decide to mess with it and break your GUI use this guide to reset compiz.
http://www.webupd8.org/2012/10/how-to-reset-compiz-and-unity-in-ubuntu.html


How to disable screen blanking when external monitor is connected and lid is closed

Gnome-tweak from the Ubuntu Software Center has options under "Shell" to set what you want to occur when the laptop lid is closed on battery and AC.  Install it, set it, and try it out.  Should work.  "Nothing" and "Interactive" are both options in the drop down menu.  Not sure what "Interactive" means though...


As per your the comments you don't have to use an SSH key.  Your Ubuntu One SingleSignOnis sufficient for logging into the Canonical Shop.

I'm in communications with Canonical Store Customer Service.  They have advised me they are having issues that they are trying to resolve and will notify me when it's resolved.

I'll update this answer when I receive the notification.

By the way, they have been sending me updates every few hours since yesterday.

Update

For your information, the problem at Canonical show as been resolved as of this morning:

From The Canonical shop:

  Hi Larry

  Hope you had a lovely weekend.

  Just a quick email to advise that my IT department has now rectified
  this issue and you should now be able to log in with no issues.

  Thank you again for your patience.

  Kind Regards

  Lauren

  Canonical Store Customer Service


Moved /home to a separate partition, now I can't log into it

First run ubuntu on normal mode, after press ctrl + alt + f1 and then login with your user name and password, now write sudo chmod 777 -R /home/Your_user_folder

If not posible, put the terminal answer here.


How do I find the ppa of a project from its Launchpad page?

You can also do a search for software in PPAs:

https://launchpad.net/ubuntu/+ppas

Another option would be to contact the maintainers of the project and ask them to link the PPA in the project description, that would probably make it easier for people to find it.


How to fix Ubuntu 17.10 BIOS corruption, after uninstalling Ubuntu

I have done exactly the same thing on my Lenevo ideapad but my one saving grace is that when I boot up I can gain access to Windows 10 by pressing F12. Hope this is of some small help.


This is part of the design of Windows Server Message Block (SMB) protocol and NetBIOS. A machine is asked to be the goto directory for all other computers on the network. This is suppose to be passed on to another computer if the current one is down. But it rarely turns out that way. For me I keep a Linux based SAMBA server that always forces itself to be the WINs server and I get consistent results on the Windows and Linux computers.


How to correctly avoid the "You are running Setuptools on Python 2, which is no longer supported" message while using Python 2?

We need to follow the recommendation in the last two lines of output:

  You are using pip version 8.1.1, however version 20.0.2 is available.
  You should consider upgrading via the 'pip install --upgrade pip' command.

So we need to run

pip2 install --upgrade --user pip

and then logout and login back, then follow the other recommendation:

  Setuptools using pip 9.x or later or pin to setuptools<45 in your environment.

pip2 install --user "setuptools<45"

After this any installation of pip2-packages will result in the following message:

  DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support


Use the "debug" kernel parameter, you will see more debug output at boot time, and initramfs will write a boot log to /run/initramfs/initramfs.debug.

Debugging the actual boot scripts is usually slow work. You need to take the initramfs, unpack it (gzip -d init*.gz then cpio -vid < init*), modify it (begin at /init), repack it, then boot with it. Add print statements where you want to check what is happening at a certain point. The problem with race conditions is that adding debug prints can change the timing, resulting in different behaviour. There is no easy solution to that, other than reading the code and understanding what it is doing. Having said that, the scripts are short and should be pretty easy to follow (/init is only around 300 lines of code).


Use Ubuntu & Windows in the same network and make share file

There's a program called TeamViewer. It should allow you to access multiple different desktops, share files, and even troubleshoot other people's problems. The link is below. I think they have an enterprise/commercial/workplace solution.

TeamViewer


The title bar buttons for "chrome" are different than usual applications(according to theme)

This is a very easy fix :)

Simply check the Use system title bar and borders option in the Appearance category in Chrome's settings.


According to the evasi0n jailbreak page, it is not possible to use evasi0n to jailbreak post-iOS 6.1.2 devices with the evasi0n jailbreak. There are lots of gimmicks out there that claim you can, but for now the only way to jailbreak that device is with redsn0w, which is only available for OS X and Windows.


Can anybody recommend an open source VPN for Firefox on Ubuntu 16.04?

It is not open source but I have to recommend Private Internet Access as a customer.  They are one of the oldest, cheapest, and most reputable VPN providers.

As far as open source, OpenVPN is the gold standard but does require some configuration but there is plenty of documentation.


Black screen on boot nvidia optimus card

First, in order to access the terminal, boot up in recovery mode, then select root prompt. However, this will only mount the disk in read-only mode, so do this:

mount remount,rw /

This remounts the filesystem in rw-mode. Then, uninstall all your Nvidia stuff by doing this:

apt-get remove --purge nvidia*

Try booting then. If it still doesn't boot properly, I suggest backing up your files from the root prompt, and then reinstalling the system. If it does boot, reinstall the Nvidia stuff:

sudo apt-get install nvidia-current

This should fix it. (At least, it worked for me when I had these problems.)


Setting PPAs during installation to fetch updates

No, there is no there is no option like this in the Ubuntu installer (ubiquity) and I'm quite sure there is nothing like this in the alternate installer as well.


I believe your device uses the driver r8712u; please confirm here:

lsmod

You might try a driver parameter:

sudo modprobe -r r8712u
sudo modprobe r8712u ht_enable=0

If it helps, write a file to make it persistent:

sudo -i
echo "options r8712u ht_enable=0" > /etc/modprobe.d/r8712u.conf
exit

If it doesn't help, there are other options to try. You may wish to check for any clues here:

dmesg | grep -e wlan -e r8712u

You might also experiment with N speeds disabled in the router.


How can I open a  .themepack file in Ubuntu?

After trying several hours and links, I think, I've finally got the right solution, that allow me to open a .themepack file with file-roller.

First install cabextract package, by entering the command on terminal.

Press super+a key on Unity, type terminal on dash and click on the terminal icon.
Type sudo apt-get install cabextract command on the terminal, provide your password and hit enter.

Then type again in the terminal sudo apt-get install assogiate, this will install the assogiate program on computer. (alternatively, you can install it through "Software Center".
Then open the assogiate program, by pressing alt+f2 and typing assogiate on the 'Run a command' box.

This will open assogiate program in graphical window. On the left hand side pane, click on Search Results. then type cab on the bottom text box on the right pane.
Double Click on the desired application name. ( In this case, it is vnd.ms-cab-compressed ).
On the new Edit type application/vnd.ms-cab-compressed window, Click on Filenames tab. Then click on Add button, type *.themepack on the new Add filename rule dialog window. Click close, and then Exit the program.

Now you should open any *.themepack extensions file with file-roller just like any other compressed tar, zip etc files.

If you want this settings persists globally (system wide), you should open the program in the step 2 as gksu assogiate, all other procedure is same.

Credit goes to MistreLion, answerer of this post.

Update

I recently upgraded my Ubuntu to 12.04 and in this version, you need only to install p7zip-full package.

Open a terminal, type the following command , provide password and hit enter. That's the all required (of course, after connecting to the internet).

sudo apt-get install p7zip-full


In reading this page: Compressed RAM with zRAM, it appears that you set the size of the volume by editing the /etc/init/zramswap.conf file and changing the line that points to your zRAM block device to match the size you want.

e.g. in terminal (CTRL+ALT+T):

$ echo 3221225472 > /sys/block/zram0/disksize

I've never used it myself, so I cannot guarantee that I'm even close to correct!


Bash command to determine first login for a particular time period

Using last and awk
last -R "$USER" | \
    perl -ne 'print unless /wtmp\sbegins/ || /^$/' | \
    awk 'END {print $4,$5,$6}'

last  searches  back  through  the file /var/log/wtmp (or the file designated by the -f flag) and displays a list of all users logged in (and out) since that file was created.
Per default /var/log/wtmp is created on every new month:
% awk '/\/var\/log\/wtmp/,/}/' /etc/logrotate.conf
/var/log/wtmp {
    missingok
    monthly
    create 0664 root utmp
    rotate 1
}

last -R $USER returns all entries from /var/log/wtmp for the given user. The first login is placed at the bottom of the output, therefore the END in my awk command.
% last -R "$USER"
aboettge pts/1        Wed Jul 15 12:04   still logged in
aboettge pts/1        Wed Jul 15 11:29 - 12:04  (00:34)
aboettge pts/1        Wed Jul 15 08:08 - 11:29  (03:21)
aboettge pts/1        Wed Jul 15 08:08 - 08:08  (00:00)
aboettge pts/1        Wed Jul 15 08:07 - 08:08  (00:00)
aboettge tty2         Wed Jul 15 08:03   still logged in
aboettge pts/1        Tue Jul 14 12:58 - down   (00:53)
aboettge pts/1        Tue Jul 14 09:06 - 12:58  (03:51)
aboettge pts/1        Tue Jul 14 09:03 - 09:06  (00:02)
aboettge pts/1        Tue Jul 14 08:23 - 09:03  (00:40)
aboettge pts/1        Tue Jul 14 08:22 - 08:23  (00:00)
aboettge tty2         Tue Jul 14 08:22 - down   (05:28)
aboettge pts/1        Mon Jul 13 12:01 - 16:26  (04:24)
aboettge pts/1        Mon Jul 13 11:49 - 11:59  (00:10)
aboettge pts/1        Mon Jul 13 11:46 - 11:49  (00:02)
aboettge tty2         Mon Jul 13 11:44 - down   (04:42)
aboettge pts/2        Mon Jul 13 11:26 - 11:35  (00:08)
aboettge tty2         Mon Jul 13 11:25 - down   (00:09)
aboettge pts/3        Fri Jul 10 14:26 - 14:28  (00:01)
aboettge pts/3        Fri Jul 10 14:23 - 14:26  (00:03)
aboettge pts/2        Fri Jul 10 13:34 - 15:27  (01:53)
aboettge pts/2        Fri Jul 10 13:31 - 13:31  (00:00)
aboettge pts/2        Fri Jul 10 13:25 - 13:30  (00:05)
aboettge pts/2        Fri Jul 10 10:28 - 13:19  (02:50)
aboettge pts/1        Fri Jul 10 08:35 - 15:27  (06:52)
aboettge tty2         Fri Jul 10 08:00 - down   (07:28)
aboettge pts/1        Thu Jul  9 16:25 - 16:27  (00:01)
aboettge tty2         Thu Jul  9 16:21 - down   (00:06)
aboettge tty1         Thu Jul  9 16:03 - crash  (00:00)
aboettge tty1         Thu Jul  9 15:29 - 16:03  (00:33)
aboettge pts/1        Thu Jul  9 14:32 - 14:32  (00:00)
aboettge pts/1        Thu Jul  9 08:51 - 08:51  (00:00)
aboettge pts/1        Thu Jul  9 08:51 - 08:51  (00:00)
aboettge pts/1        Thu Jul  9 08:50 - 08:51  (00:00)
aboettge pts/1        Thu Jul  9 08:46 - 08:46  (00:00)
aboettge pts/1        Thu Jul  9 08:46 - 08:46  (00:00)
aboettge pts/1        Thu Jul  9 08:45 - 08:45  (00:00)
aboettge pts/1        Thu Jul  9 08:44 - 08:44  (00:00)
aboettge pts/1        Thu Jul  9 08:42 - 08:42  (00:00)
aboettge pts/1        Thu Jul  9 08:42 - 08:42  (00:00)
aboettge pts/1        Thu Jul  9 08:42 - 08:42  (00:00)
aboettge pts/1        Thu Jul  9 08:41 - 08:41  (00:00)
aboettge pts/1        Thu Jul  9 08:41 - 08:41  (00:00)
aboettge pts/1        Thu Jul  9 08:40 - 08:41  (00:00)
aboettge pts/1        Thu Jul  9 08:39 - 08:39  (00:00)
aboettge pts/1        Thu Jul  9 08:38 - 08:38  (00:00)
aboettge pts/1        Thu Jul  9 08:36 - 08:36  (00:00)
aboettge pts/1        Thu Jul  9 08:36 - 08:36  (00:00)
aboettge pts/1        Thu Jul  9 08:36 - 08:36  (00:00)
aboettge pts/1        Thu Jul  9 08:35 - 08:35  (00:00)
aboettge pts/1        Thu Jul  9 08:35 - 08:35  (00:00)
aboettge pts/2        Thu Jul  9 07:50 - 16:03  (08:12)
aboettge :0           Thu Jul  9 07:50 - crash  (08:13)
aboettge pts/1        Wed Jul  8 16:13 - 16:27  (00:13)
aboettge pts/2        Wed Jul  8 13:47 - 16:27  (02:39)
aboettge pts/1        Wed Jul  8 11:30 - 14:14  (02:44)
aboettge pts/1        Wed Jul  8 08:18 - 11:29  (03:11)
aboettge :0           Wed Jul  8 08:02 - crash  (23:47)
aboettge pts/2        Tue Jul  7 08:54 - 08:55  (00:00)
aboettge pts/1        Tue Jul  7 08:02 - 13:13  (05:10)
aboettge :0           Tue Jul  7 07:50 - down   (05:23)
aboettge pts/1        Mon Jul  6 09:55 - 14:48  (04:53)
aboettge :0           Mon Jul  6 08:27 - crash  (23:19)
aboettge pts/2        Fri Jul  3 07:52 - 15:30  (07:38)
aboettge :0           Fri Jul  3 07:51 - down   (07:40)
aboettge pts/2        Thu Jul  2 15:16 - 15:18  (00:01)
aboettge pts/2        Thu Jul  2 15:07 - 15:07  (00:00)
aboettge pts/1        Thu Jul  2 14:46 - 16:21  (01:35)
aboettge pts/1        Thu Jul  2 09:53 - 09:53  (00:00)
aboettge pts/2        Thu Jul  2 08:00 - 14:41  (06:40)
aboettge :0           Thu Jul  2 08:00 - crash  (23:47)
aboettge pts/5        Wed Jul  1 14:16 - 14:38  (00:21)
aboettge pts/3        Wed Jul  1 14:01 - 16:10  (02:09)
aboettge pts/2        Wed Jul  1 13:27 - 16:10  (02:42)
aboettge pts/1        Wed Jul  1 13:22 - 16:10  (02:48)
aboettge :0           Wed Jul  1 13:15 - 16:21  (03:05)
aboettge pts/2        Wed Jul  1 11:30 - 11:36  (00:06)
aboettge pts/1        Wed Jul  1 11:29 - 13:02  (01:32)
aboettge pts/1        Wed Jul  1 11:27 - 11:29  (00:01)
aboettge pts/2        Wed Jul  1 08:28 - 11:27  (02:58)

wtmp begins Wed Jul  1 08:28:18 2015

Example
% last -R "$USER" | perl -ne 'print unless /wtmp\sbegins/ || /^$/' | awk 'END {print $4,$5,$6}'
Jul 1 08:28

Breakdown

% last -R "$USER"
see above

perl -ne 'print unless /wtmp\sbegins/ || /^$/'
removes empty lines and wtmp begins …

awk 'END {print $4,$5,$6}'
prints the fields 4, 5 and 6 from the last line, the default separator is   (a space)


Laptop screen goes blank after 33 seconds of inactivity

The problem was in the DPMS settings.  These are settable in two places:

Under System Settings / Configure Energy Saving Settings / Screen Energy Saving.  (Screenshot). Enabling this and then disabling it again fixed the problem.
Under the X server DPMS settings, accessible through xset.  The output of xset q included:

DPMS (Energy Star):
  Standby: 33    Suspend: 49    Off: 66
  DPMS is Enabled
  Monitor is On

which explains the 33 seconds.  Enabling and disabling “Screen Energy Saving” as described above reset this to:

DPMS (Energy Star):
  Standby: 21600    Suspend: 32400    Off: 43200
  DPMS is Disabled

presumably the command xset -dpms or xset dpms off would have fixed the problem in the same way.


Doing a sudo apt-get install ubuntu-desktop seemed to fix the issue!


How do I get names of different outputs available on the system via ssh?

If you connect through ssh, you could very well not even having an X session running. Even if you have it, the ssh session is not connected to any of them by default... you can even login via ssh to an user different from the one that has the X session opened.

So for example if I ssh to my remote machine I have:

(0)pern:~% xrandr --current
Can't open display

So I have to find if an X session is running and who is connected:

(0)pern:~% w
 01:57:06 up 10 days,  9:56,  4 users,  load average: 0.12, 0.17, 0.13
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
romano   tty7     :0               08Nov13 10days  1:29m  6.95s gnome-session -
romano   pts/2    :0               08Nov13 10days 23.67s 23.67s /home/romano/bi
romano   pts/0    xxx.xx.xxx.xxx   01:56    2.00s  0.08s  0.00s w
romano   pts/3    :0               08Nov13  6:48m  0.08s  0.08s zsh

Hmmm... let's see the capability of display :0, given that I am logged as the same user and so I have the permissions:

(1)pern:~% xrandr --current -display  :0
Screen 0: minimum 320 x 200, current 1680 x 1050, maximum 8192 x 8192
DIN disconnected (normal left inverted right x axis y axis)
DVI-0 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 430mm x 270mm
   1680x1050      59.9*+
   1600x1200      60.0
   1280x1024      75.0     60.0
   1024x768       75.1     72.0     70.1     60.0
   832x624        74.6
   800x600        72.2     75.0     60.3     56.2
   640x480        72.8     75.0     66.7     60.0
   720x400        70.1

Notice that all this will work if the user on the non graphic session has sufficient rights to the server. Basically, it needs to be the same user that started the X server (and sometime, do to .Xauthority, not even in that case); to have it working anytime, you should do xhost + on the server (but this has big security risks).


Simply type in sudo apt-get remove wine and let it uninstall wine. If there is a package in your machine that is truly installed called wine-staging-i simply type in sudo apt-get remove wine-staging-i and it will remove that package.

If it claims that wine-staging-i is not apparent on your machine... it means it isn't.

You can also use Systemback - A free program for Ubuntu 14.04 that allows you to backup your files, and even restore your system.

Try restoring your system to a point it was before you installed Wine.

Also, type in sudo apt-get remove playonlinux - A lot of users install PlayOnLinux carelessly alongside Wine, so please remove that as well (Optional).


All you need to do is go to the Ubuntu Software Center and install the Adobe Flash Player.

Make sure you disable any other plugins in your browser that could be conflicting like lightspark or gnash.


Search files content for possible BTC key strings

try this

grep -I -R "1LxpcqQ6a4x1RCjGk838CbMT2HA9qgFq7P" ~

Or if you think you might have put it somewhere outside of your home folder replace the ~ with / and see what happens.


I have solved the problem by changing my driver to NVIDIA driver, updating the software, and lowering the animation speed in System Settings>Display and Monitor>Compositor, and then restarting my laptop. But I think the real answer was updating the software though.

EDIT : Idk why, but after somedays, this problem occur again. Please help me.


Should I disable systemd-timesyncd if ntp is installed?

It shouldn't be necessary to disable systemd-timesyncd if you install ntp, because the ntp service configuration includes the following:

# grep -i conflict /lib/systemd/system/ntp.service
Conflicts=systemd-timesyncd.service

The same applies for the chrony service on newer Ubuntu versions.

There have been startup bugs in the past which meant systemd-timesyncd tried to adjust the clock while another NTP server is running, producing harmless-but-annoying errors in the system logs.  So there should be no harm in disabling systemd-timesyncd if that's what you prefer.


How to run command line on startup ubuntu server

First, install the TightVNC server  sudo apt-get install tightvncserver.
Set up the VNC server for the user you wish to log in as. When you run "vncserver" for the first time, it will ask you to set a password. only allow SSH tunnelled or VPN connections. To launch programs or a session when your VNC session starts, modify ~/.vnc/xstartup. Here is an example.

#!/bin/sh

xrdb $HOME/.Xresources
xsetroot -solid black
/opt/azureus/azureus &
k3b &
icewm-session &

Copy the following into /etc/init.d/vncserver. The easiest way to do it is to copy it to your clipboard, run sudo -i && cat > /etc/init.d/vncserver && exit in a terminal, paste it in, and type CTRL-D. Be sure to change the USER variable to whatever user you want the VNC server to run under.

#!/bin/sh -e
### BEGIN INIT INFO
# Provides:          vncserver
# Required-Start:    networking
# Default-Start:     3 4 5
# Default-Stop:      0 6
### END INIT INFO

PATH="$PATH:/usr/X11R6/bin/"

# The Username:Group that will run VNC
export USER="mythtv"
#${RUNAS}

# The display that VNC will use
DISPLAY="1"

# Color depth (between 8 and 32)
DEPTH="16"

# The Desktop geometry to use.
#GEOMETRY="<WIDTH>x<HEIGHT>"
#GEOMETRY="800x600"
GEOMETRY="1024x768"
#GEOMETRY="1280x1024"

# The name that the VNC Desktop will have.
NAME="my-vnc-server"

OPTIONS="-name ${NAME} -depth ${DEPTH} -geometry ${GEOMETRY} :${DISPLAY}"

. /lib/lsb/init-functions

case "$1" in
start)
log_action_begin_msg "Starting vncserver for user '${USER}' on   localhost:${DISPLAY}"
su ${USER} -c "/usr/bin/vncserver ${OPTIONS}"
;;

stop)
log_action_begin_msg "Stoping vncserver for user '${USER}' on localhost:${DISPLAY}"
su ${USER} -c "/usr/bin/vncserver -kill :${DISPLAY}"
;;

restart)
$0 stop
$0 start
;;
esac

exit 0

Make the script executable with sudo chmod +x /etc/init.d/vncserver.
Finally, connect to your server with a VNC client on port 590X, where X is the value of "DISPLAY" in the vncserver script. On OS X, I like to use Chicken of the VNC. On Windows and Linux, the TightVNC client works nicely.

Source


It is:

Include /etc/phpmyadmin/apache.conf

Not: Include /etc/phpmyadmin/apache2.conf

Just delete the 2 and it should work.


I had the same problem. I solved by resizing the partitions in windows (I have win 8).

You need to resize if you don't have free space. Or you can format some partition - but that's what you dont't want.

You have to create partitions:

swap,
filesystem (ext4 recommended - but if you want to access it from windows you need 3rd party driver),
BIOS reserved space (around 2MB).


The problem here is that MBR is not part of the RAID setup. You need to reinstall Grub on the drive.

Step one is to boot with a Ubuntu Live medium, either from CD or USB. Open a terminal, and become root using sudo -i.

Assemble the array, as you stated in the question. This will give you some devices in /dev/md. Mount the one with your root file system as /mnt/, running the commant mount /dev/md/device /mnt.

If you have a separate boot partition, for instance /dev/sda1, you will have to mount this at /mnt/boot

Next, you will have to mount the syfs, dev and procfs to /mnt/sys, /mnt/dev and /proc respectively:

mount -o bind /sys /mnt/sys
mount -o bind /dev /mnt/dev
mount -o bind /proc /mnt/proc

Now you should be able to chroot to /mnt:

chroot /mnt

This should give you a new bash prompt, from the root file system. If you're unsure if you have a seperate boot partition, please do a grep "/boot" /etc/fstab to check. If you have, mount it.

Next step is to reinstall grub.

grub-install /dev/sda

This assumes that sda is the device you want to reinstall grub to - please check this.

Unless you get any error messages, this is what is needed to reinstall grub. The array will run in degraded mode.


Directory structure for storing images in a file system

Don't forget you can have duplication without making things too hairy.

/year/
/year/year-month-day/
/year/year-month-day/year-month-day-hour-minute-counter.jpg

You're going to have, what, at most, 60-80 subdirectories at the first level, 366 at the next level (probably much fewer) and however many photos you take in a day on the next level.

Normally I'd suggest doing this with rename but it's fairly complicated to read from EXIF data so I'd probably suggest something like Phatch, available from the phatch package.

Either way, make sure you get a backup before you start, or start with a small number of photos.
Or both.


tar command fails on bigsize(191 GB) file

GNU manual here says that there is a limit of 8GB for file sizes, so you should be ok there, unless you happen to have a file bigger than that among the other smaller ones you mention. If you need larger files you could change the tar format to POSIX with the  tar --format option.

If that's not the case, are you reaching the end of the tape cartridge perhaps? That does seem more likely from the messages you see, it seems to me.


How can I make Ubuntu run well (including with wifi) on a 32-bit machine?

Myself I'd rather run a flavor on x86 (32bit) due to it's lighter desktop, but it's a personal preference as to whether or not flavors are for you, or not.  I've also done loads of testing on x86 ISOs for 18.04.3 flavors that should be released in only a few hours, so no x86/32bit is not EOL yet.

Ubuntu 16.10 is EOL & I'd not suggest it (just like i'd not suggest either of the two 18.10 releases that were also available in x86/32bit as it's also EOL). Why not use a 18.04 LTS flavor? Also Ubuntu 16.04 LTS is still supported; the flavors for 16.04 only are EOL (with exception of kylin)

LTS means long-term-support, and Ubuntu 16.04 LTS was a long-term-support release meaning it came with 5 years of supported life (which could be extended with Ubuntu Advantage for fee). Ubuntu 16.04 LTS (2016-April) release and Ubuntu 18.04 LTS (2018-April) release are both LTS with 5 years of support; flavors of LTS releases only come with 3 years unless specified otherwise on release.

Ubuntu 16.10 you mention was not a LTS thus only had 9 months of life with it release-upgrading to 17.04, (2017-April), then to 17.10 (2017-October) then to 18.04 LTS. Ubuntu 16.04 LTS had two release-upgrade paths; the default path was to the next LTS release (ie. Ubuntu 18.04 LTS; with LTS releases coming out every even year in April), or via each release (thus 16.10, 17.04, 17.10 then finally to 18.04 LTS where the decision path could be chosen again). The every-release path is for those that want the latest software always, and don't mind release-upgrading every 6-9 months (most users find this a hassle and stick to LTS releases)

https://www.ubuntu.com/download/flavours is the site I'd suggest to download flavors of Ubuntu, most (if not all) supported x86 or 32bit for 18.04 LTS though that was the last release for x86 for all but Xubuntu & Lubuntu (which continued with x86 until December-2018, so whilst 19.04 still receives updates for x86, 18.04 LTS will likely end up being supported longer!).

Part of the reason I use the aforementioned site is ubuntu.com is pretty easy to remember as legit, however with flavors like Lubuntu, http://lubuntu.me is a little harder to remember, as lubuntu.net is a fan site and not official; where you'll note ubuntu.com only ever points to lubuntu.me


I had the same problem as you. Maybe your kernel is not working properly with the drivers you have to use. Try to install another kernel version and see if it helps. (Works most of the time).

An amazing program for doing that is Ukuu.

First add the repositories:

sudo apt-add-repository -y ppa:teejee2008/ppa

Now update them:

sudo apt-get update

Install the program:

sudo apt-get install ukuu

And then launch it from the launchpad or via the terminal by:

sudo ukuu-gtk

Inside the program, you can choose the kernel you want. Then, it downloads and installs it.
As the program indicates, those are the common errors that you have, caused by a non compatible kernel.

Hope it helps...


How do you reset a USB device from the command line?

Save the following as usbreset.c

/* usbreset -- send a USB port reset to a USB device */

#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/ioctl.h>

#include <linux/usbdevice_fs.h>

int main(int argc, char **argv)
{
    const char *filename;
    int fd;
    int rc;

    if (argc != 2) {
        fprintf(stderr, "Usage: usbreset device-filename\n");
        return 1;
    }
    filename = argv[1];

    fd = open(filename, O_WRONLY);
    if (fd < 0) {
        perror("Error opening output file");
        return 1;
    }

    printf("Resetting USB device %s\n", filename);
    rc = ioctl(fd, USBDEVFS_RESET, 0);
    if (rc < 0) {
        perror("Error in ioctl");
        return 1;
    }
    printf("Reset successful\n");

    close(fd);
    return 0;
}

The run the following commands in terminal:

Compile the program:

$ cc usbreset.c -o usbreset

Get the Bus and Device ID of the USB device you want to reset:

$ lsusb
Bus 002 Device 003: ID 0fe9:9010 DVICO

Make our compiled program executable:

$ chmod +x usbreset

Execute the program with sudo privilege; make necessary substitution for <Bus> and <Device> ids as found by running the lsusb command:

$ sudo ./usbreset /dev/bus/usb/002/003

Source of above program: http://marc.info/?l=linux-usb&m=121459435621262&w=2


Cant install python 3.6.3 on ubuntu 16.04

I solved this problem (also caused by changing ppa of python3.6 from jonathonf to deadsnakes) by removing python3-tk (which is "old" python3.6 package from jonathonf ppa).

sudo apt remove python3-tk

Also I am not sure if it helped me, but I cleaned /usr/lib/python3.6/ after removing (python3.6, python3.6-minimal, libpython3.6-stdlib and apt autoremove)


I didn't manage to find any package up to date and ready to be installed onto my linux box.
So I went the building route.

The following are the steps that made it work (each one was needed, otherwise it wouldn't work). Maybe there's  a better path anyway, I'm not a building expert at all!

sudo apt install build-essential cmake git wget curl
sudo apt-get install cmake gcc g++ qt4-qmake
sudo apt-get install qt-sdk
sudo apt-get install openssl libnss3 libnss3-dev
sudo apt-get install qt5-default
sudo apt-get install qttools5-dev-tools
sudo apt-get install checkinstall

cd xca-2.1.2/

./bootstrap
mkdir Build
cd Build/
../configure && make -j10

sudo checkinstall

checkinstall needed a description of the SW and a version number (2.1.2).

HTH


Why my Arc Theme doesn't look right on Xubuntu

I find solution:

https://unix.stackexchange.com/questions/189711/installing-an-xfce-theme-it-does-not-show-up

It is Settings -> Window Manager -> Style

not Apprearance -> style


SSH without password with non-default identity file location

It fails for the same reason that ssh-copy-id failed the first time - i.e. because you have chosen a non-default location for the identity file.

You can resolve it in the same way, by adding -i /home/user/ssh/keys/server1key to your ssh command - note that the client side needs the location of the private key file.

From man ssh

 -i identity_file
         Selects a file from which the identity (private key) for public
         key authentication is read.  The default is ~/.ssh/identity for
         protocol version 1, and ~/.ssh/id_dsa, ~/.ssh/id_ecdsa,
         ~/.ssh/id_ed25519 and ~/.ssh/id_rsa for protocol version 2.

Alternatively, you may wish to create a ~/.ssh/config file entry for the host along the lines of

Host            somename
Hostname        192.168.1.3
User            user
IdentityFile    /home/user/ssh/keys/server1key


As I read on the German site ubuntuusers.de, the DCM files are just burned to the CD.

If this information is correct, you could simply burn the files to an empty CD like you would do with everything else too.

The article mentions that usually a DICOM viewer is put on the CD, too, so people from without the medicinal area can view them. THis should also work by just burning it to the disk alongside the images.


safemode how long should it take clean and free up space

Once you get this second message you quoted the file system is already clean and you should be able to reboot (assuming the system doesn't go on to reboot.) That's why the word clean appears in that message.

This doesn't necessarily mean space is being freed--though a little bit could be freed should you have been writing to a file and your system crashed before the program was able to close the file. If you are running low on space there are other alternatives to tidy things up, such as those in  this question.

For an ext2 or an ext3 system fsck normally takes a couple of minutes or less, but it depends on the size of the partition being checked. An advantage of ext4 is that fsck can run even faster there.


I have a fairly nice Surface Pro 4 kernel running on my Ubuntu installation.

The Rundown

What works:

wifi/bluetooth
multi-touch
pen
trackpad on the typing cover

What works somewhat:

hibernate - after resume there is no touch or pen

What doesn't:

suspend (see the note on power saving below)
freeze (the more battery draining version of suspend/sleep that doesn't reliably work)
the typing cover

What I haven't tried:

the cameras

General idea

The general idea behind this kernel is to take the changes done by Hyungwoo Yang at https://github.com/ipts-linux-org/ipts-linux-new/wiki and apply them to the Ubuntu 4.9rc3 kernel.
Here are the steps to get the kernel in order.  The compilation process takes about 45 minutes using all the cores of the Surface 4.  Cloning the kernel repositories requires about 1.5 gigs of disk space.

Steps to produce the kernel

install Ubuntu 16.10 yakkety. to accomplish this you will need a USB hub that can handle both the ubuntu live-USB and the keyboard/mouse.
boot linux with a USB keyboard.
prepare the Ubuntu 4.9rc3 kernel.

clone the Ubuntu 4.9rc3 kernel (requires ~1.5gig of space):

git clone git://git.launchpad.net/~ubuntu-kernel-test/ubuntu/+source/linux/+git/mainline-crack v4.9-rc3
download 6 patches: Patch1 Patch2 Patch3 Patch4 Patch5 Patch6
apply the patches to the kernel in order: do

git am /path/to/THEPATCH.patch

for each of the patches.

create a patch with touch/pen support from the ipts-linux-new kernel.

clone the kernel (requires ~1.5gig of space) in another directory:

git clone https://github.com/ipts-linux-org/ipts-linux-new.git
create the patch:

git diff 0c183d92b20b5c84ca655b45ef57b3318b83eb9e > /path/to/ipts-linux-new_patch.txt

apply the ipts-linux-new patch to v4.9rc3

`cd /path/to/v4.9rc3`
`patch -p1 < /path/to/ipts-linux-new_patch.txt`
`git add .`
`git commit -m 'Patch for Surface Pro 4 taken from ipts-linux-new.'`

compile the kernel and make ubuntu .deb packages (copied from Ubuntu Kernel Compilation)

cd /path/to/v4.9rc3

initialize the debian files:

fakeroot debian/rules clean
configure the kernel you will build:

fakeroot debian/rules editconfigs

Say yes only to the amd64 question. This will show the "menuconfig" curses interface. activate the following two options:

Device Drivers -> NVM express lock device (y)
Device Drivers -> Misc devices -> Intel Precise Touch & Stylus (m)

comment or remove "do_zfs = true" in "/path/to/v4.9rc3/debian.master/rules.d/amd64.mk"
rename the kernel by editing "/path/to/v4.9rc3/debian.master/changelog"

compile the kernel (use more threads than processors to make it faster)

`fakeroot debian/rules clean` #necessary, but I don't know why
`DEB_BUILD_OPTIONS=parallel=5 fakeroot debian/rules binary-headers binary-generic binary-perarch`

four new .debs should be created in the directory next to v4.9rc3.
Install the .debs with the following command:

`sudo dpkg -i linux-image-* linux-headers-4.9.0-040900rc3*`

copy driver files from windows to linux:

copy driver files from "\Windows\INF\PreciseTouch\Intel" to the linux directory "/lib/firmware/intel/ipts". There should be at least 4 files with names similar to these:

iaPreciseTouchDescriptor.bin
SurfaceTouchServicingSFTConfigMSHW0078.bin
SurfaceTouchServicingDescriptorMSHW0078.bin
SurfaceTouchServicingKernelSKLMSHW0078.bin

Make symbolic links to these files:

cd /lib/firmware/intel/ipts

ln -s iaPreciseTouchDescriptor.bin intel_desc.bin

ln -s SurfaceTouchServicingSFTConfigMSHW0078.bin config.bin

ln -s SurfaceTouchServicingDescriptorMSHW0078.bin vendor_desc.bin

ln -s SurfaceTouchServicingKernelSKLMSHW0078.bin vendor_kernel.bin

You should be able to boot the new kernel now.  If the links are in the right place then touch and pen will work nicely.

Note on power saving

The missing suspend functionality is a major drawback.
This is a due to the Microsoft "connected standby" fiasco: https://lwn.net/Articles/580451/.
Freeze uses more battery (drains the battery maybe half as fast as if you had left the computer on), and doesn't seem to be reliable.
With hibernate the state is successfully kept, but unfortunately, the touch and stylus functionalities do not work after resume.


Open a terminal and type:

cat /etc/issue

If it still shows 10.04, you can upgrade by going to System > Administration > Update Manager > Settings... > set "Show New Distribution Releases" to "Normal Releases" > Close > Check.  Now you should see the button for upgrading to 10.10.


Depending on the Webserver you're using, .htaccess files might help you out if you'd like to restrict access to certain folders and you're using Apache.
In the document root you may create a .htaccess that permits any access attempts.
(see this question: https://stackoverflow.com/questions/17867576/deny-access-to-all-folders-except-a-few-ones-using-htaccess)


How can I repair GRUB in a dual boot with Windows 8.1?

The easiest method is an Ubuntu live cd with Internet connected. Go through this link:  https://help.ubuntu.com/community/Boot-Repair and follow the instructions. I recently recovered grub on my triple boot system after an Ubuntu upgrade that didn't went as planned.


I can not find /sys/kernel/debug/vgaswitcheroo/switch

In Ubuntu 10.10 and up, vgaswitchheroo is already enabled so you don't need extra settings. And /sys/kernel/debug is already mounted, however you need root permissions to read the contents of /sys/kernel/debug, so using sudo su should work.

If there's still no switch, run lspci | grep VGA and make sure both cards are outputted. If one is missing a BIOS setting might be the cause, so check that.

Console example:

sergio@Sergio-L:~$ ls /sys/kernel/debug/vgaswitcheroo
ls: impossível aceder a /sys/kernel/debug/vgaswitcheroo: Permissão negada
sergio@Sergio-L:~$ sudo su
[sudo] password for sergio:
root@Sergio-L:/home/sergio#
root@Sergio-L:/home/sergio# ls /sys/kernel/debug/vgaswitcheroo/
switch
root@Sergio-L:/home/sergio#


Making a bash script that reconnect to AP when connection lost

It is more simple than you think:

#!/bin/bash

if ! [ "$(ping -c 1 google.com)" ]; then
    nmcli nm wifi off
    nmcli nm wifi on
fi

Then you can use a cron job for this script to run at every minute.


How do I remove a download that wasn't completed?

sudo apt-get autoclean

If it errors out with a "lock error" (*) or if you want to do it yourself ...

cd /var/cache/apt/archives/partial/
ls

The directory should be empty but your system will have the yet to finish .DEB files. Use a sudo rm /var/cache/apt/archives/partial/* (safey 1st ;) )  to delete all or change the * for an actual file name. Do not delete the directory "partial/".

(*) if you are sure nobody is using the installer and the lock error is not correct you can remove the lock with

sudo rm /var/lib/dpkg/lock
sudo rm /var/cache/apt/archives/lock
sudo dpkg --configure -a


What opportunities do scopes offer to mobile operators?

Scopes provide the backend for all user searches in the Dash, which is the main entry point for most user journeys.

As such, scopes have a great impact on what is presented to the user in response to search queries, but also in the default view when no query is entered. Operators can implement their own scopes to add to or replace existing ones and that way influence user experience and provide differentiation to a great extent.


I`ve installed php 5.3.24 in my UBUNTU 18.0.4 but unable to show info.php page

Do not run this on a public facing webserver.
This version of PHP has some rather ugly security problems.
Update your scripts to work with a newer php version. Anything else is plain stupid, and should only be used to verify functionality during porting of scripts.

First we'll have to install Apache development files, a few misc build dependants and build essentials:
sudo apt install apache2 apache2-dev build-essentials libxml2-dev libmariadbclient-dev-compat checkinstall

Now we can continue with the tutorial; Copy paste mostly, with some modifications:
cd /tmp && wget http://in1.php.net/distributions/php-5.3.29.tar.bz2
tar -xvf php-5.3.29.tar.bz2
cd php-5.3.29
./configure --with-mysql --with-apxs2=/usr/bin/apxs --with-tsrm-pthreads --enable-maintainer-zts --with-libdir=/usr/lib/x86_64-linux-gnu/ #Note extra options cf. other answer
make -j
sudo checkinstall
sudo a2enmod php5

Finally, you'll have to add the line
AddType application/x-httpd-php .php

to /etc/apache2/apache2.conf using your favorite editor. Add it near the bottom.
After that, do a
sudo service apache2 restart

And php 5.3.29 should be installed.
The above was tested on 18.04. You probably want other php modules as well, which has to be enabled with ./configure. Which depends on the code you plan to run.


Interference/White noise through headphones on Asus Zenbook Pro UX501VW running Ubuntu 16.04 LTS

I encountered the same problem with a Win 10 dualboot with Ubuntu 18.04. I have this setup on an Asus G501VW.

According to this link it was a problem of using the wrong driver under Ubuntu.

I needed to change which driver was used like:

Open a terminal
Edit the file under /etc/modprobe.d/alsa-base.conf. To do this, open your favorite program. I typed the following in the terminal to open the nano editor:

sudo nano /etc/modprobe.d/alsa-base.conf

Within the file, go to the last line and add the line

options snd-hda-intel model=dell-headset-multi

Reboot


Regarding Ubuntu12.04 instalation on Windows 7 64-bit OS

Try to boot from USB instead of CD-rom.

This is how to create a bootable usb:

Booting and installing from USB

Note: To boot from USB, you need to tell your BIOS that you want to do that.
You can access your BIOS when pressing F10 while turning on the computer. Then search for boot options and select USB or 'flashdisk'.


Cannot install old Nvidia card in 19.10 - Blank on boot

I wiped the hard drive and installed 18.04 LTS

I followed the below steps, and it worked right out of the box. I'm not sure what is up with 19.10, but it just would not install these nvidia drivers right at all. Crashed on start up and gave a login screen despite having login turned off.

Activites > Additional Drivers > Check Nvidia 340, > Apply Changes > Reboot

Done!


apt-get update stuck on "Waiting for Headers" when using Windows XP ICS

There seems to be a fundamental issue with the implementation of ICS and IP forwarding in general on Windows XP it simply cannot handle multiple connections to the same server, maybe it's some weird combination of a bug with intentional incompetence (as I like to call it), but the end result is that XP cannot function as a competent router/proxy for a linux system (maybe the limitations are intentionally put in place for non-windows systems).

It is interesting to note that this is not only limited to ICS. There is a hidden option in the windows registry that allows IP forwarding for network interfaces and it suffers from the same problem.

The only solution - it appears -  is to either change the network topology to avoid using ICS (either connecting directly, or buying a dedicated switch/access point), or to use a different OS to set up the temporary bridge. I used an ubuntu live-cd (it wasn't my computer or it would have been running some *nix to begin with) and enabled packet forwarding and ip masquerading so the computer behaves as a bona-fide router.


Running Ubuntu on an external hard drive and risk accidentally disconnecting it?

When It is a laptop, I think, it is better on using virtual machine. Because you move it as much than if it is a static PC (a Desktop one).

I used to install ubuntu on harddisk and it disconnected often when used on laptop (just by moving slightly). The system will freeze and bump! nothing to do but restarting it.

I recommend you to use your second option.

Ensure your /home dir is in laptop and other files go to external disk. Because losing (disconnecting) you /home will freeze it also.


Dell with Intel SandyBridge and HD Radeon 6470M

Mouse:

In ubuntu the option Disable touchpad while typing is default on. Go to System Settings -> mouse and touchpad to turn it off.

As for your graphics problem, I am trying to figure that out. I'm using my intel HD graphics 3000 (gpu in core i5 cpu), and trying to use the hd radeon instead. Please hang on.


How can I move grub ("multiboot") from usb to hard drive

Just found the answer to my own question in case someone needs this in the future.
The trick is to use boot-repair and make sure to select advance then install the mbr on the main hard drive (eg sba1).  Follow this url for more info - http://www.howtogeek.com/114884/how-to-repair-grub2-when-ubuntu-wont-boot/


Several ways. There is an application in Ubuntu Software Center called Startup-Manager, which can be used to edit grubs menu. It's not actively supported or developed since a couple of months ago though. The developer of Startup-manager recommends a software called Grub-customizer, which you can find here: https://launchpad.net/grub-customizer. Both of those applications are GUI apps.

You can edit the boot menu yourself.

But most BIOSes have a keyboard shortcut to display a boot menu from which you choose which device you want to boot from. That is a better solution, because then you don't have to do anything special to either device. You'll just install grub on both of them.


Missing sound volume icon on screen top (14.04)

Execute in terminal:

gsettings set com.canonical.indicator.sound visible true


You can use VNC, for example tightvnc offers exactly that, with view only (and remote access with separate password) mode.

Unfortunately, with tightvnc you can't share your current desktop. You can use x11vnc (sudo apt-get install x11vnc) to share your current desktop. For example tightvnc client is good for connecting from Mac OS X / Linux / Windows to any VNC server (including x11vnc and tightvnc).


itsfoss.com has some tips which helped speedup my wireless - I would ignore the part about WICD, as it does not seem to be supported currently, and does not totally integrate into Ubuntu 14.04.

A second post which also helped advised entering the following command into a terminal:

sudo apt-get install build-essential libssl-dev linux-headers-`uname -r` linux-firmware-nonfree


Kile editor on Ubuntu 18.04 is not working properly

This can help you:

Trying to run Kile gives a segmentation fault on Linux Mint 19

In short, you will need to install Okular:

sudo apt-get install okular

It worked great for me.


These IP addresses are private IP addresses — that is, they can be used only in a private network. To take your website public you have to obtain a public IP address from a service provider. After that, you will have to register an Host (A) DNS record, aka a Forward DNS record, also from a service provider.

About configuring a router, Do you have a firewall/router? Or you need to set up your Ubuntu server as your router?

About ports, what is the use of this server? If you want it to be a web server, you will have to forward port 80 on your firewall. Please elaborate.


My hard disk with Vista and Wubi is failing, how can I use Wubi to rescue it?

I think you may be better off using the Ubuntu live CD to explore and backup your data so you can replace your disk.

An external drive would be helpful here, to back up too, as your optical drive will have the Live CD in it and your hard drive is failing.


Yes, although it gets a bit more complicated then that.

You would need to find portable versions of your "utilities", because you can't just move program installs from one machine to another.

Assuming you were able to find portable versions, the next thing you need to do is partition the drive.

So boot up Ubuntu, and fire up the terminal. Then run:

sudo apt-get update
sudo apt-get install gparted

Open up the newly installed gparted and shrink your main Linux EXT4 volume by however much you want. So if you want 8GB available for Windows utilities, you need to shrink it by 8GB.

After that, you need to format that empty space you just created as NTFS.

Then you're good to go!


The utility responsible for this functionality is gnome-screenshot.

Run sudo apt-get remove --auto-remove gnome-screenshot to remove the package and any other dependant packages that aren't needed.

Then, reboot your system and wait for Ubuntu to automatically repair this package at boot.

After logging in, try the shortcuts again.


Screenshot.jpg not visible in "recently used files"

"Recently used" files are listed in a ~/local/share/recently-used.xbel file (which is normally shared by all apps).
If you use the Gimp flatpak version, this version has its own copy of ~/local/share/ (in ~/.var/app/org.gimp.GIMP/data) so has its own copy of the ~/local/share/recently-used.xbel file, so has its own list of recently used files.
You can't replace ~/.var/app/org.gimp.GIMP/data/recently-used.xbel by  a link to ~/local/share/recently-used.xbel because this file is erased/recreated by Gimp (and the re-creation doesn't re-create the link). But you can replace ~/.var/app/org.gimp.GIMP/data/ by a soft link to ~/local/share/ and Gimp will happily share the file with others.
I don't know is this applies to other installation modes (snap, for instance) but this is fairly easy to try.


Making Changes to a Locale setting and notifying upstream

1- You can change your locale settings by editing /usr/share/i18n/locales/en_CA and then applying the changes:

gksudo gedit /usr/share/i18n/locales/en_CA
sudo locale-gen en_CA.utf8

2- You might find contact information in the file.


These steps help me resolve permanently my problem:

Remove snapd: sudo apt purge snapd snap-confine
Update: sudo apt update
Reinstall it: sudo apt install snapd
Check apparmor's status: systemctl status apparmor
If status inactive, then activate it: systemctl start apparmor
Now install any app you want via snap commands line

Remember, you must check and activate apparmor before installing any app.


Should Exterrnal USB hard drive auto mount Ubuntu 12.04.01 LTS

I have found that nautilus will automatically mount the drives if you click on them, otherwise, say for a server where no-one may be using nautilus, or you want the external USB drive to be automatically mounted when plugged in, you can use udev to do this.


Many Authentication requests on startup, NOT remote

Accidentally found a solution that worked for me. Not 100% sure if it's the true fix.
I removed all nvidia-related drivers/packages
sudo apt purge nvidia*
sudo apt purge cuda*
sudo apt purge libnvidia*
Restarted my computer, opened Ubuntu "Software & Updates" - it has defaulted to the open source driver, which causes big screen tearing for me.
Trying to switch it back to 460 (current latest as of writing) (not the server version) didn't work, threw a lot of errors/dependencies at me, but 450 worked (second latest as of writing).
And restarted... dozens of keyring requests are gone, now just 1 (back to how it was originally).
Maybe not a true solution, since I am compromising by rolling back to an older driver version, hopefully this still works when the 460 drivers are fixed on 20.10.


Ubuntu Videos doesn't play my .mp4 videos

Install ubuntu-restricted-extras with the following command, It may help:

sudo apt-get install ubuntu-restricted-extras


buttons do not appear in applications like evince, etc. image viewer. in ubuntu 13.10

The menu appears to have been relocated to the right side, inside the gear symbol. You'll find all the options and printing menu there.


If you have a filename with a space in it, most commands interpret it as two file names. For example, if you have a file called "my file" and you attempt to copy it to /tmp as follows:

cp my file /tmp

the cp command will look for two files (Called my and file -- if they dont exist it will fail).

To overcome this, put quotes round the file name:

cp "my file" /tmp

you need to do the same in your script

cp -ru "$line" "$destname"

(bash will still expand variable names inside double quotes, but not single quotes)

I haven't filly checked your script -- there may be other places where you need to quote variable names.

btw -- there are lots of comments about using rsync. Once you get used to it its a much nicer way of backing up!


Cant read variable from user input in bash

I solve this problem. It was very simple. I need to change ends of strings to Unix/Linux format in my .sh file instead of Windows ends.


How to use wireless(wlan0) and wired (eth0) at the same time?

You can assign a different IP address to each network interface or have them assigned by the DHCP server on their respective network (the default if you don't assign an IP manually). You already assigned an IP address to the wired network interface and I would guess that the wireless network has a DHCP server, so you can just leave that at its default configuration.

You should now be able to

reach the host from both networks through their respective IP addresses (unless an intermediate network component like a firewall blocks such traffic) and
access the internet through the wireless interface, because the DHCP server should have submitted a gateway address, so the host's networking layer can set up an appropriate route to public internet.
The wired connection should have no internet access unless you set up a gateway and/or route for it.

If you want to restrict inbound SSH traffic to one interface you can configure the SSH server to only listen to connections coming through that interface:

In /etc/ssh/sshd_config uncomment or add a ListenAddress entry with the static IP address of that interface, e. g.:

ListenAddress 10.0.23.42

You can specify ListenAddress if you want to listen to multiple interfaces or IP versions (e. g. in a dual-stack setup with IPv4 and IPv6 on the same interface).
Restart the SSH server:

sudo service ssh restart


How to uninstall apps downloaded from internet in Ubuntu 12.04 lts

"...is another process using it?"

If Synaptic Package Manager or other are running try closing them, and then run the command again.


How can I make all fonts show a sample string for comparison?

There is gnome-terminal when you select Edit -> Profile Preferences -> Custom Font:

However on my system it doesn't display the "E G PM" even though it head fakes you into thinking it will.


Not able to install nodejs in ubuntu command line

Make sure your /etc/apt/sources.list file is correct.

Run the next command to find out what release version you use:

cat /etc/lsb-release | grep RELEASE

Then follow one of the next links to change your /etc/apt/sources.list file:

19.10 sources.list
18.04 sources.list
16.04 sources.list

You could backup your old sources.list file by sudo mv /etc/apt/sources.list /etc/apt/sources.list.bk and create new one pasting there content from one of the provided links.

Then do

sudo apt clean && sudo apt update && sudo apt install npm nodejs node-abbrev node-ansi node-rimraf

and try again.

Also make sure there's no suspicious repositories under /etc/apt/sources.list.d/ folder that could also contain nodejs of newer version that do not contain required dependencies.


Is extracting a ISO file to USB the same method as creating a bootable USB?

It's possible but not the way you want. Simply extracting the ISO file on USB drive won't make it bootable.

Instead, you can use the app DriveDroid to create the bootable USB. You just need a rooted phone.

XDA thread || Play Store Link


How to create a SFTP (SSH) User with extremely limited permissions

Let's start

Create user ubuntu

sudo useradd ubuntu

Make password

sudo passwd ubuntu
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

Create for SFTP only group

xxx@xxx:~$ sudo groupadd sftp_users

Add to a user "ubuntu" for SFTP only group

xxx@xxx:~$ sudo usermod -G sftp_users ubuntu

Make dir for sftp access

sudo mkdir /ubuntu

Change owner, because read/write permission

sudo chown root.root /ubuntu/

Add permission

sudo chmod 755 /ubuntu/

Edit /etc/ssh/sshd_config

sudo nano  /etc/ssh/sshd_config

Comment out and add a line like below

#Subsystem sftp /usr/lib/openssh/sftp-server
Subsystem sftp internal-sftp

Add at the last

Match Group sftp_users
  X11Forwarding no
  AllowTcpForwarding no
  ChrootDirectory /ubuntu
  ForceCommand internal-sftp

Restart ssh service

sudo service ssh restart

With this cenfiguration you can ssh into folder ubuntu and get files. Can not put or delete

Try.

Edit 1

To sftp in right folder edit /etc/passwd. Change line for user ubuntu to look like this

sudo nano /etc/passwd

 ubuntu:x:1001:1001::/ubuntu:

This will change user ubuntu home folder to your sftp server folder.

  Enabling root account is not good idea.

You can ssh to server with user1.

If you add user user1 in sudoer group you will be able to write in
folder /ubuntu/ and set appropriate permission

sudo adduser user1 sudo

Make folder, write in folder ubuntu. After actions you must set permission for user ubuntu. Easiest way is to agai set permission to 755

sudo chmod 755 -R /ubuntu/

-R - option will give reading permission of all files and dir's for user ubuntu


Well if you intend to make your tablet the controller than I got a way to do it.
I will suggest you try it with your mobile phone first to ensure you get what you desired.

Go here an install gs-connect as an extension
You will get the Mobile Devices column like below if everything is good

Install KDE connect in your tablet from the play store.

Connect your laptop with your phone via hotspot and then connect using KDE-connect

laptop:-

mobile:-

Go to plugin setting to enable plugins and permissions in KDE-connect in your mobile

Now go to Remote-input option in KDE-connect an enjoy  :)


Lag in Kubuntu - Config fstab correctly?

Consider changing the partition to ext4; if your system is all Ubuntu there is no reason to put up with the overhead associated with using an ntfs file system.  Here are the steps I went through to convert mine.

  1) copy data from original partition

  2) gparted: unmount partition

  3) gparted: format to ext4

  4) gparted: label the partition

  5) copy the new UUID from gparted and edit fstab

  6) sudo mount -a to test mounting it

  7) check permissions on mount point are drwxrwxrwx

  8) copy data back


Text appearing on top whenever I open terminal

You probably edited ~/.bashrc and updated your PATH, but instead of writing PATH=..., wrote PATH-.... Change the hyphen to = and it should be fixed.


Should I install non-repository software as root or as my user?

To be more specific there are two things to do here. You can "Run" a program or "Install" it.

Running

Running a program only requires that the executable file has the "execute" permission enabled. Programs run like this, from a normal User, have access to everything the User has read/write access to, which is usually directories like /home, /tmp, and /media/NAMEOFDRIVE.

So basically you can run self contained portable programs, scripts, and even build programs using make as long as they don't need to touch any directory owned by Root.

Installing

Installing a program involves copying it's core components to restricted parts of the OS in order to streamline it's execution and integrate it with other systems and programs. This requires Root permission because it involves writing to directories owned by Root. The reason Root exists is to prevent any rouge programs or scripts from doing critical damage to the OS without getting strict Permission from the User or Administrator.

Generally almost every directory in the "root"(/) of the filesystem is owned and writable only by Root. The exceptions are /home(where user profiles and data are stored), /tmp(where temporary files are written to in order to be deleted when no longer needed or upon reboot), and usually any folder under /media(but not itself) as this is where things like your USB drives and DVDs are mounted.

Summary

Basically, as long as a program or script has no need to write to a directory owned by Root then it shouldn't be run as Root. A Safety feature in Ubuntu(and Linux in General) is to always prompt the user when a program wants to access an area controlled by Root, which means everytime you run something like APT you will be prompted for your password. The only exceptions to this are programs designed to automatically start at boot, but these programs had to first get Root permission from the User before being able to set that up in the first place.

Also Ubuntu(and some other Distros) take things a step further with the use of the sudo and gksu tools. Instead of the original practice of giving a program Root access via su and that program then having free use of Root until closed, sudo and gksu only give Root access for a single command, further limiting the possibility of the User accidentally giving the wrong program free rein of Root.


KMFL not working with either SCIM or IBUS, ubuntu 14.04

It's a long shot, but do you have the icon files for the keyboard maps in place?  When I speedily upgraded from Precise to Xenial via Trusty this weekend, I discovered that my KMfL keyboards were not working.  Only by invoking ibus-setup did I discover that their icons were now being looked for in ~/.kmfl/icon, instead of ~/.kmfl/icons where they had always been found before.  I fixed that with a soft link, in case the search location is corrected.  The icons for keyboards /usr/share/kmfl are still being found in /usr/share/kmfl/icons.

On Xenial, I've found it convenient to start the ibus daemon by adding the line

ibus-daemon -d

at the end of my ~.profile script.  I don't yet know whether this is needed for Trusty.

On Trusty, icons are still being found in ~/.kmfl/icons, but I'm having other problems there, so I don't have a solution that works on Trusty.  GTK3 applications are finding the keyboards, but the IME promptly dies!


This has moved to Gnome-Terminal package. Please uninstall it and install. Open xterm and run below commands.

sudo apt-get purge gnome-terminal
sudo apt-get install gnome-terminal

Restart the computer.


Combine multiple connections from the same NIC

Maybe you can try to bond the virtual devices with broadcast option
(I'Ve never tried that, but you might give a try)

i.e.:

iface eth0:0 inet manual
        address  192.168.2.10
        netmask  255.255.255.0
        gateway  192.168.2.1
        dns-nameserver 192.168.2.1
        dns-nameserver 8.8.8.8

iface eth0:1 inet manual
        address  192.168.2.20
        netmask  255.255.255.0
        #gateway  192.168.2.1
        dns-nameserver 192.168.2.1
        dns-nameserver 8.8.8.8
iface eth0:2 inet manual
        address  192.168.2.30
        netmask  255.255.255.0
        #gateway  192.168.2.1
        dns-nameserver 192.168.2.1
        dns-nameserver 8.8.8.8
iface eth0:3 inet manual
        address  192.168.2.40
        netmask  255.255.255.0
        #gateway  192.168.2.1
        dns-nameserver 192.168.2.1
        dns-nameserver 8.8.8.8

auto vmbr0
iface vmbr0 inet static
        bridge_ports bond0
        bridge_stp off
        bridge_fd 0

auto bond0
iface bond0 inet manual
    bond-slaves eth0:0 eth0:1 eth0:2 eth0:3 eth0:4
    #Bond Mode have to be varied to check if this works
    bond-mode 4
    bond-miimon 100
    bond-updelay 200
    bond-downdelay 200

But i will not garantee that this might work, i only say this you can test this without any garantuee... I HAVE NOT TESTED THIS (i know i repeat me)

IF this Works, you can create devices as long your fingers wants

Hope my Idea worked for you


Finding how many times a given package has been installed

I don't know if the repositories keep track of download counts, but Debian based systems have a (voluntary?) program known as the popularity contest. The Ubuntu popularity contest stats can be found at http://popcon.ubuntu.com/. It tracks installation counts, recency of usage, etc. You might be able to indirectly get the numbers you need from popcon.


Error: Unable to correct problems, you have held broken packages

If I'm not mistaken, you've installed a 32 bit version of ubuntu. Then you need a 32 bit deb file - and you tried to install the 64 bit.
First you need to remove the "wrong" deb version.

Then update.

sudo apt update

Select and install the 32 bit deb version from Anydesk and you should be fine

Ubuntu will cease to support 32 bit. So it is a good idea to install a 64bit operating system on your Lenovo G500s (which has a 64 bit Windows by default)


Ubuntu Desktop systems freeze very often

the solution to this is to install kernel 4.4.X (at the moment 4.4.0-98) instead of 4.10.X installed by 16.4.03 distribution.

It seems there has to be an issue with this kernel and virtual machines....

Regards,


I went to the GRUB menu by quickly press and hold the Shift key when I see a logo of my computer manufacturer and
Select the line which starts with "Advanced options", and then the line ending with "(recovery mode)"
Choose "Drop to root shell prompt".
Mount the system to read/write by enter the command mount -o remount,rw /
Type sudo nano /etc/init.d/rc
Replace currency=shell with currency=none
Type sudo shutdown -r now to reboot


I would switch to a lightweight user interface, xfce is quite popular on low end machines.


How do I resolve missing characters in my unicode font?

The most comprehensive font package I have found is font-noto. Installing this has always fixed whatever font-display issues I was having:

sudo apt install fonts-noto

Then, restart your browser and everything should work as expected.


Let me know if it works. The command below will load your snd-hda-intel module by appending it to /etc/modules, you might need to do a log off/log in.
    echo "snd-hda-intel" | sudo tee -a /etc/modules


Question about something appearing in my Terminal

This problem can occur when .bashrc file (which is a hidden file) is missing or corrupted. To solve this problem, run the following command from terminal as your normal user to copy the default .bashrc file from /etc/skel to the home directory:

cp /etc/skel/.bashrc ~


Collecting the origin directory of a Bash script from itself

The $PWD variable (which is also queried by pwd command) will tell you current working directory where the shell script operates. However, finding where the script itself is located depends on couple factors.

If you are using bash shell, you may use ${BASH_SOURCE[0]} variable for the purpose of finding where the script runs, as shown by Dave Dopson:

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

In other cases, such as zsh (unless in a function), ksh, and POSIX /bin/sh the $0 variable should be queried, probably with the use of dirname command, or via parameter substitution. Note that this applies mostly to the top-level scripts that you execute.

However, sourced scripts can be a problem, if you're not using bash and ${BASH_SOURCE[0]} variable. According to Gilles's answer, location of sourced scripts is not available in general from within the script itself. The calling script will know the location, but the sourced script - won't. However, the cited answer by  Gilles offers a few solutions. There are a few ways to portably determine if the script is sourced, however it seems the only benefit of that is to determine that script location is not available.


Errors after upgrading Ubuntu from 19.04 to 19.10

You cannot upgrade from an unsupported release (19.04, and b.t.w., even your target release, 19.10, currently is not anymore supported). You always should remember upgrading while your current release is still supported.
At this stage, a fresh reinstall is your only option to install a newer and supported system.


How to find my wi-fi password in ubuntu 16.04 LTS

You have to click Wi-Fi icon, next "Network Connections". Select Your Wi-Fi's SSID, and click "Edit".
In new window you should have tab "WiFi Security" and there will be check button called "Show password".

I'm writing it from my memory. I hope that I helped.


when i try to use apt-get to download packages or files it shows an error

assuming command line sudo rm -iv beaver.list.save.1 in the /etc/apt/sources.list.d/ should work.
Help on CLI deletion is at https://help.ubuntu.com/community/DeletingFiles
-v for verbosity and if required, -i for interactive confirmation of what is happening. You may need to  -ivf to force
update : (sorry can't comment) : did you sudo at the start of the command - this forces superuser permissions and can force file deletion (-ivf). you will need to provide your password (as an administrator)
If you have a "normal" user you would need to su [admin user name] first then issue the command - or logout/switch user from the drop down top right and login as your [admin user]


Removing half-installed Ubuntu & re installing it again

I would like to suggest you to make fresh install of ubuntu 12.04 but if you want to upgrade... download ubuntu 12.04 from site.. Burn installation disk. and upgrade through it.


How can I make ascii-banners from the command line?

I've always preferred figlet for big writing. Something about it preserves the character shape better. A bit subjective but there you go. Simple enough:

$ sudo apt-get install figlet
$ figlet oh hai!
       _       _           _ _
  ___ | |__   | |__   __ _(_) |
 / _ \| '_ \  | '_ \ / _` | | |
| (_) | | | | | | | | (_| | |_|
 \___/|_| |_| |_| |_|\__,_|_(_)

(It looks better in a terminal than it does here)

There are a ton of formatting options too that make it suitable for lots of different situations. It does this through "fonts" (standard, slant, shadow, small, smslant, bubble, digital, mini,  etc). man figlet has a full listing of available styles and formatting options but here are a few examples:

$ figlet -f slant Hooah!
    __  __                  __    __
   / / / /___  ____  ____ _/ /_  / /
  / /_/ / __ \/ __ \/ __ `/ __ \/ /
 / __  / /_/ / /_/ / /_/ / / / /_/
/_/ /_/\____/\____/\__,_/_/ /_(_)

$ figlet -f smslant Hooah!
   __ __               __   __
  / // /__  ___  ___ _/ /  / /
 / _  / _ \/ _ \/ _ `/ _ \/_/
/_//_/\___/\___/\_,_/_//_(_)

$ figlet -f bubble Hooah!
  _   _   _   _   _   _
 / \ / \ / \ / \ / \ / \
( H | o | o | a | h | ! )
 \_/ \_/ \_/ \_/ \_/ \_/

$ figlet -f mini Hooah!

|_| _  _  _.|_ |
| |(_)(_)(_|| |o


Boot to Ubuntu if specific USB is inserted

I would try to just set up your boot priorities in the BIOS. Set it to boot from a USB as the first option and then set your HDD with the Windows OS as the second option. That way when the computer is first turned on it will run through that sequence. If the USB is inserted it will go to that, if its not it will default to windows. You should install the os to the USB stick, like a 64gb stick per say, so you can save files and such on the drive.


If you need to remove your KDE settings, you be able to via removing the config files in your home directory.
If you remove the files ~/.kde (could also be ~/.kde4), it should remove the configuration - hence resetting it and hopefully removing any problems with it.

You will also need to remove the KDE files from ~/.config and ~/.local - Don't just remove these files, they are shared directories, and are used by other programs as well.

You don't have to remove the files if you want to, you can just rename them or place them elsewhere.

Hope this helps.

When you have a KDE config that works, you can back it up by running this to make a compressed file:

tar -cf KDEbackup`date +%y%m%d`.tar '.kde'

Or this to simply copy it:

cp -r '.kde' KDEbackup`date +%y%m%d`

N.B. If you are not copying and pasting, note that the things surrounding the date +%y%m%d are not apostrophes they are Grave accents. The ` key is to the left of the 1 on most keyboards. I know this is overly complicated, but it is useful when backing up as it adds in the date automatically.


rsync does that by default

from man rsync

  rsync [...] is famous for its delta-transfer algorithm, which reduces the amount of data sent over the network by sending only the differences between the source files and the existing files in the destination.

This should work:

rsync -av file /path/to/backup/


I'm facing the same problem on a RHEL 7.x box...

We are waiting on an official response from the shiny-server gurus.

However, for the time being, if you edit the /etc/systemd/system/shiny-server.service file...and comment out thePIDFile=/var/run/shiny-server.pid line, it seems to 'fix' the problem.

(you may need to translate paths since I'm on en EL 7 box, and you are on an Ubuntu Server)


install Oracle Virtual Machine by adding a repository

When you encounter commands that you don't understand, use manual pages.

This big command can be separated in three main parts :

Adding VirtualBox repository to the system
Register Oracle public keys
Installing Oracle VirtualBox

1. Adding VirtualBox repository to the system

sudo sh -c "echo 'deb http://download.virtualbox.org/virtualbox/debian '$(lsb_release -cs)' contrib non-free' > /etc/apt/sources.list.d/virtualbox.list"

Let's breack up each part :

sh -c

If you type man sh you will get :

-c               Read commands from the command_string operand
                 instead of from the standard input.  Special
                 parameter 0 will be set from the command_name operand
                 and the positional parameters ($1, $2, etc.)
                 set from the remaining argument operands.

Now :

deb http://download.virtualbox.org/virtualbox/debian '$(lsb_release -cs)' contrib non-free

is the address where the VirtualBox packages are located.

When you run the command lsb_release -cs it will output your Ubuntu version :

$ lsb_release -cs
trusty

> is a redirection operator. It writes the previous output to the following file :

/etc/apt/sources.list.d/virtualbox.list

When you run

echo 'deb http://download.virtualbox.org/virtualbox/debian '$(lsb_release -cs)' contrib non-free'

it will output in your terminal :

deb http://download.virtualbox.org/virtualbox/debian '$(lsb_release -cs)' contrib non-free

Running

echo 'deb http://download.virtualbox.org/virtualbox/debian '$(lsb_release -cs)' contrib non-free' > /etc/apt/sources.list.d/virtualbox.list

will write the line :

deb http://download.virtualbox.org/virtualbox/debian '$(lsb_release -cs)' contrib non-free

to the /etc/apt/sources.list.d/virtualbox.list file instead of giving a terminal output.

Note : This is not the advised method to use. It may lead to duplicate entries when running twice.

The recommended way to add the VirtualBox repository to the system is add-apt-repository :

sudo add-apt-repository "deb http://download.virtualbox.org/virtualbox/debian trusty contrib"

Replace trusty with your current Ubuntu version.

2. Register Oracle public keys

wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc

man wget output :

DESCRIPTION
       GNU Wget is a free utility for non-interactive download of files from
       the Web

[...]

-q
       --quiet
           Turn off Wget's output.

With this command you download the VirtualBox public key...

wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O-

...and register it to the system (What does the “-” mean?):

sudo apt-key add -

3. Installing Oracle VirtualBox

sudo apt-get update

man apt-get output :

   update
       update is used to resynchronize the package index files from their
       sources. The indexes of available packages are fetched from the
       location(s) specified in /etc/apt/sources.list.

And finally sudo apt-get install virtualbox-5.0 installs the virtualbox-5.0 package.

If you need additional clarification, do not hesitate to ask.

More information you can find in the answer from @takkat.
There is a list of all separated commands necessary to install VirtualBox.


It is indeed possible to start bash with ignoring the ~/.bashrc file. Specifically, via --no-rc flag:

 bash --noprofile --norc

You can make a wrapper .desktop file for that in a fairly simple way:

[Desktop Entry]
Version=1.0
Name=No-rc shell
Comment=Starts Bash with --no-rc flag
Exec=bash --noprofile --norc
Icon=/usr/share/icons/gnome/48x48/apps/terminal.png
Terminal=true
Type=Application
Categories=Utility;Development;

Alternatively, you could modify the ~/.bashrc in such way, that would allow you sourcing it dynamically. For instance, I'd personally do something like this:

if [ -z "$no_intell_compilers" ][ "$no_intell_compilers" = "false" ]; then
    source /opt/intel/parallel_studio_xe_2018.2.046/bin/psxevars.sh
    export CC='/opt/intel/bin/icc'
    export CXX='/opt/intel/bin/icpc'
    export FC='/opt/intel/bin/ifort'
    export F77='/opt/intel/bin/ifort'
    export CFLAGS='-O3 -xHost -ip'
    export CXXFLAGS='-O3 -xHost -ip'
    export FCFLAGS='-O3 -xHost -ip'
fi

What this does is that it checks for environment variable no_intell_compilers; if it is unset or set to false, ~/.bashrc will export those variables. When you want to start over without those variables in the environment, do

$ no_intell_compilers="true"
$ source ~/.bashrc

Once you're done developing in that shell, just unset no_intell_compilers and source the file again to have the variables back.


From man ps:

-q pidlist
    Select by PID (quick mode).
    This selects the processes whose process ID numbers appear in pidlist.

To combine this with ps -o rss, use command subtitution:

ps -o rss -q $(pidof seamonkey)

Or the old-fashioned style with backquotes:

ps -o rss -q `pidof seamonkey`

You may want to add --no-headers if you are only interested in getting the number.


Grub bootloader failed to boot in dual boot system after installing Ubuntu 12.10

For general boot problems (even specific problems  UEFI - GPT) with grub-boot-loader you can use the Boot-Repair program from a LiveCD-USB of Ubuntu.


No proprietary Nvidia drivers, only open source ones

That is actually a misprint from the ppa.

All drivers listed as Nvidia* are proprietary drivers and are not opensource.

Nouveau is the only open source driver available and all others are proprietary.

Yes, there is an advantage.


Custom Commands on Terminal with pipe character

You will need to escape or quote any shell-special characters ex.

$ getwithpipe stringcontains\|fortest
It's there!

or

$ getwithpipe "stringcontains|fortest"
It's there!


Why does my cron job run every 1 minute although I set it every 1 hour?

If you want to set cronjob for every hour, you can do it any of following way:

You can run:

0 * * * * /path/to/script

which reads

  On minute 0, each hour, each day of month, each month, each day of the week.

or

@hourly /path/to/script

or

0 */1 * * * /path/to/script

An asterisk (*) can be used so that every instance (every hour, every weekday, every month, etc.) of a time period is used.

Reference:
crontab,
CronHowto


I had to take two steps to resolve the same issue when I had it.  First was to reinstall Nautilus and then I had to exit from Nautilus so it would restart:

sudo apt-get install --reinstall nautilus
nautilus -q


If you use WEP security, try changing it to WPA. That worked for me with a Marvell Topdog adapter using ndiswrapper.


can't boot, get message: ... terminated with status 127

Boot into the Recovery mode, and if that doesn't work, into a LiveCD. Then edit the file, there should be something like

LANG="en_US.UTF-8"

(depending on your locale). Use sudo nano /etc/default/locale in Recovery or gksudo /media/ubuntu/etc/default/locale in the LiveCD (change /media/ubuntu/ appropriately depending on where you mounted the Ubuntu partition).


xbacklight: No outputs have backlight property - No /sys/class/backlight folder

Check your /sys/class/backlight folder. If you can see an intel_backlight folder there and still you are getting the above error then creating a /etc/X11/xorg.conf file with the below configuration should work for you. It worked for me.
Section "Device"
    Identifier  "Intel Graphics"
    Driver      "intel"
    Option      "Backlight"  "intel_backlight"
EndSection

Also, remember to logout and login again for the changes to take effect.
Reference: Backlight - ArchWiki


From OPs comment

  I solved it!

  I've renamed extensions folder under /usr/lib/libreoffice/share, and
  it came back. Gotta see if the pdf extensions is still working, but
  now at least I can run LibreOffice.


Why cannot Ubuntu 12.04 detect windows 7 (dual boot)

Your PC uses a recent boot system (EFI), which may be why GRUB (which uses os-prober) did not detect Windows. This is a bug of os-prober that should be reported here.
Repair your Windows boot by booting on a Seven Recovery CD (32bit or 64bit), then type these 2 commands:

bootrec /fixmbr

bootrec /fixboot
When you recovered direct access to Windows, use Boot-Repair to recover the GRUB menu


"ERROR while getting interface flags: no such device"

To quote from the aircrack-ng site:

  This means you have an old version of airmon-ng installed. Upgrade to at least v1.0-rc1.

They add chipset information/support in their newer releases, as well as incorporate patches.

To upgrade to the latest version of aircrack-ng, please follow the steps in this answer.