Another method to change the pin configuration is through a shell script when the "Install boot override" funtion does not work. Run hdajackretask and select "Remove boot override" then reboot your system.

After reboot, run hdajackretask Then To override one of your jacks:

Select a codec
Click the "Override" checkbox for that pin and select the new
desired function
Click "Apply now"

After you click "Apply now" a shell script is created to make the changes and prompts for super user password to execute. The script is also saved in /tmp which can be copied and later executed with sudo from the command line.

hdajackretask creates a script, script.sh in /tmp similar to /tmp/hda-jack-retask-QW1EEZ/ for the jack functions you desire:

#!/bin/sh
echo "0x12 0x90a60140" | tee /sys/class/sound/hwC0D0/user_pin_configs 2>>/tmp/hda-jack-retask-WFEIEZ/errors.log
echo "0x14 0x90170150" | tee /sys/class/sound/hwC0D0/user_pin_configs 2>>/tmp/hda-jack-retask-WFEIEZ/errors.log
echo "0x17 0x40000000" | tee /sys/class/sound/hwC0D0/user_pin_configs 2>>/tmp/hda-jack-retask-WFEIEZ/errors.log
echo "0x18 0x411111f0" | tee /sys/class/sound/hwC0D0/user_pin_configs 2>>/tmp/hda-jack-retask-WFEIEZ/errors.log
echo "0x19 0x411111f0" | tee /sys/class/sound/hwC0D0/user_pin_configs 2>>/tmp/hda-jack-retask-WFEIEZ/errors.log
echo "0x1a 0x411111f0" | tee /sys/class/sound/hwC0D0/user_pin_configs 2>>/tmp/hda-jack-retask-WFEIEZ/errors.log
echo "0x1b 0x411111f0" | tee /sys/class/sound/hwC0D0/user_pin_configs 2>>/tmp/hda-jack-retask-WFEIEZ/errors.log
echo "0x1d 0x40700001" | tee /sys/class/sound/hwC0D0/user_pin_configs 2>>/tmp/hda-jack-retask-WFEIEZ/errors.log
echo "0x1e 0x411111f0" | tee /sys/class/sound/hwC0D0/user_pin_configs 2>>/tmp/hda-jack-retask-WFEIEZ/errors.log
echo "0x21 0x40f000f0" | tee /sys/class/sound/hwC0D0/user_pin_configs 2>>/tmp/hda-jack-retask-WFEIEZ/errors.log
echo 1 | tee /sys/class/sound/hwC0D0/reconfig 2>>/tmp/hda-jack-retask-WFEIEZ/errors.log

Copy this script somewhere else on your system (other than /tmp)

cd /tmp/hda-jack-retask-QW1EEZ
cp script.sh ~username/speaker.sh

Then edit speaker.sh

cd ~username
nano speaker.sh

Add the line killall pulseaudio & at the top of the file. This is necessary because the jack function can not be changed while pulseaudio is running. By default pulseaudio will respawn. Also change the path to errors.log file to /tmp or wherever you like:

#!/bin/sh
killall pulseaudio &
echo "0x12 0x90a60140" | tee /sys/class/sound/hwC0D0/user_pin_configs 2>>/tmp/errors.log
echo "0x14 0x90170150" | tee /sys/class/sound/hwC0D0/user_pin_configs 2>>/tmp/errors.log
echo "0x17 0x40000000" | tee /sys/class/sound/hwC0D0/user_pin_configs 2>>/tmp/errors.log
echo "0x18 0x411111f0" | tee /sys/class/sound/hwC0D0/user_pin_configs 2>>/tmp/errors.log
echo "0x19 0x411111f0" | tee /sys/class/sound/hwC0D0/user_pin_configs 2>>/tmp/errors.log
echo "0x1a 0x411111f0" | tee /sys/class/sound/hwC0D0/user_pin_configs 2>>/tmp/errors.log
echo "0x1b 0x411111f0" | tee /sys/class/sound/hwC0D0/user_pin_configs 2>>/tmp/errors.log
echo "0x1d 0x40700001" | tee /sys/class/sound/hwC0D0/user_pin_configs 2>>/tmp/errors.log
echo "0x1e 0x411111f0" | tee /sys/class/sound/hwC0D0/user_pin_configs 2>>/tmp/errors.log
echo "0x21 0x40f000f0" | tee /sys/class/sound/hwC0D0/user_pin_configs 2>>/tmp/errors.log
echo 1 | tee /sys/class/sound/hwC0D0/reconfig 2>>/tmp/errors.log

To run the script:

sudo ./speaker.sh


Cannot press ctrl + alt + left + up simultaneously to switch between workspaces

Mine works perfectly this way . Hitting both arrows switch to desired workspace.

Obs: Using Unity


Ubuntu 17.10, logs out when monitor is detached

You can prevent it by locking the screen first.

I have the same problem with my Desktop computer and a DVI hardware switch. Just shortly switching cause the desktop to kill all aps and relaunch.


command line grep * does not work but grep *. works

What do given grep commands do

From your output it is apparent that you want to find all files that belong to "staff" group and created at hour 22 ( or 10 pm in 12 hour format ). We'll address that below, but lets first figure out what your grep commands do and why they're not the right tool for what you want.

First of all, the two grep commands that you do are slightly different in the way they are interpreted, and your approach is not proper - you shouldn't try to parse output of ls.

grep "staff*22" reads as "match all lines that start with 'staf' and may or may not have in them extra 'f' , immediately followed by '22'."

$ echo "staff whatever 22" | grep 'staff*22'
$ echo "staff22" | grep 'staf*22'
staff22
$ echo "staf22" | grep 'staff*22'
staf22
$ echo "staf22" | grep 'staff*22'
staf22

grep "staff.*22" reads as "match all lines that have 'staff' in them, zero or more characters in between ( any type of character ),and number 22".

$  echo "staff whatever 22" | grep 'staff.*22'
staff whatever 22

Better approach

ls command in general should only be used for interactive listing, i.e., when you only want to have a quick peek at what's inside a folder. When it is necessary to find specific files, or some how work with those files via script, find command is the way to go. It has -group variable, which will help you isolate all the files that belong to staff group, and -nevermt for finding files with modification time newer than some specific date. For instance, what you want is probably this:

find . -group staff -newermt "2017-01-12 21:59:59"

See also this: https://superuser.com/questions/580273/ubuntu-linux-find-files-between-specific-times


How do I get rid of /sys/kernel/debug/tracing?

At first I thought the problem had something to do with your Linux net-services revealed by uname -a command. I'm on Ubuntu 16.04 desktop so had little hope I could solve these two questions. I read up on the situation from this link: (redhat.com - Realtime Tuning Guide) that discusses /sys/kernel/debug/tracing/
Question 1: How did "debugfs on /sys/kernel/debug" get mounted?
Imagine my surprise learning on my system kernel tracing was also enabled:
# cat /proc/sys/kernel/ftrace_enabled
1

Also when I type mount, this is one of the lines that appears:
debugfs on /sys/kernel/debug type debugfs (rw,relatime)

I rebooted my kernel 4.4.0-47 to 4.4.0-45 then to 4.8.5 and finally to 3.13.0-92. ALL these versions have /sys/kernel/debug mounted.
To answer your question (paraphrased) "how did this happen?" -> it happens to everyone.
Question 2: How do I get rid of it?
To answer your question "how do I get rid of it?", use:
sudo umount debugfs

Note this only works for current session.
Summary Thoughts
Even though trace is enabled on all Ubuntu kernel versions I've tested, it is not activated until you tell it to start monitoring a specific event. After an event is activated then it will slow down your CPU.
Basically I would not worry about this...


In the Files GUI of Ubuntu 18.04, is there a way to see the space of folders without installing adds-ons that might restart your computer?

You can see space occupied by a folder and all its contents (i.e. files, folders and subfolder with files contained theirein) in the properties dialog of the folder. With the folder highlighted, either

press Alt+Enter, or
press Shift+F10 then r, or
right-click the folder and select "Properties"

You will see the total space occupied by any items in that folder and its subfolders, along with the free space remaining on the partition where the folder resides.


Wifi not connecting (ASUS N76VZ + Intel centrino 2230 + Ubuntu 13.04)

I've had a similar issue with an Acer Aspire (4339-2618) on multiple versions of Ubuntu. While I haven't fully diagnosed the problem, I have found a very stable work-around that you might try. The problem turned out to only occur when I used the native network-manager. That is what you use to find your local wifi networks in your window manager, it is installed by default on Ubuntu.

After attempting multiple variation on driver/kernel fixes, I turned off network-manager and used wpa_supplicant which should be installed by default, or otherwise can be installed with the command:

sudo apt-get install wpasupplicant

This assumes that the wifi network you are trying to connect with is using wpa (most are). If you know your wifi network and password, you should run the following command:

wpa_passphrase mynetwork mypassword

That will output something like this:

network={
    ssid="mynetwork"
    #psk="mypassword"
    psk=69e49214ef4e7e23d0ece077c2faf3c73f7522ad52a26b33527fa78d9033ff35
}

You should delete the #psk line, as that presents your password in plaintext in a config file and is not a very secure practice (the psk hash itself isn't so great to have in a config file, but that's another topic).

Copy that output and paste it at the bottom of the file /etc/wpa_supplicant/wpa_supplicant.conf.

You will only have to do this once. If you want to add additional networks, you can re-run the wpa_passphrase commands with those network names and passwords and paste those into the wpa_supplicant.conf file.

The final steps are to disable network-manager and run wpa_supplicant. I put this all in a bash script called run_wifi.sh and run the script as sudo from the command line:

#!/bin/bash
service network-manager stop  # stop network manager
killall wpa_supplicant        # exit any running wpa_supplicants
wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf
dhclient wlan0                # get ip address from router

Here it is assumed that your wireless network shows up as wlan0 when you type ifconfig, you may have to change that to wlan1 or whatever the case may be.

Make this script executable (chmod +x ./run_wifi.sh) and run it with the line:

sudo ./run_wifi.sh

After the next reboot, you can simply use the previous line to connect to your network. If you want to connect to the ethernet port using network manager again, you can turn it back on service network-manager start or simply run sudo dhclient eth0.

If this doesn't work for you, please let me know and I will delete this answer.


How to install & run java 8 and javafx on Ubuntu 18.04

The default openjfx package on Ubuntu 18.04 is not compatible with OpenJDK 8.
You may use the older version of the openjfx package. Please note that it's not a fully secure solution because you won't get updates for the package.

sudo apt install \
  openjfx=8u161-b12-1ubuntu2 \
  libopenjfx-java=8u161-b12-1ubuntu2 \
  libopenjfx-jni=8u161-b12-1ubuntu2

Hold the package:

sudo apt-mark hold \
  openjfx \
  libopenjfx-java \
  libopenjfx-jni


Ubuntu 18.04 does not wake up from the lock screen

I had the same problem on Dell XPS desktop with Nvidia Geforce GTX 1060 running latest Ubuntu 18.04.
After I switched from using X.Org X Server video driver to NVIDIA proprietary driver the problem went away.
Maybe try changing your video driver ?


To change time zone from terminal, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo dpkg-reconfigure tzdata

Once open, just follow the screens to change the time zone.


It looks like the disk you are trying to shut down contains an NTFS partition. Find out what is the volume label, in my example below I will use label DATA. Then you could use script like:

for drive_letter in {a..f} ; do
  if [ "`ntfslabel /dev/sd${drive_letter}1`" == "DATA" ] ; then
    sudo hdparm -y /dev/sd${drive_letter}1
  fi
done

Explanation

for drive_letter in {a..f} ; do loops over letters a-f
if [ "``ntfslabel /dev/sd${drive_letter}1``" == "DATA" ] ; then checks the label of device /dev/sda1, /dev/sdb1, etc and compares it to DATA (sorry about the double backticks)
sudo hdparm -y /dev/sd${drive_letter}1 is the payload


Constant freezes on new Sandy Bridge Thinkpad

I have had my T420 for just over a week and am experiencing multiple problems with it. I initially installed Ubuntu 11.04 32bit which installed fine, but would crash several times each day. So I switched to the classic interface, but still was experiencing the type of anomaly that you describe; the mouse pointer moves, but the interface is completely unresponsive to mouse clicks.

I then decided to install 11.04 64bit since I will be upgrading the RAM soon. This install also went fine and soon had my system up and running. Unity still crashed frequently, so I switched to classic mode. However, this time I chose classic mode without effects. I have not experienced any crashing or locking up in the three days since I made this change.

I would recommend that you try installing Natty again, but try running it in classic mode without effects until some of these bugs get worked out. I also recommend adding information to the bugs that have been already filed on Launchpad and also open new bug reports for problems that have not already been reported.


Losing Wifi on 12.04, no way to get it back?

It sounds like the wireless driver may be your problem which may be fixed in each new release of the kernel so I would recommend trying Ubuntu 12.10 to see if that helps...

Also here is a link for the latest 3.7 version of the kernel for 12.10:

http://www.upubuntu.com/2012/12/installupgrade-to-linux-kernel-37-under.html


Systemd: How to start/stop services on battery

I'm not an expert on systemd, but I google better than the average bear. See https://wiki.archlinux.org/index.php/Power_management:

There is just one thing systemd cannot do (as of systemd-204): power management depending on whether the system is running on AC or battery. To fill this gap, you can create a single udev rule that runs a script when the AC adapter is plugged and unplugged:

Further instructions follow.

My guess is you want to do something like create a fake service called acpluggedin.service which is started and stopped by the udev rule, and then have the mongo and redis services Requires it. Or something.


Rationale

3.3 Installed Packages
There are two lists of installed packages available on Debian. The original file these lists are created from is /var/lib/dpkg/status. This file must not be corrupted, or otherwise your system is hosed. This is the main database for the package manager dpkg.
The Debian package system keeps an older copy from the last but one dpkg run in /var/lib/dpkg/status-old. In order to preserve the system for greater damage upon a crash or filesystem corrupting a daily backup of this file is created into /var/backups when the file differs from the last copy. The backup code is in /etc/cron.daily/standard.
The informal list is created by the command dpkg -l or by starting dselect and using the Select item. Or by using any of the other package manager front ends. This list consists of the name of the package (stripped down to some 40 characters), the installed version of each package and a short description. This is intended to be human readable.
For technical purpose you can make dpkg to generate a list of packages and their selection status (i.e. install, hold and deinstall). This is created by dpkg --get-selections. This output is intended to be parsed by a program again, such as dpkg --set-selections which will change the status of packages in its internal database. The dselect-upgrade action from apt-get will install all new packages afterwards.

Shouldn't there be one?

It is better to have backups and not need then then not having backups and needing them. It is better left to the user then to automate it but that is just my opinion.


You can make use of LVM tool for more insights.
LVM can be installed this way

sudo apt-get -y install lvm2

and gparted

If you are using LVM- then it will always shows 100% full even it is not 100% full.


Ubuntu Server 16.04 ismissing enp3s0 section in ifconfig

You should:

understand the relation between your ISPs and IPs
follow https://help.ubuntu.com/16.04/serverguide/serverguide.pdf about Network Configuration to set it up correctly


Open source and secure app to replace Google Keep

QOwnNotes seems to become a good replacement. May be self-hosted. Supports Markdown.


Ubuntu Freezing after login, can't install gdm3, other solutions not working

Amongst other possible repairs required...

We need to test your memory.

Go to https://www.memtest86.com/ and download/run their free memtest to test your memory. Get at least one complete pass of all the 4/4 tests to confirm good memory. This may take many hours to complete.

Your BIOS is very old.

Note: have a good backup before updating the BIOS

Lenovo Ideapad 310-15IKB

You have BIOS version 3JCN19WW, and 3JCN31WW is current. See...

https://pcsupport.lenovo.com/us/en/products/laptops-and-netbooks/300-series/310-15ikb/downloads/ds118500


Ok seems like I need to answer this :p. usually sound files are located in /usr/share/sounds. You can check there.


Does apt-get update keep Ubuntu version unchanged?

Yes, running sudo apt-get update will not change or update anything.

The only thing apt-get update does is refresh the local "cache" with the list of available software / packages. It won't update any packages, and it won't upgrade or change your Ubuntu version.

Note that apt-get upgrade is different - that does actually update things.


Can I use all my RAM for application data?

Applications use ram on their own; you don't have to DO anything.  Whatever ram ISN'T in use by applications is used to cache recently accessed files to speed things up if they are needed again, thus between the two, ram usage is usually close to 100%.  As applications request more ram, the cache gives it up.


How to copy an entire directory except one file in each sub-directory via terminal?

The easiest way would be to use rsync with the --exclude option to exclude to .wav files from copying:

rsync -av --exclude='*.wav' /path/to/Java /out/dir

Example:

/foobar/Java% tree
.
├── day-01
│   ├── 01.sh
│   ├── 01.txt
│   └── 01.wav
├── day-02
│   ├── 02.sh
│   ├── 02.txt
│   └── 02.wav
├── day-03
│   ├── 03.txt
│   └── 03.wav
├── day-04
│   └── 04.txt
└── day-05
    └── 05.wav

/foobar/out% rsync -av --exclude='*.wav' ../Java .
sending incremental file list
Java/
Java/day-01/
Java/day-01/01.sh
Java/day-01/01.txt
Java/day-02/
Java/day-02/02.sh
Java/day-02/02.txt
Java/day-03/
Java/day-03/03.txt
Java/day-04/
Java/day-04/04.txt
Java/day-05/

sent 564 bytes  received 158 bytes  1,444.00 bytes/sec
total size is 0  speedup is 0.00

/foobar/out% tree
.
└── Java
    ├── day-01
    │   ├── 01.sh
    │   └── 01.txt
    ├── day-02
    │   ├── 02.sh
    │   └── 02.txt
    ├── day-03
    │   └── 03.txt
    ├── day-04
    │   └── 04.txt
    └── day-05


Ubuntu has Python 2.7 set as default. So, running python or pip normally runs the 2.7 version.

If you want to run version 3 then you have to use the command python3 and pip3

pip3 -V

python3 -V

For the virtual envirmoment if found the command pyvenv-3.4

pyvenv-3.4 myenv_folder #Creates a python 3.4 virtual enviroment in the myenv_folder
cd myenv_folder
source bin/activate #Activates the virtual environment


I did a quick test setup here at home, with a 10.0.1.0 network and a 192.168.43.0 network (the first my usual lan over ehternet the second my phone over wireless.) I have no problem pinging to either network, so i would expect the computer to be able to find printers on both networks since it automatically takes the correct network interface.
I'm 99% confident you will have no problem at all. (don't sew me in case of the other 1%)
please let us know if it's working :-)


Make sure your code does not have any errors in it, this is the common cause of the Segmentation Fault error. You should ask any questions related to code on stackoverflow


Apache can't listen/bind to any port other than 80?

You need to add a NameVirtualHost directive to the ports.conf file.
For example:

NameVirtualHost *:80
Listen 80

NameVirtualHost *:90
Listen 90

See also apache documentation for NameVirtualHost:

http://httpd.apache.org/docs/2.2/de/mod/core.html#namevirtualhost


How to display windows titles at the bottom of the screen using Byobu?

This behaviour appears to be by design when you're using the tmux back-end for byobu (default behaviour).

When you run byobu-screen you will see this functionality out-of-the-box.

If you look in the /usr/share/byobu/keybindings/f-keys.tmux file, you can see the line that binds the F2 key to open a new window:

bind-key -n F2 new-window -c "#{pane_current_path}" \; rename-window "-"

What do you know? The sneaky little fella renames the window to - as it's created.

You can override this behaviour by adding a line to your ~/.byobu/.tmux.conf file:

echo 'bind-key -n F2 new-window -c "#{pane_current_path}"' >> ~/.byobu/.tmux.conf

For some reason, this still doesn't work on the first window.


Why is the resolution incorrectly set on boot after installing the Nvidia drivers?

There is easy top use script with very similar steps that solved my problem where procedure on your link couldn't. It also corrects the grub resolution as well so you may not wanna set the resolution too high. You can find it here,


How to install ffmpeg on Ubuntu 14.04 (32-bit)?

Try these running these commands on your system to install ffmpeg

cd ~/ffmpeg_sources
wget http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
tar xjvf ffmpeg-snapshot.tar.bz2
cd ffmpeg
PATH="$PATH:$HOME/bin" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \
  --prefix="$HOME/ffmpeg_build" \
  --extra-cflags="-I$HOME/ffmpeg_build/include" \
  --extra-ldflags="-L$HOME/ffmpeg_build/lib" \
  --bindir="$HOME/bin" \
  --extra-libs="-ldl" \
  --enable-gpl \
  --enable-libass \
  --enable-libfdk-aac \
  --enable-libfreetype \
  --enable-libmp3lame \
  --enable-libopus \
  --enable-libtheora \
  --enable-libvorbis \
  --enable-libvpx \
  --enable-libx264 \
  --enable-nonfree \
  --enable-x11grab
PATH="$PATH:$HOME/bin" make
make install
make distclean
hash -r

for more details see this installation guide


A quick bit of research provided this response:-

https://stackoverflow.com/questions/19269321/libreoffice-calc-openoffice-calc-how-to-filter-rows-based-on-their-background

It suggests that there is no built in function but lists a macro which could form the basis of the task you are considering.


Is there any safe way to remove GNOME Software in 16.04 and install the classic Ubuntu Software Center?

It will be safe to remove gnome-software, apt tells me it will only take out the package gnome-software and nothing else, I tried it, it was removed and the system is fine

sudo apt purge gnome-software

To add the old one back run

sudo apt install software-center

All packages will be exactly the same, it is based off you repositories, not the center its self.


laptop will not boot after attempting upgrade to 13.10

The problem, as far as I can see, is that as naerwenya mentioned, you don't have an ext4 partition, you have two efi partitions. I just recently got a new laptop, and replaced Windows 8 with Ubuntu 14.04. 1 swap, 1 efi, 1 ext4. That's my setup, anyway, and I don't have any boot issues. Now, take it for what it's worth, I'm no expert, but I would change partition type of sda2 to ext4(/). Be advised, if no OS is detected, and you carry on with the installation as is, it will run a full install, potentially over-writing any files on the drive. My advice would be to make a backup of pertinent files, then run a clean install.


Change Firefox open/save file explorer search behaviour

As pointed out by @DKBose, this issue is resolved by running firefox with the following environment variable:

export GTK_USE_PORTAL=1
firefox

This works temporarily, when executed in the terminal and persistence can be achieved by exporting the variable on boot (i.e. by adding the line to the .profile, requiring a logout/login)

echo "export GTK_USE_PORTAL=1" >> ~/.profile


Wifi adaptor isn't recognized by Ubuntu 13.10

You might have to install the driver from Realtek in order to make it work. Some network adapters have special functions or configurations that require the OS to use a specific driver (like for extra frequency ranges).
In the case of your network adapter, Realtek provides a driver for Linux-based operating systems like Ubuntu; and since you are using version 13.10, you need to download the version for Linux kernels above 2.6.24 from this page: http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PFid=48&Level=5&Conn=4&ProdID=272&DownTypeID=3&GetDown=false&Downloads=true#RTL8188CE
(It jumps to your adapter automatically, but it takes a few seconds for the page to load completly)


How can I change notify-osd behaviour? (14.04)

I have just installed NotifyOSD on 14.04 and it works.

http://www.webupd8.org/2012/06/closable-movable-notifyosd.html
http://www.webupd8.org/2013/04/configurable-notifyosd-updated-for.html


Disable resizing of specific window using Devilspie

(maximize) command may work. Edit following file.

  gedit ~/.devilspie/yourprofile.ds

and add

  (maximize)

between

(begin ...
...
...
)


You probably won't be able to use Unity on that machine, it's too old. But you can use Lubuntu or Ubuntu without Unity.


This can happen on occasion. Fortunately, it's not too tricky to fix. Follow these steps:
First, find out what process is using the file:
sudo fuser -v /var/cache/debconf/config.dat

You'll see something like this:
USER        PID ACCESS COMMAND /var/cache/debconf/config.dat:
root       8440 F.... frontend

Take the PID value and put an end to it:
sudo kill <PID>
sudo kill -9 <PID>

This will unlock the config.dat file. From there you'll be able to remove VirtualBox:
sudo apt purge virtualbox-6.1
sudo apt purge virtualbox-dkms

Hope this gives you what you need.


you can use usbreset.

sudo apt-get install build-essential

Then you need source for this little tool
copy the text from here
and save it as usbreset.c
Change to directory where the downloaded file is

cc usbreset.c -o usbreset

Move the build file to /usr/local/bin/

sudo mv usbreset /usr/local/bin/

These way you can use it.
Identify your stick or whatever with

lsusb

I show an example.

Bus 003 Device 022: ID 18a5:0304 Verbatim, #Ltd my Stick

To reset this

usbreset /dev/bus/usb/003/022


Ecryptfs - Encrypt second folder (for dropbox) in addition to encrypted home folder

eCryptFS is not designed for cloud storage. It assumes it is the only application accessing your ciphertexts and runs into undefined behavior when some other application (say your Dropbox client) modifies them.
EncFS also has its problems as explained here.

You might want to take a look at CryFS https://www.cryfs.org


sqlite3 timestamp (current_timestamp) one hour off

sqlite stores dates in utc. To see a date in localtimezone use the localtime modifier.

select datetime(date,'localtime') from links;


Error while loading shared libraries (file: magfieldmapper_gui)

This most likely means that the library your program is looking for is not installed. To find out what package this library is in, do this (if apt-file is not found, run sudo apt install apt-file && sudo apt update first):

apt-file search liblapacke.so.3

Your output will be something like this:

liblapacke: /usr/lib/x86_64-linux-gnu/liblapacke.so.3

So, install the package as normal:

sudo apt install liblapacke


Keep Shift pressed when GRUB runs. It should bring you to the GRUB menu.

There you can choose to edit default boot option. Append ' single' (without quotes) to the end of the kernel prompt and choose to continue.

The system should boot into root shell. If your username is 'username' (without quotes), you can change password to the one you know and reboot into normal session:

# passwd username
Enter password:
Confirm password:
# reboot


Why does Ubuntu keep asking me for another super user's password?

You need to add the user misha to the sudo group

Add a user to the sudo group:

sudo adduser <username> sudo

The change will take effect the next time the user logs in.


ubuntu vivid disrgards-console-setup after reboot

See https://unix.stackexchange.com/questions/198791/
and Ubuntu Server disrgards console-setup when rebooting in VirtualBox

This problem seems to be caused by a mismatch in the naming of fonts
that console-setup expects vs what are in /usr/share/consolefonts/, and
thus copied to /etc/console-setup/ when you pick a font to use (using
dpkg-reconfigure console-setup).

If you go to a console and do an strace /lib/udev/console-setup-tty fbcon,
you can see that it is trying to open fonts like this:

/etc/console-setup/Lat15-TerminusBold11x22.psf

But if you look in /etc/console-setup/, there are only a handful of
fonts in there (the ones you picked), and they look more like this:

/etc/console-setup/Lat15-TerminusBold22x11.psf.gz

One has height x width, and the other has width x height.

The problem can be fixed in a few ways.

(1) /lib/udev/console-setup-tty could be fixed - This is the more
permanent, upstream solution.

(2) You could manually change /etc/default/console-setup, reversing the
height and width in FONTSIZE.  This will need to be done each time you
change the fonts using dpkg-reconfigure console-setup.  But when the
machine reboots, that preference is kept.

(3) You could install the fonts that console-setup-tty expects.  This
is what I call the "overkill" option.  I did it like this:

In /etc/rc.local:

# install console fonts and then set up console
/etc/console-setup/fonts.sh install
/lib/udev/console-setup-tty fbcon

Create a script called /etc/console-setup/fonts.sh:

#!/bin/bash

action=$1

srcdir="/usr/share/consolefonts"
parent="/etc/console-setup"
subdir="fonts"

case "$1" in
    install)
        # console fonts are not named properly in Ubuntu 15.04, compensate
        [[ -d $parent/$subdir ]] || mkdir $parent/$subdir
        for x in $( cd $srcdir ; ls -1 ) ; do
           # rearrange the two numbers from HHxWW to WWxHH
           y=$(echo "$x" | sed -e 's/^\([^-]*\)-\([^0-9]*\)\([0-9]*\)x\([0-9]*\).psf.gz/\1-\2\4x\3.psf.gz/g')
           # whether the pattern above matches or not, we'll be uncompressing here
           z=${y/.psf.gz/.psf}
           [[ ! -f $parent/$subdir/$z ]] && zcat $srcdir/$x > $parent/$subdir/$z
           [[ ! -L $parent/$z ]] && ln -sv $subdir/$z $parent/$z
        done
        ;;
    uninstall)
        rm -rf $parent/$subdir
        # only remove broken links (links to the fonts we removed above)
        rm $(find -L $parent -type l)
        ;;
    *)
        echo "$(basename $0) install|uninstall"
        ;;
esac

exit 0

For a quick pragmatic solution, I'd do #2, with a comment in the file that
it may be need to be re-done if you choose a different font (assuming the
comment does not also get overwritten).

But #3 works well with minimal fuss or mess.


What I believe you are looking for is a fixed asset management system, you can find plenty of Linux based fams, but a lot of them are designed for enterprise so you will find that they are interesting to set up and most likely web based.

I recommend checking out some of the items in this list:

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


Lot of "file not found" when using sudo find / -type s

These errors happen because these files belong to a special filesystem procfs (mounted at /proc). The proc filesystem presents information about processes in a hierarchical file-like structure, so at the moment when find tries to access these special files, they were no longer present.

To ignore these errors, add -xdev for GNU find (or -x for BSD find), e.g.

sudo find / -type s -xdev

  -xdev Don't descend directories on other filesystems.

See also: How to exclude the folders proc and sys from search with find command?


Linux (Ubuntu 12.10) starts up, but the main menu on the left side, and the pictograms at the upper right corner, do not show up

[SOLVED] choose the (opensource) X.Org X server (Nouveau display driver) in System settings -> Software sources -> Extra drivers. I'm not sure whether this has caused the problem, but after reboot, it worked for me.


Bootup (100 times slower than usual) drops to a shell IF at boot time the computer was off for less than 5 minutes. USB mouse no longer recognized

I own an older laptop (8 years?) with some small defects (graphics adapter for example, but it works for office, programming etc.) and I have the following problem:
When it gets warm after a few minutes of normal use (warm, maybe 40°C, not hot) and I try a restart, I get a white screen instead of BIOS display followed by GRUB and finally Ubuntu. After cooling down (if I blow air into the fan, it goes faster), it reboots normally.

As you mentioned your error depends on the time between shutdown and reboot, I would think heat is the problem. Maybe some of your hardware also has a light crash as mine and therefore can't handle the temperature? You could maybe try if cooling down the whole machine (put it in the fridge ;D, try an external fan, open the window, run it in the garden,...? - but be aware of humidity!) decreases the break time needed for a normal boot.

Have you tried your mouse in another machine, to verify it works there?

Greetings and good luck,
BC


Ah, the CM238. Okay ... there are a couple of options for you. Hopefully one of these will be one you haven't tried.
Update alsa-base.conf
Some Intel audio cards require the dmic_detect value to be set to 0. To do this:

Open Terminal (if it's not already open)
Edit alsa-base.conf as root:
sudo vi /etc/modprobe.d/alsa-base.conf

Note: Feel free to replace vi with your editor of choice.
Add the following line to the end of the file:
options snd-hda-intel dmic_detect=0

Save and Reboot the machine

If this does not resolve the issue, then ...
Reinstall Alsa & PulseAudio
On occasion reinstalling alsa-base and pulseaudio will get things working. To do this:

Open Terminal (if it's not already open)
Update apt and reinstall alsa-base and pulseaudio:
sudo apt update
sudo apt-get install --reinstall alsa-base pulseaudio

Reload alsa:
sudo alsa force-reload

If this doesn't work ...
Use pavucontrol
On occasion I've seen audio "magically" start working after fiddling around in pavucontrol. If you don't already have this on your computer, you can install it like so:

Open Terminal (if it's not already open)
Update apt and install pavucontrol:
sudo apt update
sudo apt install pavucontrol

Run pavucontrol by opening the application via application dock. If you would like to use Terminal, you can do so like this:
pavucontrol &

Check that the output devices are correct and that the volume sliders are set to 100% (0 db)

If this doesn't work ... I'm not sure. These are the only notes I have for this situation in my notebook


To boot from live disk: the best way is to burn an ISO on a USB/Flash drive.For Windows : How to create a bootable USB stick on WindowsFor UBUNTU : How to create a bootable USB stick on Ubuntu.To restore GRUB : Recovering Ubuntu After Installing Windows.

Now, If your Windows Partition is in healthy Condition then go to : How to fix the MBR for Windows 7? to restore GRUB from UBUNTUOR How to Remove Linux Boot Loader from Startup After Deleting Linux Partitions? to do it from Windows. I think this second option is best as you no longer using UBUNTU. For this second option you'll need Windows' bootable disc.
If your windows installation is corrupt then after restoring Boot loader entry in to MBR, try to repair your Windows.

Hope this will help you.


You can find error messages in syslog:

cat /var/log/syslog

You can narrow down the lengthy log with grep:

cat /var/log/syslog | grep Network

...to see what Network Manager is doing

cat /var/log/syslog | grep wlan0

...assuming that wlan0 is your wireless interface. Find out with:

iwconfig

And also:

cat /var/log/syslog | grep <wireless_driver>

Substitute your wireless driver here. Find your wireless driver with:

sudo lshw -C network

Here is an example from my machine:

*-network
   description: Wireless interface
   product: Wireless 7260
   vendor: Intel Corporation
   physical id: 0
   bus info: pci@0000:03:00.0
   logical name: wlp3s0
   version: 6b
   serial: xx:3d:82:7a:fe:xx
   width: 64 bits
   clock: 33MHz
   capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
   configuration: broadcast=yes driver=iwlwifi driverversion=4.4.6-040406-generic firmware=17.265642.0 ip=192.168.0.125 latency=0 link=yes multicast=yes wireless=IEEE 802.11bgn
   resources: irq:31 memory:e0400000-e0401fff

Finally, from time to time, the log is archived and a new log begun. If the output from these commands is sparse, look at the archived log for more complete details:

cat /var/log/syslog.1 | grep Network


How to disable third party repositories in Ubuntu 16.04 LTS?

To workaround the problem (bug) of not being able to select/deselect repositories in Software & Updates, open Synaptic, enter your password, then select Repositories from the Settings menu.

But wait... do this first. In Synaptic, go to the Edit menu and select Fix Broken Packages. Do this twice. Then click the Reload icon, and if any errors appear, you need to fix those, to help solve your problem.

Once done, you probably won't need to disable repos, and you can continue with your Software Updater app.

Also, I'm guessing that you have a 64-bit computer, and virtualbox-5.2:i386 would be the wrong version of VB. You probably need to uninstall this version and install the 64-bit version. You can use Synaptic to do this.


This is normal, it's showing that your main partition /dev/sda5 is being checked for filesystem errors, by fsck, on every boot. In older versions of Ubuntu, the checks used to be after a specific time period or number of reboots. It appears that checking the disk on every boot is the default behaviour for 16.04.


After I log in, one letter (lowercase t) isn't working?

I had remapped it by mistake in Ubuntu Tweaks.


"Where is the documentation that explains what boot options you can
  put in to the grub.cfg?"

You can find the docs for GRUB in a few formats here, look for the sections 15 and 16.


How to see all of log history on ubuntu?

Take the below steps to  see log history on ubuntu :

open terminal >

sys3011@sys3011:~$ sudo nautilus

[sudo] password for sys3011:

after enter the password folder will open.

now go to this path  /var/log

here you can get all log files

log files folder


"Invalid OpenID transaction" when signing into Launchpad

I had to accept cookies for the website, of course ...

My browser rejects them by default. I feel really dummy.


I managed to make it work by adding a new dsl connection through sudo pppoeconf, and also making the same dsl connection in Network Connections, then running pon dsl-provider, then reboot.


What can be the issue when after installing Lubuntu 18.10 shortcuts for window tiling and other ones don't work?

To fix this, I went to Menu > Session settings and then disabled Global Keyboard Shortcuts under Basic settings tab.

All the keybindings from lxqt-rc.xml started working after that, including Super_L + E for pcmanfm and window tiling shortcuts.


Issues installing driver(s) for Canon MF212w

just go in /Linux_UFRII_PrinterDriver_V320_us_EN/64-bit_Driver/RPM and do

  su root

  dpkg -i cndrvcups-common_3.60-1_amd64.deb

  dpkg -i cndrvcups-ufr2-us_3.20-1_amd64.deb

  service cups restart

then search and add the printer from the system GUI.


While booting
Press “e” to get into edit mode. then look for the line containing ”
Change this line :
.... quiet splash ....

To this line :
.... quiet splash nomodeset ........

Press ctrl + x and continue booting
To make it persistent :
sudo nano /etc/default/grub

Change this line :
GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”

To this line :
GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash nomodeset″

Save file and update grub :
sudo update-grub

Reboot :
sudo reboot


localhost/mediawiki-1.30.0/ in browser returns run(); in Firefox and file content in Chromium

Enabling php for Apache2

sudo a2enmod php

and restarting Apache2

systemctl restart apache2

solved the problem.


If I understand correctly you have a Ubuntu machine being hosted for you by some company.

If so you have a web address of some sort to find that machine. Maybe its 123.456.78.90 or maybe its http://abdel.saad.hosting-company.com.
What is the address of your server, either the number or the FQDN.

A DNS server is like a phonebook it links google.com to 216.58.192.4. However domain names (at least good ones) aren't free. IF you want to buy abdelrahman.net you have to pay a registrar like namecheap or godaddy or ....
Then you like the EXTERNAL ip address to the new purchased domain. You don't use your personal DNS to map your machines public internet facing ip to a domain, thats what someone like google DNS or opendns does.

Webmin will use a port number by default it is 10000. That means that webmin is looking for a connection to the server it is installed on at port 10000.

The kind of DNS server you referenced are more for internal networks behind NAT.

ANSWER: go to http://'your_ip>':10000

Go to namecheap.com, buy a domain. In the dns section put in the ip address of that server. That will "link" the domain to the ip.


This may be caused if there are drivers that are available but are not activated. Go to System-Preferences-Additional Drivers. See if there are any drivers available for you to install.


How to disable/hide paid apps from Ubuntu Software Center?

Also if you click on the more info button on any application it tells you the price, the license and any other info you are likely to need.  I know it's not exactly filtering but it should help you make decisions on whether to install or not.


How to make sure other users can't see my files?

In a terminal, run

chmod 700 ~

as your own user. It'll make ~ (your homedir) only accessible to yourself (the root user will also be able to access it, but no one else). To learn more, see http://mywiki.wooledge.org/Permissions

You can also do this via nautilus (the file browser). Just open your home directory in nautilus, right-click in the folder (not on any of the files), choose properties, then the permissions tab, and set the "Owner" permissions to "Create and delete files". "Group" and "Others" you set to "None".


How to write a script to run different application

That is quite simple. Write a script something like this:

#!/bin/bash
xterm -e /bin/bash /path/to/script_1.sh &
xterm -e /bin/bash /path/to/script_2.sh &

The -e option means "execute". The argument after it is the command to execute (here it is /bin/bash) and the next option is the argument for the command (here the name of the script-file). & means that the xterm-commands are running in background. If you remove the first &, it will run the first script completely and afterwards it will start the next command, but as I understood your question you want to run them simultaneously, so leave the & there.

You can also use the standard terminal instead of xterm, but this depends on the distribution and desktop you use. For example in gnome it would be gnome-terminal -x, but it should not make any difference when using xterm.

Hope this helps.

Greatings, Darth Ravage


Package 'libwxgtk3.0-dev' has no installation candidate on Ubuntu 20.04

libwxgtk3.0-dev was changed to libgtk3.0-gtk3-dev in 20.04.


Can't use flashplayer since upgrading to 19.04?

This is a similar problem to what I had. I switched to a browser with no built in flash in it (i.e Firefox, Opera , Vivaldi) and used this guide to install a fresh version of flash (use flashplugin to install it) It appears chrome's built-in one is broken in 19.04. You can also try disabling it and use the method above to reinstall it, although I am not sure if that will work.

Edit: Response to below comment: Unsure. I switched to Firefox. Quantum is relatively fast.


System will not boot after sudo update and upgrade on 20.04 kubuntu

OK I have an update. The first thing i did was back up my home directory using tar. using information i found at https://www.dedoimedo.com/computers/linux-home-dir-backup-tar-gpg-guide.html then i wiped and reinstalled. I switched to Ubuntu studio as i am using Bitwig and the KDE plasma version is just great. then uncompressed my home directory back in its place. the next step was to import my Zpool and i was back up and running 80% complete. Still not sure what happened in the first place that messed up my old install. lets hope I'm not missing any thing. thank you!


Trying install of Ubuntu Core 16.04 on Intel NUC after installation of Desktop

Why do you want to install Ubuntu Core after installing ubuntu desktop?

You can use all the snap functions as it is shipped with Ubuntu 16.04


Recommended dual-boot partitioning for Eee PC 1015PX-MU17

I hope this is an answer to your question. What I would do is the following. It's based on an installation of ubuntu 11.04, but I think that the installation of ubuntu 10.04 will be much alike.

After backuping your data, format /dev/sda3 using Gparted on the Live-USB and keep it unallocated. After the job is complete, exit Gparted and start the installation of ubuntu 10.04. The ubuntu 10.04-installer will recognise the unallocated disk space, and you will have an option to install it just there. Do this. Ubuntu itself will make this ext4 and will divide your free space in partitions like 'filesystem', 'swap', etcetera.

Good luck.


Directories disappear and reappear in Ubuntu 16.04

Solution: Finally I have found a hint for the cause of this issue in the syslog:

systemd[1]: dev-disk-by\x2dpartuuid-0b1dc9a4\x2d417e\x2d4618\x2d879e\x2d406ceb613bb2.device:
Dev dev-disk-by\x2dpartuuid-0b1dc9a4\x2d417e\x2d4618\x2d879e\x2d406ceb613bb2.device appeared twice with different sysfs paths /sys/devices/pci0000:00/0000:00:02.2/0000:01:00.0/ata2/host1/target1:0:0/1:0:0:0/block/sdb/sdb1 and /sys/devices/pci0000:00/0000:00:02.2/0000:01:00.0/ata3/host2/target2:0:0/2:0:0:0/block/sdc/sdc1

Solution was, that the RAID1 became inconsistent and so with every boot only 1 (Virtual) HDD was mounted and their content became deviant by the time. I could then see in the RAID-Setup of BIOS, that there were 2 Virtual Disks instead of one! RAID1-Array. I think that the Marvell 88SE9230 SATA controller did not tolerate the last BIOS-Update very well. Next time when I update BIOS I will perform better checks afterwards.


ubuntu 16.04 keep restarting when running spark in yarn client mode

I had the same problem after upgrading to 16.04. It seems that you need to install gnome-shell, I don't why it was missing from!

$ sudo apt-get install gnome-shell

Update:
It is right that gnome-shell is missing from my Ubuntu  16.04, but the source cause seems to be something else, most probably exhausted memory which I did not have faced wiith Ubuntu 15.1! I will keep updating the answer.


You just need to shrink your windows partition ( sda3 ), then expand the extended partition ( sda4 ), followed by your ubuntu partition ( sda5 ) to use the free space.  You will need to boot from the livecd do to this so the partition is not in use.


The list of input methods in ibus preference is not as exhaustive as in Gnome Settings > Region & Language

It's per (IBus) design. IBus only provides a small selection of the available XKB layouts.

You can edit the /usr/share/ibus/component/simple.xml file yourself. (But save a copy somewhere, since your edits will be overwritten when the ibus package is updated.)

The short IBus list has been questioned in an upstream issue.


Getting "Permission denied" even when using sudo command

You are running the cat command as root, but the output redirection takes place in your current shell which runs as your normal user account.

You have at least three options to achieve your goal of adding lines to your apt sources:

Running the whole command including output redirection in a separate Bash root shell:

sudo bash -c 'cat >> /etc/apt/sources.list'

Using the tee command that copies output to a file (-a option to append to instead of overwrite existing files) and running that as root:

cat | sudo tee -a /etc/apt/sources.list

Using a terminal editor application like nano as root to modify the file:

sudo nano /etc/apt/sources.list

However, it is recommended to leave your /etc/apt/sources.list file as it is and add additional sources by creating new *.list files inside /etc/apt/sources.list.d/.


Restore the Ctrl + Alt + Num Pad 4 and 6 window positioning commands?

Install compizconfig-settings-manager . Search for "compiz" in the Unity Dash, or start with ccsm from the commandline.

Warning
CompizConfig Settings Manager (ccsm) is an advanced tool, and not all of its options are completely compatible with Unity.
As such, CCSM has been known to sometimes break users'
desktops. Please use caution and
know that you are taking a risk by following this answer or any other
answer that recommends the use of CCSM. In the event that following
this advice does break Unity, please see this
question for instructions on how
to reset it.

Find the Grid plugin:

Click on the key binding you want to change, click on Grab key combination, and press the keys you'd like to use.


Technically no, as you can read from the answers to this question.
(Ignore all answers involving Wubi as it is no longer actively maintained)
Practically, it will make your life much easier, and if this is the first time you are trying to install Ubuntu and there is no practical reason from refraining from the use of external memory (USB, DVD, SD etc.), e.g. because you have no USB port and/or CD drive.

So the next step would be writing DVD image, booting from that DVD and following the installation instructions.


Wired network connection drops frequently

This may be an unexpected solution, but are there any other 2.4GHz devices, such as cordless landline phones, baby monitors or wireless headsets in the vicinity? Your particular computer could have a weak signal, and when combined with the interference, that could cause the problem.

Oftentimes those are using the same ISM band http://en.wikipedia.org/wiki/ISM_band frequencies, but since they are not WiFi devices they can jam the WiFi band and break your connection. Folks who do wireless consumer support often call those frequencies the 'junk' band because some consumer devices do pretty horrible things to WiFi signals.


How to increase storage size in vmware esxi 6.5 ubuntu 18.04 guest os

Take a look at growpart. It allows you to grow a partition, ex. /dev/sda1, to use all available space, either to the end of the disk, or to where thr next partition starts.

Best practice on virtual disks is to have only one partiton pr disk, because it makes it much easier to expand and mange the disks.


See After login, mouse not working!

  The manual workaround for me is to switch to the text console with ctrl+alt+f1 and go back to X11 with ctrl+alt+f7.

  This magically reinitialize the mouse :-)


Script to monitor Internet connection stability

You can try something like that in a cron job

#!/bin/bash
wget -q --tries=10 --timeout=20 --spider http://google.com
dt=$(date +%Y%m%d_%H%M%S)
if [[ $? -eq 0 ]]; then
    echo "$dt:Online"
else
    echo "$dt:Offline"
    mail -s "Internet connection lost on $(hostname) at $(date)"
fi

I personnaly have a script that stores reports of connection quality (depending on package speedtest you can get from apt-get install speedtest-cli

#!/bin/bash
#***************************************
# FOR CRONTAB
# */10 * * * * /location/of/my-internet-test.sh
#***************************************
LOG_FILE="/var/log/internet_test_$(hostname).csv"
mkdir -p $(dirname $LOG_FILE)
DT=$(date '+%Y-%m-%dT%H:%M:%S')
SPEED_TEST_RES=$(speedtest-cli --simple 2>/dev/null)
#set -o xtrace
DL=$(echo $SPEED_TEST_RES | awk '{print $5}')
UL=$(echo $SPEED_TEST_RES | awk '{print $8}')
PING=$(echo $SPEED_TEST_RES | awk '{print $2}')
#set -x
#echo "Ping: '$PING' DL:'${DL}' UL:'${UL}'"
[[ -z "$DL" ]] && { DL=0; UL=0; PING=0; }
echo "$DT,$PING,$DL,$UL" >> $LOG_FILE

Note that its a better practice to call a script regularly from a cron than doing a loop


Is it possible to format an USB external HD keeping intact some directories and files?

Nope. If you format a partition that contains files, the operation will clear out all of the files.

What you COULD do is use gparted to shrink the ntfs partition on the external drive, then create a new ext4 partition in the newly created free space (again using gparted), then move the files from the old NFTS partition to the new ext4 partition. Once you've done that, use gparted once again to remove the ntfs partition and to grow the new ext4 partition to fill all of the unused space.


Impossible to delete files from USB stick

The problem is that the cloned system inherits the iso9660 file system, which is read-only by design. After you have finished using the USB drive as an Ubuntu boot drive, you can

restore the USB drive to a standard storage device. mkusb can create an MSDOS partition table with a FAT32 partition automatically and you select it from the main menu in mkusb version 12 (mkusb-dus).

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

If you run standard Ubuntu, you need an extra instruction to get the repository Universe. (Kubuntu, Lubuntu ... Xubuntu have the repository Universe activated automatically.)

sudo add-apt-repository universe  # only for standard Ubuntu

sudo add-apt-repository ppa:mkusb/ppa  # and press Enter
sudo apt-get update
sudo apt-get install mkusb mkusb-nox usb-pack-efi

https://help.ubuntu.com/community/mkusb/wipe
use some other partitioning tool if you want to create something more advanced (than a standard storage device). gparted is a good tool with an intuitive graphical user interface.


Swappiness setting ignored in systcl.conf

Try this:

Start a terminal emulator and run

cd /etc/sysctl.d/
echo "vm.swappiness = 10" | sudo tee 60-memory-management.conf
sudo chmod 644 60-memory-management.conf

Reboot and check if the new values are in use with:

cat /proc/sys/vm/swappiness`


PlayOnLinux “Error in main glxinfo is not installed. Please install mesa-utils package” LeagueOfLegends

Do exactly as it says: install mesa-utils.

You can do so by opening a terminal, and typing

sudo apt-get install mesa-utils

Entering your password and "y" when prompted. You can also install it through the software center.


su to different user no longer working in 12.04 LTS

It was because there is no shell defined in the /etc/passwd file for the tomcat7 user.


LEMP Stack "/usr/share/nginx/html/" is forbidden error

This is an nginx configuration issue, and not a PHP/Magento one.

NGINX is trying to do a directory listing and not passing things properly to Magento in the backend I think.

That's why it gives the error it does - it can't do a directory listing of the docroot because you haven't enabled that functionality, and you likely wouldn't need to if you hand it off to Magento properly and have correct redirects, processing, etc. in the NGINX side of things.


It sounds like Unity (or more likely, Compiz) has gone funky. Hit Alt+F2 to bring up the run dialog, then enter unity --replace. This will restart
Unity and should clear things up for you.


Just put the folders in ~/.icons and ~/.themes, which is the way to install them for your user specifically.


From gnome-screenshot command line, how do you predefine the area?

It looks like there isn't such an option but you can control your mouse from command line using xdotool, so you can try to play with it:

(gnome-screenshot -a &); sleep 0.1 && xdotool mousemove 100 100 mousedown 1 mousemove 500 500 mouseup 1

I use (cmd &) syntax to have command running in background (using just && here won't work because gnome-screenshot waits for input) and make small delay (try to experiment with values of sleep) to be sure that mouse won't be moving before it's ready. Then I use mousemove x y, mousedown 1 and mouseup 1 commands to simulate grabbing an area.

You should also check out more suited tool for getting screenshots which is import from ImageMagick:

import -window root ~/Pictures/img.png -crop 100x100+1100+1100


These are my Focal Fossa ( Ubuntu 20.x LTS ) Sources;
deb http://jp.archive.ubuntu.com/ubuntu focal main restricted
deb http://jp.archive.ubuntu.com/ubuntu focal-updates main restricted

deb http://jp.archive.ubuntu.com/ubuntu focal universe
deb http://jp.archive.ubuntu.com/ubuntu focal-updates universe

deb http://jp.archive.ubuntu.com/ubuntu focal multiverse
deb http://jp.archive.ubuntu.com/ubuntu focal-updates multiverse
deb http://jp.archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse

deb http://jp.archive.ubuntu.com/ubuntu focal-security main restricted
deb http://jp.archive.ubuntu.com/ubuntu focal-security universe
deb http://jp.archive.ubuntu.com/ubuntu focal-security multiverse


Try to use:

sudo apt-get update
sudo apt-get install papi-tools


Having trouble getting .sh working with crontab

You need to get a clear error message in order to solve this, although this appears to be a PATH variable problem(in such case you might need to concatenate path of your program to crontab PATH variable)

To get a clear error message from your command you need to redirect Standard Error Stream of the command to Standard Output Stream and redirect it to a file's input stream this can be achieved with 2>&1 operator, where the numbers represent file descriptors(wont go into details here).

command args > /debug.txt 2>&1

After modifying the the script once the crontab executes your script, you can look at debug.txt for error messages.


'sudo dpkg --configure -a' stuck at 'Setting up gconf2 (3.2.6-0ubuntu2) ...'

To clarify @cnvzmxcvmcx's and @David's comments:
When sudo apt-get update appears to get stuck for a long time, you abort it and try again. The second time, it says that you need to run sudo dpkg --configure -a which shows it is stuck on a package.
For the OP, that package was gconf2. For me it was something else (accountsservice).
What you do, is you can delete the package, e.g. sudo apt-get purge gconf2.
Once that package has been deleted, you can reattempt the sudo dpkg --configure -a and/or sudo apt-get update.


When using Adwaita-dark, how to fix the fuzzy look of disabled right-click menu items?

I don't use Sublime and so can't comment on that aspect.

However, for Filezilla and with Adwaita-dark, I see what you report:

When using Blackbird which is another dark theme, Filezilla looks like this:

To install Blackbird, run

sudo apt install blackbird-gtk-theme

I suggest you experiment with other dark themes if you don't find Blackbird satisfactory.

And, if you want to use Adwaita-dark for all other programs, but just want to run filezilla with Blackbird, create ~/.local/share/applications/filezilla.desktop with the following contents:

[Desktop Entry]
Name=FileZilla
GenericName=FTP client
Comment=Download and upload files via FTP, FTPS and SFTP
#Exec=filezilla
Exec=bash -c'GTK2_RC_FILES=/usr/share/themes/Blackbird/gtk-2.0/gtkrc filezilla'
Terminal=false
Icon=filezilla
Type=Application
Categories=Network;FileTransfer;
Version=1.0

As for whether what you see can be fixed, it appears that the GNOME team is just waiting for gtk2 to die. See /usr/share/themes/Adwaita-dark/gtk-2.0/hacks.rc. From there:

  This file contains horrible hacks to make this theme work with some programs
  This is mostly due to the limitations of gtk2 but sometimes its the fault of
  the programs themselves. Not going to point fingers.

  Either way, it's a WONTFIX for both, hence this horrible file.

To my mind, the solution is to use another theme that meets your requirements. Of course, one could always approach the developers of applications and ask them to make their applications play nice with Adwaita-dark. But I suspect they won't be overly interested.

Edit: The fuzzy effect is due to the application of text shadows. Text shadows, if used properly, can ensure text visibility against a variety of backgrounds and are often used for text belonging to desktop icons, given the fact that users may want to swap backgrounds, and hence background colors, at will. The downside is the fuzzy effect. You can read more about text shadows in Can text shadow enhance readability?.


Here is a temporary solution: press Alt+F2, type r and press Enter. GNOME Shell will restart and the logo will appear.


Can't get Vnc to work reliably over wifi under lubuntu

Answering my own question : I stopped using vino-server (which is buggy I think) and used x11vnc :
http://doc.ubuntu-fr.org/x11vnc and it now works fine.


How does the GNome Alsa Mixer Work with my settings - How do the settings work?

In short: within the sound architecture of Ubuntu, user interact with Pulseaudio, not with Alsa
If you cannot find an answer to your needs with the Pulseaudio features and tools, then you can remove the Audio server and keep Alsa only

Read https://askubuntu.com/a/427036/77093

 +--------------+
 | Audio        |
 | Applications |
 +------+-------+
        |
 +--------------+                          +---------------------------+
 |              |    Inputs and            |Audio control applications |
 | Pulseaudio   |    Outputs settings      |(gnome-control-center)     |
 | Server       <---+Volume levels   <-----+(pavucontrol, paman,...)   |
 |              |    Mixing                |                           |
 +------+-------+                          +---------------------------+
        |
 +------v-------+
 | Alsa audio   |
 | driver       |
 +------+-------+
        |
 +------v-------+
 | Audio device |
 +--------------+


Download the file.

https://docs.google.com/file/d/0B7kbO9nS2qKEMmQ5elZXVUhDRjA/edit?pli=1
Copy the folder named "rt3290sta-2.6.0.0" to /usr/src/.

i. Check the folder name again! The name should be rt3290sta-2.6.0.0.

ii. You cannot copy files to /usr/src/? Open the terminal and run:

 gksudo nautilus

Then a GUI window will open. Browse to Computer -> usr -> src, and paste the folder.
In the terminal run:

sudo dkms install -m rt3290sta -v 2.6.0.0 –force


how can I set my bash window title to the last command that ran?

Using only standard commands

lastcmd() { LASTCMD=$(history 1 | cut -c8-); echo -ne "\e]2;$LASTCMD\a\e]1;$LASTCMD\a"; }
PROMPT_COMMAND=lastcmd

Test it

echo 'This echo command should be displayed on my window title'

Timestamp

To also display the time of the last command, set the environment variable HISTTIMEFORMAT:

HISTTIMEFORMAT=%c

See man date for a complete list of date/time formats.

To disable the timestamp prefix on window title:

unset HISTTIMEFORMAT

Persistence

A good place to put these two lines is in your ~/.bashrc


"Verifying backup..." step in Déjà Dup hangs

It's not an issue as I also have this happening. You just have to give it time to perform that task.

I see this happening when the backup becomes too large, so I usually remove the old backup first and start afresh but make sure you have:

Uninterrupted power, and
Disable screen lock time out, as the screen must be kept alive.


reset video driver to original ubuntu driver

Following the details on this page I gained access to the broken Ubuntu installation and executing the following fixed the issue. After that I took out the LiveCD and rebooted and then I could login normally. I finally reinstalled the latest nVidia driver.

mv /etc/X11/xorg.conf /etc/X11/xorg.conf.nvidia


How can I check that GCC is installed correctly?

Just type on the commandline:

gcc -v

(give you both version and programs invoked by this compiler)

gcc --version

(give you the gcc version)


I had a similar issue with Chromecast Ultra. Just did it without specifing ports (which helped)
sudo iptables -I INPUT -p udp -m udp -j ACCEPT


To answer my own question, I didn't need to do any of this. In 16.04 network manager, edit the connection and in the device field, type the name (in this case enp0s20u3) instead of the MAC address. Deselect 'make available to all users' to make it automatically reconnect. - maybe a bug?


Ubuntu 20.04 don't recognize my Asus MB169B+ USB 3.0 Monitor (Works well in Win10)

I was having the same problem and then I found this post https://forums.linuxmint.com/viewtopic.php?t=323724
I removed the displaylink driver and libc6-dev then reinstalled libc6-dev and ran displaylink-installer:
Unplug monitor
sudo apt-get remove libc6-dev
sudo displaylink-installer uninstall
sudo apt-get install libc6-dev
Installed latest driver    as per Asus or    https://support.displaylink.com/knowledgebase/articles/684649
Whereas before I got errors about EVDI kernel being there already when I installed, now it installed properly.
I plugged in my monitor.
However it was still not detected when I went to Display properties.
I thought I'd try sudo displaylink-installer and despite the error message of Installation terminated, my MB169B+ kicked into life and appeared in Display and working properly.
I rebooted and it worked straight away.


Speeding Up Ubuntu 19.04 in Dual Monitor with Virtualbox

I was able to get a slight improvement on this problem by doing these two steps:

Tweak Animation Settings
Open Ubuntu Software Sources control panel, which might be listed as Additional Drivers control panel. You'll see a tab that says Additional Drivers. In there, I noticed two Innotek drivers. One was for Graphics Adapter, the other for Guest Service. Innotek is the maker of VirtualBox, owned by Oracle. I tried the 2 graphics adapter settings, but neither showed an improvement. The one that has "hwe" on it stands for hardware emulation. So, I set that setting to "Do not use the device" since it didn't improve it. Next, I went to the VirtualBox Guest Service driver, and set it on Using x86 virtualization service - guest addition module source for dkms from virtualbox-guest-dkms (proprietary). I also tried the one with "hwe" (hardware emulation). I found that the non-hardware emulation VirtualBox Guest Service version sped things up considerably. It still locks up slightly when the browser is downloading something slow, but the graphics processing is considerably faster on the second monitor now.


Type in terminal

pkexec visudo

Change last line

#includedir /etc/sudoers

To

#includedir /etc/sudoers.d

It should work.!


node.js conflicts: /sbin/node vs /usr/bin/node

update: modified instructions below to use the nodejs-legacy package.(more info about node-legacy)

Try completely removing the conflicting node package:

sudo apt-get --purge remove node
sudo apt-get --purge remove nodejs-legacy
sudo apt-get --purge remove nodejs

sudo apt-get install nodejs-legacy

# Confirm it worked
node --version       # v0.10.13
ls -la `which node`  # ... /usr/bin/node -> /etc/alternatives/node

This happened to me when I unwittingly installed the non-node.js node package. Although I did apt-get remove node before installing the correct nodejs package, I guess the --purge argument is required.

Background info:

  There is a naming conflict with the node package (Amateur Packet Radio
  Node Program), and the nodejs binary has been renamed from node to
  nodejs. You'll need to symlink /usr/bin/node to /usr/bin/nodejs or you
  could uninstall the Amateur Packet Radio Node Program to avoid that
  conflict.


tetview error while loading shared libraries: libg2c.so.0

On fresh 32 bit Ubuntu 14.04.4 LTS

Downloading:
libg2c0_3.4.6-6ubuntu5_i386.deb from here
libstdc++5_3.3.6-18_i386.deb from here
Extract with Archive Manager
Copy files to the right location

$ sudo cp ~/Downloads/libg2c0_3.4.6-6ubuntu5_i386/usr/lib/* /usr/lib/i386-linux-gnu/
$ sudo cp ~/Downloads/libstdc++5_3.3.6-18_i386/usr/lib/* /usr/lib/i386-linux-gnu/


How to resolve driver issues with cuda-9.0 installation?

I believe the error comes from an incompatible versions of Nvidia and CUDA driver. In my case, I ignored it and it worked fine, but do make sure that you have PATH set to /usr/local/cuda-XX/bin and LD_LIBRARY_PATH set to /usr/local/cuda-XX/lib64 in .bashrc or equivalent file.


I'm trying to figure bridge-utils myself, and came across your post. Dear people from the future, here is what I have figured out so far:

To bridge multiple interfaces I believe you just do something like:

brctl addbr br0
brctl addif eth0
brctl addif eth1
brctl addif eth2

then you configure the address of br0

Now as to the original question here:

from what you are asking I believe it is not really bridging. I think you just want to set multiple default gateways? This is more to do with routing rather than bridging.

Some bridging links:

https://help.ubuntu.com/11.10/serverguide/C/network-configuration.html#bridging
http://manpages.ubuntu.com/manpages/oneiric/man5/bridge-utils-interfaces.5.html


Accidentally ran command, now don't know what to do

The best way to fix this depends on details of how your system is set up. Fortunately, you probably know these details.
On files, +x means they can be run like a program. (Actually, it confers the permission to try. If they're not actual executable binaries or script files with a hashbang line, this will still fail.)
On directories (that is, folders), the +x permission means something else. Executable permissions on a folder confers the ability to enter into the folder and its subfolders (though its subfolders may not have the necessary permissions for this), and to attempt to access files inside the folder (the files may or may not have permissions that allow this to succeed).
This was o+x. o stands for other. That controls the permissions of users who don't own the file or folder, and also who are not members of the file or folder's "group owner."
If You Don't Currently Use Permissions To Share Files With Other Local Users
If a user (say, you) doesn't need to share files with other users, then it's safe to take away executable permissions for other, so long as you only do it everywhere inside your home folder. Your home folder is /home/username where username is replaced with your actual username. /home is not itself your home folder, but rather is the folder that contains all the home folders. Since /home itself is not actually owned by any human user of the computer, it is imperative that executable permissions for other not be removed from /home itself.
So, you can run:
cd ~

~ represents your home folder. (The shell interprets it as that, you can type exactly that.)
Then you can run:
chmod -R o-x .* *

Or if you want to prevent others from changing directory into your home folder itself as well:
chmod -R o-x ~

It's intentional that I haven't written sudo. You still own the files in your home folder, so you don't need sudo, and leaving it off will help to avoid changing permissions on the wrong files and folders by accident. (In particular, /home is owned by root, so by leaving off sudo, you make sure you're not accidentally changing the permissions for /home and making your system unusable.)
If You Do Currently Use Permissions To Share Files With Other Local Users
If you have some folders that you do share with other users on the machine (if you do, then you almost certainly know you do), then you can use the above method and then manually add executable permissions on those particular folders. But if you have too many for this to be practical, then especially if you're not worried about other users accessing things that they're not supposed to, you might want to just take away executable permissions from files, and not from folders. After doing this, you can then selectively take executable permissions away from some folders, of course.
To take away executable permissions for other from all the files in your own user's home folder, but not the directories, run:
find ~ -type f -exec chmod o-x \{\} \;

(You will note that this is similar to one of SEngstrom's suggestions. See man find for information about how this works.)


Unable to install photoshop CS6 on Ubuntu 18.04

You should try to install it with PlayOnLinux. It seems to be supported by PlayOnLinux team.
It will install the corresponding (and tested) version of Wine which can launch Photoshop.

Install PlayOnLinux with

sudo apt-get update
sudo apt-get install playonlinux

Run PlayOnLinux (from Games category or from terminal with playonlinux) and click Install then click on Graphics and select Adobe Photoshop CS6,

click Install and follow instructions in the wizard.
After installation desktop-launcher will be created.


It's a bug.

Hit these keys: right-control-F1, then right-control-F7 to fix your display.


Which one is active? How to switch it off? Or Switch GPU? Switchable Graphics Ubuntu GNOME

Open System Settings and click Details. The graphics card you're currently using for Unity and (probably) all your applications should be shown besides "Graphics".

However, if you want to know which card(s) are powered on, you can run:

sudo cat /sys/kernel/debug/vgaswitcheroo/switch

It should show something like this:

0:DIS: :Off:0000:01:00.0
1:IGD:+:Pwr:0000:00:02.0

The two entries refer to the two GPUs: the discrete GPU, i.e. AMD, or integrated GPU, i.e. Intel. Off means the GPU is off, and Pwr means the GPU is on.


How to create and administer multi-architecture PPAs?

Launchpad has a new feature currently in beta which allows you to build your package for multiple ubuntu versions at once without any extra work. You can even automatically build  your packages every day. https://help.launchpad.net/Packaging/SourceBuilds/GettingStarted


How to install the Epson L350 printer in Ubutu 14.04?

Try this:

Download Epson Printer/Fax/Scanner .deb Drivers for Linux here

Open a File Manager Window

Double-Click on All the Printer/Fax Driver Packages

After the Printer will be Recognized and Installed

Download Epson iScan Software on Download Center here

First Select Only the ‘Scanner Driver’ with ‘core&data‘ packages
Then Get Both ‘iscan2+… ltdl7‘ and ‘iscan-data’ .deb 32/64bit Packages

Open Terminal Window Ctrl+Alt+t

Install iScan for Ubuntu Linux

cd $HOME/Downloads
sudo su -c "dpkg -i ./iscan*.deb

Launch iScan and Start Scanning

iscan


Not really the place to ask about Windows scripting, but here you go. Add this to the top of one.bat, to rewrite the script file each time. This assumes your Windows regional settings are also set to dd/mm/yyyy.

for /f "tokens=1-3 delims=/" %%a in ('date /t') do set dashdate=%%a-%%b-%%c
set dashdate=%dashdate: =%
echo open server-ip-here > one.txt
echo username-here >> one.txt
[etc...]
echo mget /usr/backup_%dashdate%.zip >> one.txt


How to upgrade effortlessly from Ubuntu 10.04 to Ubuntu 11.10 on the same machine

There are two supported upgrade paths for Ubuntu; LTS-to-LTS and stepwise. That means that you should be able to easily upgrade from 10.04 to 12.04, but from 10.04 to 11.10 would require some steps:

upgrade from 10.04 to 10.10
Upgrade from 10.10 to 11.04
upgrade from 11.04 to 11.10

This would take quite some time, and because of unusually large changes in 11.04 and 11.10, I don't think I would recommend you even attempt it. If you are using a normal desktop without webserver or SQL, etc, then all your apps are configured in your home directory. This means that if you install a new Ubuntu and install your apps anew, then they would automatically use your current configurations and data. If you do have MySQL or similar installed, then it becomes more complicated as they often store their data in /var or other places.

Ubuntu 10.04 is supported until April 2013, so you shouldn't feel rushed to upgrade. In April you'll be able to upgrade directly from the update manager. If you do want to, then it might still be possible to use the new graphical installer to replace your current version, but I haven't tried that myself. You would then have to install your applications afterwards, but they would be automatically configured.

You do need to take precautions and please don't do this without having a backup.


Nvidia GTX 860M ubuntu 14.04 blackscreen

I have had the same problem for a long time and I think I have found the solution. I have Ubuntu 14.04 LTS, my graphic card is Nvidia GTX 860M. The problem of black screen or freezing on the splash screen is related to nvidia-drivers and openGL libraries that cuda installs alongside.

So here what happens:

First you install the graphic card driver which has 3xx.yy version. For me it was 346.82 (proprietary, tested). Usually, after this step you should not have OS loading problems.
Next when you take the .deb package which has all dependencies. This dependency is really huge and long, so nobody bothers to look what actually it tries to install. What it does is it installs nvidia drivers again. For me it was the same version 346. Here the subtle difference comes up. It installs 346.00 version and overrides previous installation of the 346.82. Usually, xxx.something means that it was patched several times and bugs were fixed. Cuda installation rolls back to initial 346.00 where a lot of bugs exist.
Alongside with Nvidia drivers it also installs lib-mesa which overrides the openGL files installed by previous Nvidia driver installation.

This problem is described here:
http://developer.download.nvidia.com/compute/cuda/7_0/Prod/doc/CUDA_Getting_Started_Linux.pdf
in the section "RUNFILE INSTALLATION" subsection 4.2. Here what it says:

"Installing Mesa may overwrite the /usr/lib/libGL.so that was previously
installed by the NVIDIA driver, so a reinstallation of the NVIDIA driver might be
required after installing these libraries."

This made me dig into that direction and find out the problem causing all this crap with freezing OS.

THE BOTTOM LINE

Whenever you install cuda either by *.deb or *.run files, make sure you apply correct nvidia driver before restarting your PC. After this OS should load properly + you can use nvcc compiler to compile and run cuda programs. (g++ installation may be required separately, depends how you install cuda).

For me it worked well. Hope it will help you too.

Additional steps:

If you have discrepancy between Nsight versions that you run from terminal and application launcher. Here are the steps to fix this:

ls ~/.local/share/

in my case I have got

chrome-aohghmighlieiainnegkcijnfilokake-Default.desktop
chrome-apdfllckaahabafndbhieahigkjlhalf-Default.desktop
chrome-blpcfgokakmgnkcojhhkbfbldkacnbeo-Default.desktop
chrome-coobgpohoikkiipiblmjeljniedjpjpf-Default.desktop
chrome-pdabfienifkbhoihedcgeogidfmibmhp-Default.desktop
chrome-pjkljhegncpnkpknbcohdijeoejaedia-Default.desktop
jetbrains-idea.desktop
mimeapps.list
**nsight.desktop**
nvvp.desktop
**org_eclipse_equinox_launcher_1_3_0_v20120522-1813_jar.desktop**

Make sure that Exec=/usr/local/cuda/bin/nsight TryExec=/usr/local/cuda/bin/nsight point to the cuda installation path. Also check if org_eclipse** is not used instead of nsight.


Here's something you can try.  Since the GNU/Linux 5.4.0-1008-raspi aarch64 kernel doesn't seem to have the support for exFAT built in, you can add it.  From https://www.techrepublic.com/article/try-out-this-new-linux-exfat-kernel-module-for-improved-performance/ you can follow the steps to download and install the exFAT support for the kernel.

Install git if it is not installed:

sudo apt install git

You may also want the build-essential package:

sudo apt install build-essential

Next, download the exfat-linux:

git clone https://github.com/arter97/exfat-linux

Enter the newly created folder which should be cd exfat-linux

Then run the following to install the kernel module and make it active:

make
sudo make install
sudo modprobe exfat

Now when you run cat /proc/filesystems you should see exfat at the bottom of the list.


Ralink 148f:760b mt7601 driver doesn't build on 12.04 even when patched

Answering to myself.

I was too eager to apply the patch. Without the patch applied, the driver compiled. However it seems either to map incorrectly or to just not work with my 148f:760b (<- notice the b instead of 1) usb adapter. I even modified the devices list to add a new alias, but even after loading the driver or a bunch of other stuff related to it, the adapter just was not recognized.

But when I installed the driver in Windows 7 (didn't seem to work on Windows XP) and after the installation process copied over the driver folder located in C:/ProgramData/Mediatek Driver/RT2870 Wireless LAN Card/Driver/ to Ubuntu and loaded it with ndis wrapper and with ndiswrapper-dkms package, the adapter was immediately functional. Actually, on Windows side it didn't recognize my wlan at all for some reason but on Ubuntu it was just one click and I was immediately online wirelessly.

So, odd behavior here and there but finally working.


Use apt to discover what packages do.

Here is an example:

$ apt show clamav-unofficial-sigs
...
 This package provides a script for updating the following sources of
 3rd-party clamav signatures until freshclamav gains support for such
 signatures.
 .
 The SaneSecurity/OITC signatures provide detection of phishing, spear
 phishing, fake lottery, ecard malware, casino, fake jobs, fake loans,
 419s, fake diplomas, porn, emailed malware and other general spam.
 .
 MSRBL signatures provide detection of image spam and general spam.
 .
 SecuriteInfo signatures provide various badware signatures,
 securiteinfo.com honeypot signatures, honeynet.cz signatures
 and French anti-spam signatures
 .
 MalwarePatrol provides detection of mail containing URLs to malware.


Using zip with -T and --password at the same time.

There appears to be no good method to bypass this limitation with the zip application unfortunately. However if you are scripting this a good workaround is to use the unzip utility to test the zip file in the subsequent line of your script.

Thus you would have something like the following (omitting the -T option for zip):

zip -rm9 --password pass123 /home/cats.zip /home/cats-data/
unzip -t -P pass123 /home/cats.zip

And this should accomplish your goal!

Notes:

Options I have used for unzip are:

-t test archive files.  This option extracts each specified file in memory  and compares  the  CRC  (cyclic  redundancy  check,  an enhanced checksum) of the expanded file with the original file's stored CRC value.
-P use  password  to  decrypt encrypted zipfile entries (if any).


Avi and MP4 are proprietary formats, so you need to install the Ubuntu Restricted Extras. From the description of the package: "[Installs] Commonly used applications with restricted copyright (mp3, avi, mpeg, TrueType, Java, Flash, Codecs)"

Open the Ubuntu Software Center and search "Ubuntu Restricted Extras"


Renaming files with a prefix and suffix in folders of varying depths

This bash script should do: the path to manipulate has to be passed to it as an argument (this is intentional), e.g.:

./script.sh <directory>

#!/bin/bash

while read filepath
do
    newpath="$(<<< "$filepath" sed 's/^\(.*\)\/\(.*\)\/[^ ]*\(.*\)$/\1\/\2\/Folder \2 - Page 0\3/')"
    mv "$filepath" "$newpath"
done <<< "`find $1 -type f \( -iname '*.png' -o -iname '*.jpeg' -o -iname '*.jpg' \)`"

Before:

<directory>
├── f1
│   ├── Image 01.png
│   ├── Image 02.png
│   └── Image 03.jpeg
├── f2
│   └── f2.1
│       ├── Image 04.jpeg
│       ├── Image 05.jpg
│       └── Image 06.jpg
└── f3
    └── f3.1
        └── f3.1.1
            ├── Image 07.png
            ├── Image 08.png
            └── Image 09.jpeg

After:

<directory>
├── f1
│   ├── Folder f1 - Page  001.png
│   ├── Folder f1 - Page  002.png
│   └── Folder f1 - Page  003.jpeg
├── f2
│   └── f2.1
│       ├── Folder f2.1 - Page  004.jpeg
│       ├── Folder f2.1 - Page  005.jpg
│       └── Folder f2.1 - Page  006.jpg
└── f3
    └── f3.1
        └── f3.1.1
            ├── Folder f3.1.1 - Page  007.png
            ├── Folder f3.1.1 - Page  008.png
            └── Folder f3.1.1 - Page  009.jpeg


Software Center Crashing, Im getting annoyed

Open your terminal (Right click your desktop):

    sudo apt-get --purge --reinstall install software-center

If that doesn't work:

    sudo apt-get install synaptic

Open Synaptic File Manager, click reload at the top left. Open the "edit" dropdown at the top of the window and click "fix broken packages."

You most likely removed something that software center required.


split /home partition for program-created user-specifiec files and user created files?

As long as you always mount your separate data partition I can see little if no benefits for the security aspects you mentioned.

Any mounted partition including your data partition can be written to by you and by all your applications in case you had the appropriate permissons. A virtualised Windows will however only be able to access you data in case you had defined a shared folder or network access (the big file it creates is a closed virtual hard drive container).

Still, there may be cases where splitting our HOME and a dedicated data partition may be useful.

Examples:

have a shared partition accessible to other users using ACL
have data that should only be read but never be written to (mount as read only)
ease maintaining a different backup strategy for data vs. application settings (but this can also be done without a dedicated data partition)
access data from different Linux distributions or releases in a multi-boot setting where application settings should not be shared
have your OS and HOME on a small SSD but want to keep big files (virtual machine disks, videos, music, pictures) on a large conventional drive
store sensible data in an encrypted partition when you do not need an encryption of all of your home


ECRYPTFS_FNEK_ENCRYPTED files and folders

Looks like ecryptfs-recover-private might work for you, it's supposed to search all drives for encrypted private folders and let you decrypt/read them, or you tell it which private folder to try. May work best when ran from a live cd/usb, maybe try that if it doesn't work.


How do I remove this horizontal line on my screen?

If you are indeed using Xubuntu 18.04, see Horizontal Line Across Screen on Xfce
 which has this advice:

  I finally found the fix: open Window Manager Tweaks and untick the ‘Show shadows under dock windows’ checkbox on the Compositor tab. It would remove shadows from under docks and deskbars.


How to execute a command with "=" sign in a desktop shortcut?

You should be able to use the env command

Exec=/usr/bin/env VDPAU_DRIVER=va_gl firefox

See the manpage at man env

ENV(1)                           User Commands                          ENV(1)

NAME
       env - run a program in a modified environment

SYNOPSIS
       env [OPTION]... [-] [NAME=VALUE]... [COMMAND [ARG]...]

Alternatively, create a wrapper script and call that instead.


One of many options: Creating a sparse file, formatting it with a file system, mounting it, and sharing it.

There are a few ways to go about it. Some require a bit of configuration. Here's a simple approach that won't require installing any special quota management software. Basically, we set up a 10GB container that we format as ext4 (or whatever), mount, and share.

Decide where you want to save her 10GB file. Open a terminal and cd to that directory.
Create a 10GB sparse file. This will actually start out with a real size of zero (reported by ls as 10GB though) and grow (du command can show real size) as she adds data

dd if=/dev/zero of=10GB_Container.img bs=10G count=0 seek=1

Format the sparse file

mkfs.ext4  10GB_Container.img

Create an empty folder somewhere on your computer where you'll mount the sparse file.

mkdir /your/path/to/mount/point

Open /etc/fstab for editing and at the very bottom, add an entry to automatically mount your sparse file. Add the following line, changing the paths. The mount will take place automatically on successive boots.

/path/to/10GB_Container.img    /your/path/to/mount/point    ext4    defaults,loop    0    2

If you don't want to reboot at this point, mount the sparse file

sudo mount /your/path/to/mount/point

Point the file sharing server for your sister's directory to /your/path/to/mount/point.

Now your sister will be limited to 10GB, because the sparse file you created can't grow beyond that size. If she looks to see how much space she has available to her, the limit will be 10GB regardless of the size that the sparse file actually uses on your disk.

Like I said, there are other ways to go about this. I leave other approaches for others to post in separate answers.


How do I build MySQL server (5.5.8 is current latest)

To install:

Remember that the instructions in the MySQL manual assume you are logged in as 'root'. See RootSudo.

Another thing I ran into - before running the 'scripts/mysql_install_db --user=mysql' command you must have installed libaio1.

I just removed and installed manually using MySQL docs. I am running the 'perl mysql-test-run.pl' now. Been running successfully for 25 minutes but thought you'd like preliminary answer(s).

Cheers.


Reboot Ubuntu without going through the BIOS POST

On standard x86 PCs address 0x472 controls whether or not one does a cold or warm reboot. By writing 0x1234 to this address, the BIOS should do a warm reboot, and if zero is written to this address a cold reboot will occur.

This can be controlled with the kernel parameter reboot=w (warm) or reboot=c (cold).  So using sudo and your favourite editor, edit /etc/default/grub and change

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash reboot=w"

and save.  Then run:

sudo update-grub

and reboot.  Hopefully, you should be doing warm reboots from now on.  I've not tested this, but the code is there in the kernel to support this, see arch/x86/kernel/reboot.c in the kernel source and how reboot_type controls the reboot.


Winetricks not in dash or menu - Ubuntu 13.04

You can use the terminal to add an application shortcut. You'll only have to do this once and it's fairly easy.

Open up a terminal window by searching for "Terminal" or pressing Ctrl+Shift+T.

Type in the following:

nano ~/.local/share/applications/winetricks.desktop

This will open a text editor.

Copy and paste in the following into the terminal window:

[Desktop Entry]
Version=1.0
Name=Winetricks
Comment=Wine Package Manager
Exec=winetricks --gui
Terminal=false
Type=Application
Categories=Applications
Comment[en_GB]=Wine Package Manager

Then press Ctrl+O then enter to save it. Now press Ctrl+X to exit.

The last thing you'll need to do is to make it executable. To do this, type the following:

chmod 777 ~/.local/share/applications/winetricks.desktop

Done. Now when you look for "Winetricks" in the Unity search lens, it will appear. The icon will be a blank page.

Edit:
You can put this winetricks.desktop wherever you want, you could make the file in gedit then right click > properties > allow executing file as program. Then you can put it where you want and double click it to run it.


How to get XChat to automatically "ghost" the old "session" on provider-forced reconnect?

This is based off my SU answer to a similar question

Assuming all versions work the same, you can put /msg nickserv ghost name password as a connect command under server settings for freenode.

To change your nick as well is a little tricky - type in

  /msg nickserv ghost username password

Then CTRL SHIFT u a

  /nick username

As one line. This should do both commands one after another.


`apt is not found` when trying to install software on a new Ubuntu laptop from Dell

Firstly, when you run sudo you are prompted for the password.  The password would be the password for the user logged in.  So if you are under the user foo, the password you would enter is the password for foo.  It won't show the typed characters or even placeholders though.

Secondly, there is no space between apt and -get.  The actual program is called apt-get.

Thirdly, there should not be ANY spaces in the package name, so texlive -full is wrong, it is texlive-full.

Therefore, the commands you should be running are:

sudo apt-get update
sudo apt-get install texlive-full
sudo apt-get install tilda

Alternatively you can try the following to actually use the apt tool instead of apt-get, however I would recommend that you use apt-get instead:

sudo apt update
sudo apt install texlive-full
sudo apt install tilda


Windows partitions not showing up when installing Ubuntu 14.04?

Your partition table is sufficiently incorrect to make GParted and the Ubuntu installer ignore it.

The primary partition /dev/sda2 is defined to use sectors 27967488 to 1706840062 and the primary partition /dev/sda3 is defined to use sectors 1706840064 to 1707761663; both of them overlap parts of the extended partition /dev/sda4, which is defined to use sectors 81857 to 1953520064. Windows seems to be happy enough with your partition table, but GParted isn't, and apparently the Ubuntu installer is equally unhappy.

You need to somehow remake the partition table without primary partitions overlapping the extended partition. I cannot provide a safe way of doing it, that is, a way of doing it which is certain to have no effects on the Windows operating system.

Partition table manipulations may result in loss of data; make adequate backups before you apply any modifications to the partition table. You should also make a backup of the partition table itself (sudo dd if=/dev/sda bs=1M count=1 of=somewhere-safe).

Once you are satisfied that you have adequate backups you may try to use fdisk to correct the partition table, either automatically (press x for expert functionality, then f for fix, p to see what fdisk did, v for verify and finally w if you want the changes written to disk), or manually by deleting and recreating partitions in a correct order with the same start and end sectors (except the extended partition, of course). I don't know whether this may have consequences for the drive letter assignment in Windows. Consider all implications before proceeding.

See also:

GParted doesn't see partitions recognized OK by other aps on Ubuntu Forums.
GParted Live can'r see my partitions, Windows can on GParted forum.


How does one open the HUD from the command line.

The HUD service is available as a service on DBus, so if you'd just like to poll it for information you can do that with a gdbus command, like this.

gdbus call --session --dest com.canonical.hud --object-path /com/canonical/hud --method com.canonical.hud.StartQuery "my query" 5

If you're trying to get Unity to show the HUD prompt you can do that with the XTest extension using xdotool like this:

xdotool key alt

If you're interested in playing with HUD it's probably best to use the hud-gtk tool which is in the indicator-appmenu-tools package.


Replacing Characters With Other Characters

To replace characters in a variable in the bash shell, you can use parameter expansion

Ex. to replace each space with a plus character

$ var='some string    with spaces'
$ echo "${var// /+}"
some+string++++with+spaces

or to replace sequences of spaces with a single plus (provided you have enabled extended globbing in the shell)

$ echo "${var//+( )/+}"
some+string+with+spaces

You can assign to a new variable newvar="${var//+( )/+}" or reassign to change the value of the variable directly i.e.

$ var='some string    with spaces'
$ echo "$var"
some string    with spaces
$
$ var="${var//+( )/+}"
$ echo "$var"
some+string+with+spaces

Here's an illustration of its use in the context described in your updated question:

Construct a minimal ~/.bash_profile

if [ -r $HOME/.profile ]; then
  . $HOME/.profile
fi

search() {
  read -p 'Please enter a search term: ' searchterm
  c="https://www.google.com/#q=${searchterm//+( )/+}"
  echo "OPENING: $c"
}

Then start a new login shell and test it

$ bash -l
$ search
Please enter a search term: ask   ubuntu
OPENING: https://www.google.com/#q=ask+ubuntu
$


Continue/Retry do-release-upgrade after fixing problem?

Just run it again, it starts from point where last time left out


Adding the tar '-z' (gzip) parameter at the end of 'tar -cvpfz ...' doesn't work as expected

The -f option should be followed by a file or device name. When using tar cvpfz target.tar.gz dir1 you are actually using the so-called "Old Option Style" where

  When options that need arguments are given together with the command, all the associated arguments follow, in the same order as the options. (tar info page)


You can install it from the Ubuntu Software Center by clicking the button below:

You can then open a terminal via Ctrl-Alt-T and run it by typing mupen64plus and then the name of the ROM you want to run. See the manpage for the instructions.


Unable to repair packages in Ubuntu Software Center

Open a terminal and use these commands

sudo apt-get install -f

sudo dpkg --configure -a

sudo apt-get update && sudo apt-get upgrade

After the last one you should be able to open your USC again without faults.

Edit

Comments explain that key 5A9A06AEF9CB8DB0 is missing, during sudo apt-get update this fault comes up:

W: GPG error: http://ppa.launchpad.net oneiric Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5A9A06AEF9CB8DB0

To repair the key these commands can be used:

sudo gpg --keyserver keyserver.ubuntu.com --recv-keys 5A9A06AEF9CB8DB0
sudo gpg --export --armor 5A9A06AEF9CB8DB0 | sudo apt-key add -

After that sudo apt-get update should work, if you get no faults on it you can open USC again and click on the repair button.


To turn on or off use of the top bar to display application menus:

Install gnome-tweak-tool
Select the tab labeled "Top Bar"
Toggle "Show Application Menu".

An alternative is to make rhythmbox show the settings gear icon.  To do this run:

gsettings set org.gnome.settings-daemon.plugins.xsettings overrides '{"Gtk/ShellShowsAppMenu":<0>}'

then restart rhythmbox

Source: https://extensions.gnome.org/review/1239


The answer for this depends upon which version of ubuntu you are using (answer copied from here):

For lucid, download the appropriate Karmic .deb package from originally from here but now in the official archives here and install it i.e. amd64 is 64bit ubuntu, whereas i386 is 32bit ubuntu.

For maverick users, you’ll have to download and install libgtkhtml2-0 package from the following site to solve the dependency issue of python-gtkhtml2.