Scheduled scan by ClamAv found viruses but did not quarantine them automatically

In case you use Ubuntu as a gateway and have Windows computers behind that gateway

In case you want to move the files to another location use:

clamscan -r --move=/home/$USER/VIRUS /home/$USER

If you want to delete them automatically:

clamscan -r --remove /home/$USER

/home/$USER is the scanned directory. /home/$USER/VIRUS is a sub directory inside the scanned folder. WARNING: --remove -will- delete those files.

That basically is the answer to your question but do keep reading.

In case you solely run Ubuntu desktops

As far as I know 100% of all reported viruses by clamav are fake so I would advice against this. All of them are false positives. And it is not from the lack of trying by virus creators: I bet any of them would like to break Linux like they broke Windows as it would make that person famous and absolutely revered as a god in that world.

The big flaw virus scanners have: they use Windows rules to scan Linux files and that just does not work. So the only reason to scan for viruses is when you use Ubuntu as a gateway to provide content to Windows computers and you want to scan Windows related files before those reach your Windows computers.

Automatically moving or deleting those files will eventually kill your operating system. At some point it will find a system file that is crucial for your operating system and either moving or deleting it will essentially make the connection process stop from working. If that file is part of the boot process you killed your system.

I would suggest to investigate each of these files and actually confirm those are viruses. Manually. I really doubt you found any and, after you did investigate those files, if you agree with me: delete the software and do not look at it again. I, and many Linux Desktop users with me, have never ever used a virus scanner. On a server with sensitive data I would suggest to use root kit scanner and a good password. Or even 2 root kit scanners so you can compare results as those tend to report false positives too.

Linux, up to today, is free of viruses.

You can however install a virus yourself. The viruses that are available for Linux never got passed lab tests and require you to download it yourself, install it and provide it your admin password. If that happens that person made so many mistakes in regards to security it is fairer to claim that that person does not need a virus scanner but needs to be educated about basic usage of a computer ;)

Things to take note of:

keep your system always up to date.
install software always from the official repositories. This is especially true when installing components (like "extensions") inside browsers: those do not tend to have a virus but often have malware in them. Always investigate those before installing: check for comments and for discussions on-line.
when installing 3rd party software investigate the 3rd party.
never ever type your admin password when you know it should not be asked. A regular desktop user hardly ever needs it: only when doing admin tasks.
have a decent admin password.

... and you never need a virus scanner. The only company you need to put your trust in is Canonical as they provide our operating system. Of course ... if they mess up we all will notice. An unofficial version of Ubuntu called Mint had their servers breached and their installers compromised. A very very very serious problem yes, but not something a virus scanner would have caught :)


installing kubuntu grub loader completely ubuntu 16.04

To go back to previous grub background
If you want to go back to the Ubuntu's login screen and grub background, use this command
sudo update-alternatives --config text.plymouth

This will show you options to select something like below -
There are 5 choices for the alternative text.plymouth (providing /usr/share/plymouth/themes/text.plymouth).

  Selection    Path                                                                   Priority   Status
------------------------------------------------------------
* 0            /usr/share/plymouth/themes/xubuntu-text/xubuntu-text.plymouth           150       auto mode
  1            /usr/share/plymouth/themes/kubuntu-text/kubuntu-text.plymouth           60        manual mode
  2            /usr/share/plymouth/themes/text/text.plymouth                           40        manual mode
  3            /usr/share/plymouth/themes/ubuntu-mate-text/ubuntu-mate-text.plymouth   100       manual mode
  4            /usr/share/plymouth/themes/ubuntu-text/ubuntu-text.plymouth             50        manual mode
  5            /usr/share/plymouth/themes/xubuntu-text/xubuntu-text.plymouth           150       manual mode

Select the one with Ubuntu by typing the number and press Enter.
To remove most of the KDE and plasma components
Use the solution I gave in this question https://askubuntu.com/a/814627/61218


How can ubiquity be forced not to install grub?

sudo ubiquity -b

Just installed 16.10 by directly booting ISO on sda with grub's loopmount. Once in installer went into terminal and used above command. Something Else install seemed normal. Did not notice until I had clicked thru, but pretty sure combo box for where to install grub was missing. And during install process it normally says installing grub, but that never showed.

Normally an install to sdb or any second install overwrite my /EFI/ubuntu folder with my main install's boot. This time I was able to just boot back into my main install

And running sudo update-grub still found the new install even though grub "not installed". Noted no grub.cfg in /boot/grub either.


Create a copy of virtualenv locally without pip install

First way to create a copy of existing virtualenv, say ProjectAenv:

Copy the ProjectAenv to some other name or directory:

cp -R /home/sk/Path1/ProjectAenv /home/sk/Path2/ProjectBenv

where /home/sk/Path1/ProjectAenv is the absolute path of the virtualenv ProjectAenv
Then open the activate file of newly copied ProjectBenv using your preferred editor:

gedit /home/sk/Path2/ProjectBenv/bin/activate

Find the line VIRTUAL_ENV="/home/sk/Path1/ProjectAenv" and replace it with:

VIRTUAL_ENV="/home/sk/Path2/ProjectBenv"

Save and close the file.

Thats it!! Your new environment ProjectBenv is copied from ProjectAenv and ready to use. I'm using this way for a long time and never got any issues yet, although I recommend the 2nd way of copying.

Second way to create a copy of existing virtualenv(Recommended):

Download virtualenv-clone:

wget https://pypi.python.org/packages/source/v/virtualenv-clone/virtualenv-clone-0.2.6.tar.gz
tar -zxvf virtualenv-clone-0.2.6.tar.gz
cd virtualenv-clone-0.2.6

Install virtualenv-clone inside any virtualenv environment:

virtualenv newenv            # create a new environment. You can use any existing one.
source newenv/bin/activate   # login to newenv
(newenv): python setup.py install  # install virtualenv-clone in newenv
# be sure that you are inside the directory "virtualenv-clone-0.2.6"

virtualenv-clone will be installed inside newenv.
Now while logged-in as newenv we can create a copy of any existing environment. For example creating the copy of ProjectAenv:

(newenv): virtualenv-clone ProjectAenv ProjectBenv
(newenv): deactivate             # to come out from newenv.

Please comment for any suggestions or changes.


You can install Zoneminder on your Ubuntu desktop from the Ubuntu repository.  Follow the Zoneminder instructions to connect any type of camera (USB, IP, CCTV).

On your Android mobile, download camera monitoring software such as "tinyCam Monitor FREE" or "IP Cam Viewer".  Both work well with Zoneminder.

You will likely need to open a port on your router to allow a connection to your desktop from outside.  Additionally, you may prefer to use a Dynamic DNS provider such as DynDNS so that you don't need to keep changing your IP address configuration.

All of the above can be done using free software and services.


Sorting files to be used in for-loop in bash file

While I agree that using utilities like md5sum and shasum are far more effective than file size at detecting duplicates (as mentioned in the comments already), the root of this question seems to be more about how to sort files when whitespace is included in the name.  I believe that you can use ls -S1 to do what you're after as this will place the output from ls with one file name per logical line (sorted by size).  If you then change the IFS variable to break on newlines you should have what you're after.  Below is some example code illustrating:

ORIG_IFS="${IFS}"
IFS=$'\n'
for CURR_FILE in $(ls -S1)
do
    echo "Next file: ${CURR_FILE}"

done

IFS="${ORIG_IFS}"

Should you choose to go with md5sum or shasum instead you'll see that the command output prints the hash at the start of each output line followed by the file name.  You can then sort the output (which will put duplicate hash lines next to each other), use the cut command to peel the fixed length hash from the line start, and process in a way similar to what you're trying to do with file size.


How can I use the output suggestion by apt and other terminals use?

In general, GNOME Terminal supports tab-completion, i.e. you can automatically fill in partially typed commands by pressing the Tab key repeatedly.

For the specific case, viz. command suggested by apt to install a suggested package, you can select the suggested command (or any text for the matter) with your mouse and then click the mouse middle button. The command would be sent to the prompt. Then you just need to press Enter.

If you're really keen on not using the mouse, refer to these:

Selecting text in the terminal without using the mouse
shortcuts to select text in terminal
Select/copy/paste in terminal using only the keyboard


Dell Vostro 2420 upgrade to 12.04.1 no wifi

I got it working, same model, on linux mint 13 64-bit, which is based off of ubuntu 12.04. Assuming your laptop came with the same hardware configuration:

Do a lspci -nn | grep Network, and if you get the following: 01:00.0 Network controller [0280]: Broadcom Corporation Device [14e4:4365] (rev 01) then my solution may work for you.

There's a related question on here, How do I install BCM43142 wireless drivers for Dell Vostro 3460/3560?. The steps described there may work for you. It didn't quite work for me, I didn't know what to do after installing the .deb package.

The following driver did work for me:
http://jas.gemnetworks.com/wireless-bcm43142/

He has apt sources to make it easy to install (as found at the root of that site):

wget http://jas.gemnetworks.com/jasmineaura.gpg.key -O- | sudo apt-key add -

The sources are:

deb http://jas.gemnetworks.com/debian debian main
deb-src http://jas.gemnetworks.com/debian debian main

Then, just:

sudo apt-get update
sudo apt-get install wireless-bcm43142-dkms

The package also removes the conflicting packages from the old proprietary drivers that don't work, which I believe was what caused me problems when I tried to use the deb package in the question linked above.


How to run an Android emulator in Ubuntu 13.04

Install VirtualBox  from the Ubuntu Software Center.
Download and install Genymotion
Create a new Virtual Machine with the steps mentioned here.


How to Configure Launcher Placement in Multi-monitor Setup

Launcher placement can be achieved via System Settings -> Displays or via command line.

GUI way

Under System Settings -> Displays find the Launcher placement option

Command line way

The placement is determined by two things:

Which monitor is the primary ?
What value is set in /org/compiz/profiles/unity/plugins/unityshell/num-launchers dconf schema.

The dconf schema is very easy. Value 1 indicates one launcher, value 2 indicates multiple launchers (i.e., place it on all screens) . You can alter that with

dconf write /org/compiz/profiles/unity/plugins/unityshell/num-launchers INT`

or

gsettings set org.compiz.unityshell:/org/compiz/profiles/unity/plugins/unityshell/ num-launchers INT

where INT is either 0 or 1.

The xrandr command will tell you what monitors are connected and what is your current primary screen. It will also allow setting and unsetting that with --primary flag.

$ xrandr
Screen 0: minimum 8 x 8, current 2390 x 768, maximum 32767 x 32767
eDP1 connected 1366x768+1024+0 (normal left inverted right x axis y axis) 345mm x 194mm
   1366x768       60.0*+
   1360x768       59.8     60.0
   1024x768       60.0
   800x600        60.3     56.2
   640x480        59.9
DP1 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
VGA1 connected primary 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1024x768       60.0*
   800x600        60.3     56.2
   848x480        60.0
   640x480        59.9
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

In the output above I have my external VGA1 screen set as primary , hence launcher will show up there.

For instance, if I wanted to use my build-in monitor as primary, then

xrandr --output eDP1 --primary --right-of VGA1

And the launcher will jump from left screen ( VGA1 ) to my right screen, while preserving the layout.

For more info, read xrandr and dconf man pages.


Your script won't work for everyone.  The variable you set for home for your user will be incorrect for people who have their HOME location in a different place from /home/user.  For instance, my home location for my personal space is /home/user/l/j/ljames.

Instead of setting the path to be "file:///home/$USER/.wallpaper/1920x1080" you should more correctly change it to "file:///$HOME/.wallpaper/1920x1080".  The variable $HOME is already expanded to the full home space of the user.

Your script will work if with these changes:

#!/bin/bash

cd ~/
rm -r ~/.wallpaper
mkdir .wallpaper
cd ~/.wallpaper

wget https://source.unsplash.com/random/1920x1080
# USER=$(whoami) This line isn't neccesary.)
path="file:///$HOME/.wallpaper/1920x1080"
echo $path
gsettings set org.gnome.desktop.background picture-uri "$path"

A more efficient example is:

#!/bin/bash

[ ! -d ~/.wallpaper ] && mkdir ~/.wallpaper
cd ~/.wallpaper
wget -O 1920x1080 https://source.unsplash.com/random/
path="file:///$HOME/.wallpaper/1920x1080"
rm ~/.cache/wallpaper/*
gsettings set org.gnome.desktop.background picture-uri "$path"

The explaining of the lines are:

Line #1:  Create wallpaper directory if it doesn't exist.
Line #2:  Move to the folder.
Line #3:  Overwrite the current file with the new wallpaper.
Line #4:  Set the pathname variable.
Line #5:  Removed the Wallpaper cache for image change detection.
Line #6:  Active the new wallpaper.


Installing Ubuntu, on a Windows 8 laptop, without a CD. Can it be done? And what is the normal time for download?

Update:

It is possible that windows 8 will not allow you to install Ubuntu by LiveCD/USB or Wubi. This is because Windows 8 introduced several new features, of which 2 are:

UEFI which substitutes what we have known as the BIOS (Is an alternative to)

Secure Boot which prevents anything but the installed operating system, in this case Windows 8 from booting.

See this article for installing Ubuntu on Windows 8.

Generally Speaking, there are two major ways of installing Ubuntu, without a CD.

One:

You can create an ubuntu liveusb and install ubuntu on a dedicated partition (or inside a windows partition, this works as well). If you want to do this, see this article on how to create an Ubuntu live usb.

Two:

You can install Ubuntu via Wubi. Wubi is an windows installer for Ubuntu. Wubi creates a big file, let's say on your Windows where it install Ubuntu. The downside of using Wubi is that you cannot recreate a dedicated Ubuntu partition by using the wubi method.


Question about compiling from ruby source and upgrade

When a new ruby interpreter is released, how do I upgrade my installed version? Just do the same thing I do when installing?

Probably, presuming that new versions don't change paths. This is fairly unlikely to break updated installs, but might leave detritus littered around your system.

  Can I delete the folder that I extracted the source (/home/rgiaviti/ruby-2.1.2)?

Yes. After install, this is no longer needed.

  Is there a way to uninstall the interpreter, like a apt-get remove, but for compiling from source?

No! Personally, I would never directly install from source. As I mention above, this often results in files littered through your system. In the future, I would recommend using CheckInstall, which rolls your install into a package for easy management.


Today 2018-08-02, upgrading to 18.04.1 crashes gnome

After lots of trying I could solve the problem by performing the following steps (although I do not know what actually did the job, sorry)

install all recent updates
re-install gnome via

apt-get install gnome
set defaults via

update-rc.d -f gdm3 defaults

(a window pops up asking for your password)

after reboot, now I end up directly in the GUI again.
The login-screen uses the US-English keyboard layout and ignores my settings but once inside the GUI the preset default is automatically active again).


systemd-networkd-wait-online.service causing Artful to take over 2 minutes to boot, but Apport says package is not installed

Same problem here with Artful.

2min 52ms systemd-networkd-wait-online.service

As a workaround you can add a timeout for the service. To do that edit the file /lib/systemd/system/systemd-networkd-wait-online.service and adjust the line that starts the service:

ExecStart=/lib/systemd/systemd-networkd-wait-online --timeout 1

Setting the timeout to 1 doesn't seem to have any implications as there's another service with the exact same task (NetworkManager-wait-online.service).


Ubuntu 14.04 + LibreOffice 4.2 spell-checker dictionaries don't come up

The easiest way to have multiple languages installed on the system is to go to the system settings and then install the languages you're interested in there.  All the other applications will follow suit (like you'll also have the same spell-checker in firefox, gedit, libre-office, ...

The disadvantage of the easy way is that it will also install help files for those languages...

There is also the hard way to do this, but most users aren't interested in the hard way.  ;-)


How to fix the ubuntu file system /dev/sda error?

go with fsck -n /dev/sda1 to display the problem, so we can figure the problem out easily.


iTunes on PlayOnLinux doesn't appear in search

ITunes is one of those pieces of software which does not run in Linux.  You could try to use PoL (although you have already discovered it does not work) or you could try Wine, although it is also not supported there.

The only workable solution that I found was to run Windows in a virtual machine, and run ITunes there.  My experience with VirtualBox was that ITunes will run in WinXP and Win7, but not fully in Win8.  VMWare Player is able to support ITunes in Win8, mostly, but I have some problems with older Ipods in Win8/VMWare, and generally stick to Win7/VMWare at this time.

It you decide to use VirtualBox, you will need to capture the USB connection of the IPad/Pod/Phone device using the USB filter capability of VirtualBox.  It takes a little playing around, but can be done.


How long do HWE kernels maintain/support in Ubuntu?

You can see it in the table

You can use 3.13 till 14.04 EOL in 2019.

3.16 will be supported till August 2016.

More general


How can I install NVidia driver from a .tar.gz?

Please go to System Settings -> Additional Drivers to install your driver. If no driver is listed there, chances are there is no proprietary Nvidia available for your version of Ubuntu.


Quit all instances of `gnome-terminal` via a command

Despite it's name, killall (and kill) sends SIGTERM signal to all the process with the same name, also you can personalize the signal sent with the -s switch. So, instead using killall gnome-terminal you can use killall -s {signal} gnome-terminal.

I haven't find out what signal can be interpreted as click at the close button, but my guess is, that it's a GUI hook that trigger such behavior. In gnome2 there was a "Close all" option in the task list, but in gnome3 seems such option it's lost.

After a lengthy discussion over U&L

With the help of slm who gave me the idea, you can simulate the alt + F4 key combination on several instances of gnome-terminal using xdotool search --name terminal key --window %@ alt+F4. You must be sure you have installed xdotool using:

sudo apt-get install xdotool

But, lets me explain in detail:

search do a search of all window with a determinated characteristics. --name switch will look for windows with the content on the title bar. key tells xdotool that we are going to use keyboard commands. --window tells to use a determinated ID for the key command, if not set it will use %1 from the stack. %@ means to use all the stack of ID's. alt+F4 tells the key combination to send.

More information:

www.semicomplete.com/projects/xdotool/xdotool.xhtml


Cannot open gnome-terminal ubuntu 15.10 (Bad Locale)

All you need to do to fix this is regenerate the broken locale files. just do
sudo locale-gen
and check if the file
/etc/default/locale
has the following 2 definitions

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

are set possibly with other LC_* values for the Time , Numeric, Monetary types of the country you're in.


Ubuntu 16.04 cannot connect to wifi: The Wi-Fi network could not be found

I had a similar problem after trying to configure a new wifi connection, with WPA2 with certificates and passwords and whatnot.  After failing to get this to work, I discovered that my previous connections (which I hadn't touched) also would fail to come back up.  After much mucking about, the solution was to delete the (probably misconfigured) new connection (nmcli con del <connection-name>). After that, the old connections started working again.


So the problem was "solved" by

enabling a random option in gnome-tweak-tools > keyboard and mouse > additional layout options > Alt/Win key behavior
closing the window
opening it again and set to disabled (which was default)

as suggested in this question (comments).


How to install Git in Lubuntu (APT is "Unable to locate package libcur14-gnutls-dev")?

The problem is that there is a typographic error in your installation command. Specifically, you have told apt-get to try to install a package called libcur14-gnutls-dev. But the correct name is libcurl4-gnutls-dev.

That is, you have an l (i.e., a lower-case L) where you should have a 1 (a numeral one). It is (semantically) "lib curl 4," not "lib cur 14".

So run this instead:

sudo apt-get install libcurl4-gnutls-dev

(Also, when installing packages on the command-line, it's advisable to run sudo apt-get update first, unless you have done so recently.)

However, you might not want to install Git this way at all.

The instructions you're following appear to be for compiling Git yourself. That's a perfectly valid thing to do, but for most people it's a lot of unnecessary work, plus if you do that, the system will not be able to upgrade Git automatically when a newer version is available. (It may also, in some ways, have trouble integrating with the installed Git, because the package manager won't "know" it is installed.)'

Therefore, as Tarun suggested, you may just want to install Git directly (Ubuntu has Git packages, which is way faster and simpler!).

sudo apt-get install git-core

Typically you only need to build Git from source yourself if you need a version newer than the version available for Ubuntu. Even in those situations, there are often alternatives, so feel free to let us know more about what you need.


How do I share files between two versions of Ubuntu on different partitions?

You can create a separate (non-LVM) partition for that purpose. When you boot either of the Ubuntu versions you can mount that partition at the location where you want to have the data files.

For this to happen automatically you will have to add this partition to the /etc/fstab file in both your Ubuntu instances.

For testing, you can do first mount the partition manually and then later add it to /etc/fstab. Make sure to backup your fstab file first and have a live-disk at hand to restore it if there is a problem and your system won't boot. Also see AutomaticallyMountPartitions

Another easier option is to run Ubuntu 12.04 in a VM and then mount a shared folder.

I run Ubuntu 14.04 at work, but some projects that I work on require Windows. I have Windows XP and Windows 7 running in VirtualBox VMs and have a folder on my Ubuntu machine that is mounted as a drive under Window. This is where I share and move data between Windows and Linux.


Sending data to port does not seem to be working on Ubuntu Linux?

Instead of using tcpflow, you should maybe consider using nc instead like this:

nc -l 2003

You are now listening on port 2003. To send data to port 2003, you can open a separate terminal and type:

nc 127.0.0.1 2003

This opens a connection to the listening terminal. Anything you type in that terminal thereafter will be sent to localhost:2003 and will output on the listening terminal. Furthermore, anything typed in the listening port will be sent to the terminal output of the other.

Also, instead of using the second command you can use the same command you tried earlier instead:

echo "hello" | nc 127.0.0.1 2003

The listening terminal should output hello before closing the connection.

For more information, type the following command in a terminal to view the manual:

man nc


Where can I find the gnome applets scripts that I can look at them?

As far as I see it the relevant code is in panel-action-button.c. This code handles the shutdown and other things. You find the complete code at git repository of gnome-panel.


Sudoers NOPASSWD for command not working but ALL is

Turns out I had sudo aliased in my .zshrc. Removing the alias fixed the issue. Now it works as it should.

This link was useful:
Sudo arguments not working


How to disable Telegram auto startup in Kubuntu 16.10?

I had the same problem that you're experiencing albeit in a Xfce. Telegram starts at login and apparently it cannot be changed through the default startup/session settings.

The most probable cause for this is that your sessions cache is corrupted, and if that's the case then you'll have to manually clear it. In my case, this indeed was the problem and clearing the session cache fixed it.

Unfortunately unlike Xfce it seems that KDE does not provide an obvious way to do this. But perhaps it can be done with Session Management in Startup and Shutdown as is given here: https://userbase.kde.org/System_Settings/Startup_and_Shutdown. Starting with an empty session should work the same as clearing the cache. You can find further discussion about this here: How to delete a manually saved session.

In Xfce this can be done by going into the Settings Manager > Session and Startup > Session tab > Clear saved sessions.

I hope this helps.


try sudo apt-get install hpijs-ppds or sudo apt-get install hp-ppd
I just use the 127.0.0.1:631 to config my printers and I don't use HP, so I don't know if these will automatically get populated in your tool.
But I usually end up going through this because my (ubuntu)raspberry pi cups' driver selection is not filled out with all the drivers I need... I think also I add foomatic and one other that escapes me (maybe openprinting), until I eventually get what I need...
I generally have to something like apt-cache search ppd or apt-cache search cups to search what is available.


In the same location:

unlink documents

Assuming you want to rename documents2 to documents

mv documents2 documents


Can I make all commands have feedback if they've worked or not worked?

To check if some command worked successfully or not you can check the return status, given by $?, of the previous command with:

echo $?

A return status of 0 means the command completed with successfully, while an non-zero output (error code) would mean some problems were encountered or there's an error and the category can be known from the error code. The Linux/C error codes are defined in /usr/include/asm-generic/errno-base.h and /usr/include/asm-generic/errno.h.

Also in bash, the .bashrc defines an alias alert which can be used to notify with the status of completion. You'd have to attach the alias with the command or command combo like this:

some_command --some-switch; alert

You can append the following line of code to your ~/.bashrc file to display the return status of the last command executed..

# show the return code of last command executed
PS1='${debian_chroot:+($debian_chroot)}\u@\h(lst ret. $(echo $?) ):\w\$ '

(open the file ~/.bashrc with text editor of your choice, and copy the above line, paste it in the file and save. Launch a new instance of the terminal, and you should have it in action. Or instead you could define some function and use it with PS1 like like illustrated below.)

a little demo:

hash@precise(lst ret. 0 ):~$ ls -sh someFileThatsNotThere
ls: cannot access someFileThatsNotThere: No such file or directory
hash@precise(lst ret. 2 ):~$
hash@precise(lst ret. 2 ):~$ aCommandThatsNot
aCommandThatsNot: command not found
hash@precise(lst ret. 127 ):~$
hash@precise(lst ret. 127 ):~$ echo "you should get a lst ret. 0, I believe the system has echo installed :)"
you should get a lst ret. 0, I believe the system has echo installed :)
hash@precise(lst ret. 0 ):~$
hash@precise(lst ret. 0 ):~$ sudo touch /tmp/someTestFile
[sudo] password for hash:
hash@precise(lst ret. 1 ):~$
hash@precise(lst ret. 1 ):~$ chown $USER:$USER /tmp/someTestFile
chown: changing ownership of `/tmp/someTestFile': Operation not permitted

Just playing with PS1 :) ..a little more,

function showRetStat {
## line1: initiliazing retStat with the return status of the previous command
retStat=$?
## line2: Left padding the return status with spaces. If you prefer the unpadded one, you can just replace
# $retStatFtd in the lines initializing noErrStr and errStr among other possible ways.
retStatFtd=$(sed -e :a -e 's/^.\{1,2\}$/ &/;ta' <<< $retStat)
## lines3&4: Setting the strings to display for a successful and unsuccessful run of previous command
# which we are going to display with the prompt string. Change the strings to display text of your
# choice like you may set noErrStr="yippie!" , errStr="oopsie!" in place of what they're now.
noErrStr="retStat "$retStatFtd" :: PASS ^_^"
errStr="retStat "$retStatFtd" :: FAIL x_x"
## line5: Applying the logic and display the proper string at the prompt. Space padded number i.e. retStatFtd, here,
# worked in the logic, originally I intended to use this for the display while retStat in the conditional
# check; you could make the function one statement less if you want to.
echo "$([ $retStatFtd = 0 ] && echo "$noErrStr" || echo "$errStr")"
}

## Combining the function showRetStat into the prompt string.
PS1='${debian_chroot:+($debian_chroot)}\u@\h($(showRetStat)):\w\$ '

(you can modify the function to make it more fancy, something like @gronostaj does in his post.)


I restarted for a Ubuntu update and I now have a command line when it boots. How do I get back to my desktop?

It is maybe a problem with your grub.
If you want to start the desktop, enter your login and your password, then launch startx. But that will not solve your problem.

You have to check your grub config file:

grep 'GRUB_CMDLINE_LINUX_DEFAULT=\|GRUB_CMDLINE_LINUX=\|GRUB_TERMINAL=' /etc/default/grub

You should get :

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
 #GRUB_TERMINAL=console

If not make a copy of this file:

sudo cp /etc/default/grub /etc/default/grub.bak

And change it to get the values that I give you

sudo nano /etc/default/grub

Update your grup :

sudo update-grub

Then reboot and it should work again.


MySQL 5.6 on Ubuntu 16.04 common files issue

As I found trying multiple roads, I answered my own question, but since it took a while, i figured it would be better to answer it instead of deleting the question.

First off, remove all mysql packages and files (backup the important ones):

apt purge mysql*
apt autoremove
apt autoclean
rm -rf /etc/mysql/

You should now be clean.

Now go here and download the version you need, it contains all the dependencies except libaio1, so:

apt install libaio1
tar -xvf downloadedMysqlPackage.tar
dpkg -i mysql-common-xxx.deb
dpkg-preconfigure mysql-community-server-xxx.deb
dpkg -i mysql-community-server-xxx.deb
dpkg -i mysql-community-client-xxx.deb
dpkg -i libmysqlclient18-xxx.deb

And you're good to go!


How to install firmware-mod-kit in Ubuntu 14.04

At first use tar -zxvf firmware-mod-kit tar.gz or you can extract by right click on it and click extract here.
Then go inside of newly created folder where the file is extracted.
Make sure you first read a file called INSTALL or INSTALL.txt or README. Check if there is any of these files with the ls command, and then display the right one with:

xdg-open INSTALL

The file will contain the right indications to go on with the compiling process. Usually the three "classical" steps are:

./configure
make
sudo make install

You may also need to install some dependencies, generally after some configure error which will tell you what you are missing. You can also use checkinstall instead of make install.

See here https://help.ubuntu.com/community/CheckInstall


Add this line in your squid.conf file:

dns_v4_first on


You have to run Firefox as root.

Firefox is trying to update its system files from your personal account.

It is a little wonky, but the stock version does not have this issue because it updates with the rest of the system.

1- Close all other Firefox windows.

2- Open a terminal in the folder that you installed firefox into (mine ended up in ~/Downloads/firefox).

OP had his installed at: /opt/firefox_dev/firefox

3- Run:
sudo ./firefox-bin in that terminal. The terminal must be "in" whatever folder you are running Firefox Dev edition in.

4- Help -> About -> Update

I probably shouldn't need to mention this, but don't visit any websites in this mode, and close it as soon as it is done.


How to scan internal memory of my Android phone around a certain index entry in order to find lost utf-8/LF (for Linux/Adroid) text?

the solution to your problem is:
cd szTheCorrectDirectoryName
cp text.txt~ text.txt

which will restore the backup of the text file.
You can do the same in Nautilus as well: rename the existing text.txt to text.new and then rename text.txt~ to text.txt
If that doesn't work, your text file is lost, Sorry!


Ubuntu 18.10 kernel 4.18 crashes when 4k monitor is plugged in

As ArcanaTigris mentioned in the comments, Switching to the NVIDIA driver in the additional drivers panel does fix this issue, however it dramatically increases boot times from under 20 seconds to over a minute.

While this next part is outside the scope of Ubuntu specifically, It may be useful to some readers:

Linux MINT has a version of the nouveau driver that works with my 4k monitor out of the box. In the end I switched to MINT because of the increased boot times incurred from switching to the NVIDIA driver for ubuntu. Mint also suffers from slow boot times if you switch over to the NVIDIA driver.

Manjaro also has a version of the driver that works out of the box but limits screen refresh rates to 30HZ at resolutions larger than 1920x1080. This is what I was trying to use before switching to Ubuntu, but the low refresh rate was awful.


Setting up /etc/network/interfaces for sandboxed network with 12.04 LTS

Ok, I think my main mistake was leaving off the "inet" on the second adapter.  The new machine reboots happily.  I think there must have been another problem with the original machine that it didn't like the cut-down file above.

Also, a very useful command (for now?) for testing this file is:

sudo bash /etc/init.d/networking restart

This is deprecated;  technically I think you're supposed to do ifdown and ifup for each of your interfaces now.

Here is my /etc/network/interfaces:

auto lo
iface lo inet loopback

#net
auto eth0
iface eth0 inet dhcp

#loc
auto eth1
iface eth1 inet static
  address 172.16.1.1
  netmask 255.240.0.0
  broadcast 172.31.255.255
  network 172.16.1.1

I still don't know if this file is actually required or not, especially once I set up shorewall.


mouse middle click not working after using trackball

OK, just to report that I fixed problem after reading some tutorials and a lot of experimenting, and I hope somebody will find this useful.

Problem was that, after installing trackball, somehow mapping for buttons for any mouse was changed (or I just made some mistake while installing trackball). So, I only had to do remapping.
First I found device with

xinput list

then run

xinput get-button-map <device id>

and remember numbers (output) of this command.
Then I used

xev

to check which number is assigned to which function
and then I replaced those numbers with my required button mapping, using:

xinput set-button-map <device id> 1 9 3 4 5 6 7 2 8

You might need to play around and see what configuration works best for you.


hwinfo in Ubuntu 12.04 has been discontinued in Ubuntu 14.04, but later it was recontinued in Ubuntu 15.10, Ubuntu 16.04 and onwards. In Ubuntu 14.04 hwinfo can be installed as follows:

Download libhd21 dependency package for hwinfo matching your OS's architecture from Debian Package: libhd21 (21.6-1).
Download hwinfo_21.6-1 matching your OS's architecture package from http://ftp.debian.org/debian/pool/main/h/hwinfo/
Double click on the libhd21 package that you downloaded to open it for installation in the Ubuntu Software Center.
Now that the dependency package has been installed, double click on the hwinfo package that you downloaded to open it for installation in the Ubuntu Software Center.
hwinfo can now be run from the terminal, including the framebuffer option which can be run using the command: hwinfo --framebuffer For information about other hwinfo options run: man hwinfo

These steps were tested on Ubuntu 14.04.


How play music with Ubuntu 18.04 using Airplay?

As documented in the issue at https://github.com/hfujita/pulseaudio-raop2/issues/71 you will need to pass all necessary options at load time of the module. You can see a list of supported parameters at https://gitlab.freedesktop.org/pulseaudio/pulseaudio/blob/master/src/modules/raop/module-raop-sink.c#L35

This gets you something like:

pacmd load-module module-raop-sink --name=X --sink_name=Y --server=Z ... --username=foo --password=bar


Phpmyadmin doesn't work with other user than www-data?

You need to edit /etc/apache2/conf.d/phpmyadmin.conf:

php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp

to a writable folder for your user.

Or change ownership of that folder:

chown user:user /var/lib/phpmyadmin/tmp


It was not because of an update. It is a known bug with the I2S Audio Interface.

Simply do two cold reboots (fully shut down your computer twice). This will fix the audio issue.

Note : If you are using dual boot setup, you will need two cold reboots everytime you switch from one OS to another (Windows to Ubuntu, Ubuntu to Windows...)

Refer to this bug report for more information.


Split text file into several ones when pattern appears, with command line in linux

You could use awk with some redirection:

awk -F/ '/^PAT/{close(file);file = $NF; next} /./{print >> file}' foo

The result:

$ head page0*
==> page01 <==
ABC
DEF

==> page02 <==
GHI
JKL

==> page03 <==
MNO
PQR

Essentially, for each line beginning with PAT, I'm saving the last field (via a field separator of /) the variable file, and then printing every non-empty line (/./ matches lines with at least one character) to the name contained in file.

Note that it's important to close the previous file at each loop to prevent a "makes too many open files" error when there's "a lot" of file created.


The only difference between Ubuntu and Lubuntu is that they both use different Desktop Environments and some different packages. Ubuntu uses Unity whereas Lubuntu uses LXDE.

According to Lubuntu Wiki:

  Both Lubuntu and Ubuntu share Two Major Important Things:

Same Core System
Same Repositories

  Lubuntu and Ubuntu belong to the same family and talking about each as
  totally different two systems is not correct since they have some
  things in common.

  The differences between Lubuntu and Ubuntu are:

Different DE - Lubuntu uses LXDE while Ubuntu uses Unity as the default DE.
Different Default Applications

  Other than that, they are the same. The DE is what makes Lubuntu a
  lightweight OS, and of course the selected applications too because we
  make sure to use the lightest applications which are not resource
  hungry.

So, essentially Ubuntu Server with no GUI would be the same as Lubuntu Server with no GUI. Hence, you can go on downloading Ubuntu Server and install LXDE later, if you want a Lubuntu like GUI.


Screen tearing (very noticable during video playback) with HD3000 AND HD Radeon 6630m

it's a nasty bug reported in https://bugs.freedesktop.org/show_bug.cgi?id=37686 and also in https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/755841

and it's still open!


apt-get upgrade complains about authentication of packages

The issue appears to be a proxy configured on our Firewall. I am working with our IT department to figure out what setting it is exactly but what was happening is when apt-get would make a call to */Release.gpg and the content-type was set to "text/html" the proxy would deny the request.

I wish apt-get update would indicate issues when downloading the files as this would of saved a lot of time.


What is the normal temperature for my computer?

Stop worrying! ;-) My Fujitsu Siemens is running at 58°C at low load, 75°C at medium load and 85°C at high load. the NVidia CPU is running at 45°C when disabled and 85°C-93°C while gaming.

To get the maximum temperature (T°) for your own system just:

sudo apt-get install lm-sensors
sensors

and you should get something like:

acpitz-virtual-0
Adapter: Virtual device
temp1:        +58.8°C  (crit = +110.8°C)

coretemp-isa-0000
Adapter: ISA adapter
Core 0:       +54.0°C  (high = +105.0°C, crit = +105.0°C)
Core 1:       +51.0°C  (high = +105.0°C, crit = +105.0°C)

where you should keep the T° 5°C below the critical T° to have a very long system life...


Recovering from a failed upgrade (14.04 -> 16.04, but probably applies to all versions)

I'm not totally sure exactly what I did, but it seems that this command got me rolling again:

sudo apt-get --reinstall dselect-upgrade


How to add password in WD hard disk drive?

If you want actual security, you can use LUKS to set up a secure volume on your drive. LUKS is an encryption provider and security system for drives being used under Linux.

Note that if you use LUKS+EXT4, your hard drive will not be readable under anything but Linux.

If not already installed, you'll need to install the encryption packages needed.

 sudo apt install cryptsetup

Open the Disks program from the Dash (the Ubuntu icon in the top-left corner of your screen.
Select your external hard drive from the menu on the left of the window. Be sure you select the correct drive. Not doing so may cause irreversible data loss.
Delete any existing partitions on the drive, by right-clicking and selecting Delete.
Now, select the block of empty/unallocated space, and choose Create Partition.
During partition creation, be sure to check Encrypt underlying device. It will prompt you for a password and similar information.
When everything looks right, confirm your settings.

The system will then get to work creating your secure partition. You will need your password every time you attempt to mount the drive in the future. When your drive is sitting alone, all data on the drive will additionally be encrypted, so no data forensic techniques can be used to bypass the password.


How to create a folder named .ssh in the user’s home directory in ubuntu?

.ssh directory is reserved for ssh keys and configuration.
In case you want to generate your ssh key, execute this command

ssh-keygen

and follow the instructions.


Unable to Boot System with NVIDIA DKMS Module - No syslog!

Solution: I ditched Ubuntu and its derivates and moved to Arch based distros. I chose Manjaro KDE to be specific and it works absolutely fine with my hardware running kernel 4.9 and latest NVIDIA drivers - no issues whatsoever. Goodbye Ubuntu.

Alternative Solution (possibly): Pretty much the only root cause that makes sense is that even though I had secure boot disabled in BIOS, it was still enabled somehow (BIOS bug or UEFI overriding BIOS settings, I don't know). Unfortunately I had already moved to Manjaro before I could try this solution (the mokutil one) which may or may not had solved my issue.


Is there a precompiled Nextcloud Ubuntu client?

Found this one:

sudo snap install --edge nextcloud-client-kyrofa

source twitter.

It seems to work, but there seem to be 2 problems: broken tray icon and keychain.


As mentioned by @steeldriver , the problem was that the executable was not meant for the target system, because the cross compiler wasnt properly set in the makefile.


Ubuntu Goes to Black Screen After Any Chosen Grub Options

Ubuntu has some known issues with Windows 8 computers (more specifically, with the UEFI Bootloader..) even though it gets advertised as being compatible. Can you try turning UEFI off in your bios, and then try again with installing?

Here is a link with instructions how to do so: http://bhaismachine.wordpress.com/2012/06/01/how-to-disable-uefi-and-dual-boot-ubuntu-and-windows-on-an-uefi-enabled-laptop/


1) Turn on the computer.
2) Press the F2 key when the VAIO logo appears.
The BIOS setup screen appears.

If the screen does not appear, restart the computer and press the F2 key several times
when the VAIO logo appears

source:https://docs.sony.com/release/VPCEE_VPCEF_series.pdf


The video lens in unity is not showing up

Its worth checking that the video lens package has actually been installed.

Try the following in a terminal:

sudo apt-get --reinstall install unity-lens-video

Logout and login and examine your dash.


Linux Batch File Similar to Windows Batch File (for backing up a database)

It looks like your batch file is designed to back up a MySQL database on the local machine. While it is possible to translate the .bat commands into equivalent bash commands, the names of the executables, the directories, etc. would all be different.

Instead, you might want to try MySQL-Maint, an open-source Linux-friendly bash script designed to do exactly what you are doing.


The Kubuntu install CD works just like Ubuntu's (in my experience). You should be given the option to keep your data intact, while upgrading the the System files. Of course this depends on how your system is setup. If you use disk encryption, you may not be presented with this option.

Kubuntu can alternatively be setup on your system without an install CD, by adding the kubuntu-desktop packages, while leaving the vanilla Ubuntu system mostly unchanged. This may be a better option if your disks are encrypted.

In a terminal, type:
sudo apt-get install kubuntu-desktop
Then choose Kubuntu as your desktop environment at login.

Optionally, if you wish to remove the Gnome Desktop Environment (ubuntu's default) and make KDE your default, You can install Kate desktop manager with:
sudo apt install kdm

then remove the Gnome desktop manager:
sudo apt remove gdm

and finally, set KDM as your default desktop manager with:
dpkg reconfigure kdm


How to uninstall a game which is not letting me uninstall it?

Option 1
I can't say that this applies to Wine. This is a method of removing software that applies to Windows too (except paths and registry). If the provided uninstaller doesn't work anymore, all you have to do is manually check for:

entries in Program Files folder: ~/.wine/drive_c/Program Files/. The folder you're interested in has usually the same name as the software you installed or the name of the developing company. Delete it.
entries in Application Data folder: ~/.wine/drive_c/users/<your_name>/Application Data/. Again, look for folders matching software name or developer company and delete them. You should also check the public application data folder at: ~/.wine/drive_c/users/Public/Application Data/.
registry entries. Wine stores registry data in three files: ~/.wine/system.reg, ~/.wine/user.reg and ~/.wine/userdef.reg. Open each with a text editor and look for specific keys related to software or developer name and delete those keys.
some software places files in ~/.wine/ProgramData and/or ~/.wine/Windows. Deleting folders in these places can break your current wineprefix, so you'll end up with Option 2.

Option 2
Because that is a Windows application running in Wine, to completely remove it you can delete the current wineprefix
rm -rf ~/.wine

Note that after this, if you want to use Wine, you'll have to reconfigure it (i.e. install DLLs, runtimes and other software)


Wubi cannot retrieve the required disk image file

If you look into that temp\wubi log file, check for an error. I got authentication problems and had to enable my firewall for wubi.exe for both inbound and outbound. Check it dude.


Can you get rid of the install or try screen?

It sounds like you want to have Ubuntu installed to your flash drive, not use it as a live disc. First, you're going to want to back up your files. You can install Ubuntu to the flash drive like a normal hard disk, then restore your files from your backup. I am not sure if this would allow you to switch between computers or not, but in theory the generic drivers should allow it.


What is the difference between Terminator and Tmux ?

Terminator is easy to install and it does exactly what it's supposed to do - it can split terminal windows both horizontally and vertically, according to user's requirements. It also allows to keep multiple tabs opened in case splitting one window is not enough.

Tmux lies somewhere between Terminator and screen, combining ease of use with basing on the plain terminal only.

Here are the advantages of tmux over Terminator:

Portability - tmux works on all systems able to handle plain, old
terminal.
Scriptability - tmux can be scripted, so that setting up windows and
panes takes nothing more than one or two keystrokes.
Server-client architecture - tmux can be used to share sessions
between users.
Tweaks and options - both tmux and Terminator are easy to get with,
but it's tmux that allows to go further and offers wide range of
configuration hacks.1

1Source: Łukasz Wróbel


Partition not shown correctly in Ubuntu 14.04.02 LTS installer + wifi network not shown

If you are running Windows try creating an 'ext4' partition on the unallocated space. I was facing similar problem with Windows 8 but creating a partition beforehand solved the problem. Personally i use Minitools Partition Manager as the windows partition manager does not allow creating a ext4 partition.


How do I keep a window open in front of other windows?

Right-click on the title bar of the window and select “Always On Top”.


After a lot of man systemd.network reading, I came to the following workaround:

rename file /run/systemd/network/10-netplan-enp0s4.network to something without .network extension.

create file /etc/systemd/network/10-netplan-enp0s4.network with the following contents:

[Match]
Name=enp0s4

[Network]
DHCP=no
DNS=192.9.43.50
DNS=192.9.43.51
Address=192.168.1.11/24
Gateway=192.168.1.4
Domain=domain.domain


What are some good SVN capable GUI diff and merge applications available for Ubuntu?

Save the shell script from the link
https://mail.gnome.org/archives/meld-list/2008-April/msg00010.html
into a file called ~/bin/svn-diff-meld.sh:

#!/bin/sh
# SVN Diff Wrapper for Meld
# KOG 2008-02

left="$6"
right="$7"

meld "$left" "$right"

Then make the file executable via chmod +x ~/bin/svn-diff-meld.sh.

Create ~/.bash_aliases and paste in

alias svndm='svn diff --diff-cmd=~/bin/svn-diff-meld.sh'

but remember to replace tilde ~ with your absolute path because it needs to find the file e.g.

alias svndm='svn diff --diff-cmd=/home/arbartar/bin/svn-diff-meld.sh'

if your username is arbartar.

Run ~/.bashrc to update aliases.

Now you can run svndm some_directory/some_file within your local SVN and the GUI would pop up.


Recover drive / path name back to previous name

Linux automatically mounts removable media under a folder /meda/$USER (where $USER should be replaced by your login name. To that aim, a mount point, i.e. a folder where the medium will be mounted, is created. As name of the folder, the file system LABEL is used if it is set. Otherwise, the system used the UUID of the drive, as is your case. When the medium is unmounted, either by yourself or during system shutdown, that folder is removed.

In your case, the folder was not removed because of an improper shutdown. Thus, next time the system tries to mount the drive, it attempts to create a mount point, but sees that such folder already exists. Accordingly, the system will create a different folder.

To restore the "original" mount point:

Unmount the medium. You can simply do this from your file manager as normal user.
Delete the original mount point of the media. You need to do this as administrator (root). The easiest way would be using the terminal, with the command sudo rmdir /media/user/839bfea0-099a-4971-a198-9312992d4a57. If that would not work because for one or another reason, there are files in that folder, then first check the contents of the folder. If there is nothing of interest, then delete the folder with a similar command, where you replace rmdir by rm -rf.

Next time you reinsert the medium, it will again be mounted on the original mounting point.

Tip: If you give the medium a LABEL, (for example "Backupdrive") then the label will be used as mount point. This will make the mounted medium much more recognizable.


Mistake in shell function to count even numbers

You just forgot to replace $# with ($)element in the for loop:

function nevens {
  local sum=0
  for element in $@; do
    let evencheck=$(( element % 2 ))
    if [[ $evencheck -eq 0 ]]; then
      let sum=sum+1
    fi
  done
  echo $sum
}

Now to test the function:

$ nevens 42 6 7 9 33
2
$ nevens 42 6 7 9 33 22
3
$ nevens {1..10..2} # 1 to 10 step 2 → odd numbers only
0
$ nevens {2..10..2} # 2 to 10 step 2 → five even numbers
5


Problem by Access to ubuntu shared folder

Install the package libpam-smbpass if it is not installed yet. Samba requires this package to synchronize the users on the pc that do the hosting to samba users. I had the same issue and this resolved it. Just remember to restart the samba services after installing that package.


Is there a way to use Threema on a Ubuntu desktop?

There are some options:

Threema Web (web.threema.ch) is Threema’s web client. It allows you to use Threema on the desktop without compromising security.
By scanning a QR code, desktop and mobile device are connected at once, and all conversations are fully accessible on the desktop.
More details on the Threema webpage.

openMittsu is a cross-platform open source implementation and desktop standalone client for the Threema Messenger App. More infos on the openMittsu Github page.
You can use the repository, or install the packages directly.
If you like to use the repository, add the GPG key for the repository:

wget -O- https://packages.openmittsu.de/openmittsu.packages.gpg.key|apt-key add -

Now, add the repository. As root or using sudo, create a file called openmittsu.list in /etc/apt/sources.list.d/ with the following contents:
deb https://packages.openmittsu.de/apt/debian stretch main

You can now install (or update) openMittsu using:
sudo apt-get update
sudo apt-get install openmittsu

Rambox, an Electron based Free, Open Source and Cross Platform messaging and emailing app that combines common web applications into one.
Threema is among the available services along with Wire etc. There is also an option to add services manually.
To install Rambox, first download the deb package right for your system from their official GitHub page. Then run the following command in Terminal

sudo dpkg -i /path/to/the/package/package-name.deb


trigger script on open or close of cd drive

The only solution I've found so far is to constantly poll the drive for its status with ioctl. See Is there a command that detects if the CD drawer is open or closed?
It's important to close and reopen the file descriptor on each poll; otherwise, you might not be able to mount the CD or DVD inserted.
YMMV, and I'm a newb, so there's probably a better way. On my RHEL 7 box with a USB DVD drive I see the drive status change to 2 (CDS_TRAY_OPEN) when the tray is opened and briefly to 3 (CDS_DRIVE_NOT_READY) when closed before changing to 1 (CDS_NO_DISC) or 4 (CDS_DISC_OK).

I had high hopes for udev, but with my drive I only saw events for adding or removing the drive or opening the tray when it contained a disc or closing the tray. I saw no event for opening an empty tray. You can try running udevadm monitor and see if you get events for opening or closing your tray. If so you can make udev rules to run your script when those events happen: https://opensource.com/article/18/11/udev
All my testing was on RHEL 7, so sorry if any of it is irrelevant for Ubuntu 18.04.


can't get touchegg to work with my touchpad

You need to disable two and three finger gestures of Ubuntu to make the touchegg gestures work. For detailed instructions consult the Ubuntu Wiki Multitouch.

The touchegg FAQ provides the following as a fast and easy solution:

  You can simply execute this commands to allow Touchégg to use this gestures:

 synclient TapButton2=0
 synclient TapButton3=0
 synclient ClickFinger2=0
 synclient ClickFinger3=0
 synclient HorizTwoFingerScroll=0
 synclient VertTwoFingerScroll=0


How can I update the NVIDIA drivers to version 390.77?

The NVIDIA drivers version 390.48 from the official Ubuntu 18.04 repositories are those ones which were current at the time when Ubuntu 18.04 was released. There is a GPU Drivers PPA from which you can install newer versions. Execute the following commands, if you want to install one of them:
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt install nvidia-driver-<version>
sudo reboot

Replace <version> with 390 if you want the latest stable long-lived branch drivers.
Replace <version> with 396 if you want the latest stable short-lived branch drivers.
Currently the latest stable drivers from the NVIDIA long-lived branch are 390.77.
Currently the latest stable drivers from the NVIDIA short-lived branch are 396.51.
Addressing the comments that the 390.77 and the 396.51 drivers are not visible -
here is the proof they are (screenshot of the PPA and apt after adding the PPA).

$ apt policy nvidia-driver-390
nvidia-driver-390:
  Installed: (none)
  Candidate: 390.48-0ubuntu3
  Version table:
     390.48-0ubuntu3 500
        500 http://archive.ubuntu.com/ubuntu bionic/restricted amd64 Packages
$ apt policy nvidia-driver-396
N: Unable to locate package nvidia-driver-396
$ sudo add-apt-repository ppa:graphics-drivers/ppa

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update

$ apt policy nvidia-driver-390
nvidia-driver-390:
  Installed: (none)
  Candidate: 390.77-0ubuntu0~gpu18.04.1
  Version table:
     390.77-0ubuntu0~gpu18.04.1 500
        500 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic/main amd64 Packages
     390.48-0ubuntu3 500
        500 http://archive.ubuntu.com/ubuntu bionic/restricted amd64 Packages
$ apt policy nvidia-driver-396
nvidia-driver-396:
  Installed: (none)
  Candidate: 396.51-0ubuntu0~gpu18.04.1
  Version table:
     396.51-0ubuntu0~gpu18.04.1 500
        500 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic/main amd64 Packages


How to save theme settings and restore it later?

I have found a way to save  and restore theme settings. Actually It restores all your personalized settings.

To Backup

Open a terminal and do this

cp ~/.config/dconf/user  ~/settings-backup
cp -r ~/.gconf/apps/metacity ~

This will copy the user settings in your home directory in a file named settings-backup. The window manager theme (window framing) will be stored in a folder named metacity in the home folder

To Restore

Open a terminal and do this (I assume your backup file is in your home folder with the name settings-backup)

cp ~/settings-backup ~/.config/dconf/user
cp -r -v ~/metacity ~/.gconf/apps

This will restore the theme  settings and the window manager settings. (Note that, If you delete a theme, it can't restore that theme)

Logout and Login again, to see all your settings are restored.


How can I create a menu entry for my snap

qcomicbook in the Snappy Playpen is a good example of this. It ships an icon and a .desktop file in a special directory called ./setup/gui.

For the desktop file, you can in most cases just copy the one that is shipped with the upstream source, or create one from scratch (Desktop Entry Specification).

Note the following when you create the Icon and Exec entries:

For Exec just use whatever you defined in the apps stanza of the snap.
For Icon use ${SNAP}/meta/gui/ because that's where the icon will be shipped.

In the example of qcomicbook, this is:

Exec=qcomicbook
Icon=${SNAP}/meta/gui/qcomicbook.png


You can not create a bootable Windows 7 USB with Unetbootin as the snapshot you shared, more over the option to select ISO is not selected in your snapshots


Custom locale settings when launching program from KDE menu

One way is to create this file:

$ cat ~/bin/thunderbird
#!/bin/sh
export LANG=sv_SE.UTF-8
exec /usr/bin/thunderbird $@

and make it executable: chmod +x ~/bin/thunderbird

You may need to log out and log in again, if the ~/bin folder didn't exist previously.


Copy drivers from one ubuntu to another ubuntu

It is possible but it is not advisable. In order for this to work, both Ubuntu installs would have to have exactly the same kernel version, and same architecture (x86 32-bit or 64-bit). You would have to identify the installed .ko module files that are used by the driver, and any other scripts installed by the driver, and manually copy them across. Unless you are an expert you will probably spend more time figuring this out than just installing the driver properly. And you are likely to run in to problems updating - the kernel module packaging system (DKMS) automatically rebuilds modules when the kernel is updated. Unless your system is aware of the copied driver, it will not be rebuilt when your kernel is updated, and so will stop working.


Ubuntu/Debian treats python and python3, and their associated libraries as different packages (rather than one being an upgraded version of the other), since there are fairly few libraries which have a common codebase executable in both python 2 and 3.

Thus, you want python3-numpy, python3-scipy, python3-matplotlib, etc. Unfortunately, python3-matplotlib is not available in 12.04 (it is available from 13.04). You might be able to find a PPA containing it, but I personally don't know one to recommend.

(Other libraries you might want to consider for a scientific python setup might include sympy, pandas, and the various scikit packages).

Edit: Learning python 3 rather than 2 is a sensible goal, but if you're restricted to 12.04 you're likely to find support lacking in a number of libraries. That being the case, the best course is probably to use python 2 while ensuring you write forward-compatible code - see the official porting guide for suggestions.


Dropbox icon not working - Unable to create ~/.dbus/session-bus

Despite not working several times in a row, here is a sequence of things that seemed to bring the icon back to functioning:

dropbox stop
dbus-launch ~/.dropbox-dist/dropboxd start -i

This results in an error "Unable to create /home/~/.dbus/session-bus"
Then:

dropbox stop && DBUS_SESSION_BUS_ADDRESS="" dropbox start

This produced no output, but icon didn't work either.

Reboot.  Icon and its menus seem to work now.
Reboot again.  Same problem reappears - menus don't work.

dropbox stop && DBUS_SESSION_BUS_ADDRESS="" dropbox start

Same error message, "Unable to create /home/~/.dbus/session-bus" however dropbox icon reappears in a different spot on the tray, and menus work.

Late Breaking News:  @Harris found a way to get rid of the error message

sudo chown username.username -R .dbus

Next I will try putting the dbus command into the dropbox autostart file.

[edit]
Now that the dropbox icon menu is working, I can proceed with modifying the autostart.
First, open the icon menu and uncheck "Start Dropbox on System Startup".

I copied my desktop entry: Dropbox replaces this every time it starts so you can't just edit it:

cp ~/.config/autostart/dropbox.desktop ~/.config/autostart/start_dropbox.desktop

then editing the new file thus:

    [Desktop Entry]
Name=Dropbox
GenericName=File Synchronizer
Comment=Sync your files across computers and to the web
#Exec=dropbox start -i
Exec=dbus-launch dropbox start -i
Terminal=false
Type=Application
Icon=dropbox
Categories=Network;FileTransfer;
StartupNotify=false

Finally went to Applications > System Tools > Preferences > Startup Applications and noticed now two instaces of Dropbox as startup programs.  Uncheck the original and rename the other one to Dropbox With Icon Fixed.

Tried this at the command prompt

dropbox autostart n

most of this is reviewed here

This difference being in my case the error message.  Despite that error message the hack seems to work.


How can I learn the command which will start an application in Unity's 'System Settings' from the command line?

The details are all in a setting's *.desktop file.

Go to the directory /usr/share/applications.
Find the *.desktop file for the setting you are interested in.
Open the file in gedit.

For example, to open Brightness and Lock I used the command below.
gedit '/usr/share/applications/gnome-screen-panel.desktop'

The content of the file gnome-screen-panel.desktop is shown below. The fourth line in the file, Exec=gnome-control-center screen, shows that the terminal command to open the Brightness and Lock settings windows is gnome-control-center screen.

[Desktop Entry]
Name=Brightness and Lock
Comment=Screen brightness and lock settings
Exec=gnome-control-center screen
Icon=system-lock-screen
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Settings;DesktopSettings;X-GNOME-Settings-Panel;X-GNOME-PersonalSettings
OnlyShowIn=GNOME;Unity;
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gnome-control-center
X-GNOME-Bugzilla-Component=screen
X-GNOME-Bugzilla-Version=3.4.1
X-GNOME-Settings-Panel=screen
# Translators: those are keywords for the brightness and lock control-center panel
Keywords=Brightness;Lock;Dim;Blank;Monitor;
X-Ubuntu-Gettext-Domain=gnome-control-center-2.0


How to hook up an Epson XP-430 printer to an Ubuntu 14.04 system?

maybe if I add the details for you Brandi:

go here http://download.ebz.epson.net/dsc/du/02/DriverDownloadInfo.do?LG2=EN&CN2=&DSCMI=55539&DSCCHK=5ef6ec128765534a989152269045f12fc58077f2 for the printer driver; you need to know if you have 32bit or 64bit ubuntu installed: maybe check with son-in-law? .. either way, it is epson-inkjet-printer-escpr_1.6.13-1lsb3.2_i386.deb or epson-inkjet-printer-escpr_1.6.13-1lsb3.2_amd64.deb  ... I have highlighted the two different, endings .......

for the scanner, go here http://support.epson.net/linux/en/imagescanv3.php?version=1.3.18 and again, you need to know which version of 14.04 you are using


How to get the tp-link TL-WN723N working on ubuntu?

Look in the Windows drivers cd:

/media/CD176A1/TL-WN725N_WN723N/Driver Files/Windows 7 32bit

for the file netrtwlanu.inf search for RTL8188EU. If you have that do this:

add other drivers on blacklist
sudo gedit  /etc/modprobe.d/blacklist

# Blacklist native RealTek 8188CUs drivers
blacklist rtl8192cu
blacklist rtl8192c_common
blacklist rtlwifi

Go here https://github.com/lwfinger/rtl8188eu

Get the zip from  Download this repository as a zip then:

then:

cd ~/Downloads/
unzip rtl8188eu-master.zip -x
cd rtl8188eu-master/

then do the steps from README.md:

make
uname -r

in my case 3.2.0-43-generic-pae so I use

sudo cp 8188eu.ko /lib/modules/3.2.0-43-generic-pae/kernel/net/wireless/
sudo depmod -a
sudo modprobe 8188eu
ifconfig # and you can see the wlan interface :-)

if it is not RTL8188EU look in that file and write here as a comment the RTL8... you find there


Error installing ubuntu server 14:04 / 15:04

Well no response so far, for me the solution was to use debian server, it works very well in this situation , besides being a very similar operating system.


Can't boot Ubuntu 18.04 -- missing 'lowerdir' -- failed to connect to lvmetad

I did have internet access but DNS was somehow misconfigured.  I was able to reconfigure it as described here with

sudo dpkg-reconfigure resolvconf

I was then able to follow the instructions here for reinstalling nvidia drivers.

My home directory was available from a user login.


run this command to sure what version are you using:

cat /etc/lsb_release

if it has ubuntu 18 so you are right.

you can type pwd and df -h to sure where are you and what is your root partition.


I've now posted this example on the bottom of the original question too, but for completeness I'll include it here aswell:

wget -qO- http://archive.ubuntu.com/ubuntu/pool/main/l/linux/linux-headers-2.6.38-6-generic_2.6.38-6.34_i386.deb | dpkg-deb --fsys-tarfile /dev/stdin | tar Ox --wildcards './usr/src/*/.config

This does not actually prevent downloading of the package file.  But with some further cunningness and ask wget to only fetch a particular range it would be possible, although not automatic.  If you have a wider and more in-depth interest in the subject, it is probably partially covered from the slides and video from a talk at FOSDEM few years ago:

archive.fosdem.org/2007/schedule/events/debian_delta_upgrades

The case here is is only one file, or part of file has changed in a .deb package, how to extract that from the stack of .ar+.gz+.tar without causing a download of the full thing. (Disclaimer: I was one of the speakers).


How to load mouse driver/support in text tty terminals (Ctrl+Alt+F[1-6])?

sudo apt-get install gpm

and reboot

and then it will work

As of 12.04.3 there is no need to reboot.


you forgot this step when adding the repo:

wget -qO- https://deb.opera.com/archive.key | sudo apt-key add -

This command adds the key. Note: wget needs to be installed.


After running updates in 10.10 Netbook Remix, Ralink 5390 Not working

OP reported in Revision 2 of the question that the following action worked for him:

Use synaptic-package-manager
Mark the driver for re-installation
Re-install the driver
Reboot


How is the en_US locale supposed to work with printable characters

I found one way to print those characters using the en_US locale:

Press Alt+F2 and run env LANG=en_US gnome-terminal. Then in the terminal window:

$ printf '\xe5\xe4\xf6\n'
åäö
$

This would indicate that there is no problem with the locale, at least, but it enables ISO-8859-1 encoding as expected.

Edit:

Printing using hexdump works fine too:

$ printf '\xe5\xe4\xf6' | hexdump -vC
00000000  e5 e4 f6                                          |åäö|
00000003
$


How to automate terminal inputs/commands?

Of course, switch to Private Key/Public Key authentication.

This guide will explain how to create and add a public key to GitLab, please notice that you'll have to switch your address from https://… to git@gitlab.com:….

Regarding SSH/SCP, all you have to do is to login to the server once using the command ssh-copy-id <user>@<host_address> (after you've created a private key in the former GitLab guide), instead of actually logging you into the system your public key will be copied and you'll be able to use SSH/SCP without a password.


If you have ssh access to vps - then:
ps aux | grep Vncserver then
 kill -9 pid of Vncserver
then
vncserver -geometry 1920x1080
Resolution can be whatever you want.
Then reconnect to vps using vnc.


Is Unity causing my Macbook to run near-burning hot?

This looks like a problem regarding Unity.It may be too powerful to handle and causes your laptop to overheat.

First of all you can monitor your GPU temperature by typing nvidia-settings in terminal.Alternatively, you can install indicator-sensors by typing the following list of commands:

sudo add-apt-repository ppa:alexmurray/indicator-sensors

sudo apt-get update

sudo apt-get install indicator-sensors

You can  install laptop mode to your ubuntu machine which may solve your overheating problem by typing sudo apt-get install laptop-mode in terminal.

Additionally you may take a look at the power bug issue regarding the Linux Kernel workaround .

Last but not least,you can disable animations and effects from CompizConfig Settings Manager


How to control a torrent file to be downloaded item by item

libtransmission has a python API, so you could script anything you want... but no, that feature is not baked in.

Here's a working example

#!/usr/bin/env python3

import transmissionrpc

tc = transmissionrpc.Client('localhost', port=(9091))

torrents = tc.get_torrents()
for torrent in torrents:
  if torrent.status == 'downloading':
    low = []
    torrent_files = torrent.files()
    for item in torrent_files:
      low.append(item)
    high = []
    for item in sorted(torrent_files, key=lambda x: torrent_files[x]['name']):
      if torrent_files[item]['size'] - torrent_files[item]['completed'] > 0:
        high.append(item)
        break
    try:
      low.pop(low.index(high[0]))
    except:
      pass
    tc.change(torrent.id, priority_high=high, priority_low=low)

I put together a desktop widget to do this for me here.


How can I determine if something is a bug or not?

First, see if the problem has already been reported here on Askubuntu.com. Then, see if the problem is indeed a bug and has been reported at launchpad.net. If you can't find any mention of it, ask a question here.


Problems connecting to sqlserver instance

According to this, the proper way to explicitely set the port is -S [protocol:]server[instance_name][,port], not server:port as you are doing it.

Also, since 1433 is the default port, and on your other ways to test it, you're excluding it, you can also remove it on the sqlcmd options.

I think this is the case because the error says Server is not found or not accessible. Nothing about the driver, so the wrong syntax is making the search for the host unsuccessful.


Ubuntu freeze after successful cuda installation?

I've had the same problem on a Zareason Verix laptop. The problem seems to be that NVIDIA drivers and the CUDA toolkit will not work on an Optimus computer with both Intel and NVIDIA chips. I've been a dozen rounds with support teams from both NVIDA and Zareason and the conclusion is that unless I am willing to modify the bios code I will not be able to use Theano and other such platforms. My stopgap solution is to use an AWS g2.2xlarge Instance which infuriates me but at least it does work.


Adjust screen brightness doesn't work Xubuntu 13.04 xfce4 keyboard shortcut fn+f2/f3 Toshiba L840 laptop

Did you tried this way:

step 1: terminal sudo gedit /etc/default/grub

step 2: modify your file at line GRUB_CMDLINE_LINUX="" like that: GRUB_CMDLINE_LINUX="acpi_osi=\"Windows 2012\""

step 3: terminal sudo update-grub

step 4: reboot

Worked for me on Asus X501A running Ubuntu 13.04 (same problem with fn keys)


"Welcome to emergency mode!" device descriptor read/64, error -32

So the cause of error is not completely clear. Some believe that "most probably it’s a result of hardware failure rather than a driver or kernel bug." And this article suggested that "unplugging all USB devices from PC, turnning power off, and waiting a minute or two would do the trick." However,. I didn't have any USB devices plugged into my laptop, so this solution was not helpful, even though it apparently has solved the issue for many other people.

What actually solved the issue for me was executing the following command as a root user:

root@localhost~# fsck -y /dev/sda1
root@localhost~# fsck -y /dev/sda2
root@localhost~# fsck -y /dev/sda3
root@localhost~# fsck -y /dev/sda4
root@localhost~# fsck -y /dev/sda5
root@localhost~# fsck -y /dev/sda6
root@localhost~# fsck -y /dev/sda7


background tab dissapeared in terminal profile preferences

I found the answer
It's just that this version of gnome-terminal doesn't have transparency.
I'm just purging the ppa for gnome and reinstalling from ubuntu repositories. I hope it will work.

Did they just remove the Background settings for Terminal?

Done


To run GUI applications as root you should not be using sudo, but instead use gksu.
In this particular case run gksu eclipse, then enter your password.


How to switch between outputs attached to same sound card without detaching one output

Install "Pulse audio volume control" (pavucontrol):
In the the device output tab, you can  usually  force "port"  to line , headphone or speaker.


How to prevent automatic hibernation while watching videos?

You can use Caffeine.

  "Caffeine is designed to help your computer stay awake. It’s chiefly used to prevent a screensaver or lock-screen from kicking in when you don’t want it to (e.g., watching videos or leaving music playing in the background while you snooze)."

A link to more info, as well as a download for 14.04, can be found here.

Caffeine is available as a PPA. To install it, open a terminal by pressing CtrlAltT and then enter the following commands:

sudo add-apt-repository ppa:caffeine-developers/ppa
sudo apt update
sudo apt install caffeine

Type your password when prompted for a password by sudo.


If you have windows installed on your machine, i would recommend you using Rufus. its a very famous tool to create bootable USB drive
Download it from the page:
https://rufus.akeo.ie/. this tool is the answer to create bootable media for any kind of OS. if you face any issue using the tool, comment back.


Qt Upgrade Problems, Cmake still looking in /usr/lib/x86_64-linux-gnu

No idea why this worked:

I nuked the entire build directory and started over. I had to configure twice, and supplied ~/Qt/5.15.1/gcc_64/ for QT5_INSTALL_PATH, and got the same mixed results as above.
I then used cmake-gui and deleted all qt-related entries, and hit configure again.

Would be happy to be enlightened as to why this worked. Or maybe I should just delete the question altogether, as this solution wasn't too informative (to me at least).


Yes of course you can generate the flash drive using
Power iso.
If you are using windows os in that laptop then download the poweriso in windows
Select image file(.iso) of ubuntu .
Select the disk you are using for booting.
Then burn it
..
If you are using ubuntu in another laptop then
Use startup disk creator which is system application provided by ubuntu..
..
You can use
1.universal usb installer
2.rufus
3.winusb

Softwares for making flash drive in windows

Hope it will help you


Had the same problem in 16.04. Guy helped me out saying that sometimes Ubuntu needs manual installation of HP printers, laserjets.

Try it:

sudo hpsetup -i

(and follow instructions).


Suggestion for an application to do our company car fleet management

Your first port of call should be to investigate various fixed asset management solutions available online for Linux based operating systems:

http://sourceforge.net/projects/fams/

You may also find that account management solutions might better encapsulate the problems you want to solve:

http://loll.sourceforge.net/linux/links/Software_Applications/Financial_/index.html

In the end though, don't be scared of picking the closest solution and then searching out for programmers to add in what you need. The unique thing about foss of course is that you can pay others to modify on your behalf.


Tail the "in the last hour written lines from a log file" is it possible?

Let's say your log have the following structure:

219.369.42.449 - - [05/Mar/2020:11:05:17 +0200] "log line"
219.369.42.449 - - [05/Mar/2020:11:06:37 +0200] "log line"
219.369.42.449 - - [05/Mar/2020:12:01:14 +0200] "log line"
219.369.42.449 - - [05/Mar/2020:12:07:23 +0200] "log line"

We can get all lines from the first occurrence of 05/Mar/2020:11 to the end $ of the file by using sed in the following way:

sed -n '/05\/Mar\/2020:11/,$p' "/path/to/file.log"

The option -n will suppress the normal output of sed, but the flag p will print the matched part of the file.
Note, if there isn't presented any record that mach to 05/Mar/2020:11, sed wont provide any output.

We can automate the above by the help of the commands date and eval:

COMMAND="sed -n '/$(LANG=C date --date='1 hour ago' "+%d\/%b\/%Y:%H")/,\$p'"
eval $COMMAND \"/path/to/file.log\"

Using sed with double quote marks and variable within the expression doesn't provide the desired output in this case.
So we first constructing the command as string and convert it to a real command by eval.
LANG=C (LANG=en_us_88591) stands in order to get the desired date format, because, for example, in my case the default value of this envvar is bg_BG.UTF-8.

You can create a script, based on the two lines above - examples of such script:

apache2 : How to search a string from apache2 error logs in specific time range?
modsecurity-whitelist-rule-generator.bash - that parse events within ModSecutity's modsec_audit.log by their unique-id, and then generates whitelist rules for ModSecutity.


Trying 20.04 LTS - Errors from xkbcomp are not fatal to the X server

I solved this trouble by reinstalling, but did not select download 3rd party drivers, and remove last installation.


To run multiple sessions as you describe, the Windows machine would need to be running Windows Server. The terminal service for the desktop editions are limited to one active session at once so they don't devalue the server.

If you have a spare Windows license lying around, you could always install it in VirtualBox and enable seamless mode. You would access IE as a virtual application with the start panel as a "bonus".
(Image source)


make error cmath ‘::cos’ has not been declared

I encountered the same problem with miniconda and OpenCV 3.3.1. It appears that cmake is finding these includes based on PATH, where miniconda was added. I temporarily removed it, deleted build directory, configured and build successfully. Moving the conda entry to the end of the PATH may be worth trying instead of removing it (but I've not tested that).


Ubuntu only booting in discrete graphics mode (GTX 1070)

Thanks to @cl-netbox I got the solution. If you already have Ubuntu installed in Discrete mode do this:

  Open a Terminal and use this command:

  sudo nano /etc/default/grub

  put between this:

GRUB_CMDLINE_LINUX_DEFAULT="[...]

  and this:

GRUB_CMDLINE_LINUX=""

  the following:

GRUB_GFXPAYLOAD_LINUX=1920*1080

  Save it with Ctrl+O and exit STRG+X. Then:

sudo update-grub

  if its on the PC then open

sudo nano /etc/lightdm/lightdm.conf.d/50-dpms.conf

  Put in front of each row a "#" Save it with Ctrl+O and exit STRG+X.
  Then try to reboot in DISCRETE again if every thing works. MSHYBRID
  Should now work.

How to use MSHYBRID in the Installer:

  If you want to have it right in Install working the use MSHYBRID, to boot to >the Ubuntu USB. Highlight "Install Ubuntu" and press "E"  One Row above "Linux
  /casper...." put

set gfxpayload=1920*1080

  and start installation with F10. After Install use "Crtl+ALT+F1" to go
  to Terminal log in. Do the above steps to enable Booting in MSHYBRID
  mode.

source: https://www.linux-onlineshop.de/forum/index.php?page=Thread&threadID=385

Otherwise if you have a Clevo Notebook install Ubuntu in Discrete Mode like this:
https://www.tuxedocomputers.com/TUXEDO-WebFAI.geek
And then do the above steps.


$TERM set to "dumb" causes problems with suspend

You could put your TERM setting in a tiny script fragment in /etc/profile.d/setTERM:

# Set TERM to something reasonable
TERM=<whatever>
export TERM

for <whatever>, reading man clear should have led you to man terminfo, which shows you how to pick a terminal type.

Set TERM to one of the filenames in /usr/share/terminfo/*/*, so clear will be able to look up a sequence of characters to output to "clear the screen".

It is worrying if /usr/share/terminfo is empty.

My system shows:

walt@wombat:~(0)$ dpkg -S /usr/share/terminfo
ncurses-term, ncurses-bin: /usr/share/terminfo
walt@wombat:~(0)$ apt-cache search ncurses-term\|ncurses-bin
ncurses-bin - terminal-related programs and man pages
ncurses-term - additional terminal type definitions

I think that one or both of these packages are needed for clear to be happy.


Ubuntu not starting and recovery not working

Your Ubuntu installation seems to be broken according to your description of how did you get there. The easiest way to fix it could be reinstalling Ubuntu.

Before you proceed, make a backup of the filesystem (just in case, something bad can happen at any time). You can use command line within the Ubuntu Installer or the wizard with Clonezilla.

Launch the Ubuntu installation. In the Installation type, choose Upgrade. After the installation completes, your refreshed Ubuntu should be there for you.

Sources:

https://help.ubuntu.com/community/UbuntuReinstallation
https://ubuntuforums.org/showthread.php?p=11770332


Recently installed Ubuntu, Wifi is not working. How do I fix this?

You can run in terminal

sudo apt-get install firmware-b43-installer
sudo modprobe -r b43
sudo modprobe b43

and Wi-Fi will work.


You have to install the headers, contained in the -dev package.

http://packages.ubuntu.com/raring/libgtk2.0-dev

sudo apt-get install libgtk2.0-dev

You may need additional packages, check the dependency list, and install the relevant -dev packages (or sort it out one error at a time, lol)


Virtual box - Can not install virtual box by Terminal

Running this on a newly installed Ubuntu 16.04 (clean install) works for me:

sudo apt-get update
sudo apt-get -y upgrade

echo debconf virtualbox-ext-pack/license seen true | sudo debconf-set-selections
echo debconf virtualbox-ext-pack/license select true | sudo debconf-set-selections

sudo apt-get -y install virtualbox virtualbox-ext-pack

I use this snippet for installing it automatically on ephemeral test systems.

The issue of missing libgsoap8 is probably about running apt update as they already mentioned by @AndroidDev.


Ubuntu 11.10 Shutting Down Randomly and Unexpectadely

Can you check the following and update your question with more information on it:

Ubuntu - Power Management Features (Shutdown on idle or Sleep on idle)
Ubuntu - Cron jobs for root and other users
Ubuntu - Recent Updates (Some updates require system reboot - I assume auto updates would restart the system when required)
BIOS - Power Management (enabled or disabled)
BIOS - Recent Updates
APPS - Any Bit torrents running? (Some Bit torrents shutdown after complete if set) - as seen in this forum

To check the cronjob type the following in the terminal:

for active session (the account you logged in with) cron jobs

crontab -l

for root's cron jobs

sudo crontab -l

for any other user's cronjob

sudo crontab -u <usename> -l


Anyway to create a new Firefox profile on a server with no display? (Ubuntu 18.04)

If you have firefox on a server, then I assume that you also have X11 installed.
Just forward your display and start firefox.

https://unix.stackexchange.com/questions/12755/how-to-forward-x-over-ssh-to-run-graphics-applications-remotely


Install php-x and php7.2-x as the latter is the default php for bionic and the former is for all versions.

Based on OP updates, if they are two versions of a module say php-x and php7.2-x then install the latter where the required version isn't specific.


5GHZ wifi is not showing on fresh install

I had the same issue, so in my research I replaced Ubuntu with Debian and found
https://wiki.debian.org/InstallingDebianOn/Apple/MacBookPro/9-2
While it is not your and my MacBookPro version, it does the trick
sudo apt install -y linux-headers-$(uname -r) && sudo apt install -y broadcom-sta-common broadcom-sta-source broadcom-sta-dkms

then reboot
reboot


Issue with Broadcom 4313 - wireless card very very slow in ubuntu 14.04

Strange... but I did absolutely the opposite to recommendations of @Wild Man:

i've installed  bcmwl-kernel-source and removed bcma & brcmsmac, and i got my normal speed :-\

[~]> lsmod | grep wl
        wl             4207846  0
        lib80211       14381    2 wl,lib80211_crypt_tkip
        cfg80211       484040   2 wl,mac80211

[~]> lspci
03:00.0 Network controller: Broadcom Corporation BCM4313 802.11bgn Wireless Network Adapter (rev 01)

[~]> lsb_release -a
    Description:    Ubuntu 14.04.1 LTS

[~]> uname -a
Linux martin 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux


The touchpad on Dell XPS 9550 is not working on Ubuntu 18.04

I had the same problem and adding the nomodeset and acpi_rev_override parameters to the kernel parameter solved it.
You just have to add this line before booting:
GRUB_CMDLINE_LINUX_DEFAULT="acpi_rev_override=1 nomodeset"
I had a lot of trouble with 18.04 so I went back to 17.10.


~/.bashrc return can only 'return' from a function or sourced script

It looks like you should "source" the script. That means running it like this:

. ~/.bashrc

It's effectively the same as typing all the command into the shell you are running it from and has the effect of changing the environment of the running shell (which doesn't happen if it's run as a sub-process).


How to blank the screen when laptop lid is closed but without sleeping the computer?

open a terminal and type:

xset dpms force off

as soon as you mouse moves or you press a button, the monitor will come alive again.
If you would like to run that code whenever you close the lid, you'll have to some more work:
Add to following line into /etc/acpi/events/lid:

event=button/lid
action=/etc/acpi/actions/handleLidClose.sh %e

Now create the file: /etc/acpi/actions/handleLidClose.sh
and paste the code

#!/bin/bash
echo "$1" | grep -q open /proc/acpi/button/lid/LID0/state && exit 0
xset dpms force off

into it.

You can name the file any way you want, but dont forget to make it executable:

chmod +x /etc/acpi/actions/handleLidClose.sh

All commands must be excecuted as sudo or su


Why do I need to source ~/.bashrc manually everytime when I connecting via SSH?

Add the following to your ~/.bash_profile or ~/.profile: (for ~/.bash_profile you can ommit the outer "if" statement checking that you're running Bash)
# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
        . "$HOME/.bashrc"
    fi
fi

Alternately, if you already have a ~/.profile with the proper contents, you can delete ~/.bash_profile, and ~/.profile will be used instead.


Xubuntu - how to detect bluetooth devices and connect with them?

As a security precaution, Bluetooth devices typically do not broadcast that they are available for connecting.  They only broadcast this information at a specific time, usually called pairing.

The way in which you activate pairing on any device will differ, but sometimes you hold down the Bluetooth or power button for some extended period of time.  Most of the time, but not always, some indicator will flash (turn on and off) to tell you it is in pairing mode.

When your Bluetooth device is in pairing mode, your Bluetooth adapter on your computer (or phone) should be able to pick up the broadcast of the device and allow you to make a connection.  Make sure the computer is scanning (refresh) to pick up any new devices this way.

Once you connect your Bluetooth device, you will notice it is assigned a profile.  There are many different profiles, but there are limitations to the number of profiles per connection.

You should take a look at the available profiles of your devices to see what it is that they can accomplish, but you can most likely tether/share your Internet from your phone to your laptop, or use the keyboard as a keyboard for either your phone or laptop.


How to convert iptables command line to Ufw Command line?

Is IPtables command line are different with Ufw command line ?

Yes definitely, see man iptables and man ufw

how could i translate bellow command line into Ufw command line ?

You can't since ufw doesn't have all the functionalities you need for your case. However, ufw is using iptables under the hood. So you can add iptables rules to ufw. See for example : IP masquerading - Ubuntu server guide


How do I deploy an app to my Ubuntu phone with the Ubuntu SDK?

The phone must be in developer mode, which can be turned on through

System Settings > About this phone > Developer mode


there is a bash program called test and when run it does nothing without arguments (do a quick man test in terminal to see more about it).  That is why renaming worked :)

Lots of people do not know 'test' is a program too, best not to name scripts and such 'test'


You need to add libgtk-3-0 as build dependency (Build-Depends) in debian/control file.


Terminal stuck in mirrored display mode (ctrl-alt-f1)

I'm pretty sure you can't.  The Ctrl-Alt-F1 virtual terminal is separate from X, and only one can be controlling the graphics card at a time.  Think about it this way: if you had X on one monitor and the VT on another, how would you switch focus between the two?  They don't interact (that's kind of the point).


Seems like your computer is finding the windows bootloader instead of grub (ubuntu bootloader). You may need to manually reinstall grub. What does your partition table look like? (Boot into live-cd, press try, search for/open gparted)


try installing from pendrive using unetbootin

u can download it here http://unetbootin.sourceforge.net

if u have ubuntu 12.04 iso file you can use Diskimage option in unetbootin, u can see how to install here

http://unetbootin.sourceforge.net/#install

i hope that works


How to get a list of all packages installed from PPAs even for PPA repositories that may have been removed

You may search for installed obsolete packages, either locally installed or their source repository is disabled)

aptitude search '?narrow(?installed, ~o)'

Also if you want both obsolete + ppa ones:

aptitude search '?narrow(?installed, ~Oppa | ~o)'

Reference: aptitude - Search term reference


Too long for a comment
My tests are too long to fit in a comment so pardon my break from tradition in posting the results in an answer. Remind me later and I'll delete this answer.
Current kernel version
$ uname -r
4.14.13-041413-generic

Look for Kernel header 4.13.0-26
$ apt list linux-headers-4.13.0-26-generic
Listing... Done
linux-headers-4.13.0-26-generic/xenial-updates,xenial-security 4.13.0-26.29~16.04.2 amd64

Install Kernel header 4.13.0-26
$ sudo apt install linux-headers-4.13.0-26-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-gcp-tools-4.10.0-1008 linux-gcp-tools-4.10.0-1009 linux-headers-4.10.0-38
  linux-headers-4.10.0-38-generic linux-headers-4.10.0-40
  linux-headers-4.10.0-40-generic linux-headers-4.4.0-101
  linux-headers-4.4.0-101-generic linux-headers-4.4.0-103
  linux-headers-4.4.0-103-generic linux-headers-4.4.0-98 linux-headers-4.4.0-98-generic
  linux-image-4.10.0-38-generic linux-image-4.10.0-40-generic
  linux-image-4.4.0-101-generic linux-image-4.4.0-103-generic
  linux-image-4.4.0-98-generic linux-image-extra-4.10.0-38-generic
  linux-image-extra-4.10.0-40-generic linux-image-extra-4.4.0-101-generic
  linux-image-extra-4.4.0-103-generic linux-image-extra-4.4.0-98-generic
  linux-signed-image-4.10.0-38-generic linux-signed-image-4.10.0-40-generic
  linux-tools-4.10.0-1008-gcp linux-tools-4.10.0-1009-gcp
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  linux-headers-4.13.0-26
The following NEW packages will be installed:
  linux-headers-4.13.0-26 linux-headers-4.13.0-26-generic
0 upgraded, 2 newly installed, 0 to remove and 34 not upgraded.
Need to get 11.4 MB of archives.
After this operation, 83.0 MB of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort.

Summary
On my system at least there doesn't seem to be a problem with installing 4.13.0-26 Linux headers. However there have been many problems reported with Ubuntu LTS kernel version 4.13.0-26.


I am not absolutely sure but cuz your persmissions for lpt are set to root it came to my mind that it could have the following reasons:

a) Add your user to the lp user group. Use the following command to accomplish the task:

gpasswd -a [user] lp

Read the ArchWiki article on Users and Groups for more information on how Groups are used for access to certain system hardware.

Turns out there are multiple bugs on Launchpad regarding this issue. These may help:

https://bugs.launchpad.net/hplip/+bug/802780
https://bugs.launchpad.net/hplip/+bug/718092
https://answers.launchpad.net/hplip/+question/161346

From: (Read in another post)

Permissions needed to add printer

b) you could change the parport permissions to every user. But I am not sure if that would be a better idea.

sudo chmod 666 /dev/parport0

From:
Fedora Parport permission - but the same in Ubuntu