How do I configure NetworkManager to connect to two separate VPN servers simultaneously?

I think it is impossible using only Network Manager. But you can use a little trick:

First export your OpenVPN2 settings from Network Manager to some file, say ovpn2.conf.

Find your OpenVPN1 connection UUID:

nmcli con

Write script below, and put it under /etc/NetworkManager/dispatcher.d/, say two_vpn

#!/bin/sh
VPN_UUID=84d61cf6-6f51-4f84-93fb-df3c458db6d6
CONF_FILE=path/to/ovpn2.conf

interface=$1 status=$2
case $status in
  up|vpn-up)
      if [ $VPN_UUID == $CONNECTION_UUID ]; then
        # connect your second OpenVPN2 using .conf file:
        openvpn --config $CONF_FILE

      fi
    ;;
  down| vpn-down)
      if [ $VPN_UUID == $CONNECTION_UUID ]; then
        # close your second OpenVPN2
        pid=$(ps -ef | grep "[o]penvpn --config $CONF_FILE" | awk '{ print $2 }')
        kill $pid > /dev/null 2>&1
      fi
    ;;
esac

Don't forget to give chmod +x /etc/NetworkManager/dispatcher.d/two_vpn

That's it, now you only need to connect OpenVPN1, and OpenVPN2 will connect automatically. Also if you close OpenVPN1, OpenVPN2 will close.

Please let me know if something goes wrong, because I did not test script


I guess you missed the file path, there should be /home/username/Downloads not /Home, please recheck your path with ls -a.


How can I deactivate the webcam LED on a ASUS Eee PC Netbook 1001PXD?

Surely there must be a serious hacker with a software answer...
Mine is to use a very little piece of black sello tape.


Is there a way to Lock user access on Ubuntu (without disabling the screen)?

Use xtrlock
$ sudo apt install xtrlock

To unlock, type the password on the screen.
Automatic Lockscreen Timeout script
I wrote a quick lockscreen timeout script that will auto start the lock when the computer is idle.  It works like a screen saver.
To enable it, run startup app from the Ubuntu Dash Search to add it to your autostart applications.
The script needs xprintidle to run.
$ sudo apt install xprintidle`

The Script
lockscreen.sh:
#!/bin/bash

# The lock timoeout defaults to 15 minutes.
# Enter an argument on the commanline to for a different timeout.
# xptintidle needs to be installed for the script to work

if [[ ! $(type xprintidle 2>/dev/null) ]]; then
    notify-send "xprintidle not installed... lockscreen not enabled."
    exit
fi
idle=15
[[ "$1" ]] && idle=$1
while :; do
    if (($(xprintidle) > idle * 60000)); then
        [[ $(ps h -C xtrlock) ]] || xtrlock
    fi
    sleep 10
done


There exists an autostart script

/etc/xdg/autostart/user-dirs-update-gtk.desktop

Which calls the program xdg-user-dirs-gtk-update, which appears to have no man page or --help explanation, but I am guessing might be the cause.

You can either delete this script (which appears to belong to the package xdg-user-dirs-gtk, and may be recreated if it is updated), or add a line Hidden=true to the autostart file, which should prevent it running (and you should be asked if you want to keep your modified copy during any future updates).


If you have not paid for the full GeoIP database, you will only have the free subset, and you will receive these messages.

If the lines just before the log excerpt you posted show

initializing GeoIP Country (IPv6) (type 12) DB
GEO-106FREE 20160408 Bu

then you are successfully using the free database.

The messages are not of concern unless you have paid for the full GeoIP database.


For first, why only one core:
I'm not the best authority to answer that; this site has tons of people who understand that better, yet they stayed away from answering for so long; so it's my turn then :)
To my understanding, it boils down to how a specific program was written. Before multicore processors came into fashion, all programs used a single core. When multicore processors appeared, people started to update/improve software so that their programs would be aware of multiple cores and they could distribute their load over them. The primary goal I guess was to achieve better performance, shorter times for computations.
But there is still a notable amount of software out there that uses only a single core. The creators of those software did not prioritize to make them multicore-aware. Maybe they feel quicker computations are not mission-critical for their program. Maybe they just don't have the capacity to work on this aspect. Maybe the program is so small, that it's not deemed worthy for bringing in the heavy artillery of a multicore-compatible framework.
So this is kind of normal, even if it may appear inconvenient for the user in some cases.
Second, which program is it?
Your top screenshot with the graph shows that you used the System monitor app to explore your issue.
In this app's top window header, right above the graph in your screenshot is a row of buttons: Processes, Resources, File Systems.
Pick the Processes button to see a list of all the processes currently running. Click on the % CPU table header to order the items by the highest value in this column. Likely, the process responsible for the activity will stand out sharply from the rest, on the top.
After having the name of the process, you can search the net for its name, maybe combined with the term "Ubuntu". If that does not serve with sufficient clues, you can bring a new, specific question here, like this one or this one.


I can't do "sudo apt-get update" (malformed entry 54 in sources.list)

Those two lines in your sources.list file:

deb http://archive.canonical.com/ partner
# deb-src http://archive.canonical.com/ partner

should look like this:

deb http://archive.canonical.com/ubuntu xenial partner
#deb-src http://archive.canonical.com/ubuntu xenial partner


When you are inside the nano editor, pres Crtl+O (Oh not zero) and it will promt youFile name to Write: /youcantypepath/filenamekeeporchangeIn fact if your terminal is expanded enough these shortcuts are always set as promts at the foot of the editor.


Try adding the -l or --long option

-l     Display long lines. By default, lines are truncated to the  dis‐
       play  width or 132 if output is sent to a non-tty or if the dis‐
       play width is unknown.

See man pstree


How to open a file in text editor through terminal?

What are you using to schedule? If it's cron-based, it likely doesn't have a DISPLAY variable set, so it doesn't know where to render the window. I'd recommend changing the command to include the DISPLAY, assuming it's the default :0:

DISPLAY=:0 /usr/bin/gedit /path/to/file

To debug cron issues, you can emulate a cron-like environment in a terminal:

env -i /bin/bash --noprofile --norc
sh

That'll dump you on a horribly restricted terminal, but it'll give you some idea what cron is working from. If you get your command working from there, it should work in cron.


No, there isn't any such Lens manager yet in Ubuntu (24 September, 2012). But some apps are really in their way to appear soon. Such as this lens toogler app. Though this app is in PPA, you can use it.

We hope some more this kind of apps will appear in future and obviously in the standard repository.


Chromebook and want Linux on a separate USB - possible?

I know this isn′t the most helpful of answers, but you could always try installing Ubuntu on a USB drive from your regular PC, plugging the drive into your Chromebook and see what happens.

Here′s the step−by−step: How do I install Ubuntu to a USB key? (without using Startup Disk Creator)

I don′t know if the machine in question is supported or needs special tricks, sorry.

It should be noted that some (most?) Chromebooks have boot from USB disabled by default.


Unable to fetch some archives with apt-get?

I found the problem. This is  because a program that is behaving like a proxy, also the silly fact is Ubuntu does not show the proxy settings correctly :).

I was using the webscabar (one of the pen test tool). For that program I set my proxy settings to capture request and response packets headers between the server and my browser. After I unistalled the program , settings are still remains. I just set all settings to system default from network settings.


Ubuntu 17.10 to 18.04 LTS - Samba failure of Windows access to Ubuntu shares

After two days I finally got Win10 to see Ubuntu 18.04 samba shares. (Still a newbie)

On the 18.04 box:

Load samba using Linuxconfig.org instructions. version 4.7.6.
I restarted it repeatedly during the process to verify continued operation. (samba restart)

Samba V1 was deprecated/removed from Win10 by Microsoft (even Netgear got caught with that one)

Verify WORKGROUP matches the rest of the network in smb.conf file.

Add user with smbpasswd -a newusername

Right click on filefolder you want to share from Nautilus. Share folder and give read/write to users.

On the Win10 box:

Go to explorer. In the quick access bar enter \\linuxmachinename. Hit Enter and you should see the Linux shares. Double click one and a user/password window should come up. Enter the smbpasswd user/password you entered on the Linux box. You may still need to change read/write and ownership on the Linux box.

Re-boot both machines, whisper special incantations, and poof, you'll probably have frog legs for dinner.


How to get .so file to show up in package?

You really want to be using the build system (scons) that jsoncpp uses, since it's probably well-tailored for the package.
Firstly, the package names that you are using should be prefixed with lib, such as libjsoncpp0 (assuming that the resulting file is /usr/lib/libjsoncpp.so.0)
To install the files, you need to have these files listed in the .install files, eg debian/libjsoncpp0.install would have /usr/lib/lib*.so.* to install the right file. libjsoncpp-dev would have the files in /usr/include/* and /usr/lib/lib*.so

The library packaging guide at http://www.netfort.gr.jp/~dancer/column/libpkg-guide/libpkg-guide.html can be complex, but it has some important information about the right way to package libraries so that they integrate well in Debian & Ubuntu.

Also, there are often people available on #ubuntu-motu or #ubuntu-packaging on irc.ubuntu.com to help with questions you may have.


For the blinking _, switch to tty1. (CTRL+ALT+F1)

At there, type:

startx

If that throws up errors, please put them in your question. Then try:

sudo service lightdm restart

If that doesn't work, try this:

DISPLAY=:0 unity --replace

Please post any errors.

This is to restart the GUI.

Edit: Looks like you need to re-configure LightDM and reinstall Unity.

You will need to use startx and open a terminal.

To re-configure LightDM, do in a terminal:

sudo dpkg-reconfigure lightdm

To reinstall Unity, do:

sudo apt-get update
sudo apt-get install --reinstall ubuntu-desktop
sudo apt-get install unity

then do a sudo apt-get update just to make sure.

Hope this helps!!!


How do you change the command to lock the screen in kde plasma 5?

Luckily for you I have a direct answer. Replace the contents of /usr/lib/kscreenlocker_greet with the command below and then make the file executable.

#!/bin/sh
xscreensaver-command -lock

Now clicking the "Lock" button in the launcher will execute the script.


Which Dell laptops are fully compatible with Ubuntu 12.04?

The solution to the "main issue" of the screen remaining blank after boot is simple: boot with nomodeset the first time, install the appropriate proprietary display drivers for your discrete graphics (nVidia® NVS™ 4200M), and that's usually it.

The only two other issues I'm aware of with this laptop are:

Make sure (upgrade if necessary) to one of the Intel 6205/6300 wifi adapters; the cheap Dell ones sometimes cause problems.
The fingerprint reader, if you choose to get it, may not fully work.

If you have a choice, I recommend the Lenovo T520/T530 Thinkpad which can be similarly configured and is known to work flawlessly with Ubuntu 12.04.


Make a wireless keyboard always use specified layout

As far as I know (which is not much) all solutions involving udev.rules stopped working recently, and at the moment the only solution that seems to work is a simple startup script that assumes the second keyboard is connected before the user logs in or else the user should manually run that script later.

The script tested to work for USB keyboards (here: https://askubuntu.com/a/337431/47343) should of course be modified for wireless keyboards, which might be something like the one below.

Note 1: In addition to entering the keyboard layout code desired, it might also require some trial-and-error (e.g. first entering each line in a terminal window) as the author is an "amateur" (and almost beginner-level) "script writer" ;-)

#!/bin/bash
extkbd=`xinput -list | grep -c "Wireless.*keyboard"`
if [[ "$extkbd" -gt 0 ]]
then
    extkbd_id1=`xinput -list | grep "Virtual core keyboard" | awk -F'=' '{print $2}' | cut -c 1-2`
    extkbd_id2=`xinput -list | grep "Wireless.*keyboard" | awk -F'=' '{print $2}' | cut -c 1-2`
    extkbd_layout="<kbdlayoutcode>"
    setxkbmap -device "${extkbd_id1}" -layout "${extkbd_layout}"
    setxkbmap -device "${extkbd_id2}" -layout "${extkbd_layout}"
    notify-send -i input-keyboard "Wireless Keyboard" "is ready and set for use..."
fi
exit 0

Note 2: As the system seem to assign 2 device IDs to one hardware, I've found it is safer to assign the same keyboard layout code to both of those device IDs.


Which Lenovo laptop is featured on the new Ubuntu homepage?

It is a prototype or photoshoped case of one of Lenovos Ultrabook (U) Series.

At least I think it is a Prototype case, cause the Model number shows U000s, but the original Modell numbers are all but 000. ATM you can buy U310 and U410 Modells officially from the lenovo site.


It is not possible to do this. You can use your laptop as a remote display client to your PC, but you cannot simply extend the display output from one computer to another.


Automatically disable wifi (wireless) when wired?

The following script, put in /etc/NetworkManager/dispatcher.d/99-disable-wireless-when-wired, mostly works—it disables wireless even when I want to share wired with wireless or vice-versa.

To do this, run the following command in terminal:

sudo nano /etc/NetworkManager/dispatcher.d/99-disable-wireless-when-wired

And paste the following code into the text editor.

#!/bin/sh
myname=${0##*/}
log() { logger -p user.info -t "${myname}[$$]" "$*"; }
IFACE=$1
ACTION=$2

release=$(lsb_release -s -c)
case ${release} in
    trusty|utopic) nmobj=nm;;
    *) nmobj=radio;;
esac

case ${IFACE} in
    eth*|usb*|en*)
        case ${ACTION} in
            up)
                log "disabling wifi radio"
                nmcli "${nmobj}" wifi off
                ;;
            down)
                log "enabling wifi radio"
                nmcli "${nmobj}" wifi on
                ;;
        esac
        ;;
esac

Then save and exit.

Note the following conditions on the script, as documented in the NetworkManager manual page:

  Each script should be:

  a regular file,
  owned by root,
  not writable by group or other,
  not set-uid,
  and executable by the owner.

Instead of nmcli radio wifi off (or nmcli nm wifi off for older
versions of NetworkManager), there is also rfkill block wifi.
However, if rfkill is used instead of nmcli, newer versions of
NetworkManager will turn wifi back on during boot.


Does the guided encrypted LVM option encrypt swap on 11.10?

If you use the guided option , everything but /boot will be encrypted.

How it works is that you have a series of containers. First is a physical partition. Within the partition is a crypt (LUKS) container. Within the LUKS you use LVM to divide the crypt into / and swap.

If you manually partition , make sure /home is also within the LUKS crypt / LVM.

So if you manually partition, you first make a LUKS crypt. Then within the crypt you use LVM to make / , swap, and if you so desire /home, but, with LUKS it makes less sense to have a separate /home as you can not as easily preserve an encrypted /home if you re-install. It is not impossible to do, just a few steps more difficult.


How do I open a .py file in the interpreter?

You probably don't have the executable bit set on the script.

Right click on the file.
Click on Properties.
On the Permission tab, check “Allow executing file as program.”


Ubuntu does not use the root user shell by default.  Instead, the root is disabled by default.  As such there is no 'root shell' shortcut application.
The way you run commands as superuser is by using sudo straight on the terminal directly, and provide your user's password to attempt to use sudo privileges.  There is no 'root shell' application in an Ubuntu system.


Unable to install new software due to dartvm?

Fixed it doing this:

sudo dpkg --purge dartsdk
sudo apt-get update

Everything worked after this.


CSS editor with real-time preview and selector localization

There are a few options.

Currently I simply use Google Chrome's Developer Tools (Action Video) as it allows for a wide range of inspection, detailed reporting, and over-riding. After making my changes I just copy the updated CSS and over write the relevant sections of the CSS file, refresh, continue plugging away.

Here I have edited a definition in Chrome's Developer Tool

I can follow the file name and line number (after copying the changes) and just paste them into the editor

Beyond that there is a tool recently launched called WebPutty which is designed to alleviate your described problem. While I haven't used it personally yet it's developed by Joel Spolsky's company Fog Creek Software (Joel is also Co-Founder of StackOverflow) So I'd be willing to bet it's a relatively stable, simple, and effective product.


usb_modeswitch.conf isn't loaded on startup

I did it by running the usb_modeswitch command from a startup script, as described in How to run a script during boot as root (highest rated answer).
One of the commenters states that this won't work on Ubuntu 16.04 or later, but in my case it does.

I know that this solution may seem "dirty" to some, but I already spent too much time trying to do it the "proper" way.


Run sudo commands without running the whole script with sudo (using a desktop launcher)

You can change to script to:

#!/bin/bash

teamviewer --daemon enable

sudo -u USERNAME teamviewer

teamviewer --daemon disable

This way you can execute teamviewer as USERNAME while still running the others as the sudo user, as you are running the script with gksu.

If you want an easy way to test it, run the following with gksu:

#!/bin/bash

echo "Without 'sudo' -->" ; whoami

echo "With 'sudo -u USERNAME' -->" ; sudo -u USERNAME whoami


Unable to Add ppa in my newly installed ubuntu 16.04 LTS

A bit late but someone might find it helpful: I had this problem when I set HTTP_PROXY= but forgot to set HTTPS_PROXY=.


Can't connect to wifi after update to 13.04

I see you have a NO CARRIER error in the log.You should start from there.Search the web on cable(i'm assumming you have one, not just wi-fi connection) and see what you can find while your problem is viewed by other linux users.My knowledge in linux world is limited, as i'm a user for about 1 year, i'm still learning myself.I also have 13.04 but clean install and no problems with wi-fi. Whenever a new version of Ubuntu appears you should do first a Live session(testing without install,running from usb-stick), to see if everything works and after everything is ok do a clean install.This UPGRADE THING(i also had problems after upgrade from 12.04.1 to 12.10) from one version to another doesn't work well for everyone.


When you did the upgrade to 18.10, in some cases, it changed working repository locations, to locations looking for repositories compatible with cosmic. Not all repositories have cosmic compatible files, hence the error.

For each error, go to the http:// location, like:

http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu/

and then click on the dists link, and view what the latest supported Ubuntu version is listed... in this example, it would be xenial (not cosmic).

Open the Software & Updates app, go to the Other Software tab, and change the Wine properties from cosmic to xenial. When you've made all of the changes, close the window, and click the Reload button to update the software databases.

Update #1:

In terminal...

cd /etc/apt/sources.list.d      # change directory
grep -i nvidia *.list           # find out which filename to edit
more nvidia.list                # view the correct found fileneme
# check the http web site as per my earlier instructions and
# determine the most recent Ubuntu version (if it isn't cosmic)
sudo pico nvidia.list           # put in the proper found filename to edit
sudo apt-get update             # you may have errors here if you didn't fix the other errors
sudo apt-get install dkms nvidia-dkms-390 nvidia-utils-390 # install
reboot                          # reboot the computer


This error message is output by the compilation script of the alsa-driver package.

However, the alsa-driver package is outdated; ALSA drivers are part of the kernel, and the only way to update the drivers is to update the kernel.

See, for example, How to automatically stay updated with the latest mainline kernel?


Postgres - could not create shared memory segment: Invalid argument

Well after experimenting a fair bit I found changing /etc/sysctl.conf to have kernel.shmmax=89934592 (two digits shorter than the original kernel.shmmax=8589934592) just for kicks... worked!

* Starting PostgreSQL 9.2 database server [ OK ] durrantm$


undefined symbol: EVP_idea_cbc when using wget

Is this a custom build of wget that statically links to /usr/local?

Can you run which wget to get the full path to wget. The output might look something like

$ which wget
/usr/bin/wget

Then use ldd and pass it that full path. E.g. ldd /usr/bin/wget

The output should look something like this:

$ ldd /usr/bin/wget
    linux-vdso.so.1 (0x00007ffcc3bfd000)
    libgtk3-nocsd.so.0 => /usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0 (0x00007f4f516da000)
    libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f4f51468000)
    libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f4f51261000)
    libidn2.so.0 => /usr/lib/x86_64-linux-gnu/libidn2.so.0 (0x00007f4f51044000)
    libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007f4f50dda000)
    libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007f4f50962000)
    libpsl.so.5 => /usr/lib/x86_64-linux-gnu/libpsl.so.5 (0x00007f4f50754000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4f50363000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f4f5015f000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f4f4ff40000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f4f51b62000)
    libunistring.so.2 => /usr/lib/x86_64-linux-gnu/libunistring.so.2 (0x00007f4f4fbc2000)

ldd is telling you where the executable (wget) is looking for its dynamically linked libraries i.e. the .so files that it depends on.

If you are using a custom build of wget which expects the .so libraries to be in /usr/local, you will have to install those yourself somehow outside of the package manager.

If you want to use the version of wget from the package manager repositories which will look in the expected lib directories (similar to mine above) you should install it with something like sudo apt-get install wget


focal ppa.launchpad missing Release file

At the time of this post, the Certbot PPA does not have Focal builds currently because the latest Certbot is already in the repositories for 20.04 so the PPA isn't needed for 20.04.

Why the RPi image has that PPA included is a mystery to me, but it's not needed currently for 20.04.


gs: /MATLAB/ /bin/glnxa64/libtiff.so.5: no version information available (required by /usr/lib/libgs.so.9)

no version information available means that you have an old version (of Ghostscript) see:
https://stackoverflow.com/a/156387/6747994
Therefore you have to update to Ghostscript 9.23 (or newer):
https://askubuntu.com/a/942995/676490
Due to the fact that Ubuntu 16.04 offers Ghostscript 9.18 and Ubuntu 18.04 offers Ghostscript 9.26 (earlier it was 9.22), you have to

Download the source code from https://www.ghostscript.com/download/gsdnld.html (direct link to gs 9.53.3)
uncompress it (f.e. tar xvf ghostscript-9.53.3.tar.gz)
go into this folder
sudo ./configure
sudo make install
restart Terminal
Test with gs -v which Version you have


How can I permanently display the current playback position in SMPlayer?

Options > Toolbars > Edit control bar

At the end of "Available actions:" there is the option "Current time (current_timelabel_action)". Select it, add to "Current actions:" and click "OK".


How to minimize or maximize windows from the Unity panel?

i guess there is no updated ppa for 12.10 of minimize patch.It worked in 12.04 lts and even with older unity version then it is now in 12.04 by default..Maybe you should try to contact developer of patch and ask to update.Here is working ppa for 12.04. its Isaac Joseph's ppa and hes comments presented on page
http://www.webupd8.org/2012/05/how-to-get-dodge-windows-and-minimize.html


How to build my custom Ubuntu using Minimal CD

The 30MB minimal ISO mini.iso is NOT a minimal Live-CD; it's a minimal net-install CD, and I don't think it's possible to customize it in the way you want. You need to start with a minimal Live-CD such as Ubuntu Mini Remix, which can be customized using the Ubuntu Customization Kit and other utilities. Please see this excellent answer from @Mitch to a similar question for a how-to.


Well, the (rather horrible) workaround was to download the Ubuntu 14.04 install image, create an install DVD, boot it up on another machine, copy /usr/bin/man across, chmod it to 755, and I have a working man command again. There ought to be an easier way to recreate a file which has somehow got corrupted or gone missing, such as forcing a reinstall of the package.


Keyboard layout/language changes in every boot

Starting from the first boot after a successfull Ubuntu installation the typical scenario, according to my experience, is:

you get the US/American language for the UI, for the input you get the keyboard layout according to your locale

if Ubuntu can't determine your locale the fallback is on the US keyboard everytime

after the first boot you have to download and update all the language packs for all the software that you have, this way you get to complete the setup for the language for your specific locale for both the interface and input.

You can always enable and disable more than 1 option for the keyboard layout, after downloading and installing all the language packs I tipically go into the setting panel and make sure that all the keyboard layouts are disabled except the one I'm interested in. The little icon with the locale in the upper right corner of your desktop should contain a shortcut to the settings anyway.


ImportError: No module named 'deployment'

echo $PYTHONPATH
:$HOME/tensorflow-models-master/research:$HOME/tensorflow-models-master/research/slim

Export pythonpath should be done from models/research . You are doing it from models. So, it is taking wrong directory path.
Try running export $PYTHONPATH from models/research and it would solve the problem.


I had the same issue installing 19.04 on Asus Zenbook UX433 and am still having the same problem intermittently after installation. After trying a few things I managed to boot into the 'Try Ubuntu' screen and from there perform a successful installation. These are the steps I followed:

Create a bootable USB drive using Rufus (I initially tried the installation with Unetbootin however this did not work)
Disable Fast Boot and Secure Boot in the BIOS menu
Boot into GRUB and select Try Ubuntu. This took a few attempts as I also got the black screen

After booting into Ubuntu using the Try Ubuntu method I was able to perform the installation however I am still getting the blank screen intermittently after trying to boot into Ubuntu from GRUB. What's strange is that the issue does not seem to be reproducible. Sometimes I am able to boot into Ubuntu after selecting Ubuntu from the GRUB menu. Other times I have to go into Advanced Options for Ubuntu and select the option to boot using Linux 5.0.


Lubuntu, does not use Composition, you can a very basic compositing manager in the form of xcompmgr just make it auto start when you log in.

sudo apt-get install xcompmgr will Install it.


How can I move window titles to the center of the title bar in 12.10?

Yes there is a way, open up your terminal and go to the folder /usr/share/themes/YourTheme/metacity-1/

in my case that would be Ambience

cd /usr/share/themes/Ambiance/metacity-1/

in this folder should be a file called metacity-theme-1.xml, open this file in your favorite editor, you need sudo rights though!

search for this part

<draw_ops name="draw_title_text_normal">
<title color="#333" x="10" y="(((height - title_height) / 2) `max` 0)+1"/>
<title color="#333" x="10" y="(((height - title_height) / 2) `max` 0)-1"/>
<title color="#333" x="9" y="(((height - title_height) / 2) `max` 0)"/>
<title color="#333" x="11" y="(((height - title_height) / 2) `max` 0)"/>
<title color="#dfdbd2" x="10" y="(((height - title_height) / 2) `max` 0)"/>
</draw_ops>

and replace all the x="" numbers with ((width - title_width) / 2) max 0

so it'll look like this at the end

<draw_ops name="draw_title_text_normal">
<title color="#333" x="((width - title_width) / 2) `max` 0" y="(((height - title_height) / 2) `max` 0)+1"/>
<title color="#333" x="((width - title_width) / 2) `max` 0" y="(((height - title_height) / 2) `max` 0)-1"/>
<title color="#333" x="((width - title_width) / 2) `max` 0" y="(((height - title_height) / 2) `max` 0)"/>
<title color="#333" x="((width - title_width) / 2) `max` 0" y="(((height - title_height) / 2) `max` 0)"/>
<title color="#dfdbd2" x="((width - title_width) / 2) `max` 0" y="(((height - title_height) / 2) `max` 0)"/>
</draw_ops>

save the changes, logout and login again, and the titles are centered!


As described in this answer, you can make tool tip transparent! This is a quick workaround for disabling tool tips.


aircrack-ng channel problem  under 12.04 LTS

When you run a scan using airodump-ng mon0 and you try to inject some packets into the network you get this error.

So to fix it you should do the following :

airodump-ng mon0 -w anything  -c [channel number] -b [BSSID]

ex:

airodump-ng mon0 -c 6 -w  store_data_on_this_file -b 00:11:22:33:44:55

and then run aireplay-ng tool.


How can I use the "sort" command on a specific field?

sort -t '/' -k 7 -n your_input_file

Explanation:

-t '/' defines '/' as field separator
-k 7 takes the 7th field as sort criteria (the empty field before the first '/' has to be counted, too)
-n specifies a numerical sort.

If you want to keep the order of the input file for all lines where the 7th field is equal you can add (and later remove) a line number as second sort field:

nl -n rz  your_input_file | sort -n -k 7 -k 1 -t '/' | sed 's/^[0-9]*\t//'

Explanation:

nl -n rz adds a zero-padded line number before each line
The sort command sorts following the 7th field, and then the line number
The sed command deletes the line number.


Question about my usb wirless network adapter

The Ubuntu installed nvidia driver, nouveau can be replaced by a proprietary driver in System Settings> Additional Drivers. As for internet - connect to an Ethernet connection and test speed with speedtest.net and do the same with no Ethernet.


What is the lightest desktop interface for ubuntu and is Unity-2d classified as a 'light' interface?

A light interface is basically one that uses little resources, and can optionally depend on compositing and/or 3D capabilities, so even compiz could be called a light desktop interface when configured correctly (I've run compiz on worse specs than those you mentioned and it was fast and pretty stable).

For optimum performance, I would suggest going with Lxde (Lubuntu).

You can also use GNOME or XFCE, but keep in mind that both may get stressed under a heavy work load with that little memory, though you should be safe either way if you are only doing the basics like web browsing, word processing, etc.

Unity 2D is also a light interface, and might be able to run on your hardware.


You have enabled EFI boot in VirtualBox.

Either type exit in the EFI prompt and try to find the EFI file for booting Ubuntu if you're committed to booting in EFI. Play around with the options in their EFI configuration menu. If it's not working, disable EFI in the System properties for your virtual machine and install Ubuntu into BIOS mode.

EFI isn't too much fun in VirtualBox and you don't gain too much from using it, unless you're trying to boot from a raw local disk, in which case it could be essential.


How can I enable the old African Savanna sound on boot?

Click Startup Applications in the system menu at the top right of your computer.

Click ADD, name it > GNOME Login Sound

In the command field type >

/usr/bin/canberra-gtk-play --id="desktop-login" --description="GNOME Login sound"

Make sure the checkbox is checked.

Logout and login.

Enjoy


From what I see there is an error in the path name either in the desktop file or in the script itself.

Try editing it. Insted of Cauldon Server use Cauldon_Server. Directory name shouldn't include space.


Windows 7 not starting up after installing Ubuntu 12.04

You can use Boot-Repair to fix it, read carefully the whole article before you start. I recommend that you make a boot-repair cd or usb after you download it from here.

For your case, your Windows boot files are probably corrupted, see other options and start from "repair windows boot files"


How to find the version of an Ubuntu machine remotely?

You can get the Ubuntu version using

$ lsb_release -s -d
Ubuntu 10.04.1 LTS

If you want to automate that, write a Bash script that reads list of hosts from stdin and executes the command over SSH. Something like

#!/bin/bash
while read host; do
   echo -n "$host: "
   ssh "$host" lsb_release -s -d < /dev/null
done

If you have one common user account on all the machines you want to connect to then this should be what you are looking for

#!/bin/bash
RUSER="username"
while read host; do
   echo -n "$host: "
   ssh "$RUSER@$host" lsb_release -s -d < /dev/null
done

Save it as versions.sh, remembering to make it executable (chmod a+x versions.sh), and execute

$ versions.sh < ips.txt


I have recently dealt with exactly the same errormessage. I found that if I turned off 3d acceleration in VirtualBox everything worked properly (though not having 3d acceleration is not ideal, it would be great to find a solution that does not require disabling it).


You have to add the layouts to your .bashrc file. So, let's say you wanted us and bg, run nano .bashrc, scroll to the bottom, and add the following line:

setxkbmap -layout "us,bg" -option "grp:alt_shift_toggle"

Ctrl+o to save, ctrl+x to exit.

Then logout/login, and try alt+shift.


nVidia Optimus , Unity 3D and Dual Monitors

Assuming that your Intel card is hooked up to the outputs you want to drive¹, then yes, your Intel GPU should be perfectly capable of both running Unity 3D and driving two monitors.

Optimus setups aren't really standardised; each manufacturer tends to do something slightly different, and often does things differently on different models, so it's hard to say anything definitive without having the actual laptop in question.  Depending on how your manufacturer has wired things up, there may be a BIOS switch to select between the integrated and discrete CPUs.  If there is such a BIOS option, then you'll be able to use either the Intel or nVidia card.  In this case you'll obviously need to reboot to switch GPUs, and you'll also need to do some fiddling with the video drivers - 3D won't work on the Intel GPU while the nVidia drivers are configured.

Note: If there's an option like Detect OS Optimus Support or suchlike, you need to have this disabled.  For many boring, stupid, and annoyingly necessary reasons, linux identifies itself to the BIOS's ACPI implementation as the most recent version of Windows.  This means Windows 7, which supports Optimus (or, at least, the Windows 7 nvidia drivers support Optimus), so if the BIOS tries to detect Optimus support it will incorrectly enable it.

As to your unity_support_test output, I'd guess that you've either got the nvidia binary drivers installed and are using the Intel GPU or that you're using the nvidia GPU and haven't got the binary drivers installed ☺.  I don't think nouveau in 11.10 supports 3D on your nVidia card.  The contents of your /var/log/Xorg.0.log file would be instructive in debugging this.

¹: In many of the Optimus laptops, like this T420s, only the internal display and VGA output is hooked up to the Intel GPU; the DisplayPort output is only hooked up to the nVidia card.


How to run - from Firefox context menu - terminal commands selected in web pages?

The addon you mention hasn't been updated for a while, but it is possible to run it in Firefox 17 using the hack I mention below, which I have used for other addons.

However, be very careful when using it to copy, paste, and run commands, as some forums other than this one have malicious code. However, it may be very useful for a good site like askubuntu.

Note: This method below merely edits the install file so it can be installed in the latest firefox, as xpi files are basically like zip archives, which can be manipulated.

The developer did not test it with Firefox 17, so it is unsupported, but it does seem to work. However, it will not be updated again and will receive no updates or fixes, so you must only use it on trusted sites like askubuntu.

How to edit the xpi and install it

(After writing this article myself, I noticed that a similar method for another addon was also used in this question, so the basics of the trick documented below is well known and usually works fine.)

Download the xpi file from gnome's archive:

wget "http://ftp.gnome.org/pub/mozilla.org/addons/9738/terminalrun-0.6-fx-linux.xpi"
unzip -d terminalrun terminalrun-0.6-fx-linux.xpi
cd terminalrun
gedit install.rdf

Now, just edit the Firefox version numbers in install.rdf so they look like this- choose any version of Firefox from 17 onwards to put in the MaxVersion (I chose an arbitrary number like 23.0, but you can choose a much higher one, up to 99.0.)

<em:minVersion>3.0</em:minVersion>
        <em:maxVersion>23.0.*</em:maxVersion>

After saving the file, but while still in the terminalrun folder, run

zip -r terminalrun *
mv terminalrun.zip terminalrun.xpi

Now just drag the xpi file into Firefox and it will install it; restart firefox and you will be able to highlight code with your mouse and right click to open in terminal.

Usually when you highlight code it works fine (as long as the command you highlight makes sense for your system), so please test this one that gives you system information:

uname -a

Here's the firefox context menu that you should see:


About Graphics Driver Ubuntu 18.04.1 LTS

Will you be using Intel Graphics for things that are of importance to you? If so, then go for it. To me, you'll be fine with your main graphics card. Intel graphics should be fine with the already included drivers in the Linux kernel. At least I haven't had any issues with mine for the time I have had on Ubuntu.


How do I know what physical drives/partitions are behind my /dev/mapper/isw_dghbbcaabe_RAID_Volume11?

Best quick overview I have seen is lsblk, which prints a reasonable output even if you have a complicated setup.

$ lsblk
NAME                     MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda                        8:0    0 223,6G  0 disk
├─sda1                     8:1    0   350M  0 part
├─sda2                     8:2    0    29G  0 part
├─sda3                     8:3    0   488M  0 part /boot
├─sda4                     8:4    0     1K  0 part
└─sda5                     8:5    0 193,8G  0 part
  ├─vg_ssd-lv_root_solid 254:0    0  13,3G  0 lvm  /
  ├─vg_ssd-lv_srv_solid  254:2    0  46,6G  0 lvm  /srv
  └─vg_ssd-lv_home_solid 254:3    0   107G  0 lvm  /home
sdb                        8:16   0  74,5G  0 disk
└─sdb1                     8:17   0  74,5G  0 part
  ├─vg_ssd-lv_swap_solid 254:1    0   3,7G  0 lvm  [SWAP]
  └─vg_ssd-lv_videos     254:4    0    28G  0 lvm  /mnt/videos

See also: this more detailed answer on server fault.


To start, try refreshing Firefox. If the issue returns, we will know there is more work to be done, although it would be best to do an antivirus scan preemptively.

Before doing this, you'll need to restore your .mozilla folder (which contains your Firefox profile) from backup, based on the comments on your question. Run this command in terminal:

mv ~/.mozilla-bk ~/.mozilla

Then refresh Firefox. Instructions from Firefox help - Refresh Firefox:

  Click the menu button and then click help.
  From the Help menu choose Troubleshooting Information.

  If you're unable to access the Help menu, type about:support in your address bar to bring up the Troubleshooting Information page.

  Click the Refresh Firefox button in the upper-right corner of the Troubleshooting Information page.
  To continue, click Refresh Firefox in the confirmation window that opens.
  Firefox will close to refresh itself. When finished, a window will list your imported information. Click Finish and Firefox will open.

There is more info on the Firefox help page, including screenshots, what the refresh actually does, and where it backs up your existing data.


What is the best desktop/screen recorder?

You can try 3:

Recordmydesktop
Istanbul
XVidCap

But could you define "best"?


No sound from Bluetooth headphones since Ubuntu 16.04 LTS

Did you try using HSP/HFP. A lot of people have the same issue with A2DP.

Distorted sound with bluetooth speaker in Ubuntu 16.04
After updating to 16.04, bluetooth audio A2DP mode stopped working

Problem with a bluetooth speaker


gspca_zc3xx webcam does not work with skypeforlinux

Had a similar(?) problem with a gspca_ov519 camera that worked perfectly when opened with vlc but was not recognized as webcam by android-emulator. Another uvcvideo camera was recognized as webcam but failed to show a valid picture in any program. I ended using a uvcvideo Microsoft webcam that was available and everything worked fine.

I guess switching the webcam would be an easy to try solution.


How to find (and delete) duplicate files among local disks and NAS?

You can try 'dupeGuru'

sudo apt-add-repository ppa:hsoft/ppa
sudo apt-get update
sudo apt-get install dupeguru-se

For further assistance you can have a walk through:
www.unixmen.com


Bash script gives warnings / errors although it works as expected. How can I edit to remove warnings / errors?

The issue is that if you encounter a directory with no matching image files, the glob is passed unexpanded to the convert command so you end up trying to convert files with literal name ./*jpg , ./*png and so on.

The usual solution for this (in bash, and other shells that support it) is to enable null globbing. Unfortunately in this case that just creates a different error, since now you are calling convert without any input files at all.

I can't think of a more elegant way of handling this except setting nullglob, expanding the globs in an array, and then explicitly testing whether the array is empty or not. So for example:

find $PWD -type d -execdir bash -c '
  shopt -s nullglob
  files=("$1"/*.jpg "$1"/*.png)
  if (( ${#files[@]} == 0 )); then
    echo "$1: nothing to do here"
  else
    convert "${files[@]}" "$1.pdf"
  fi' bash {} \;

or more compactly

find $PWD -type d -execdir bash -c '
  shopt -s nullglob
  files=("$1"/*.jpg "$1"/*.png)
  (( ${#files[@]} == 0 )) || convert "${files[@]}" "$1.pdf"
' bash {} \;

or, taking @Zanna's lead and doing away with find altogether:

#!/bin/bash

shopt -s globstar
shopt -s nullglob

for f in **/*; do
  [[ -d "$f" ]] || continue
  files=( "$f"/*.jpg "$f"/*.png )
  (( ${#files[@]} != 0 )) || continue
  convert "${files[@]}" "$f.pdf"
done


How do i find exact status of my microphone mute or unmute or the volume level of mic using command line?

By using the Pulseaudio Command Line Interface we will obtain a lot of information on available sources

pacmd list-sources

will display a rather lengthy list. The current active input is marked with an asterisk. We could combine this with grep but will then lose information for which source the outputs are valid

pacmd list-sources | grep volume

To set an output to a defined value we need to know it's index which is also given by list-sources to issue

pacmd set-source-volume <index> <value> # value: 0 = mute 65536 = 100%

We may also need to unmute the sink source with

pacmd set-source-mute <index> 0


All these shortcuts are shown in MATE Control Center → Keyboard Shortcuts (mate-keybinding-properties) in Window Management section:

You can define or redefine them here:

Toggle fullscreen mode - you may want to define Alt+F11 here or other;
Toggle maximization state - Alt+F10;
Tile window to east (right) side of screen - Ctrl+Alt+KP Right (KP means keypad - button from numpad when NumLock is active)
Tile window to west (left) side of screen - Ctrl+Alt+KP Left
other tiling options are available with

Control+Alt+KP_Begin
Control+Alt+KP_Page_Up
Control+Alt+KP_Home
Control+Alt+KP_Page_Down
Control+Alt+KP_End
Control+Alt+KP_Up
Control+Alt+KP_Down


Yes it is. You also probably need to update your kernel. Are you already using hwe kernels? Check with uname -a and if you're still on 4.4 upgrade your kernel by activating HWE. This is how-to.

I advice to use the ppa:ubuntu-x-swat/updates to have the last stable mesa.


Enable replace image feature in LibreOffice

LibreOffice is the same office suite that has been shipped in previous Ubuntu releases. Many of LibreOffice's first improvements were patches from the go-ooo project which were already being used in major Linux distributions. If expected and optimal behavior changed from one release to the next that is a regression and you should file a bug about it.

The OpenDocument Format is actually a zipped XML format. It may be possible to write a script to replace the images since you are having to repeat the action so many times.


You have two options - using the GRUB boot loader (what I recommend) or the Windows loader. First remove all the Ubuntu or GRUB entries you had created in the Windows BCD store before. To list all identifiers open command prompt as administrator, execute : bcdedit /enum all /v

To delete the Ubuntu entries execute : bcdedit /delete {*} for each Ubuntu entry you have. Replace * with the Ubuntu identifier to delete - be careful and don't delete the Windows entry. Additionally I recommend to uninstall EasyBCD to avoid further problems with BCD operations.

Method 1 : GRUB boot loader

Boot from the Ubuntu installation media and select Try Ubuntu without installing, once on the Live desktop open GParted to identify the disk and partitions where the operating systems are installed. In most cases the disk is sda, the Windows partition on msdos partition table sda1.

Now install the GRUB boot loader from which you can boot Ubuntu and Windows to the disk in Legacy BIOS (msdos partition table) mode - so open a terminal and execute these commands :

sudo mount /dev/sd** /mnt
sudo grub-install --boot-directory=/mnt/boot /dev/sd*

Replace sd* (disk) and sd** (Ubuntu partition) with the letters and number you've identified.

In case the systems are installed in UEFI BIOS mode ... install the GRUB boot loader in EFI mode.

sudo mount /dev/sd*** /mnt
sudo mount /dev/sd** /mnt/boot/efi
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
sudo chroot /mnt
grub-install /dev/sd*
update-grub

Replace sd* (disk), sd** (efi partition), sd*** (Ubuntu partition) with what you've identified.

Boot into BIOS and change the boot order in UEFI settings - select Ubuntu to be the default OS.

Method 2 : Windows boot loader

Boot from the Ubuntu installation media and select Try Ubuntu without installing, once on the Live desktop open GParted to identify the disk and partitions where the operating systems are installed. In most cases the disk is sda, the Windows partition on msdos partition table sda1.

First mount the Windows partition, open a terminal, execute : sudo mount /dev/sd*** /mnt
Replace sd*** (Windows partition) with the letters and number you have  identified before.

Copy the first 512 bytes of Ubuntu : dd if=/dev/sd** of=/mnt/linux.bin bs=512 count=1
Replace sd** (Ubuntu partition) with the letters and number you've had  identified before.

Boot into Windows, open command prompt as administrator and execute these commands :

bcdedit /create /d Ubuntu /application bootsector
bcdedit /set {identifier} device partition=c:
bcdedit /set {identifier} path \linux.bin
bcdedit /displayorder {identifier} /addlast
bcdedit /timeout X

Replace "identifier" with the characters, letters and numbers being returned when you executed the first command and replace "X" with the number of seconds (for instance 10) you want to see the Windows boot loader menu - before it automatically will boot the default operating system.


"ubuntu-drivers devices" command do not displaying

I had the same problem. Software & Updates > Ubuntu software > check 'Proprietary drivers for devices' option. Then update from gui or sudo apt update


I'm no expert but I think the problem was the open input stream.

This code does the trick:

### Actual Work ###
if [[ $manual == 0 ]]; then  # Read the servers from the config file.
  while read line; do  # Read line by line.
    arguments="$arguments $line"  # Build a string for $arguments out of the
                                                              # config file.
  done < $config_file_path  # Define input for line by line reading here.
else  # Arguments were given.
  for ARG; do  # For every given server:
    arguments="$arguments $ARG"  # Build a string for out of the given
                                                          # arguments.
  done
fi
#
for server in $arguments; do
  if [[ $no_runcheck == 0 ]]; then  # Check wether the given server is
                                                    # already running.
    /usr/local/bin/serverstart.sh -v 3 -z 30 ${server##*@}  # Cut off username.
  fi
  ächo "Upgrading system on ${bold}${server##*@}${normal} as ${bold}${server%%@*}${normal} ..."
  ssh -t $server '/usr/local/bin/installieren.sh -U'  # Execute update script.
  # Use ssh with pseudo terminal (option: -t).
done


As we have chat, sometime prime don't support set refresh rate.

https://devtalk.nvidia.com/default/topic/982558/setting-default-refresh-rate/

You have to set the screen resolution and the avalible refresh rate as per the below article.

How to see/change screen refresh rate or monitor frequency?


How to increase the partition size of Ubuntu 14.04 installed under Windows 7?

First install Gparted if you have not already by:

sudo apt-get install gparted

and resize your 230GB windows partition (NTFS) to make unallocated space (you can decide the size of this partition). Do not make any changes to Ubuntu partition while you are logged into Ubuntu.

If you have live CD or USB with ubuntu boot from this and run Gparted from there. Now, merged this unallocated space to Ubuntu.

Also, just in case make sure you have make a copy of Boot-Repair and use it in case this procedure messes up GRUB (there won't be a problem generally, but who knows!)


Ubuntu copying file problem (cannot stat file)

Have you verified that sample.pdf is the exact filename in the downloads folder?  It looks like the path is incorrect and that file doesn't actually exist there.  Try this...

ll ~/Downloads

See if sample.pdf shows up in the file list.


The easy way via system

#!/usr/bin/env perl
system("gunzip 9001_20150918165942_00085.xml.gz")

or

#!/usr/bin/env perl
system("gunzip","9001_20150918165942_00085.xml.gz");

The native Perl way

#!/usr/bin/env perl
use strict;

BEGIN { @ARGV= map { glob($_) } @ARGV }

use Compress::Zlib;

die "Usage: $0 {file.gz|outfile=infile} ...\n"
    unless @ARGV ;

foreach my $infile (@ARGV) {
    my $outfile= $infile;
    if(  $infile =~ /=/  ) {
        ( $outfile, $infile )= split /=/, $infile;
    } elsif(  $outfile !~ s/[._]gz$//i  ) {
        $infile .= ".gz";
    }
    my $gz= gzopen( $infile, "rb" )
        or die "Cannot open $infile: $gzerrno\n";
    open( OUT, "> $outfile\0" )
        or die "Can't write $outfile: $!\n";
    binmode(OUT);

    my $buffer;
    print OUT $buffer
        while $gz->gzread($buffer) > 0;
    die "Error reading from $infile: $gzerrno\n"
        if $gzerrno != Z_STREAM_END;

    $gz->gzclose();
    close(OUT)
        or  warn "Error closing $outfile: $!\n";
}

Source


With a celeron processor and only 2 gigs of ram your computer will run better with lubuntu or xubuntu.lubuntu or xubuntu 32bit version. You could run ubuntu 32bit version but it will be slower then the other two.

It is not a matter of which one is better both are good but lubuntu will use the least resources so it will be a little faster and snappier.

Just make a livecd or liveusb of both and test for yourself to make sure everything works but remember the live version will be slower then when it is installed.


the root filesystem on /dev/sd1 requires a manual fsck. How does one do this?

The best way is to use a Live CD/DVD to access your system (as you cannot run fsck on a mounted system). Two steps are then required:

Boot your computer using a 'Live' CD/DVD
Open a Terminal window and run:

sudo fsck /dev/sd1

Confirm first that the drive number: sd1 is actually the correct one from your error message...


You can install 12.10 now and upgrade then to 13.04.
Or just reinstall if 13.04 when it is released, if you like to do some tryouts.

If you don't like to upgrade every 6 Months you can use the Version 12.04 LTS (Long Term Support). Ubuntu provides system updates für 5 years for LTS-Versions.


Pandora doesn't work with Firefox but with Chromium

There's probably not much you can do other than reporting the bug to Firefox.

However as an alternative you can try pithos  which is a desktop client for Pandora, which alleviates the need for Flash altogether.


Can't choose to boot either windows 8.1 or ubuntu on uefi

You need to go to the BIOS and change the boot order. Ubuntu probably installed a boot manager if everything went well.

I'm not sure what the key is in Sony's laptops, but you must press one of the F1-F12 keys when the Vaio logo appears when you start up your computer.


Live USB Ubuntu fails t o see the nvme SSD on Predator Triton 700 to make install

Try, open BIOS, swith to Main tab and press Ctlr+S, the new item for change SATA Mode could be appeared here. It works for me on Acer Predator Triton 300 and on some another Acer books.


I had to install g++. @steeldriver, thank you for pointing me in the right direction :)
I specifically installed a version 4.7 of g++ because my gcc that matlab needed was only 4.7.x,and the mex compilations with my version of matlab were not compatible with the default 4.8 that ubuntu 14.04 runs.


Unity themes won't apply unless I logout and login after boot

The problem likely is that 14.04 (with GTK 3.10) is not listed as supported from that source - v1.1 says it is for 14.10 (with GTK 3.12), and v2.1 says it is for 15.04 (with GTK 3.14), which use newer (and different) versions of GTK. This page seems to be the extension's source, but seems to only lists the versions on the page you mentioned.

Those versions should still work to some extent (1.1 may work better than 2.1), but probably will have issues like the ones you are describing. Issues could also be caused by not having the needed GTK engines ('murrine' and 'pixbuf' in this case) installed.

However, you should be able to find a version of the theme that works from elsewhere - e.g. using the noobslab themes PPA as suggested here:

sudo add-apt-repository ppa:noobslab/themes
sudo apt-get update
sudo apt-get install libra-theme

You can also download the deb files from that PPA directly from here. The version for trusty may just be version 1.1 of the theme un-patched though, so using it directly from the extension's source or what you downloaded may produce similar results. Basically don't use the v2.1 theme.


How do I add a 1 second fade out effect to the end of a video with ffmpeg?

For a 10 second duration video, 1 second fade in in beginning, 1 second fade out in the ending use the fade filter:

ffmpeg -i input.mp4 -vf "fade=type=in:duration=1,fade=type=out:duration=1:start_time=9" -c:a copy output.mp4

If you want to fade audio too then add the afade filter:

ffmpeg -i input.mp4 -filter_complex "[0:v]fade=type=in:duration=1,fade=type=out:duration=1:start_time=9[v];[0:a]afade=type=in:duration=1,afade=type=out:duration=1:start_time=9[a]" -map "[v]" -map "[a]" output.mp4

To automate it use ffprobe to get the duration and bc to calculate the start time for the fade out at the end:

#!/bin/bash
mkdir fade
for f in *.mp4; do
  dur=$(ffprobe -loglevel error -show_entries format=duration -of default=nk=1:nw=1 "$f")
  offset=$(bc -l <<< "$dur"-1)
  ffmpeg -i "$f" -filter_complex "[0:v]fade=type=in:duration=1,fade=type=out:duration=1:start_time='$offset'[v];[0:a]afade=type=in:duration=1,afade=type=out:duration=1:start_time='$offset'[a]" -map "[v]" -map "[a]" fade/"$f"
done

This assumes all inputs have video and audio. If not you can use an if/then statement in conjunction with ffprobe to determine if there is audio.

  ...and keep everything else the same (codec,quality)

Filtering requires encoding. You can't keep the quality when outputting a lossy format. Either output a lossless format (not recommended, huge files, compatibility issues), or accept some amount of loss. Luckily you probably won't notice. Just use the -crf option when outputting H.264 video. Use the highest value that still looks good enough. See FFmpeg Wiki: H.264 for more details.


Keyboard shortcut/command for opening a new nautilus window and raise it

By default, the keyboard shortcut to launch the file browser is the special key Explorer, available on some keyboards (along with other special keys to laucnh music players, internet browsers and so on). You can change this to something else in the Shortcuts section of Keyboard settings:
Change the Home folder shortcut to something else.


Error while Running ztemyapp MTS Mblaze modem in Ubuntu 14.04

Reason: In 64 bit system , 32 application missing shared libraries.

Solution:

Found the missing libraries usingldd

added foreign architecture:

sudo dpkg --add-architecture i386

Installed i386 version of missing libraries one by one.

Now it is working.


Where can I find linux drivers for my PC running Ubuntu?

You will have no problem when you install Xubuntu:

http://xubuntu.org/getxubuntu/

Unity runs quite bad on old computers as it more resource hungry, I recommend you to install the Xubuntu version and start having no problems at all and notice a big speedup improvement.

PS: Use the 32 bit 13.10 version as you have less than 4 gigs of ram and you aren´t using a latest-gen processor.

PS 2: Try to update the BIOS of the motherboard.


Terminal command with sudo takes a long time

Hi I found this answer on another question -
The problem is if your hostname is not in your hosts file.

basically, type  "hostname" in your terminal.  That will tell you what your hostname is.

Next, type:

sudo nano /etc/hosts

and add:

127.0.0.1 yourhostname

then save - and you are done!
Sudo should be fast now!


Can't use all wifi channels - Ubuntu 16.04, Asus 1215n, BCM4313

First of all your wireless adapter does not support 5 GHz. There is no way to connect to 5GHz networks with this adapter on any OS.

Also you need Broadcom proprietary drivers for this adapter. You can install them by

sudo apt install broadcom-sta-dkms

Regarding channel 13, it may be blocked in your adapter if it was purchased in a country where this channel is not allowed, like the USA.


I installed the OpenJDK-7 but my runtime environment wasn't upgraded to 7?

It's because the javac file in /usr/bin is still linking to your previous jdk. So you have to using update-alternative to configure it.


Remove menu icons of uninstalled applications

This software appears to only be supported for CentOS (not Ubuntu) linux, which suggests the desktop files may have been placed in a location which that distro uses.  Take a peek in these folders for Nuke related desktop files:

/usr/share/desktop-directories
/etc/xdg/menus/applications-merged
/usr/share/applications


Why are some apps incompatible with 12.10?

You're going across releases, so there may be specific builds for that release and the app will need to be downloaded again.  You're also trying to migrate the apps to a development release, so some apps may not be available yet, either waiting for QA and approval, or waiting for patches to make them compatible.

There are other ways of doing this, that might ensure that you get the correct versions and that the dependencies are met correctly.  I have this one in my notes:

To make a file with all installed applications on the system:

On working system:

dpgk --get-selections | grep -v deinstall > ubuntu-files

To then install the packages listed in this file:

### Make sure the system is fully updated
sudo apt-get update && sudo apt-get upgrade
### Install the dselect tool (probably depracated)
sudo apt-get install dselect
### Give the package list to dpkg so it knows what to install
sudo dpkg --set-selections < ubuntu-files
### Use dselect to initiate installation (option 'I' will do it)
sudo dselect

NB: There might be a better way to do this, for example calling dpkg directly
instead of installing and using dselect.

NB: Although all packages are listed only those that do not exist on the system
will be installed by dpkg

NB: cross version installation not really recommended - may install obsoleted
packages (Open Office) and unwanted themes and dependancies (eg as in upgrade
from 10.04 to 11.04 with Unity

Again, as noted, cross version installation may not be ideal, but at least this way the packages will be installed fully from the correct repository.  You can still use the .deb files and restore them to /var/cache/apt/archives so that they don't have to be downloaded again, however if a newer release is required or is available it will still have to be downloaded obviously.


Can not switch Node.js to a default version of my choice

You have the Node.js snap package installed. The Node.js snap package is started with the node command. Users can choose from one or more of the currently supported releases and get regular automatic updates directly from NodeSource. Node.js versions 6, 8, 9, 10, 11, 13 and 14 are currently available, with the Snap Store being updated within hours or minutes of a Node.js release.
Users can switch between versions of Node.js at any time without needing to involve additional tools like nvm (Node Version Manager), for example:
sudo snap refresh node --channel=8/stable

Users can also switch from the stable channel to the edge channel with the following command:
sudo snap switch node --edge

Then run node -v to show the currently selected node version.
Node.js LTS Schedule
Release LTS Status  Codename    LTS Start       Maintenance Start Maintenance End
6.x     Active      Boron       2016-10-18      April 2018        April 2019
7.x     No LTS
8.x     Active      Carbon      2017-10-31      April 2019        December 2019
9.x     No LTS
10.x    Active      Dubnium     October 2018    April 2020        April 2021
11.x    No LTS                                  2019-04-01        2019-06-30
12.x                            2019-10-22      2021-04-01        2022-04-01
13.x    No LTS                                  2020-04-20        2020-06-01
14.x    Current     Fermium     2020-10-20      2021-10-20        2023-04-30


Use a *.desktop file. Look into it's documentation or at this answer.
For Exec= use your path /usr/local/AppDir/App and if you need sudo, do something like gksudo /usr/local/AppDir/App. gksudo asks for the sudo passphrase in a graphical Window.


Document Scanner, CanoScan N650U not reconised

Answer was to download every imaging, camera & editor software on offer, I still don't know which piece of software added the missing library but the scanner now works, the software intermittently crashes, well most of the software crashes, however I did eventually get the paperwork scanned and emailed.

So this question can now be closed.


IPTables rules not working, while previously they did..?

I found the solution to my problem, somehow I did not have ufw enabled. Which made it impossible for the client to get access. I'll leave this post for future references.

Best of luck!


unable to delete a strangely behaving directory

If you encounter such a problem, try like this.

right click your directory which disturbs you
choose Move to trash so that it is trashed
open your Trash
click Empty.

Your differently behaving directory will be deleted successfully. This has worked for me.


How to fix broken dropbox *menu* in xubuntu 18.04?

On clean installation of Xubuntu 18.04.1 LTS I started with

sudo apt-get install thunar-dropbox-plugin

then rebooted, logged in and waited for proprietary DropBox installer to finish, then logged in to my DropBox account. Then got icon in place, but left and right clicks did not work.

To fix it we need to change dropbox start -i to dbus-launch dropbox start -i.

I recommend to make it with script:

rm ~/.config/autostart/dropbox.desktop
dropbox autostart y
sed -i "s/dropbox start -i/dbus-launch dropbox start -i/" ~/.config/autostart/dropbox.desktop

Then logout and login back and enjoy:

Note: if this method does not work for you try to remove dropbox completely with

dropbox stop
rm -rf ~/.dropbox ~/.dropbox-dist
sudo apt-get purge thunar-dropbox-plugin
sudo apt-get autoremove

then reboot and start from the beginning.


How to use the PATH variable as a starting-point in find within zsh

It looks like you're using a shell like zsh, which disables word splitting on variable expansion. If you're indeed using zsh, then you need to force expansion by either emulating sh (emulate sh) or using ${=PATH//:/ }:

$ printf "%s\n" ${PATH//:/ }
/usr/local/sbin /usr/local/bin /usr/bin
$ printf "%s\n" ${=PATH//:/ }
/usr/local/sbin
/usr/local/bin
/usr/bin
$ (emulate sh; printf "%s\n" ${PATH//:/ })
/usr/local/sbin
/usr/local/bin
/usr/bin

If you're indeed using bash, check your IFS:

$ (IFS=; printf "%s\n" ${PATH//:/ })
/usr/local/sbin /usr/local/bin /usr/bin
$ (IFS=; unset IFS; printf "%s\n" ${PATH//:/ })
/usr/local/sbin
/usr/local/bin
/usr/bin

Setting IFS to an empty string disables word splitting in bash. You can unset IFS to get the default value and re-enable word splitting.


Installing Oracle JDeveloper Studio Edition 12.2.1.3.0

To set up the installer if required the right command should have been: chmod +x jdev_suite_122130_linux64.bin. But nonetheless, run it without sudo:

./jdev_suite_122130_linux64.bin

Next time check whether it's executable with:

ls -l jdev_suite_122130_linux64.bin

Excerpts from here

Below are some additional considerations to make prior to running the installer:

On UNIX operating systems, Oracle recommends that you set the umask to 027 on your system prior to installation. This ensures that file permissions will be set properly during installation. Use the following command:

umask 027

You must enter this command in the same terminal window from which you plan to run the product installer.

On UNIX operating systems, do not run the installation program as the root user. The installer startup validation will fail and you will not be able to continue.
When managing a product installation (for example, applying patches, or starting Managed Servers), you must use the same user ID as was used to perform the initial product installation.

From the above the new permissions you set 777 will not let the installer go forward. Hence you need to take it back to the default then follow the instructions above in the excerpt. The was  o requirement to change the permissions in the first place. If you downloaded the zip file then unzip again and check the permissions with ls -l <file_name>. Armed with this information you can now follow the recommended way to run the installer.

See page 15 here


You are using the IcedTea build of the OpenJDK JRE, which is based mostly on the same code base used by the "official" version from Oracle.

Put simply, you are using the IcedTea JVM.
Hotspot is provided by the "official" download
But IcedTea is based on Hotspot! (see their homepage for details)

The only difference is that IcedTea has a separate (open-source) browser plugin!


What permissions does freefilesync run on?

+1 : Interesting question.

Freefilesync may require sudo privileges to backup certain files in the volumes it parses.
To my knowledge it is not good to preserve rwx oder ownership of files.

If you execute it from cli, the proper syntax is:

$ sudo -i -g bruni /usr/bin/FreeFileSync "${HOME}"/.FreeFileSync/backup-jobref.ffs_batch 2> "${HOME}"/.FreeFileSync/backup-jobref.ffs_log

The above suppose that within FreeFileSync's GUI you have previously defined a batch job and saved it as: "${HOME}"/.FreeFileSync/backup-jobref.ffs_batch.

If however you intend to run the job from an automated script, make sure that the variables you use explicitly or implicitly are known in yr execution environment (cron, udev, ...):

$HOME
$DISPLAYDon't leave it undefined in your script, include for instance:
# define local default display and pass it on to any child process
DISPLAY=:0 ; export DISPLAY

DISPLAY=:0 ; export DISPLAY may not suit your use case if you are doing remote admin on a distant volume while executing a remote instance of FreeFileSync. In that case you'll have to define DISPLAY appropriately.

If you don't want to have to enter your sudo password every time yr backup job runs, or if you want it to run unattended, then go to: /etc/sudoers.d/ and sudo-edit the file 10_user or whatever name you choose, with:

%admin yr_host = NOPASSWD: /usr/bin/FreeFileSync

where admin is any user group that contains you and those you authorize to run FreeFileSync with root privileges. Visit man sudoers to learn about the grammar and syntax of sudoers rules.

More details on sudoers are outside OP's scope, but for the sake of being a little more complete, just 2 more comments.

1) RULE PATTERN FOR sudoers

# who where = tags:(as_whom) what
# "who" is either a group or a collection of users
# "where" is a host or a collection of hosts
# "tags" is the permission granted to "what" is being allowed
# "as_whom" specifies under whose guise the cmd(s) are executed;
#   can be a user "user:" or a group ":group"
#   or a user and group "user:group"
# "what" is a cmd or a collection of cmds

2) WARNING: messing with sudoers may end up with a user either smiling or creating a security black hole or making himself and others unable to access sudo altogether. In the latter case, with this you can still go home in the evening and have yr cake too. Make sure you know what you are doing.

The above tests well for me on a plain vanilla 14.04.4 LTS Desktop, but can be further hardened security wise. Doing so is not terribly complicated, but again it falls outside the scope of this question.
HTH


They're not processes, they're threads under one process.

By default htop shows threads and in this case, is very misleading. You can alter this by going into Setup (F2), Display options and checking Hide userland threads.

Press F10 when you're done.


How to sync Ubuntu One Contacts with thunderbird?

Ubuntu One contacts sync has integration with Thunderbird in Ubuntu 11.10. The following instructions explain how to setup contacts sync in Ubuntu 11.10 with Thunderbird and use Ubuntu One contacts in Thunderbird.

Setup contacts sync

Open the Ubuntu One Control Panel
Click on the services tab
Click the "Install now" button
Enter your Ubuntu password when prompted
Click the "Install now" button under the "Enable Contacts Sync" section
Copy contacts to Ubuntu One from Thunderbird

Open Thunderbird
Click on the "Address Book" button
Click on the "Personal Address Book"
Select all the contacts you want to copy
While holding the "Ctrl" key, move the contacts from the "Personal Address Book" onto the "Ubuntu One" address book
Auto-complete email address from the Ubuntu One address book

Open Thunderbird
Click the "Edit" menu and select "Preferences"
Click on the "Composition" icon
Click on the "Addressing" tab
Click on the checkbox next to "Directory Server" and select "Ubuntu One" from the pull down menu
Click the "Close" button

Source


How to install super-wingpanel on ubuntu 16.04 Pantheon?

If you look at the launchpad website, you will find that super-wingpanel had only been released for Ubuntu Precise - No version exists for Ubuntu Xenial.  The package has not been updates in three years.


How to uninstall a program installed through Wine

If the application you're trying to uninstall doesn't show up when you run wine uninstaller, proceed.

Note: The following command wipes out all the programs installed in the default Wine prefix. Be advised. Since Windows programs may store data and documents on the "virtual" Windows drive contained in your .wine folder, you must make sure any valuable files are saved elsewhere first!

To completely delete the Wine prefix, run the following command.

rm -r ~/.wine

The next time you run Wine, it will create a new prefix by itself.


I tried to update from 13.04 to 13.10. Got the "Could not calculate the upgrade" error

This worked for me

sudo ppa-purge xorg-edgers


Update to Ubuntu 18.04 from 16.04 failed - unable to boot due to Kernel panic

Ok, this was a self-inflicted wound. As I mentioned, I moved /usr to /home and linked /usr to it in order to free up space for the upgrade. Looks like during the upgrade the link (while still pointing to /home/usr) got invalid somehow.

When I was in the live Linux, I copied usr back. Luckily there was still enough space. After that all the boot problems disappeared. Lesson: don't mess with system files. On the bright side - it did enable me to upgrade the OS, and I now have a bootable Linux USB as a bonus :)


evince is showing errors in error messages in the terminal

It could be AppArmor:

Check /var/log/kern.log for entries like :

May 11 10:17:35 dev kernel: [2336998.770824] type=1400 audit(1431364655.819:726): apparmor="DENIED" operation="chmod" parent=19487 profile="/usr/bin/evince" name="/data/home/fritz/.local/share/recently-used.xbel" pid=23290 comm="evince" requested_mask="w" denied_mask="w" fsuid=1001 ouid=1001

check where your home directory is.  If it's a symlink from /data/home -> /home then you need to modify AppArmor to to have the true home directory in it.

sudo vim /etc/apparmor.d/tunables/home

and modify HOMEDIRS accordingly

@{HOMEDIRS}=/home/ /data/home/

then restart apparmor

sudo /etc/init.d/apparmor restart


WUBI hangs while "Almost finished copying files"

Had the same problem. i had allocated 8GB for ubuntu installation and my installation disk was formatted as NTFS.

I allocated 12GB and changed my format to FAT32, then i managed to install my ubuntu. As i have done the changes at the same time, i am not sure which change did the trick. I think it had something to do with the disk allocation size.

Hope this helps...


Helvetica font screw Google Chrome on Ubuntu

The font causing the problem is "Emoji One". I had the same problem and after removing the package fonts-emojione, the problem was gone.


Cannot get concurrent SFTP users to log in

man sshd_config specify two relevant parameters: MaxSessions and MaxStartups

 MaxSessions
         Specifies the maximum number of open shell, login or subsystem
         (e.g. sftp) sessions permitted per network connection.  Multiple
         sessions may be established by clients that support connection
         multiplexing.  Setting MaxSessions to 1 will effectively disable
         session multiplexing, whereas setting it to 0 will prevent all
         shell, login and subsystem sessions while still permitting
         forwarding.  The default is 10.

 MaxStartups
         Specifies the maximum number of concurrent unauthenticated
         connections to the SSH daemon.  Additional connections will be
         dropped until authentication succeeds or the LoginGraceTime
         expires for a connection.  The default is 10:30:100.

         Alternatively, random early drop can be enabled by specifying the
         three colon separated values “start:rate:full” (e.g. "10:30:60").
         sshd(8) will refuse connection attempts with a probability of
         “rate/100” (30%) if there are currently “start” (10)
         unauthenticated connections.  The probability increases linearly
         and all connection attempts are refused if the number of
         unauthenticated connections reaches “full” (60).


How to install latest version Eclipse in Ubuntu-16.04

Download and install it from http://eclipse.org.

Here is the link to all different versions of eclipse.
You just have to extract and run it.

My instruction is:

Download it
Extract it in /opt

sudo tar -xf /path/to/file -C /opt

Create a link to its binary

sudo ln -s /opt/eclipse/eclipse /usr/local/bin


Your Dynamic DNS is actually (almost certainly) pointing at your router not your Ubuntu computer. Even if you run it from a client inside the network, all DDNS can do is point at the public IP.

I assume you have some port-forwards set up on your router to take the connection onto your Ubuntu server. The problem is that most home routers won't do internal redirects. So a local computer (regardless of operating system) will look at the DNS, get your public IP and try to connect. The router won't know how to forward this on.

You have a few options here, depending on what your router lets you do:

Run a DNS server inside the network (eg on your server) that provides its own interpretation of youraddress.no-ip.org that points directly to the right machine (with a local IP).

In essence, install BIND and configure it to get most of its DNS from your current DNS server but add overrides.

But then you need your network computers to use this as their DNS server so you'll need your router to specify this computer as the DNS server. Then when another local computer resolves (you might have to refresh its network connection first) it should get the local IP.
Just override the DNS on each local computer. Most systems allow editing /etc/hosts to assign IPs directly to DNS names.
Get a router that allows internal forwarding. This feature tends to become available in smaller enterprise routers so this isn't a cheap option.


Mount disk C automatically when I load Ubuntu

You can use fstab to automount your additional storage devices.
this post will give you some guidance How to mount a new drive on startup


Trying to install pycharm with snap gives error: error: snap "pycharm-community" not found

First you have to add below mentioned repository

sudo add-apt-repository ppa:mystic-mirage/pycharm

Then use theses commands

sudo apt-get update

sudo apt-get install pycharm


trying to install Ubuntu but i886 CPU detected and won't install

I suggest that you download an iso file with an i386 kernel (alias 32-bit version). For such an old computer it is necessary to use an i386 kernel. It is also a big advantage to select a community flavour of Ubuntu with a light desktop environment, lighter than standard Ubuntu,

Lubuntu with the ultra-light desktop environment LXDE
Ubuntu MATE with the medium-light desktop environment MATE
Xubuntu with the medium-light desktop environment XFCE

See these links,

releases.ubuntu.com/

help.ubuntu.com/community/UbuntuHashes

How to select the version and flavour of Ubuntu


Ubuntu Installer doesn't detect Windows 10

Make sure that you have turned off quick startup in Windows and do a full shutdown by holding shift when you click shutdown to disable quick startup. If you dont do this, the Windows partition cannot be mounted by linux to see that there is a Windows partition.https://www.maketecheasier.com/disable-hybrid-boot-and-shutdown-in-windows-8/


How to get rid of the keyboard layout menu without getting rid of keyboard layout

You can try to edit the panel.js file located in the /usr/share/gnome-shell/js/ui/ directory.

Note: I have two keyboard layouts (Es , En). First I will create a backup of the file and comment the line 855 to remove the keyboard indicator in the gnome panel without removing a keyboard layout.

1) Open a Terminal window Ctrl+Alt+T and type:

sudo cp -p /usr/share/gnome-shell/js/ui/panel.js /usr/share/gnome-shell/js/ui/panel.js.bak
sudo nano -c /usr/share/gnome-shell/js/ui/panel.js

Comment or delete the line 855 (You can use the double slash "//" for single line comments)'keyboard':imports.ui.status.keyboard.InputSourceIndicator,

To save the changes in nano.. Ctrl+O,Enter then Ctrl+X.

Before:

After:

Finally to see the changes you can logout login, restart the panel or reboot your machine.

Now if you neeed to change the Keyboard layout you can use the shortcut Ctrl+Space.

Important: Just in case ... remember you have the file panel.js.bak as a backup.

Hope this helps.


Skype has stopped working on Ubuntu Studio 14.04.1

You need to upgrade skype to version 4.3.0.37.


Very slow svn checkouts unless I use --no-auth-cache

Through you don't say what was the repositories, of course it could take hours to clone the complete repository (hold your horses before cloning the linux kernel!) so, the time that it takes to clone the repository is perfectly normal and it has other factors like the bandwidth, the load of the SVN server, IPv6, etc. You don't provide more information that could nail the problem.

On the other hand, the --no-auth-cache switch just force your SVN to ask you for credentials in case you are accessing a protected repository. If there is any problem then is with the authentications methods stored in your configurations.


Moving entire Linux installation to another drive

It can be done in a few ways. But the easiest one is to just copy all files from the old drive to the new one.

Create an ext4 partition and a swap partition on the new drive.
Boot from LiveUSB.
Mount the old Ubuntu partition to some directory, mount the new one to some other directory.
Copy all files from the old one to the new one using cp -a command.
Install grub to the new drive.
Update /etc/fstab with new UUIDs.

If something is not clear, I can add some explanations.


Shutdown and Reboot is causing Logout, and brings me to Login page

Freevo was the trouble maker. I uninstall Freevo and shutdown works fine.

Occasionally, i press CTRL+ALT+F9 and found Freevo, it was starting automatically on boot.
I press exit and Freevo closed. After this i go to previos default tty (CTRL+ALT+F7), and then shutdown Ubuntu successfully.
This i have found in logs:

/var/log/auth.log.1:503:Dec 18 01:33:34 m-desktop su[1069]: pam_unix(su:session): session closed for user freevo

I think that i was unable to shutdown, because of another user "freevo", which was logged in automatically on boot.


IPtables allow traffic from only an ip and one port to one port

I think this should do what you want, where 192.168.0.12 represents the IP you want to allow and port 80 the port from that IP you want to allow:

#!/bin/sh
#
# 1110080_firewall 2019.01.05 Ver:0.01
#       Most basic iptables firewall.
#       Currently for this question:
#       https://askubuntu.com/questions/1110080/iptables-allow-traffic-from-only-an-ip-and-one-port-to-one-port
#

# The location of the iptables program
#
IPTABLES=/sbin/iptables

#Set some stuff
#
EXTIF="ens5"
UNIVERSE="0.0.0.0/0"

echo 1110080_firewall $FWVER begin.

#Clearing any previous configuration
#
$IPTABLES -P INPUT DROP
$IPTABLES -F INPUT
$IPTABLES -P OUTPUT ACCEPT
$IPTABLES -F OUTPUT
#$IPTABLES -P FORWARD DROP
$IPTABLES -F FORWARD
#$IPTABLES -t nat -F

# Reset all IPTABLES counters
$IPTABLES -Z

# loopback interfaces are valid.
#
$IPTABLES -A INPUT -i lo -s $UNIVERSE -d $UNIVERSE -j ACCEPT
$IPTABLES -A INPUT -i $EXTIF -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT

$IPTABLES -A INPUT -i $EXTIF -s 192.168.0.12 -p tcp --sport 80 --dport 80 -j ACCEPT

#$IPTABLES -A INPUT -j DROP

echo 1110080_firewall $FWVER done.


Installing Skype 4.3 won't do you any good, even if you could install it. Microsoft has stopped supporting it, and effective July 1 2017, you won't even be able to log in. They want you to use the newer Skype 5.3.0.1. And, you'll be disappointed in Skype 5.3.0.1 as it's missing a whole bunch of features that were in Skype 4.3, or in the Windows version.

Get the newest version at https://www.skype.com/en/download-skype/skype-for-computer/


Ubuntu 18.04 login screen still showing ubuntu 16.04 lts style login

Ubuntu 16.04 uses lightdm as login manager. This is (obviously) preserved if you upgrade to 18.04. If you prefer to use gdm, you will need to switch from lightdm to gdm. How you can do that is explained elsewhere on Askubuntu. How do I switch from LightDM to GDM?


.desktop file appears to run a .sh file executable, but doesn't complete

The line seems to be wrong, your Desktop folder isn't in /home

Exec=sudo /home/Desktop/mountServer.sh

and there is no need to use sudo twice, once in you script and once in your desktop file.

Use

Exec=/home/your_username/Desktop/mountServer.sh

instead, replace your_username with your username (the output of echo $USER)

And you should use

$HOME/capsule

instead of

~/capsule

in your script.

The best solution for you is, install gksu via

sudo apt-get install gksu

A desktop file like this, replace your_username with your username (the output of echo $USER)

[Desktop Entry]
Name=Mount Server
Comment=Mounts the Server 1.5 from Apple Airport Extreme
Exec=gksu /home/your_username/Desktop/mountServer.sh
Icon=/paht/to/icon.png
Terminal=false
Type=Application

and a script like this

#!/usr/bin/env bash
mount -t cifs "//10.0.1.1/The Server 1.5" -o username=myusername,password=pwhere,sec=ntlm "$HOME"/capsule

With this solution you have a graphically password prompt, no unneeded terminal and if you want to start your script directly in a terminal you can use

sudo ~/Desktop/mountServer.sh


Found a fix, though it makes no sense to me why it worked. I'd be interested to hear, in the comments, how this may have fixed the problem.

I disabled the on-board Ethernet adapter in the BIOS and booted the server (so no eth0, only loopback device). I rebooted, re-enabled the Ethernet adapter in the BIOS and this time it worked.


Can I use a bootable USB to boot Ubuntu on a PCIe SSD?

With Linux you can do a dual step boot if you use initramfs or anything similar.

Linux can boot from mostly anything, like a slow USB stick, memory card, etc., but it must boot from something that BIOS can see.

Said that, there is a dual step boot way to boot any Linux, i will try to explain it.

Linux and Grub2 can boot from USB, while booting the first thing it is done is to load a kernel and an initramfs or equivalent.

To boot from a device not seem by BIOS, you put that part on a USB drive or an internal HDD partition or SSD or where ever the BIOS can boot from.

So basically you put Boot code (MBR) + Grub stages + kernel + initramfs on a device that can be seen by BIOS... aka, the /boot as a partition. The rest you put it on the fast NVMe or where ever you want, but it must be on a device that can be seen from within that initramfs boot step (this is the same trick as booting from inside LVM and/or LUKS, etc).

So there is the trick, put some driver on the initramfs (or compile a kernel, or a kernel module, etc) that will power up your PCIe card and the NVMe, from them the drive is seen and the boot process can go on; the Linux installer will do such automatically on most cases, so do not panic.

Resuming:

Boot code, Grub, Kernel and initramfs on a bootable device seen by BIOS (this is basically /boot partition)
initramfs with driver to power up PCIe NVMe
root filesystem on the PCIe NVMe

And voila, Linux can boot... that is a dual step boot... it first boot a small part from a BIOS bootable device, then from inside the ram drive it loads what it needs to power up the PCIe card and the NVMe (and much more things), then it continue booting with root mounted from the NVMe.

Sound easy, but can be tricky, the part to DEBUG initramfs PCIe and NVMe power up can be as easy as nothing or a real headage.

I can suggest to you, that try a LiceCD, if it sees the NVMe, then plug a USB stick and when installing tell the installer to put /boot on a USB partition and Grub also on the USB MBR; then configure the BIOS to boot from the USB, and magic is done.

Having /boot on a slow device do not slow a lot the boot, since it is a few megabytes.

But some very old PC (one of my old Pentium IV) have a very weird BIOS that on boot time it uses all USB 2.0 at USB 1.x speeds, so booting Grub menu is quite fast, but loading kernel+initramfs can take from two to five minutes.

If you have any USB 3.x stick and USB 3.x port that is bootable (not all motherboards allow to boot from USB 3.x) try with that, it is much faster than USB 2.x and much much faster than old legacy USB 1.x speeds.

And of course, if you have any other storage device (internal) that is seen by the BIOS, like normal HDD or a sata SSD, use such device instead of the USB, since can be faster on most cases.

Solution:

Use a device that is seen by BIOS as bootable for Grub + /boot partition when installing Linux
And use the PCIe NVMe for root filesystem
Configure the BIOS to boot from that device where you put Grub + /boot partition

On most cases is just that simple, most if while on LiveCD the PCie NVMe is seen without installing anything, to test that boot such LiveCD without Internet connection (to ensure nothing is downloaded), see if the NVMe is seen and then connect to Internet if you want.

Hope you get the idea: Grub & /boot partition on a separated device, a device that can be seen by BIOS as bootable, that is the Key.

P.D.: I like to explain why thing works and why i suggest things, not just through the solution without explaining the idea, steps, etc. and forum do not allow me to post comments.


Cannot remove "empty directories" from my external hard drive after rsync fail

As Ravexina suggested, I ran a command prompt as administrator from a Windows machine and I inserted the following lines, as my external hard drive was at D::
C:\> D:
D:\> chkdsk /f

Then it found the broken indexes, the "empty directories", and deleted them.
Warning: This can result in data loss. For example, if one of your file doesn't respect the Windows' naming conventions (it contains a '?'…) then it will probably be erased !


Successfully installed SASS, but the terminal insists it isn't

You need to add /var/lib/gems/1.8/bin/ to your path


Error in installing Bad Piggies game through Wine

Yes, it is possible to install it but only the initial release (version 1.0.0).
According to winehq.org that is.
Instructions to make it work can be found here: http://appdb.winehq.org/objectManager.php?sClass=version&iId=26748

You are trying to install version 1.3.0.0 which is confirmed to NOT work on wine. You can however use a VM (virtual machine) to get it to work.


Laggy sound, how can I know what the problem is?

Possibly this is a pulseaudio issue - one solution is to use ALSA instead of pulseaudio.

This will loose the sound indicator together with the pulseaudio tools.  To change your sound use alsamixergui or gnome-alsamixer

sudo apt-get remove pulseaudio gstreamer0.10-pulseaudio
sudo apt-get autoremove
sudo apt-get install alsa-base alsa-tools alsa-tools-gui alsa-utils linux-sound-base alsamixergui gnome-alsamixer

Then reboot.

To reinstate pulseaudio:

sudo apt-get install ubuntu-desktop indicator-sound

As we have discussed, it is worth checking if this is a specific problem in 11.10 that could have been resolved in the upcoming 12.04 release.  To do this, download either the Alpha 1 release of 12.04 or the daily-build.

Use Unetbootin to write the ISO to a USB stick and boot from that into the 12.04 live USB.

On confirmation that this is a specific 11.10 issue, then the problem is likely to be a kernel specific issue.

You have four choices:

Stick with what you have and wait until 12.04 is officially released in April
Upgrade to the 12.04 Alpha - only do this is you are prepared for breakages.  Only do this if you are happy and experienced enough to overcome alpha quality issues such as non booting, graphical issues etc.
Install 12.04 as a dual boot with 11.10 or as a virtualbox guest install in 11.10
Upgrade the 11.10 kernel to the 12.04 kernel.

If you want to try the 12.04 kernel then first the important proviso:

drive-image backup you current 11.10 install

I'm not kidding - upgrading the kernel is not to be trivialised and can leave you in a non-booting scenario.  Use a good quality drive-image software such as clonezilla.

Step 1 - temporarily change your sources to precise:

sudo sed -i -e 's/oneiric/precise/g' /etc/apt/sources.list

Step 2 - download and install the precise kernel

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

Step 3 - change your sources back to oneiric:

sudo sed -i -e 's/precise/oneiric/g' /etc/apt/sources.list
sudo apt-get update

Then reboot.

Once logged in test that you have successfully booted into the kernel 3.2 by running:

uname -a


I have the same type of graphics card, but I don't have a driver. use s3tc. its a compression tool. start by adding ppa:xorg-edgers/ppa to your ppa list, sudo apt-get update, then go to the software center and look up s3tc and there are 2 packages. install them both, and make sure you run the update manager. I did this, and my computer runs faster and better than ever when playing steam games.
you do not necessarily need one, but if you are a gamer, I recommend this


Ideal Boot partition for 1Tb hard drive to install ubuntu

The answer to your question is no.  There is no idea partition.  Some like to have just a /(root) partition for everything, some like / and /home partitions.  Some people are happy with just 30gb, some think 1TB is too small.


Help installing Ubuntu 16.04 on a Lenovo B570. Won't Boot

Your disk uses GPT partitioning, so there is no room for a legacy bootloader outside the partitions.  You have to explicitly make a small (1-2M) partition and flag it grub-bios so the bootloader can be fully installed.

I'd just reinstall and re-do the partitions, putting the grub-bios one just after the EFI partition.  Then if you'd like to keep your data separate from the rest of the system, use 50G for the root, and the rest for your home data.  There are lots of recommendations on setting up your partitions, depends upon how you are going to use them.


Command argument from desktop file ignored in gnome3

Try changing spotify to the full path to spotify in the Exec= line, i.e. change

Exec=spotify --force-device-scale-factor=1.5 %U

to

Exec=/full/path/to/spotify --force-device-scale-factor=1.5 %U

To find out the full path to spotify you may run

whereis spotify

or

which spotify

It should be something like /usr/bin/spotify.


How to install gattlib in Raspberry Pi 3

The solution on this link worked for me on a Raspberry Pi 3 using Gattlib with Python 3
https://stackoverflow.com/questions/43721463/cant-install-gattlib-on-rasperry-pi-error-stray-xxx-in-program-on-usr-incl


how can i resize and partition thepart in hard disk where the system setup?

To repartition your disk, the partitions you want to change (every operation except enlarging) have to be unmounted. This means that the running OS is not accessing them. You can recognize a mounted partition by the key symbol next to its name in gParted and you will see that both of your partitions (mount points / and swap) are mounted.

So it is impossible when you boot from your installed Ubuntu version, you have to boot from a live media. Insert the Ubuntu installation DVD/USB stick, select "Try Ubuntu" and run gParted from within this live session. You will see that the partitions on the hard disk are now unmounted (no key symbols) and you can modify them.

Anyway: Partitioning always might lead to data loss. So backup your important data before performing this. Especially operations like shrinking/moving partitions may damage the data, while moving the left border of a bootable partition might lead to problems with GRUB and no booting anymore. (This can be solved by running boot-repair or update-grub from within the live session after mounting the hdd partitions)


How to properly setup a second hard drive for all users?

Step 1 -- Setup Drive
Use gparted to partition the drive. Make one partition covering the entire drive with the label "Drive2" and formated to ext4. Make note of the UUID for the partition.
Next, setup auto-mount. Make a folder for a mount point: sudo mkdir /mnt/drive2
Then add the following lines to /etc/fstab
#Drive2 automount
UUID=<UUID from above> /mnt/drive2 ext4 defaults 0 2

Reboot to test the auto-mount.
Step 2 -- Setup Folders
If auto-mounts works, open a terminal and type cd /mnt/drive2
I chose to set normal users with access to only their folder, and give sudoers access to all folders. I do not know a way to do this automatically; perhaps someone could make a script.
Repeat the following commands for each user. Replace "user1" with the actual user name.
 mkdir user1 #sudo might be needed.
 sudo chown user1:sudoers user1
 sudo chmod 770 user1  #user and sudoers full access, other no access
 ln user1 Drive2 #sudo might be needed again
 sudo chown user1:user1 Drive2
 sudo mv Drive2 /home/user1

Your users should now have a folder named "Drive2" in their home directory that links to their folder on Drive2.
For ease of access, a link for /mnt/drive2 can be made and copied to all the sudoers.
Notes:
With this setup, sudoers will be able to add files to user's folder, and delete files they created. But may only be able to view files created by others because default file settings are user:user 755 (maybe 754). And vis-a-versa. Though sudoers should be able to change permissions and owner.


switch temporarily to headless mode or runlevel 3?

AFAIK Ubuntu doesn't use the runlevel, in fact the /etc/rc*.d directory are the same. If your goal is to not run Xorg automatically just edit /etc/default/grub and modify the line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

in

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash text"

then type:

sudo update-grub

to switch back delete "text" and re-run sudo update-grub


How to tail a log file when removing lines (not appending) of the file?

You might try:

tail -f /var/log/syslog

Or whatever file you are interested in. Get out of 'tail' with Ctrl+c.