The answer was in this Stack Overflow question by starry-eyed-sysadmin.

  How to use dump and restore to 'clone' a Linux OS drive

  You can find plenty of info online about using dd to clone OS drives.

  Don't listen! It's MUCH faster to use dump and restore because you only copy the data, rather than copying all the blocks (empty or not).

  Part 1: Know where your source and destination drives are in the device list

lsscsi | grep sd*

  will show you a list of scsi devices and their associated letters. If you are lucky enough to be working with a hot-swapable box, then you can simply run that command before and then after you insert the drive--the newest device to show up is, of course, the drive you just inserted.

  Part 2: Prepare to dump

  Safety tip: assign variables for the destination and source devices. (Also, if you are doing this more than once, variablization allows you to reuse the commands.)

SOURCE=/dev/sdx DEST=/dev/sdy

  A note on the source drive (the one you are copying from). If you are copying the current OS drive, it will (duh) already be mounted. If you are copying a different drive, it actually doesn't need to be mounted.
  Copy the partition table of your source drive out to a file:

sfdisk -d $SOURCE > part_table

  Copy the part_table already stored in a file

sfdisk --force $DEST < part_table

  Zero out the boot sector:

dd if=/dev/zero of=${DEST}1 bs=512 count=1

  Make your filesystem (one partition at a time):

mkfs -t ext4 ${DEST}1
mkswap ${DEST}2

  Take a look:

parted $DEST --script print

  Copy the label of all non-swap partitions. Example:

tune2fs -L "/" /${DEST}1

  Part 3: The dump | restore moment

  Make a directory to mount the destination device of the dump | restore. (As mentioned above, source device need not be mounted.)

mkdir -p /mnt/${DEST}1

  Mount the destination device:

mount -t ext4 ${DEST}1 /mnt/${DEST}1

  cd into the mount point:

cd /mnt/${DEST}1

  Dump and restore:

dump -a0f - /dev/${SOURCE}1 | restore -rf -

  (dump flags: a=autosize; 0 (zero)= start at block 0; f = file, - = stdout; restore flags: r=rebuild; f=file; - = stdout)
  The dump | restore should take just a few minutes.

  Part 4: use grub to install a boot loader onto the cloned drive

  Assuming you are copying an OS drive (i.e., a drive off which you boot a box), you need to install a boot loader.
  Grub identifies disks as hd#, starting from 0 (NOT 1). The correspondence is easy: /dev/sda = hd0, /dev/sdb = hd1, etc.

   [root@drive-toaster /]# grub

 grub> root (hd1,0)  # use correct number for your disk!
 root (hd1,0)
 Filesystem type is ext2fs, partition type 0x83

 grub> setup (hd1) # use correct number for your disk!
 setup (hd1)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... yes
 Running "embed /boot/grub/e2fs_stage1_5 (hd1)"...  27 sectors are embedded.
 succeeded
 Running "install /boot/grub/stage1 (hd1) (hd1)1+27 p
 (hd1,0)/boot/grub/stage2 /boot/grub/grub.conf"... succeeded
 Done.

 grub> quit


How to see why apt has a specific package version installed?

sudo apt-get purge '^wine'
sudo apt-get dist-upgrade
sudo apt-get autoremove
sudo apt-get clean
sudo apt-get install wine
sudo apt-get update
sudo apt-get upgrade

would be my best guess that should update eveything on your computer through terminal, remove everything related to wine and all wine everything clean up reinstall update and upgrade it if it can.
Wines been on the decline for the last couple of years, nothing will break with that purge command I promise it just removes the wine filesystem all together and reinstalls it all dist-upgrade upgrades all those not upgraded things


Let's understand how rm -rf command works first. It removes everything in a given directory and the directory itself, so if you give it path $HOME/directory_1/directory_2/ the directory_2  will be gone along with its files. The rest of the path will be safe. Heres' an example:

$ tree somethings/
somethings/
└── subdirectory_1
    ├── a
    └── b

1 directory, 2 files
$ rm -rf somethings/subdirectory_1/

$ tree somethings
somethings

So as far as your commands go:

rm -r "$HOME/.wine" only removed .wine directory
rm  $HOME/.config/menus/applications-merged/wine* only took care of all files starting with wine string in $HOME/.config/menus/applications-merged folder
rm -r "$HOME/.local/share/applications/wine" removed the wine folder only
rm $HOME/.local/share/desktop-directories/wine* got rid of the files starting with wine in  $HOME/.local/share/desktop-directories folder
rm $HOME/.local/share/icons/????_*.xpm nuked all .xpm files.

In other words they're sufficiently safe.

What me and Rinzwind have discussed in the comments and Ask Ubuntu chatroom, is that it's possible to alter $HOME variable. Yes, it is possible, but if you intentionally alter $HOME , you need to keep that in mind; otherwise, it's not rm's fault and let's be honest - it's plain stupid from user's point of view. Commands work only on the path you give it, so give the commands proper path.

Other potential issues is spaces. If you have space in your home folder name, like /home/My User, then without quotes around $HOME the shell will think you're giving it two arguments, /home/My and User. This effect is known as word splitting. So always quote your variables like "$HOME"


You have to use a font which can show all the unicode characters.

Install the Hanazono fonts shown in the test page.
Choose HanaMinA in the firefox's preference.

test page


How to fix broken nautilus-dropbox icon in ubuntu 18.04 GNOME-Flashback in top Panel?

To sum up:

Run

dropbox stop && env XDG_CURRENT_DESKTOP=Unity dropbox start

Click on Dropbox icon after it starts up. Go to the "Preferences" and uncheck "Start Dropbox on system startup" (to prevent dropbox from changing the startup command after reboot.)
Go to Applications > Preferences > Startup Applications, if Dropbox is already there click on Edit, and if not click on Add.

Enter
Name:        Dropbox
Command: env XDG_CURRENT_DESKTOP=Unity dropbox start
Comment: Sync your files across computers and to the web
Run

gedit ~/.config/autostart/dropbox.desktop

replace Exec=dropbox start -i with

Exec=env XDG_CURRENT_DESKTOP=Unity dropbox start

and

Run

sudo gedit /usr/share/applications/dropbox.desktop

replace Exec=dropbox start -i with

Exec=env XDG_CURRENT_DESKTOP=Unity dropbox start


Unable to set password for the mysql "root" user

Same root password setting problem here, mine possibly caused by an unsuccessful manual installation of mysql server 5.6 previously. A thorough mysql uninstallation is no easy task. I purged/reinstalled for hours then finally solved it with

sudo dpkg --purge mysql-client-core-5.5 # or alternative version
sudo dpkg --purge mysql-client
sudo dpkg --purge mysql-server-core-5.5 # or alternative version
sudo dpkg --purge mysql-common

Basically I just type

sudo dpkg --purge mysql # followed by two tabs

Then --purge any packages the terminal auto-completes. Purge mysql-common at last because of some dependency problems.

Use above dpkg commands in addition to

sudo apt-get --purge remove mysql-server
sudo apt-get --purge remove mysql-client
sudo apt-get --purge remove mysql-common
sudo apt-get autoremove
sudo apt-get autoclean

Also I tried Greq's method

sudo rm -rf /etc/mysql

Remove the mysql folder from /var/lib

sudo rm -rf /var/lib/mysql/

At this point, to make sure mysql is fully removed, check with

which mysql
mysql --version

The first one should return no output instead of a folder. The second should return mysql is not installed instead of a version number. Otherwise the removal is still incomplete.

The significance of dpkg --purge is, when using apt-get alone, which mysql and mysql --version behave like mysql is still there.

Before reinstallation, reconfigure dpkg and update

sudo dpkg --configure -a
sudo apt-get update

Problem resolved finally. Hope it will be helpful for other people.


SSD is more sluggish in Unity than my HDD on 14.04

Sounds like the connection might be maxing it out.

You say it's an older computer so it likely has IDE or sata 1 which means 150 MBs is the best you could expect mathematically. Remember sata 1 is 1.5GBs raw, but only 150mbs usable, sata 2 is 3GBs raw 300mbs usable, and sata 3 is 6GBs raw 600MBs usable.

Real world you're exactly where you should be for the kind of connection I assume you're using.

Also you're using swap on the hard drive which means any data that gets saved there will reduce your system performance! Loose the hard drive swap, or at least disable it at startup.


Can't increase the number of recent documents in gedit

This option has been removed in recent versions of gedit, so the dconf key was also removed.
A workaround is to use the Quick Open plugin, which shows more than 10 recent files. As a bonus, you can also search for files with it.
Install, if you haven't already the gedit-plugins package, which contains the Quick Open plugin along with a bunch of other useful plugins:
sudo apt install gedit-plugins

To enable the plugin click the hamburger menu ≡ → Preferences → Plugins and enable Quick Open (see screenshot below).

After that press Ctrl+Alt+O to open a window which shows your recently opened files and also allows to search for files to open.


Error during installation from try ubuntu

You should go thru the below properly before starting the installation of Ubuntu...

https://help.ubuntu.com/community/WindowsDualBoot
https://help.ubuntu.com/community/MultiOSBoot
http://lifehacker.com/5403100/dual+boot-windows-7-and-ubuntu-in-perfect-harmony


A temporary work-around you can use is tether via the iphone bluetooth connection with the blueman package (that's what I've been doing in Maverick):

Open your terminal and type:

sudo apt-get install blueman

Then, activate your iphone's internet sharing via bluetooth, and using blueman pair it as an access point connection.


You have some errors i believe, shouldn't it be:

  [Dialer Defaults]

  Init1 = ATZ

  Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0

  Init3 = AT+CGDCONT=1,"IP","internet",,0,0

  Phone = *99#

  ISDN = 0

  Modem Type = USB Modem

  Password =

  New PPPD = yes

  StupidMode = 1

  Username =

  Modem = /dev/ttyACM0

  Baud = 460800

Also you should check if your provider doesn't really use a username and password.


Problem writing 'pipe' symbol on danish keyboard (Ubuntu 12.04 server, console)

Seems to have been an old-crappy-keyboard-issue - just connecting another keyboard fixed it. Hope I didn't waste anyone's time on this.


How to search text within PDF files with docfetcher?

Is there any difference between PDF files with only text and PDF files with texts and images scanned pages?

Yes, PDF files with text and PDF files with scanned images are different. In Image based pdf, the computer only sees images and recognizing texts within these images requires extra capabilities be built into the PDF engine, such as Optical Character Recognition (OCR). The PDFs with text are easier for computer to search because computer can recognize text directly.

Recommendation

One way to search scanned pdf is first doing OCR on them to extract text and then perform search. Have a look at this question for some good OCR for Ubuntu What's the best, simplest OCR solution?
For searching texts in PDFs with Text only, I recommend command line tool pdfgrep. There are other good options too. Take a look at this question How do I search a PDF file from command line?


Clone option is not available in VM Virtual Box

You can use the command line:

VBoxManage clonevm          <uuid|vmname>

This command creates a full or linked copy of an existing virtual machine.

The clonevm subcommand takes at least the name of the virtual machine which should be cloned. The following additional settings can be used to further configure the clone VM operation:

                            [--snapshot <uuid>|<name>]
                            [--mode machine|machineandchildren|all]
                            [--options link|keepallmacs|keepnatmacs|
                                       keepdisknames]
                            [--name <name>]
                            [--groups <group>, ...]
                            [--basefolder <basefolder>]
                            [--uuid <uuid>]
                            [--register]

useful links:

HOWTO: Cloning a complete VM (not only the VDI)
VBoxManage clonevm


How to create a launcher for Wine in Ubuntu 14.04 LTS?

You can create a launcher item in /usr/share/applications or in /home/user/.local/share/applications.

This is a file with extension .desktop.

Procedure:

Open a terminal,Press Ctrl+Alt+T

Run it:

sudo -i
nano /usr/share/applications/msoffice.desktop

The file should look similar to this content:

[Desktop Entry]
Name=Msoffice
Comment=Microsoft Office
Exec=sh -c "cd /home/user/.wine/drive_c/Program\ Files/Msoffice_Folder; wine msoffice.exe"
Icon=wine
Terminal=false
Type=Application
Categories=Wine;
StartupNotify=true

Ctrl + O, save file. Ctrl + X, close nano.

So you'll be able to locate your application in the Launcher by typing "msoffice".


How to change the color of the ">>>" from python when running in terminal

You can edit the Python prompt - see http://www.doughellmann.com/PyMOTW/sys/interpreter.html#interactive-prompts

I can't say how one would embed colour codes in the prompt string, but it should be possible.


How can I find the discharge rate of the battery?

You can try powerstat, which gives you the watts used over a period of 5 minutes. To install it, try the following commands:

sudo add-apt-repository ppa:colin-king/powermanagement
sudo apt-get update
sudo apt-get install powerstat

Or you can try the power-usage-report, which I guess, depends on fatrace and powertop.

Linked Question:

How to check battery status using terminal?


The command

grep -r 'download.opensuse.org' /etc/apt

shows where the repository is configured, e.g.:

/etc/apt/sources.list.save:deb http://download.opensuse.org/repositories/home:/sarimkhan/xUbuntu_14.04/ ./
/etc/apt/sources.list.save:# deb-src http://download.opensuse.org/repositories/home:/sarimkhan/xUbuntu_14.04/ ./
/etc/apt/sources.list:deb http://download.opensuse.org/repositories/home:/sarimkhan/xUbuntu_14.04/ ./
/etc/apt/sources.list:# deb-src http://download.opensuse.org/repositories/home:/sarimkhan/xUbuntu_14.04/ ./

In your case it is in

/etc/apt/sources.list

With this knowledge you can remove the entry with the help of sed

sudo sed -i '/download.opensuse.org/d' /etc/apt/sources.list

and to avoid confusion in the future you also should remove the entry in your backup file

sudo sed -i '/download.opensuse.org/d' /etc/apt/sources.list.save

Now update the package information

sudo apt-get update

and the problem is gone.


It seems that tracker-extract was having problems with a couple of Excel XLS files from the same auto-generated source. I suspect they were hitting bugs in tracker's extract code. Tracker has now successfully indexed, and is using negligible resources.
This Debian User Forums post was the key: will tracker-extract ever settle down?. Diagnosing and fixing the problem required me to look in /tmp/tracker-extract-files.1000. If a symlink to the same file persists for any amount of time and tracker-extract is hitting 100% CPU usage, you have a problem file. For me, a problem file symlink looked like:
$ ls -l tracker-extract-files.1000/
total 0
lrwxrwxrwx 1 scruss scruss 55 May 12 16:25 1-9eaf433878d0c8e604486b798d035882 -> /home/scruss/Documents/toronto_hydro/SmartMeterData.xls

To fix this particular file:

stop tracker with tracker daemon --terminate

Resave the offending file in a different format, delete it, or set it as excluded in the tracker config GUI. It's important that the file with problems is gone from anywhere that tracker will try to index, or the problem will persist.

Delete the broken symlink in /tmp/tracker-extract-files.1000

restart tracker with tracker daemon --start

If you monitor tracker with tracker daemon --follow, you should see Extractor progress lines increase from 0, 1, 2 ... 100%. If it hangs at anything less than 100%, check /tmp/tracker-extract-files.1000 again.
For me, tracker-extract used to throw the error tracker-extract crashed with signal 31 in __libc_message() when it finished. It didn't seem to affect tracker running or indexing new content, though.


"temporary failure in name resolution" installing Notepad++ snap

This looks like the temporary DNS failures described in bugs 1804487, 1727237, and 1805027.  Assuming you haven't done anything to the default DNS setup, I found that adding the package libnss-resolve fixed my issues.  That package rewrites the /etc/nsswitch.conf file to better handle certain situations.

sudo apt-get install libnss-resolve


How to show desktop application launchers only in a certain desktop environment?

The OnlyShowIn tag controls what launchers appear in menus. The launchers themselves (eg 'firefox.desktop') are just files and will appear in their relevant folders regardless of your desktop environment.

To prevent Nautilus from showing files (and thus, launchers) on the GNOME Desktop:

Launch gconf-editor
Navigate to apps > nautilus > preferences
Untick the show_desktop option


Installer Stuck At "creating ext4 file system"

It happens to me all the time.

To solve this, I format concerned linux partitions ( Filesystem Partition 5 and Swap partition 6 in your case) from disk utility ie gnome-disks manually.

To do so you must select Try ubuntu instead of Install ubuntu after booting from bootable cd/usb.


Can anybody explain these Kernel command-line parameters?

quiet disables most of the log messages(shown by dmesg command).

I think the splash option starts the plymouth service from the initial ram-disk after the kernel goes through some initialization code.Plymouth is to show you the logo of the distribution or the logs of the systemd initialization.

nomodeset is to disable the Kernel Mode Settings(a.k.a KMS) during bootup .Mode settings enables the kernel to control the graphics hardware itself and change the modes of GPU (graphical or text mode , resolutions, rotations and so on) and it's for making a smooth and flicker-free splash screen (the option above) , but it may cause some problems in  some graphics hardwares or even blackscreen.Disabling it forces the kernel to use the BIOS modes.For more information see this answer.

video option is to mention the video mode option.Some global options to be used in the underlying GPU.And the uvesafb is actually a generic framebuffer driver which makes use of the standards set by the VESA association. mode_option=1280x800-24 means the resolution 1280x800 with 24 as the Color Depth or a.k.a Bits Per Pixel (8-bit for Red , Green and Blue channel each).
The mtrr=3 means the write-combining attribute.It's actually a caching technique to buffer the Read/Write requests to later release them in burst mode to better utilize the bandwidth and prevent consistent Read/Write cycles and resource exhaustion perhaps.
Because the Read/Write operations aren't released in-order , it can cause sever bugs and problems if gets utilized in most of the programs(Thread-safety is based on the assumption that those operations are done in-order) , but in framebuffers out-of-order memory operations is not a problem(You don't care whether the top-left corner of the image on your screen gets drawn first or the bottom-left one when a frame is rendered in less than 50 msec).So using it in the framebuffer operations (we're talking about the framebuffer driver uvesafb) makes sense.It can increase the performance quite a lot.
However using the MTRR API in the kernel is phased out almost completely in favor of the Page Attribution Table.Because with PAT you have finer control over the memory areas that you want to cache and it has more attributes than MTRR.
And finally the scroll= option gets one of the three possible values :

ypan :     Enable display panning using the VESA protected mode interface. The visible screen is just a window of the video memory, console scrolling is done by changing the start of the window. This option is available on x86 only and is the default option on that architecture.

ywrap :    Same as ypan, but assumes your gfx board can wrap-around the video memory (i.e. starts reading from top if it reaches the end of video memory). Faster than ypan. Available on x86 only.

redraw :   Scroll by redrawing the affected part of the screen, this is the default on non-x86.

In fact it's there to set the mode of the scrolling operation operation when you're in the text mode(e.g text-mode console not graphical)
You can read more about that driver here.

If you want to read more about kernel command-line options , take a look at the official documentation.

Hope it helps.


Ubuntu 17.10 fails to boot with AMD graphics card

Uninstall radeon using the command

amdgpu-pro-uninstall

It worked for me. Then type

reboot


Mac cannot use external hard drive after Ubuntu installation?

First of all test your external HDD on your installed Ubuntu system. There is a chance that Ubuntu can still read it. If so, backup all your data from it (to have a copy at least), and go back to Mac and using the Disk Utility:

You will have 2 options:

If you succeded with making a copy: format your external HDD, and copy back all your data from the location where you made the backup.
If it failed: ask a professional to help you. Don't try to use "magic" softwares to recover your data, because it is a huge chance that you will destroy for good your data.


Are softwares installable on ubuntu also installable on Lubuntu?

Both distributions use the same repositories. So, software that can be installed on ubuntu can also be installed on Lubuntu. At most some extra gnome packages will be installed (this will mostly be taken care of by synaptic or software centre). But with low ram, Lubuntu would give a better peformance. Also be aware of the fact that Lubuntu 12.04 is not an LTS as opposed to ubuntu.


It IS about ownership, but not quite the way you think.

Inspect the way the USB Disk is mounted, with:

mount | grep MAGIC

Then, read man mount, especially the sections "FILESYSTEM-INDEPENDENT MOUNT OPTIONS" and "FILESYSTEM-SPECIFIC MOUNT OPTIONS" (the "Mount options for fat" part).

Then, do something like:

sudo mount -o remount,rw,user,users,nosuid,nodev,relatime,uid=$(id -u),gid=$(id -g),fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2 /dev/sdb1 /media/sazzabi/MAGIC

Then, inspect the mount | grep MAGIC again.

Questionner ( @seifallah-azzabi )says: (moved up from comments to improve searchability)

The first command gave me this result

/dev/sdb1 on /media/sazzabi/MAGIC type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)

after running the second command, this is the result of

mount | grep MAGIC
/dev/sdb1 on /media/sazzabi/MAGIC type fuseblk rw,nosuid,nodev,noexec,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,user,uhelper=udisks2)

@waltinator responds:

For some reason (you're running the command from a root shell?), $(id -u) and $(id -g) returned root's UID and GID. I expected them to return your USER UID and GID. Or you have to umount first.

Substitute your own UID and GID. getent passwd $USER | cut -d: -f3,4 to see them, or id.

Rather than trying to remount on /media/sazzabi/MAGIC,

(only once)

mkdir -p $HOME/mnt/MAGIC

Then,

sudo umount /dev/sdb1

followed by

sudo mount -o rw,user,users,nosuid,nodev,relatime,uid=$(id -u),gid=$(id -g),fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2 /dev/sdb1 $HOME/mnt/MAGIC
# no "remount,", different mount point

Then, you should have owner access to the files on $HOME/mnt/MAGIC/.


GParted in Ubuntu 18.04 Wayland is not running

It is a bad idea to open graphical applications  with sudo in Ubuntu 18.04, hence the Gtk-WARNING **: 17:57:23.758: cannot open display: :0 error message. Instead open GParted with pkexec as follows:

pkexec gparted

and authenticate with your user password in the Authentication Required window that opens up.

Try logging in at the usual login screen with Xorg instead of Wayland. Click the gear icon to the left of the  Sign In  button and select Ubuntu on Xorg from the dropdown menu. This selection will be persistent across reboots unless you switch back to Wayland.


conky RAM usage - does not show large file in ram disk (tmpfs)

The most likely explanation is just that conky is not counting that memory as "used" memory.

What is "used" and what is "available" memory is not a simple black and white in Linux or any modern OS.  For example, the system cache (including the hard disk cache) is "used" in the sense that memory is allocated to it, but is "free" in the sense that it's only taking up otherwise available RAM, and will naturally shrink as less RAM becomes available to it.

tmpfs is a virtual filesystem which behaves a little like system cache in many respects, in that it has files mapped in RAM taking up memory that would otherwise be "free", except they aren't duplicates of files that also exist on permanent disk-based storage.  With tmpfs, if there ceases to be enough free RAM to keep them in memory, it will swap those files out to the swap partition instead.

Thus for the same reason it makes sense to sometimes think of cache memory as free, in some respects it also makes sense to think of tmpfs memory as free, because that memory is still available for use by other applications.


Here is what I am doing to get around this:
Setup the MAAS master node as dual homed. In other words, install another network card in it.
Run your DHCP server so that it only listens and answers in your cluster network.
connect a switch to the MAAS master node, and connect all your other nodes to that.

Does that help at all?


Well you should make sure everything else outside your computer is behaving nicely.

Run a traceroute to the gaming server. Where does latency grow? Is it normal or is it happening in places where it shouldn't?

For example, a hop from New York to London will add latency. Fifty or so milliseconds to the first hop after your router probably means faulty equipment in your last mile; doublecheck with your neighbours.

How much latency do you have to your router? Switching from wifi to wired connectivity may not always be possible, but it might just shave five or so milliseconds.

Is your computer good enough for the game? Sometimes game will have suboptimal performace under Wine, and well, if a game can't process packets in a round trip time (your latency to the game server as measured through pingor traceroute doubled) then the bottleneck is actually not the network.

Does your ping even matter? Most real time games require interpolation to run smoothly. This means you're actually playing "in the past." For example, Source games have every player running 0.1 seconds in the past, which means all players with latency in the double digits actually are playing on a even field. Personally I play at 160 ping on TF2 servers in US and don't really have too much trouble with it. Read more here. Read here about the Unreal networking stack.


Bluetooth device appearing and shortly after disappearing Ubuntu 15.04

A good way to fix this would be to install Blueman Bluetooth Manager.After you installed it If you however happen to get the "Connection Failed: Stream setup failed".Then do this fix I found from tuxdiary.com:

1.Edit /etc/bluetooth/audio.conf and uncomment the following line:

AutoConnect=true

2.Run the following command to install latest packages for blueman and related modules:

sudo add-apt-repository ppa:blueman/ppa
sudo apt-get update
sudo apt-get upgrade blueman

3.Run blueman-applet. Right click on the panel applet and turn bluetooth on.

4.The old profie of you bluetooth device would still be there, remove it. Right click on the blueman-panel applet and select Setup New Device. Complete the wizard for your device.

5.Logout and login.


How to roll back Ubuntu to a previous version?

There's a saying in my language which can be roughly translated as "You can't turn mince back into meat by rotating the mincer's handle in the opposite direction"  :)
The upgrade procedure is one-way - while installing new versions of software, your configuration files and settings are modified by packages' post-install scripts to use new format which is required by new software. Basically, there's no opposite procedure - to make a newer configuration file compatible with old software.


Shrinking /home/ and extending / while the server is running

Concerning the discussion in comments, it sounds like you're running a server that relies on a large (or at least largeish) database in /var. On such a computer, it's important to either split off /var (or a subdirectory of it) into a big enough partition to hold the database or ensure that root (/) is big enough. In fact, many servers do better with a separate /var partition than with a separate /home partition -- although your df output shows that you've got 94GB on /home, so that doesn't seem to be the case for you. Nonetheless, if you're running a MySQL server, 20 GB for root (/) and no separate /var partition sounds inadequate, so your problem is understandable. You might want to consult a MySQL expert for advice on how much disk space your database might be expected to consume.

In any event, it is possible to do a "live" resize of some filesystems; but increasing the size is far better supported than decreasing a filesystem's size, and it appears you'll need to do one of each operation. If you can log in as root, you should be able to unmount /home and shrink it from your regular boot. Be aware that this is a non-standard configuration for Ubuntu, so you'll need to enable direct root logins -- and you may want to disable them afterwards. (See this question and its answers for more on this.) Depending on your partitions' layout, there may be other complications, too. See this question and its answers for some information on resizing while you're logged in. If your /home partition comes after your root (/) partition, you might want to consider shrinking /home, creating a new partition following it, moving the contents of /var (or whatever subdirectory of /var is chewing up so much disk space) to the new partition, and then mounting it at /var (or its subdirectory, as appropriate). Because so many programs work on /var, moving all of /var in this way would likely require working from an emergency disk, but you might be able to do this from the main installation for a subdirectory of /var.

That said, I agree with an earlier comment that, as a relative newbie, this might not be the best thing to attempt. If you must do it, I strongly recommend you set up a computer (or virtual machine) that matches your current configuration as closely as possible so that you can practice. It's better to wipe out a virtual machine (or two or three) than to wipe out your real server!

Another time-honored, but somewhat ugly, approach is to relocate one or more directories to an existing partition, and rely on a symbolic link rather than mounting a new partition. You'd do something like this:

Locate a directory on the root (/) partition that's chewing up a lot of space. For MySQL, I'd expect it to be /var/lib/mysql.
Create a target directory on the /home partition -- say, /home/var/lib/mysql. Match its ownership and permissions to the original /var/lib/mysql directory.
Shut down any software that's using /var/lib/mysql. I think it would be sudo service mysql stop to do this, but I'm not 100% sure of that.
Type sudo mv /var/lib/mysql/* /home/var/lib/mysql/. This will move the files from /var/lib/mysql to the /home partition.
Type sudo rmdir /var/lib/mysql to delete that directory. (If it won't delete, then chances are some files didn't get moved. Maybe they're dot files. You must fix this problem.)
Type sudo ln -s /home/var/lib/mysql /var/lib/mysql. This creates a symbolic link so that programs that use /var/lib/mysql will still be able to access the files in the new location.
Restart MySQL. sudo service mysql start should do this.

Caveat: I'm not familiar enough with MySQL to be 100% confident that this procedure will work properly for it. The use of symbolic links might give it fits. Also, I haven't tested this procedure as I've typed it, so I may have made a mistake in one (or more) of the commands.

As I'm not a MySQL expert, there may be some better way to do this for MySQL specifically (assume that's really the program that's causing problems.)


Trying to create Cortana search equivalent

I have connected this script to a keyboard shortcut for when I am holding my five month old son. It is quicker than having to type with one hand. I have an SSD so launching Chromium is fast. If you have an HDD, you'll need to use pgrep to see if Chromium is running already, if so, sleep less time, if not sleep more time until Chromium loads. (I could add this segment if needed.) The sleep aspect is there so all page content loads before running the xdotool command at the end. I am assuming here that you would be using Chromium and that your default page is the Google search page. My script also moves Chromium to the middle monitor, but I have commented out those lines assuming you have one screen. You will need xdotool installed with the command sudo apt install xdotool for the script to work. The following is less instant than other virtual assistants, but it works every time for me. It basically selects the little Google Now/Search microphone and hits enter for you.

#!/bin/bash

chromium-browser &

sleep 3

# window_id=$(xdotool getactivewindow)
# Un-maximize to move
# wmctrl -ir $window_id -b remove,maximized_vert,maximized_horz
# Move window to middle screen
# xdotool windowmove $window_id 2000 200
# Maximize again
# wmctrl -ir $window_id -b add,maximized_vert,maximized_horz
# sleep 1

# I need to do 6 tabs then enter.
xdotool key Tab Tab Tab Tab Tab Tab Return


Desktop wall paper goes black, desktop is almost in accessible

This is a bug in Ubuntu tweak

check this on launchpad

This bug is solved in version 0.6.1.

If you want to use it, try the testing

  ppa: https://launchpad.net/~ubuntu-tweak-testing/+archive/ppa


Own made .desktop doesn't show at sidebar Ubuntu 16.04 LTS Unity

Try [Desktop Entry] rather than [Desktop entry]. Also make sure the path is correct.


How to get a command to output the contents into Terminal, and my system clipboard

You can install xsel

sudo apt-get install xsel

Then run

cat /etc/lsb-release | xsel -ib

And

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.2 LTS"

will be copied to clipboard.

You can also output text from clipboard to a terminal command by e.g.

xsel -ob | cat


Looking for an application that saves clipboard history

apt-cache search "clipboard manager"

Yields the following

clipit - lightweight GTK+ clipboard manager
glipper - Clipboard manager for GNOME
parcellite - lightweight GTK+ clipboard manager
klipper - clipboard manager

The last one is for KDE


kde clock format: how to include the day in a non-tiny font?

QML

The KDE plasmoids are using qml scripts, http://en.wikipedia.org/wiki/QML .

The plasmoid scripts are at: /usr/share/plasma/plasmoids/... ie the digital clock scripts are at: /usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/... You could edit those but any update will overwrite your changes.

The KDE TechBase has tutorial - Plasma5 QML2 GettingStarted: https://techbase.kde.org/Development/Tutorials/Plasma5/QML2/GettingStarted .

The Date QML Type: http://doc.qt.io/qt-5/qml-qtqml-date.html

-> Date:

-> Time:

My panel clock

Writing a quick and dirty clock.

Making:

/tmp/mypanelclock/metadata.desktop: http://pastebin.com/PZe812VR
/tmp/mypanelclock/contents/ui/main.qml: http://pastebin.com/WqwD49N5
/tmp/mypanelclock/contents/ui/CompactRepresentation.qml: http://pastebin.com/9Ky7Fgj2

Opening a terminal window to the tmp directory and running command:

plasmapkg2 -i mypanelclock

The command:

:~$ plasmapkg2 --help
Usage: plasmapkg2 [options]
Plasma Package Manager

Options:
  -v, --version             Displays version information.
  -h, --help                Displays this help.
  --hash <path>             Generate a SHA1 hash for the package at <path>
  -g, --global              For install or remove, operates on packages
                            installed for all users.
  -t, --type <type>         The type of package, e.g. theme, wallpaper,
                            plasmoid, dataengine, runner, layout-template, etc.
  -i, --install <path>      Install the package at <path>
  -s, --show <name>         Show information of package <name>
  -u, --upgrade <path>      Upgrade the package at <path>
  -l, --list                List installed packages
  --list-types              List all known package types that can be installed
  -r, --remove <name>       Remove the package named <name>
  -p, --packageroot <path>  Absolute path to the package root. If not supplied,
                            then the standard data directories for this KDE
                            session will be searched instead.

Now there are available:

Adding the clock to the panel:

More of the KDE clocks: https://www.kubuntuforums.net/showthread.php?61798-Clocks

More of the qml & plasma 5: https://www.kubuntuforums.net/showthread.php?67726-Quick-KDE-plasma-qml-widgets


What files and directories can be excluded from a backup of the home directory?

Most of these files and directories are recreated if missing. They are mostly intended for lowering the startup time of an application (Firefox extensions cache), indicating locks (.gksu.lock), or containing session-specific information (e.g. ID of dbus session). Recent documents changes frequently and is generally not that sensible to backup.

These directories may be excluded:

.gvfs                           # contains mounted file systems?
.local/share/gvfs-metadata
.Private                        # contains the actual encrypted home directory
.dbus                           # session-specific
.cache
.Trash                          # do I need to say more?
.local/share/Trash
.cddb                           # cached info about audio CDs
.aptitude                       # cached packages lists

Flash-specific:

.adobe        # Cache for flash, maybe others?
.macromedia   # except for Flash persistence, there is no reason to keep this

Files:

.xsession-errors            # contains errors from the current graphical session
.recently-used              # recently used files
.recently-used.xbel
.thumbnails
.Xauthority                 # session-specific
.ICEauthority
.gksu.lock
.pulse                      # directory
.pulse-cookie
.esd_auth

KDE specific:

.kde/share/apps/RecentDocuments # Recent documents on KDE
.kde/share/apps/klipper         # Contains a history of the Klipper clipboard (KDE)
.kde/share/apps/okular/docdata  # you will loose saved scrolling positions of PDFs
.kde/share/apps/gwenview/recentfolders
.kde/share/apps/kmess/displaypics  # cached other users' profile pics
.kde/share/apps/kmess/customemoticons  # cached emoticons of others

Firefox-specific (see also Profile folder):

.mozilla/firefox/*/Cache
.mozilla/firefox/*/minidumps    # in case Fx crashes dumps will be stored in this
.mozilla/firefox/*/.parentlock       # session-specific
.mozilla/firefox/*/urlclassifier3.sqlite  # phishing database, recreated
.mozilla/firefox/*/blocklist.xml   # blacklisted extensions
.mozilla/firefox/*/extensions.sqlite  # extension database, recreated on startup
.mozilla/firefox/*/extensions.sqlite-journal
.mozilla/firefox/*/extensions.rdf
.mozilla/firefox/*/extensions.ini
.mozilla/firefox/*/extensions.cache
.mozilla/firefox/*/XUL.mfasl     # cached UI data, recreated
.mozilla/firefox/*/XPC.mfasl
.mozilla/firefox/*/xpti.dat
.mozilla/firefox/*/compreg.dat

Opera-specific (related question on Superuser.com: Is documentation available on files and directories in the Opera profile folder?):

.opera/temporary_downloads
.opera/cache
.opera/thumbnails
.opera/opcache
.opera/icons
.opera/application_cache
.opera/widgets/*/cache
.opera/lock

Komodo Edit:

.komodoedit/*/codeintel/db
.komodoedit/*/host-*/*/codeintel
.komodoedit/*/XRE/Cache
.komodoedit/*/XRE/.activatestate/komodo edit/Crash Reports
.komodoedit/*/XRE/.activatestate/komodo edit/*/Cache
.komodoedit/*/XRE/.activatestate/komodo edit/*/minidump
.komodoedit/*/XRE/.parentlock
.komodoedit/*/XRE/extensions.rdf
.komodoedit/*/XRE/extensions.ini
.komodoedit/*/XRE/extensions.cache
.komodoedit/*/XRE/XPC.mfasl
.komodoedit/*/XRE/XUL.mfasl
.komodoedit/*/XRE/xpti.dat
.komodoedit/*/XRE/pluginreg.dat
.komodoedit/*/XRE/compreg.dat
.komodoedit/*/XRE/*.sqlite-journal
.komodoedit/*/pystdout.log
.komodoedit/*/pystderr.log
.komodoedit/*/history.sqlite.bak
.komodoedit/*/running.lock
.komodoedit/*/mutex.lock
.komodoedit/*/*.xmlc
.komodoedit/*/startup-env.tmp
.komoeoedit/*/commandments.fifo
.komoeoedit/*/history.sqlite

GnuPG:

.gnupg/rnd
.gnupg/random_seed
.gnupg/.#*
.gnupg/*.lock
.gnupg/gpg-agent-info-*

Google Chrome:

.config/google-chrome/Default/Local Storage
.config/google-chrome/Default/Session Storage
.config/google-chrome/Default/Application Cache
.config/google-chrome/Default/History Index *

Other apps:

.pulse/icons                  # Pidgin
.java/deployment/cache        # Cached applets
.icedteaplugin
.icedtea
.gnome2/epiphany/favicon_cache
.dropbox                      # to avoid problems, let Dropbox re-create these
.dropbox-dist


The command used to shutdown is:
dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 "org.freedesktop.login1.Manager.PowerOff" boolean:true

For understanding
man systemd-logind
systemd-logind is a system service that manages user logins. It is
       responsible for:

       ·   Keeping track of users and sessions, their processes and their idle
           state

       ·   Providing PolicyKit-based access for users to operations such as
           system shutdown or sleep

       ·   Implementing a shutdown/sleep inhibition logic for applications

       ·   Handling of power/sleep hardware keys

       ·   Multi-seat management

       ·   Session switch management

       ·   Device access management for users

       ·   Automatic spawning of text logins (gettys) on virtual console
           activation and user runtime directory management

Now read to the systemd/logind wiki http://www.freedesktop.org/wiki/Software/systemd/logind/


Why 11.10 says plymouth errors and "Checking battery state..."?

I had this problem sometimes when I have updated from beta 11.10,
I dont know what the exact problem is but it shows starting lightdm fail then it stops at checking bettery state,
so u need to start lightdm
press ctrl + alt + F2
login and type sudo lightdm
it should work.
and for me I have installed gdm removed lightdm


How to pass a regex when finding a directory path in bash?

This is a surprisingly tricky thing to do nicely.

Fundamentally, -d will only test a single argument - even if you could match filenames using a regular expression.

One way would be to flip the problem around, and test directories for a regex match instead of testing the regex match for directories. In other words, loop over all the directories in $HOME using a simple shell glob, and test each against your regex, breaking on a match, finally testing whether the BASH_REMATCH array is non-empty:

#!/bin/bash

for d in "$HOME"/*/; do
  if [[ $d =~ (ana|mini)conda[0-9]? ]]; then
    break;
  fi
done

if ((${#BASH_REMATCH[@]} > 0)); then
    echo "anaconda/miniconda directory is found in your $HOME"
  else
    echo "anaconda/miniconda is not found in your $HOME"
fi

An alternate way would be to use an extended shell glob in place of the regex, and capture any glob matches in an array. Then test if the array is non-empty:

#!/bin/bash

shopt -s extglob nullglob

dirs=( "$HOME"/@(ana|mini)conda?([0-9])/ )

if (( ${#dirs[@]} > 0 )); then
  echo "anaconda/miniconda directory is found in your $HOME"
else
  echo "anaconda/miniconda is not found in your $HOME"
fi

The trailing / ensures that only directories are matched; the nullglob prevents the shell from returning the unmatched string in the case of zero matches.

To make either recursive, set the globstar shell option (shopt -s globstar) and then respectively:-

(regex version): for d in "$HOME"/**/; do
(extended glob version): dirs=( "$HOME"/**/@(ana|mini)conda?([0-9])/ )


Partitioning a USB and making separate bootable drives

Startup Disc Creator only does ISO9660 installs to a single partition drive.

Yumi Multiboot USB will make multiple persistent installs on the same partition, however it only runs on Windows.

MultiBootUSB will also make multiple persistent installs on the same partition and there is a Linux version.

You can divide a GTP drive into partitions and do a Full install of an OS to each partition using "somerthing else". Grub should sort itself out automatically.

Edit:

One of my favorite multibooters is to make a drive with mkusb, using defaults, overwrite the ISO9660 partition and casper-rw partition with a FAT32 partition for persistent folders, add a casper-rw file and a home-rw file to each uniquely named persistent folder and create a folder on the NTFS partition labeled "iso" for the ISO's, then add some ISO's. Edit usbboot/boot/grub.cfg to loopmount the ISO files. Include: persistent persistent-path=/<persistent-folder-name> if you want persistence. Persistence is limited to 4GB for each casper-rw file and 4GB for home-rw file.
There are a few variations on this method.

All of the above have worked for me with BIOS and UEFI.

Edit 2: Linux Installer Drive

Multibootin with UNetbootin. Use GParted to create a msdos flash drive with as many FAT32 partitions as OS, (~2GB each), Partition size may be increased to suit persistence requirements. Flag first partition, (sdb1), as boot. Use UNetbootin, (655), to install an OS to each partition adding persistence as required, copy chain.c32 from the syslinux 4.07 package to root of first partition.
Open first partition and make a copy of syslinux.cfg save as syslinux2.cfg. Edit the original syslinux.cfg as follows:

default menu.c32

label boot_hd0_1
menu label linuxmint 18.2
config syslinux2.cfg

label boot_hd0_2
menu label Ubuntu 16.04.3
com32 chain.c32
append hd0 x

where x is the syslinux partition number.
May need to be modified for UEFI
Will add graphical summary of this method as a separate answer.


Nemo Custom Action (.sh script) does not execute

I kind of came to solution for this situation in Cinnamon.
The .nemo_action file consists of the following content.

[Nemo Action]
Name=OCR The Screenshoot
Comment=OCR Function for Nemo File Manager
Selection=S
Exec=gnome-terminal --working-directory=%P -e "/media/storage/Scripts/actions/ocrFile.sh %F"
Icon-Name=gtk-execute
Extensions=png;jpg;jpeg;bmp;
Active=true

Having terminal launch to do the job is rather a workaround here. Everything else didn't seem to yield results.

The bash script itself remained pretty much the same, altered only for a directive to keep the terminal open until the execution of the command set.

#!/bin/bash
convert $1 /tmp/output.pnm
cat /tmp/output.pnm | pamstretch 4 > /tmp/stretched.pnm
convert /tmp/stretched.pnm -colorspace gray /tmp/output600dpi.tif
tesseract /tmp/output600dpi.tif ./outputText -l eng
rm /tmp/output.pnm /tmp/stretched.pnm /tmp/output600dpi.tif
bash

What I crave ultimately is to make this process completely terminal-free. It seems to me that the process goes slightly differently from Gnome2 (Mate). Here the bash script which consists of terminal commands do not execute "somewhere in the background". With bash scripts that call GUI applications Gnome3's Exec= directive allows the <script.sh %F> value.


A workaround posted from Krusader forum.

Login to the FTP host
Add this FTP host to favorites
Quit Krusader
Run Krusader
Select the FTP host from favorites (the one previously added)
Enter the FTP host password and select the option to remember it

Now the FTP host is in favorites with no need to re-enter the password.


It's far from a good solution because the end user has to install something by hand but it works for me.

I have used this in my snapcraft.yaml

parts:
  snapd-xdg-open:
    source: https://github.com/ubuntu-core/snapd-xdg-open.git
    plugin: copy
    files:
      data/xdg-open: bin/xdg-open
    stage-packages:
      - dbus

Additionally you have to install snapd-xdg-open on the end users machine.

$ sudo apt-get install snapd-xdg-open


how to modify another user's .profile from the recovery console?

Recovery mode doesn't necessarily get all your partitions mounted(sometimes it does).  Even if it does you need to think of it as a child directory tree that isn't attached to your '/'.  Then chroot to it and everything will be where you expect.

IIRC(if i remember correctly) - recovery mode tells you where the running system's root is mounted.  With that information you can go to /where-rescue-mode-told-me-it-was-mounted/home/user/.profile

okay, so I just checked.  Been a while since I had to use recovery console.  Use the remount all as RW option before dropping to a root shell.  It drops you in /root/ as you would expect.

So to get to user .profiles:

cd /home
ls
cd listed_username
nano .profile

change your:

PATH="Path/To/Folder"

to

PATH=$PATH:/path/to/folder

You said you're using vi.  I specify nano because it's easier for new linux users.


How do I change my repositories to saucy from raring after upgrade?

I believe the answer is a few commands. You do have to re-check which ones you want (probably sticking to the ones that are commented as "Disabled on upgrade to saucy.")

sudo sed -i 's/raring/saucy/g' /etc/apt/sources.list
sudo apt-get update && sudo apt-get dist-upgrade
sudo apt-get upgrade


First and foremost, the syntax for the execution times is demonstrated here. The CronTab can be confusing, but there are an abundance of guides out there to help.

Now, in your case you have:

* * * * * /home/tom/test.sh

Depending on how you edited your Crontab, this could be a permission issue. Using bash, I always did the following:

* * * * * sh /home/tom/test.sh

Which is the same as the following:

* * * * * /home/tom/test.sh

With the theory that test.sh has a somewhat similar structure:

#!/bin/bash

for i in */ .*/ ; do
    echo -n $i": " ;
    (find "$i" -type f | wc -l) ;
done

The last thing to check is that the script is executable:

chmod +x /home/tom/test.sh

For me, I performed the following on my Crontab:

# Example Crontab command:
# * * * * * /home/mn/Documents/Scripts/counta.sh >> /home/mn/Documents/Scripts/test

This was able to successfully run and output the test file as required.


How does gnome shell know which config file to use from /usr/share/gnome-shell/modes/?

It is from the Ubuntu session which is the default at login screen.

session Name Ubuntu -> is the one /usr/share/xsessions/ubuntu.desktop

and its contents are

[Desktop Entry]
Name=Ubuntu
Comment=This session logs you into Ubuntu
Exec=env GNOME_SHELL_SESSION_MODE=ubuntu /usr/bin/gnome-session --systemd --session=ubuntu
TryExec=/usr/bin/gnome-shell
Type=Application
DesktopNames=ubuntu:GNOME
X-GDM-SessionRegisters=true
X-Ubuntu-Gettext-Domain=gnome-session-3.0

Observe the line Exec= in which it is setting the environment variable

GNOME_SHELL_SESSION_MODE=ubuntu


Have I fixed my partition problem with os x 10.5.8? Are my GPT and MBR back to normal?

You may be missing an EFI System Partition (ESP), which is a partition used by the firmware to store boot loaders and drivers. An ESP isn't strictly required on Macs, but Apple does use it to help out with firmware updates, so it's probably best if you have one. Note, however, that I'm only passingly familiar with Partition Inspector; I'm not 100% certain that it even shows ESPs. If it's missing, you can create it with a tool like OS X's standard "gpt" command or my GPT fdisk (gdisk). You'll also need to create a new FAT filesystem on it with (IIRC) newfs_msdos. Sorry I'm a little foggy on the details; my Mac is booted into Linux at the moment, so I can't check the options.

As to the directories you've identified (bin, sbin, and so on), these are standard Unix directories. They're present on both Linux and OS X systems. You should not delete them. In a normal Linux/OS X dual-boot configuration, Linux won't write anything to the OS X partition, so it's very unlikely that there are any traces of Linux left on your OS X partition. (The closest thing to an exception is rEFIt, which is a boot manager and so not strictly a part of either OS; however, rEFIt often gets installed on the OS X partition.)


Hard disk not detected during Dual boot installation on New Acer Aspire A315-56 laptop

I have same issue, with a doctor in computering we tried all, the only way was to change to another HDD.....
That laptop with that 1tb HDD and Linux do not work......
And if you change to another HDD, please set your BIOS properly, in secure boot something you must inform your BIOS to start from your debian(in my case)..... I think like shim64 or shrim64 something I forgot please forgive me about that, it's in EFI folder... I think grub64 option also there, total 4 options maybe....


Have you tried just simply setting

sudo systemctl enable ssh

?

That's how I have my ssh set to run at start up.

****I'm leaving in the above part of the answer in case it's helpful for others who come across this post****

Quoting my comment from above:

  How do you have your port forwarding setup? I don't use the ListenAddress at all and things work fine on my home server. My router forwards anything that comes in on a port I specify (22 if you want the standard port, but you can use anything as long as it doesn't conflict with other services on your intl. network) to the computer I want. For example anything that comes in on port 12345 gets forwarded to port 22 on my CentOS server. Anything that comes in on 12346 gets forwarded to port 22 of my headless RasPi. Anything that comes in on 12347 goes to port 6697 for the IRC bouncer on my RasPi

The ListenAddress has nothing to do with port forwading, the ListenAdress can be used for a server that is configured with multiple IP addresses over one or more NICs. Quoting from here (the whole page is a good explanation): https://www.cyberciti.biz/tips/howto-openssh-sshd-listen-multiple-ip-address.html

  Let us say you have total 8 public IP address and one private IP address. You >would like to bind sshd to one selected public IP (ex 70.5.xx.xx) and private >IP (10.1.5.1) only.

  Luckily there is an easy way to achieve this using ListenAddress option. It >specifies the local addresses sshd should listen on. If this directive is >skipped from configuration file sshd will bind or list on all available IP >address.

It's to allow one some of your multiple IPs to accept ssh connections. I'm guessing you set the ListenAddress to either your public IP or your router's internal IP - I'm guessing if you set that to your server's local IP it would have worked fine. Regardless, now you know how ListenAddress works and you'll be ready if you have to configure a more complicated server. Glad to hear you got things working.


Application switcher's (compiz) thumbnails not working in ubuntu 12.04

Use Alt + ` (Grave accent, next to the 1 key).

Do not bother messing around with Compiz effects on Ubuntu 12.04. Most of them don't really work well with Unity.


How to resolve an Unmet dependencies error?

After correcting your /etc/default/grub, run this:

sudo dpkg --purge linux-image-3.13.0-32-generic
sudo apt-get update
sudo apt-get -f install


On Linux (and Unix in general) you do not have drive letters.

You have a root, /, with everything under the root.

For instance a lot of software goes into /usr/, while your user owned files goes into /home/username/, configuration files in /etc/ and so forth.

Any directory may be a mount point, so yo can have one partition for /usr, one for /, and one for /home. But I wouldn't recommend that for a newbie, as it easily ends up with a lot of wasted disk space.

What I would suggest is to have one partition for / and one for /home. This way you can keep all your personal files across upgrades or reinstalls easily.

The windows model doesn't apply at all to Unix in general. So forget what you know about partitioning from Windows, and run with one partition (~50-100GB) for / and one for /home (the rest of the disk).

Note that you have probably not kept the disk partitions from Windows, as Ubuntu will probably not install to a NTFS disk.


It’s

$ gsettings set org.mate.panel.menubar show-desktop false


same thing happened to me. here's what you can do: right click the panel and then
"add to panel", select "notification area"


Kubuntu 18.04 Redshift Control Plasmoid has no effect

Finally, I solved it by removing plasmoid and starting redshift from a script (KDE built-in autostart):

andreyv@desktop-99:~$ cat ./redshift.sh
/usr/bin/redshift -v 2>&1 | tee /home/andreyv/log/redshift.log &

andreyv@desktop-99:~$ cat ./.config/redshift.conf
[redshift]
temp-day=6500
temp-night=4000
transition=0
gamma=1.0
location-provider=manual

[manual]
lat=56.0
lon=60.0


How to use HP's RAID driver for Smart Array B120i, e.g. ProLiant Microserver G8

I've installed 14.04.2 following the steps from the HP guide located at:

http://downloads.linux.hpe.com/SDR/project/ubuntu-hpdsa/

However, the HP logical volumes where not visile during the install process.

After installation, I've updated hpdsa and installed the Storage Administration (hpssacli) utility from here:

http://downloads.linux.hpe.com/SDR/project/mcp/

However, the hpssacli utility output is as follows:

root@hp:/home/user# hpssacli
HP Smart Storage Administrator CLI 2.10.14.0
Detecting Controllers...Done.
Type "help" for a list of supported commands.
Type "exit" to close the console.

=> ctrl all show config

Error: No controllers detected.

=>

Trying to get some info on the module:

root@hp:/home/user# modinfo hpdsa
    filename:       /lib/modules/3.16.0-30-generic/updates/dkms/hpdsa.ko
    license:        HP
    version:        1.2.6.116d
    description:    HP raidstack firmware version 1.2.6.116d (d71/s249/r2994)
    author:         Hewlett-Packard Company
    srcversion:     7E67ABFB6EA64BD6130FFA0
    alias:          pci:v0000103Cd0000193Fsv0000103Csd00003381bc*sc*i*
    depends:
    vermagic:       3.16.0-30-generic SMP mod_unload modversions

lsmod lists the module:

root@hp:/home/user# lsmod
Module                  Size  Used by
hpdsa                2686323  1

I'll keep digging.


How do I control the position of an indicator created with appindicator.Indicator?

The previous answer is correct in saying that the layout is like this:

  [appmenu]        [app indicators] [system indicators]

Which means you can not have the layout you mention in the question.  But, you CAN move an Application Indicator within the space allocated for the application indicators.  You do that by calling app_indicator_set_ordering_index() to a custom value.  The value is normally generated by the application name and category, but if you want to be next to another indicator you can grab it's value and add (or subtract) one so that you are close.


How to fetch the latest version of MySQL using tools like APT?

apt-get is a tool specific to debian-based linux distributions, and will only download packages from locations specified in /etc/apt/source.lst.

To update to 5.5, you will either need to find a repository with the newer builds and add it to your sources.lst, or you'll have to manually download and install one of the packages from mysql's site.


Thanks a lot for your fast answer!
I tried it hard, but unfortunatley the "refind" Win installation instructions are not totally complete and useful for beginners like me. They are written for someone who knows how to use a command line and the commands. Sometimes it's just a missing simple sentence like: "to change directory use "S:" or "cd S:"."
And then I made a mistake and corrupted my Win8 - System, what can easily happen. So I had to recover my system and deleted everything. In total it took me some 7 hours to have a "new" Win8-Version without Lubuntu. Because of lack of time and patience I stay with Win8 now. Maybe I'm gonna install Lubuntu with one of the next versions, when all these children-diseases with UEFI in the common Lubuntu-Installation-Routine are solved.
Again: Many thanks, but it was to difficult for me as a beginner.


How to mix and play back multiple audio tracks from a video file?

For multiple inputs or outputs use --lavfi-complex. This example is from man mpv:

mpv --lavfi-complex='[aid1][aid2]amix[ao]' input.mkv

A label of the form aidN selects audio track N as input (e.g. aid1).
A label named ao will be connected to the audio output.

Example with volume filter:

mpv --lavfi-complex='[aid1]volume=0.5[vol1];[aid2]volume=3dB[vol2];[vol1][vol2]amix[ao]' input.mkv


Wireless dropping with an Intel Centrino Wireless-N 1030

Try by changing the security method of your router from WEP to WPA/WPA2. I have the same wireless hardware and had this issue but after changing the security the wireless connection worked fine for me. (Yes this solution aaplies to you if you are using WEP security)

I got idea of changing the security method from this link - Wireless with WEP extremely slow on an Acer Timeline 4810T with a Centrino Wireless-N 1000

Thanks.


How can I mount a partition on every reboot using Bash Script?

From man fstab:

  The file /etc/fstab contains descriptive information about the filesystems the system can mount. fstab is only read by programs, and not written; it is the duty of the system administrator to properly create and maintain this file.

To do what you want you just need to add an entry for this mount in /etc/fstab as follows:

Open new terminal window Ctrl+Alt+T.
Open the file /etc/fstab for edit with root privileges, using nano:

sudo nano /etc/fstab

Go to the bottom of the file and add the following line - here I'm assuming it is an image file, so we need to use the loop option (reference):

/mnt/filesys.bin /mnt/mymnt/ auto nofail,defaults,loop 0 0

If you want to mount physical device (or partition), you can identify it by several different ways, for example by its UUID. To find the UUID use sudo blkid while the device is mounted (or use the GUI tool Disks). In this case the entry could look like:

/dev/disk/by-uuid/a58b40e4-eb9b-4720-835b-785a3be3ae33 /mnt/mymnt/ auto nosuid,nodev,nofail 0 0

or:

UUID=a58b40e4-eb9b-4720-835b-785a3be3ae33 /mnt/mymnt/ auto nosuid,nodev,nofail 0 0

Where a58b40e4-eb9b-4720-835b-785a3be3ae33 is the UUID of your device.
Save the file: Ctrl+O, then exit from nano: Ctrl+X.
Restart the system or type sudo mount -a to see the result.

Do not forgot to remove that entry if you remove the image file.


If you are using network-manger in Ubuntu, it's an Ad hoc wifi network and android don't recognize them. Therefore you have to create a true Access Point wifi network, with hostap for example.
However, custom android ROMs such as CyanogenMod can connect to Ad Hoc wifi networks.

If you are already trying to set up a true Ad Hoc wifi network, then the problem may not come from android. Maybe it comes from your computer, some (all?) Intel wifi chipsets are known not to work well with hostap, which can be solved by buying a supported usb wifi dongle (even if buying another thing is not a really good solution).


Shell / awk how to pass some value across to results of another command

In general, you do this kind of thing using xargs, for example
awk '{print $1}' apache.log | sort -n | uniq -c | sort -nr | head -20 |
    xargs -L1 sh -c 'host "$2" | awk -v ip="$2" "{print ip, \$5}"' sh

If you have GNU awk (aka gawk) then you could instead do the sorting internally, and pass the IPs to the host command using getline from a Pipe
Ex.
gawk -v cmd='host ' '
  {c[$1]++}
  END{
    PROCINFO["sorted_in"] = "@val_num_desc"
    for(i in c) {
      if(++n > 20) break
      cmd i | getline; close(cmd i)
      print i, $5
    }
  }
' apache.log


Do I need to install Ubuntu desktop before installing Ubuntu server?

The Ubuntu desktop and Ubuntu server are two different products

You can install either the desktop or the server. There is no need to install one and then the other, unless you want two separate Ubuntu installation in your laptop.

Note, the server is only command line. There is no point and click on the server. In the server you have to type all your commands. If you don't know what to type, then you can't use it. The user interface looks something like:

If this is what you want, then install the server.

If you are used to icons and pretty buttons, then you may want the desktop. The desktop looks like:

If you want a graphical user interface (GUI) but don't want the standard Ubuntu, then you can try XUbuntu or LUbuntu. Also see other options for low memory systems.

Hope this helps


How to unzip only the first few lines of a zip archive?

This simple pipe-script works for me:

zcat a.zip | head -n 10

Here:

zcat a.zip - unpacks zip-archive and sends its contents to standard output
| pipes zcat output to head input
head -n 10 - shows first 10 lines from its standard input


You can use pip3 (which is just normal pip but in system's Python3 packages). Normally I would suggest avoiding using pip for installing stuff globally but given there are no packages for this that could overwrite the files, there's nothing to lose.

It's quick and simple:

sudo apt-get install python3-pip
sudo pip3 install sympy


Will Ubuntu 12.04 run smoothly with these specs?

Yes, it will. You can check specifications here.


How to fix problems with following packages

Some of those packages exist in the universe repository. Not having that installed would cause the install to fail for obvious reasons. You can either enable this through the Update Manager settings or simply by:

sudo add-apt-repository universe

Then sudo apt-get update again and go back to installing.


Missing icons from System Settings in 12.04

This can happen if you used a different icon theme for your machine.

Try downloading this and then extract it to the directory:

/usr/share/icons/current icon theme/categories/24

Then logout and login back.


Salem's answer got me part of the way. To show package info and system info on login, I needed to install the following packages:

update-motd
update-notifier-common
landscape-common

The update-notifier-common package installs /etc/update-motd.d/90-updates-available, which shows information about available packages.

The landscape-common package installs /etc/update-motd.d/50-landscape-sysinfo, which shows info such as IP addresses and load.


If I understand your question correctly, you can use the following:

#!/bin/bash

apt-get update &> update.log
apt-get -y upgrade &> upgrade.log

echo "all done"

Save this script as run_updates.sh, make it executable with chmod 755 run_updates.sh and run it with sudo ./run_updates.sh.
If you want to save all output in one file, remove the &> updates.log and &> upgrades.log from the script and run the script as sudo./run_updates.sh &> run_updates.log

Explanation of the script:

apt-get update &> update.log runs apt-get update and saves the output in update.log
apt-get -y upgrade &> upgrade.log runs apt-get upgrade and saves the output in upgrade.log. The -y prevents apt from asking to continue (it assumes "yes")

A note on redirections:
You can use the redirections below to "send" output from a command or script to a file.

&> redirects STDOUT and STDERR
> or 1> redirects STDOUT
2> redirects STDERR

A note on sudo:
This is probably the reason why you got errors. When running a command that needs sudo in a script, it is a good idea to put the command without sudo in the script and run the script with sudo. Otherwise, you would have to give your sudo password to the script in some way, which is bad.

Edit:
In the following code, the output of both apt commands is redirected to update.log. The double > (>>) is used to append data to a file (instead of replacing it)

#!/bin/bash

apt-get update &> update.log
apt-get -y upgrade &>> update.log

echo "all done"


Set the windows version to windows 98 in the winecfg window.


What does the GTK Loader compiz plugin do?

In my experience: if you didn't manually turn it off then leave it off. I found my water plugin broken by a combination of this, blur settings and who knows what GTK2 or 3 settings. (BTW...Dimming the window or screen for the duration of the effect...but no water at all...)

http://forum.compiz.org/viewtopic.php?t=2244 gave me a hint...and Google search for "compiz gtkloader plugin" settled it for me with:

https://code.launchpad.net/~vanvugt/unity/remove-gtkloader/+merge/109316

  Sam Spilsbury (smspillaz) wrote on 2012-06-08:    #

  To clarify - we can only initialize gtk+ once, and I'd prefer that we
  don't do it in a distro patch. Because we'll be enabling sheet style
  dialogues this cycle in a separate plugin, we need to have gtkloader
  in a plugin that is guarunteed to load once, and before unityshell and
  unitydialog.

  The reason why it existed in unityshell and in a distro patch in
  compiz was purely historical - there was difficulty in enabling new
  plugins on upgrades. That reason no longer exists - we have settings
  upgrades in compizconfig to mantion that.

  Daniel van Vugt (vanvugt) wrote on 2012-06-10:    #

  BTW Sam, it now occurs to me that even if we do introduce any new
  feature that requires gtk initialization, keeping gtkloader would not
  make sense in any scenario:

  The new feature was in lp:unity. In that case, gtk initialization is already done in unityshell and gtkloader is not required.

  or

  The new feature goes outside of lp:unity, like lp:compiz or somewhere else. In that case, gtk initialization should go in the
  project where the new feature is. And still, there is no reason to
  keep gtkloader in lp:unity.


Why does Ubuntu 16.04 remove 'MountFlags=slave' from systemd-udevd.service?

The reason is given in the patch removing this option:

  laptop-mode-tools remounts file systems from within a udev rule to
  apply certain mount options. With MountFlags=slave, those mounts then
  become private to the systemd-udevd namespace and are no longer
  accessible from outside the namespace. While the root cause is the
  broken behaviour of laptop-mode-tools, with mount propagation turned
  off, this can result in a read-only root file system. Therefore revert
  the relevant parts from commit
  c2c13f2df42e0691aecabe3979ea81cd7faa35c7 to re-enable mount
  propagation for udevd.


Cannot boot into Ubuntu 12.04 after reinstalling Windows 7

As Windows was installed with Wubi, Ubuntu would of been in the directory of Wubi. Now that you re-installed Windows 7, Wubi is deleted. So I am afraid Ubuntu is long gone.

I would imagine if you clicked 'Upgrade' from the Windows 7 installation I would presume it created a System Restore Point. If you type in to the Start Menu 'System Restore' I guess you could have a go at recovering Wubi. But it is probably gone.

Hope this helps!


How can drag music to my apple iPhone 4s

There are other apps you can use. Dropbox has a music player that will play music from dropbox, and there's a dropbox app for iPhone. There are other apps that will play from other cloud storage services that work with the iPhone. But Apple just doesn't seem to want to work with Linux - probably some conflict between their business model of charging for air and sunlight when they can and the Open Source community's dislike of proprietary formats and DRM.


Mouse cursor lags behind after screen lock / user switching

I think I've had the same issue as you, it appears to be because of multiple sessions trying to use the nvidia driver and the subsequent session (light-locker/lightdm) not ending up with the correct path to the driver modules.

Fix seems to be a simple workaround where you enumerate the paths in xorg.conf:

https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-390/+bug/1757202

Hope this helps,

Alex


Have applications which appear in the featured banner in the Software Centre paid to be advertised there?

From what I can see from the software-center specifics, the exhibit banner is just a means to promote a software or a collection of software. The banners doesn't seem to be an advertising space nor do the developers pay to have their software featured there. Simply, the software-center devs are just promoting some of the top-rated software available through the software-center.

Read more about the exhibit banners:

https://wiki.ubuntu.com/SoftwareCenter#Exhibit_banners


Some pixels on the screen in a big rectangular shape are darker than the rest

I had the same issue.  And it appeared to be my 'Screenshot' tool which I use quite a bit.  I simply opened and closed the tool and the black rectangle went away


How do I install a package outside of the APT database?

Let's assume you are currently running Huriste Hippo (21.04).

Expand "The Hirsute Hippo (current stable release)" section.
You will see a list of Package files.

Select and download the the *.deb (*.ddeb) files for your architecture.
For AMD64, you would pick:

pdb2pqr-dbgsym_2.1.1+dfsg-7build1_amd64.ddeb - Debug symbols for pdb2pqr. Note, this is probably optional, unless you need to debug the software.
pdb2pqr_2.1.1+dfsg-7build1_amd64.deb - Preparation of protein structures for electrostatics calculations
pdb2pqr-doc_2.1.1+dfsg-7build1_all.deb - Example files accompanying pdb2pqr

Open a terminal and execute the following commands.
Let's assume you downloaded these files to your Downloads directory.
cd ~/Downloads

Add the universe repository so Ubuntu can download other dependent packages you may need. Also this is needed for the gdebi command below.
sudo apt-add-repository universe
sudo apt update

Install gdebi, a tool to allow you to install *.deb files and automatically install their dependencies.
sudo apt install gdebi-core

Install your downloaded packages.
sudo gdebi pdb2pqr_2.1.1+dfsg-7build1_amd64.deb
sudo gdebi pdb2pqr-doc_2.1.1+dfsg-7build1_all.deb
sudo gdebi pdb2pqr-dbgsym_2.1.1+dfsg-7build1_amd64.ddeb


Is there a site where one can poll Ubuntu users?

If you want to want to hold long-term discussions (that couldn't be quickly satisfied in our chat or IRC), Ubuntu Forums is the right place for it.

The system here isn't designed for polling/subjective questions while UbuntuForums has a built in module for asking a poll question and allowing discussion beneath it.


If you installed it/are going to install it from their website, no.

Because you manually installed the drivers there isn't any way, unless that functionality is programmed into the driver (which I believe it isn't.)

As for the worthwhile-ness of updating your drivers, that's normally a good idea. You get bug fixes and usually better performance.

However, it's smart to back up your system prior to doing so because driver updates can occasionally mess up your system.


Run two servers simultanually from bash script

here's what you can do instead :

gnome-terminal -- bash -c "$HADOOP_HOME/sbin/start-dfs.sh; $HADOOP_HOME/sbin/start-yarn.sh; cd /home/hadoop/apache-hive-3.1.1-bin; hiveserver2" &&
sudo /opt/hue/build/env/bin/hue runserver &


How to start an application from the terminal?

to run Compiz Config Settings Manager you have to type ccsm

full list of commands:

Options:
  -h, --help            show this help message and exit
  -p PLUGIN, --plugin=PLUGIN
                        Directly jump to the page of PLUGIN
  -c CATEGORY, --category=CATEGORY
                        Directly jump to CATEGORY
  -v, --version         Version


A command line way to turn Caps Lock into ShiftLock on Unity is:

gsettings set org.gnome.desktop.input-sources xkb-options "['caps:shiftlock']"


Chinese input methods not working in ubuntu mate 19.10

I also lost CJK input when upgrading to 19.10. The upgrade was interrupted by a system crash, requiring a boot into safe mode, and repairing broken packages. It turns out that none of the ibus modules for pinyin, hangeul, and kana/kanji support got installed.


it's not blocked. That is security.

Just type your password and press enter.


"ERROR: role "$user" does not exist" when setting up postgresql server

It is always best to copy/paste the command and error message so we might check your syntax.

Two thoughts - "$USER" is a variable, you replace it with the user name you wish to use. Also $user is not the same as $USER.

So ...

sudo -u postgres createuser --superuser your_user
sudo -u postgres psql

You should not have a postgres prompt, again change "$USER" to the actual user name you wish to use ...

postgres=# \password your_user

and on ...


There's a blog post titled A acrolling primer for GTK+ 3. Since it's from 2017, it covers many recent scrolling features present in gtk3 apps.

touchpad scrolling
classical scrolling which includes jumping (or warping) to the mouse position by primary clicking or legacy scrolling up or down a screen page (by shift+primary clicking)
smooth scrolling which the author describes with "One feature that we introduced long ago is a ‘zoom’ or ‘fine adjustment’ mode, which slows the scrolling down to allow pixel-precise positioning."
a variant of smooth scrolling is where you can control the speed of scrolling.

This is done by "secondary clicking in the trough outside the slider". (On my system, that's a right-click instead of a left-click.).
Then, depending on whether you've clicked in the trough above or below the slider, your document will scroll slowly up or down.
You can increase the speed at which the scrolling occurs by moving the mouse pointer away from the scrollbar.
To reduce the speed, move the mouse pointer closer to the scrollbar.

Please look at the linked blog which has videos to illustrate each scrolling mode.

Caveat: Mousepad, Gedit, and Geany behave as described above. Leafpad, which is a gtk2 application, doesn't. Firefox, Google Chrome, and LibreOffice also don't behave in that way.


Unable to find a source package for linux-lts-vivid

linux-lts-vivid is obsolete.

You can upgrade to a supported kernel by running

sudo apt-get install linux-generic-lts-xenial

Then reboot and try again.


What keyboard layout does my MacBook 7.1 have?

Edit
I've found the image, which looks similar to your Macbook Keyboard Laytout. It looks like English(UK, Macintosh Internation) Layout
You can even change it in Ubuntu.

Open Keyboard Layout from System Settings (or search in dash)

Go to Layouttab

Click + in down-left

Search forEnglish UK Macintosh, you will get the list.

You can press Preview button to see it. I'm attaching the images, it actually shows all the possible keys you can use for this Layout:

Keyboard Layout - English (UK Macintosh International):

(source: akamaihd.net)
Hope it would match with your MacBook Keyboard Layout. I'm sure after setting it you'll get the keys what shown in your Keyboard.


Adding radio stations to Banshee from m3u files

You can add any radio station you know the URL of by opening Banshee Radio context menu to select Add Station. This will open the following window:

Select the Genre, the station name and give in the full Stream URL,in your case:

http://streams.wgbh.org/streamb/classical.m3u

This will add the station with the name you chose to the radios available. Select the station, then Play. Adding the stream provider address:port may not work in your network environment.


Packages are stored in /var/cache/apt/archives/. I suggest using APTonCD

sudo apt-get install aptoncd

for backing them up to a CD or DVD. You can then use this disk as an offline repository.


I had the exact same problem. I am using Puddletag to update the id3 tags but doesn't seem that the changes are reflected in Banshee's library even after forcing a "Rescan Music Library".

The only way I've found to make Banshee update the tags is by explicitly removing the files from the library and adding them back: right click on "Music" in the left toolbar under "Libraries", select "Import Media to Library" and select the folder where the files whose id3 tag you've updated are.


Unable to login with a freshly installed Ubuntu Desktop 18.04.3 LTS

I was able to solve this with:

sudo ubuntu-drivers autoinstall


How to install League of Legends in Ubuntu

Answer updated: as of September 2015, only steps 1, 2 and 3 are required for a 100% working League of Legends on Ubuntu 14.04

I've finally solved all problems and League of Legends is working 100%. Here is a comprehensive tutorial on HOW TO PLAY LEAGUE OF LEGENDS ON UBUNTU 14.04.

Install your video card driver (in my case, I have a NVIDIA GeForce 730M):

Open Unity Settings --> Software & Updates --> Additional Drivers and click on the proprietary driver option. Here is a screenshot:

Install PlayOnLinux:

sudo apt-get install playonlinux

Install League of Legends through PlayOnLinux

Open Play On Linux
Click "Install"
Type "league of legends"
Select the game and click "Install" buttom.

Here is a printscreen:

Just click Next >> Next >> Next* >> Finish*. Make sure you don't change anything, install in the default directory (don't change anything in the installer) and unmark "Launch League of Legends" when the installation is over.
Install TuxLoL (not needed any more, it's here just for reference)

Download it from here: https://bitbucket.org/Xargoth/tuxlol/wiki/Home
Unzip anywhere you want
Enter the folder you just unzipped (where there is the tuxlol.exe file) and execute it:

$ mono tuxlol.exe patch --dir "LEAGUE_OF_LEGENDS_DIR"

Obviously, replace LEAGUE_OF_LEGENDS_DIR with your League of Legends directory. In my case, it's installed here:

~/.PlayOnLinux/wineprefix/LeagueOfLegends/drive_c/Riot Games/League of Legends/

PS: You'll have to reapply this patch everytime a new LoL update is released.

Prevent in game store big items (not needed any more, it's here just for reference)

Navigate to /home/[username]/.PlayOnLinux/wineprefix/[virtualdrivename]/drive_c/Riot Games/League of Legends/RADS/solutions/lol_game_client_sln/releases/[0.0.0.XXX]/deploy/DATA/menu/hud
Open the file corresponding to the resolution you play with. For example hud1680x1050.ini
Add these lines and save:

[TipTracker]
XPos=-20000
YPos=-20000

If you don't do this, in game store icons will be too big, here is a print screen:

After adding these lines, your in game store will be just fine:

PS: some people reported they had to install Internet Explorer using PlayOnLinux for the store to work. But for me, it worked just fine.

Play the game!

To play the game, just open PlayOnLinux, select League of Legends and click "Run". Remember, if you have an Optimus Notebook, you must open PlayOnLinux as mentioned in section 5 every time. Here are some screen-shots of the game running:

http://i.stack.imgur.com/MdvH5.jpg
http://i.stack.imgur.com/aGbDn.jpg
http://i.stack.imgur.com/KNRn9.jpg
http://i.stack.imgur.com/qLdtw.jpg

As you can see, League of Legends is working 100% on Ubuntu 14.04: user store, in game item shop, Maestro connection and all the maps. Just make sure you follow these instructions to the risk. If I helped you, please upvote.


Somewhat like a factory reset.

Did you get Ubuntu with the system? I doubt it so a factory reset will not be there unless you make a backup of your system yourself. You could make one by creating a partition of about 1Gb and putting your current system in there. You need to create an installer from an ISO by adding in all the software you need and then have "grub" boot from it. Pretty difficult to do though :)

It is far easier to do a full re-install. When you have an SSD as boot disk probably takes a 20 minutes (without the post install script).

===

I would do the following (and have been for several years now):

1 time preparation:

create a partition where you store all your personal data.
Move all normal directories from /home/$USER/ to that partition and edit ~./config/users-dirs.dirs to point to it. Save a copy of that file on your partition.
on the same partition create a file with all the "apt-get" instructions you do post-install. If you remove or add software from the base install toss all those commands in that script.

Now a re-install is done by ...

formatting / and mounting it
if you use a /home/ partition formatting /home/ and mounting it
mount the data partition
after the install finishes you copy users-dirs.dirs over the original and press f5 on the desktop.
re-install the software you use from the post-install script you made.


Issue with Vulkan installation and HD Graphics 4000

You need to install vulkan driver

sudo apt install mesa-vulkan-drivers mesa-vulkan-drivers:i386


Power and external display issues with Ubuntu 19.10 on Lenovo P1 Gen2 (Quadro T2000)

As per https://forums.developer.nvidia.com/t/support-external-displays-in-render-offload-mode/107046/13, you need to install at least the 450.51 Beta proprietary Nvidia drivers: https://forums.developer.nvidia.com/t/linux-solaris-and-freebsd-driver-450-51-beta/129482
And it should work. Note (see details in the first link) that the dGPU won't be powered off completely but will be in a low power mode when using external displays.


Ubuntu 18.04 freezes when several applications are running, even keyboard is dead

I think this is the same question which is being asked before :
here is the link for the same,

What should I do when Ubuntu freezes?

maybe it will help you.


Hathway ISP - Cable Modem - Connection Failure

Yup i am also a Hathway(Bangalore) user and was facing the same issue. Try the following IP addresses to get to the login page. See if this works, as it works just fine for me :

http://203.212.193.59
http://203.212.193.60
http://203.212.193.61


I'm trying to start a .jar file with linux boot

Create a file in /lib/systemd/system. Its name must end with .service. For example myfirst.service.
Find the full absolute path to java using which java
In the file put the following.
[Unit]
Description=Job that runs the foo.jar

[Service]
ExecStart=/full/path/to/java -jar /full/path/to/.jar

[Install]
WantedBy=multi-user.target

Enable it to run at boot:
sudo systemctl enable myfirst

Also refer to this answer for further clarification


How to Build a package that doesn't require root

This is not possible since users in a Linux system use an ID to differentiate one another, root would have the same in any system. AFAIK all users can use the path /usr/bin but only the administrator can write to this folder hence a regular user cannot install a package.

You can add an additional folder to PATH in Bash but you would be required to do this step for each user but how it is actually done is to use a Tar archive and run by clicking on the binary itself. After uncompressing the archive ofc.

Happy Llamas!


"One or more partitions are busy on /dev/sd*" what to do?

I believe it's being automounted.  You can't format a mounted partition.

In Disk Utility click on "unmount" and then click "format".

"safely remove" will not let you format the USB stick, because it may actually unmount the drive and then tell the interface on the USB stick to power down.  After selecting this option you can normally do nothing with the device until it is removed and inserted again (which will cause it to automount again...)


All my desktop icons have disappeared in gnome shell ubuntu 12.10 after 6 March update

Solved: The problem was an incompatibility between gnome shell and nvidia's driver version 310. I uninstalled the driver and installed nvidia-current from the ubuntu archive. All the icons are back and I can install new extensions again.
Rob Key


Need Fix for NetworkManager Openvpn, prepending extra-path to crt-path

After a looking around, I found that the config-file for Network Manager could be found at: /etc/NetworkManager/system-connections/othernetwork.nmconnection
But it turned out that the patch was correct in the config-file. So a bug-report should be send to: Free Desktop gitlab for MN
For whomever there can make a login (or have one).
An Work-around will be to make a softlink, in the patch/var/lib/openvpn/chroot, to the home folder.
The Command will be:sudo ln -s /home /var/lib/openvpn/chroot/home
For more info about ln: ln man-page


The initframs will attempt to resume from... when updating (K)ubuntu

This just means that the UUID in /etc/initramfs-tools/conf.d/resume is missing or does not match the swap partition.

To fix, edit the file and add the correct UUID.

If file does not exist, create it and add a line like RESUME=UUID=whatever

For example, on one of my systems, the swap partition has a UUID of adc97911-6d93-4094-8ec4-15cab05377e7, so the line looks like

RESUME=UUID=adc97911-6d93-4094-8ec4-15cab05377e7

Then run sudo update-initramfs -u


systemd does not allow you to modify the ExecStart line. It does, however, allow you to "reset" the ExecStart parameter using an empty directive:

ExecStart=
ExecStart=/sbin/wpa_supplicant -q -u -s -O /run/wpa_supplicant

See e.g. here. The ExecStart is actually an array in memory; the first directive empties the array.


Kivy hello world script yields black screen on Ubuntu 14.04

Install xclip using sudo apt-get install xclip.
Also, check your gtk version. Update it to gtk3.

Edit: install ffmpeg also.


Distribute workload among different CPUs

Is there anything I can do to improve the situation, such as dilute the work among the 4 CPUs? Usinge nice does not seem a solution to my situation.

In short: no. The program is single threaded.

Top can show cpu use in two ways: saturation per CPU, or share of total. If you have a four core system, top may show Irix mode:

  Also for multi-processor environments, if Irix  mode  is  Off,  top will  operate  in  Solaris  mode  where  a task's cpu usage will be divided by the total number of CPUs.  You toggle Irix/Solaris modes with the `I' interactive command.

You can toggle this by pressing I in top. As you have four CPU cores, the use is divided by four, and you will show 25%. If you turn on Irix mode, it will show 100%.

Your application is single threaded. It executes a sequential thread, on one CPU core. If you have the source code, you can change this. It's usually not a trivial task however, and depending on task it may not be possible.

Linux has a scheduler which will distribute running threads to different CPUs/cores.


I can not export the preseed.cfg file with kickstart configurator

The menu is only displayed if you have permission to write to the directory. Run chmod or sudo if applicable and then you should have a menu.


The uid= and gid= options do not apply to ext4 file systems.

All you need to do is mount the file system as you did (sudo mount -o rw /dev/sdb1 1TB/).

Then sudo chown myusername:mygroupname 1TB

Then you will own the file system you created and will be able to create files there as yourself.


Doing more than one copying/moving between usb and HD is very slow and slows down entire computer

What worked for me on a laptop was to change the disk scheduler.  This can be cone in three ways:

Test it by typing at the command line (ctrl+alt+t)

echo cfq | sudo tee /sys/block/sda/queue/scheduler

and replace "sda" with the device name of your devices.  Do this for both of your disks.  You can check what scheduler is in use by entering

cat /sys/block/sda/queue/scheduler

reboot to revert to standard if this does not work.

To make the changes permanent, place the command into /etc/rc.local or add a kernal option elevator=cfq

more information

Since I wrote this answer, I have changed my strategy.  I now user the cfq disk scheduler, but have added the 'noautogroup' flag to my boot parameters.


Evince ignores page margins when printing

You can try Okular that can print all pages in a PDF like Evince.


It is better to create new users with adduser instead of useradd. In this way you won't have this problem.


You have to use resize2fs to resize the filesystem to match what you have done with Gparted or lvextend.

Whenever you are doing this you have to imagine that you are making the logical volume larger with Gparted or lvextend, and then you need to resize the file system to make the newly allocated space usable.


It is a known (kernel) bug:

http://thread.gmane.org/gmane.comp.emulators.kvm.devel/91786

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1045027

There is a fix released for Ubuntu 12.10 but that I know (from my google search) not 12.04.

There are also reports of this error being thrown when you allocate insufficient memory to your guest. Try allocating 1024 Mb.

https://serverfault.com/questions/446015/windows-server-2008-instance-on-kvm-stuck-in-pause-mode


Raid md device is not remove from memory, how to overcome this problem

So it looks like you started off with 5 disks, I don't see a number "two" disk
in this list and you need 4 disks just to create a RAID 10

Number   Major   Minor   RaidDevice State

   0       0        0        0      removed

   1       0        0        1      removed

   4       8      145        2      faulty spare rebuilding   /dev/sdj1

   3       8       65        3      active sync   /dev/sde1

and a spare was defined which automatically kicked in. Problem is, you don't
have enough disks in the array to rebuild it completely.

I don't work with RAID 10 much but from the looks of things...

you started with 5 disks,1 defined as a spare
1 member dropped out, perhaps without your knowledge
hot spare was engaged and started rebuilding
2 more disks were pulled

You need 4 disks min for a functioning RAID 10, you only have two, add two
more and hopefully your sync meter will start to tick upwards. Also, you
can't kill those processes, they're doing IO and are uninterruptable, you
have to let it complete or give up on its own accord.

HINT: next time you want to practice this kind of fault injection, use a VM
to familiarize yourself, just create a bunch of tiny vdisks.


Try reading Try reading https://help.ubuntu.com/community/UEFI .  Turning off secure boot is really not necessary in most cases, and for your installation to be in the same mode Windows is in (UEFI?), you have to boot the USB install media in UEFI mode


How to mount a partition from a remote computer without sudo rights

The easiest would be to use an NFS Share (on the "server" machine) and the automounter (autofs) on the "clients".

I assume that NFS is installed on server and client according to the first comment from Dorian.

Say, the partition to share is on /mydata, add an entry to the file /etc/exports on your server:

/mydata     *(rw,sync,no_subtree_check)

(options depend on your requirements). After calling sudo exportfs -a the partition should be exported (test with showmount -e). Same should be true after each restart of the server.

On each client, install autofs:

sudo apt-get install autofs

Edit the file /etc/auto.master to remove the comment sign from the line for /net:

#
# Sample auto.master file
# This is a 'master' automounter map and it has the following format:
# mount-point [map-type[,format]:]map [options]
# For details of the format look at auto.master(5).
#
#/misc  /etc/auto.misc
#
# NOTE: mounts done from a hosts map will be mounted with the
#   "nosuid" and "nodev" options unless the "suid" and "dev"
#   options are explicitly given.
#
/net    -hosts

After restarting the autofs service (sudo service autofs restart), you should be able to access the exported filesystem(s) via

/net/<servername_or_ip>/<exportname>

Eg., if your server's name is "myserver" and the exported filesystem is "/mydata", you could enter

ls /net/myserver/mydata

to see the contents of the directory.

There are a few advantages over having a static entry in /etc/fstab:

The NFS share is only mounted when accessed, and will be unmounted after some time of inactivity. This saves a lot of ressources and network bandwidth.
If you add a second share on your server (say "/myotherdata"), you do not have to add any entry on the client. Just access the path /net/myserver/myotherdata
If you add a second server with another share (say "/moredata" on "secondserver"), the path will be /net/secondserver/moredata without any action on the client
You can use the same path (/net/...) on each client, even on the server itself, if you installed and configured autofs on the server.

If you do not want to always enter /net/...., just add a link in e.g. your home directory:

ln -s /net/myserver/mydata .

Caveat:

NFS matches users/groups via the UID/GID. So the "same" user has to have the same UID on all computers, which also holds true for the groups (GID). Otherwise, access rights are mangled/corrupted. There is no problem if you have a centralized user management.


While accesing mysql in Ubuntu , after entering the correct password?

Your mysql server is not running. Try to set error logging in your /etc/mysql/my.cnf in [mysqld] section : log_error = /var/log/mysql/mysql-error.log , then restart mysql and look for errors. When you fix your errors you will access your mysql.