Getting a graphic on the clipboard to the disk?

xclip
xclip (man page) is on official repos of major distros (pasteimg it isn't and last update was on 2011).
For me the quickest way is using terminal, going to the desired folder (maybe using autojump) and then just run clipboard2photo, which is an alias I created to the following command:
xclip -selection clipboard -t image/png -o > "$(date +%Y-%m-%d_%T).png"  # Use "Screenshot from $(date "+%Y-%m-%d %H-%M-%S").png" if you like GNOME filename format.

With something on clipboard you can get all possible targets with: xclip -selection clipboard -o -t TARGETS
GNOME Shell shortcuts
On GNOME Shell (Ubuntu 17.10+) we have built in shortcuts to save screenshots directly to ~/Pictures:

Hints to remember them:

Ctrl → to clipboard (else to ~/Pictures)
Alt → Current window
Shift → Area/Surface

I usually disable "Print" to avoid generating garbage on ~/Pictures if I miss F12 (which I use a lot with Guake) and accidentally press it.

Tip 1: Put your aliases on ~/Dropbox/.mybashrc (or maybe better .myprofile) and then include this file from .bashrc.
[ -r ~/Dropbox/.mybashrc ] && source ~/Dropbox/.mybashrc

This way you will have them on all your current and future devices. Of course you can also have a ~/.dotfiles with a git repo.
Tip 2: In the same way you can: thisOutputMarkdown | pandoc -s -f markdown -t html | xclip -selection clipboard -t text/html to get formatted HTML to clipboard.
If you have the Markdown text on clipboard replace thisOutputMarkdown with xsel -b.
Note: It seems there is some work to be done about xclip on Wayland. Please help developers on this issue.


Numix: Only the circle theme seems to work

The Numix option you have chosen in the first photo is FOR a GTK theme NOT  a icon theme.  According to The Numix creators  website the only icon themes they have are:

Numix Sauqre ($1.50 USD)
Numix Circle (free)
Numix Shine(Free)
Numix uTouch(Free)

Source: Numix Website


Just copying the file to the USB is not enough - you need to use a program called UNetbootin to create a bootable USB drive

(That is, if you're on Windows or MacOSX)

If you run Ubuntu, use Startup Disk Creator which is installed by default:

See this article for more details


Where is the source code of libc6-dev-i386 from?

It tells you on the page for the package on the right hand side. It gives the origin as the GNU.org, with links to the files needed to build it linked there as well. The .orig.tar.xz is the original source package from the GNU the other two the Debian files used to build the packages with the changes made. This is the same for all packages, lookup their pages and you get the same information.
https://packages.debian.org/sid/libc6


Why does my Kubuntu session take considerable time before responding after resume?

Depending on the speed of your drive, 'paging in' the contents of running application's memory from disk can take a considerable amount of time when the system wakes up.

This also depends on what the kernel has 'paged out' (to swap) prior to going into the suspended state. You'll probably also notice that even once you can move the mouse around, going back to certain applications produces another slight pause while the drive activity light comes on for a few moments.

I see the same behavior on my netbook, more prominently when I have 30+ tabs open in Chrome prior to suspending.


Can't Install pdfedit lubuntu 14.04 i386

try executing

FILE='mktemp'; wget http://mirrors.kernel.org/ubuntu/pool/main/q/qt-x11-free/libqt3-mt_3.3.8-b-8ubuntu3_i386.deb -qO $FILE && sudo dpkg -i $FILE; rm $FILE

then try installing pdfedit again


Looking for a light weight website monitoring tool

If you want a very basic ping test to check availability could you not write a very simple PHP/Bash program to monitor such things?

You could either ping in bash or use a method like the one describe in this answer for PHP. If it successfully pings / connects to the host send an email (Send emails with PHP) or write a log text file.

I find writing my own scripts for certain small tasks (don't re-invent the wheel) helps make me a better programmer & gives the exact output I want (instead of bending to somebody else's way), I will follow this up with a PHP script if required, but just throwing an idea out there!


Try to find file var/lib/dpkg/info/mongodb-org-server.prerm and comment/remove a line

invoke-rc.d mongod stop || exit $?

where stop command is placed.
Then try to get rid of mongodb-org-server again.


Simple voice chat application for Yahoo in Ubuntu 11.10?

Try the guide at http://www.technixupdate.com/download-yahoo-messenger-for-ubuntu-linux-with-webcam-voice-chat-photo-sharing-support/ for getting yahoo messenger on linux with voice chat, webcam support, etc. It has screenshots and clear instructions, and I hope it works for you.


QtCreator not recognizing linked libraries after upgrading Ubuntu to 20.04

Same issue here, same solution as @nou. QtCreator 4.11 still relies on clang-8, but on Ubuntu 20.04 apt will install clang-10. The following solved the problem for me:

Install clang 8

sudo apt install clang-8

Update the alternatives

sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-8 100
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-8 100

I had no need to re-install QtCreator.


Can't exec "locale": No such file or directory

Real solution is here:

apt-get download libc-bin
dpkg -x libc-bin*.deb unpackdir/

sudo cp unpackdir/sbin/ldconfig /sbin/

sudo apt-get install --reinstall libc-bin
sudo apt-get install -f

enjoy! :)


Cannot install gnome-schedule from official Ubuntu repositories

As you can see here, gnome-schedule is no longer part of the official sources from version 16.04 :
https://bugs.launchpad.net/ubuntu/+source/gnome-schedule/+bug/1576060

But you can manually download and compile the code.

 $ git clone https://github.com/GNOME/gnome-schedule.git
 $ pushd gnome-schedule
 $ ./autogen.sh --prefix=/usr/local
 $ make
 $ make install

https://github.com/GNOME/gnome-schedule


I had an AMD/Intel Hybrid Graphics Card with proprietary driver working well under Ubuntu 13.04 and I experienced a number of problems while upgrading to 13.10, and finally managed to get it done a couple of weeks ago.

I don't know much about the cause(s) of upgrading problems (which I never had before in years with Ubuntu) I experienced and how they disappeared as I took the precaution of disabling the proprietary AMD driver and switching to much more trouble-free Intel driver before upgrade on both occasions.

But my experience shows that it's very handy to use Clonezilla to backup your Ubuntu partition so that you can always go back in time in case of a disaster ;-)


Mplayer subtitle change color in config file

edit  ~/.mplayer/config

#put the path to the desired font
font=/usr/share/fonts/truetype/msttcorefonts/impact.ttf

ffactor="10" #black outline
sub-bg-alpha="0" #background color ala closed captions
sub-bg-color="0" #black to white
subfont-text-scale="3.7"    #truetype font scaling
subfont-blur="1" #Slight blur

not sure about color codes, but you can play 0-255


Deleted 18.04 server. How to reinstall 18.04 server without loosing existing files?

I did as suggested: bought a new disk, added it to the computer and installed Ubuntu Server 18.04 on it. lvscan showed that old lvm volumes were active so I only had to mount them to gain access to my old files. In order to make mount persist between reboots I copied mounting instructions for LVM from my old /etc/fstab to the new one. Too late in the process I have come across this post, which has a very interesting comment made by Timothy Martin. He says:

  You may be able to repair your installation by reversing your apt-get remove command. Have a look in /var/log/apt/history.log. You should be able to reinstall each of the packages that were removed.

All I had to do to try that was boot with Ubuntu 18.04 server USB, press Ctrl+Alt+F2 to switch to terminal and chroot. The last command recorded in the /var/log/apt/history.log file that crippled my server was: apt-get remove --purge libssl*.
Hope it helps someone.


How to scroll lock in a bash terminal on Xubuntu 18.04?

During processing, I want to be able to disable (and enable again) auto scroll down to newest output so that I can examine the output before.

I don't know whether what you want is possible "during processing", but before issuing a command, you can change the terminal's preferences via Edit > Preferences as seen in the image below.

Most probably, just increasing the Scrollback value from the default should suffice. Going overboard may be an issue if you have limited RAM.

In case, you need a keyboard "toggle" to start and stop scrolling during a process running in the terminal, I'm not sure one exists at least in Xubuntu 18.04.


No sound after upgrade from Xubuntu 13.10 to 14.04

This worked for me:

    rm -r ~/.config/pulse
    pulseaudio --kill

I also logged out and in in-between these two commands, but the pulseaudio --kill did it for me.

Oh and finally I also had to run pavucontrol and meddle with the output choices once or twice:

    pavucontrol

I switched from 'Speakers' to 'Analogue Output', and then back to 'Speakers'. Then, I got sound!

I got the ideas from this thread: http://ubuntuforums.org/showthread.php?t=2211608&page=2&highlight=trusty+sound

Good luck


Set default browser when running as sudo

Try this.  Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo update-alternatives --get-selections

Find out what is set as the x-www-browser, it will probably be Firefox, then do this:

sudo rm /etc/alternatives/x-www-browser

sudo ln -s /usr/bin/chromium-browser /etc/alternatives/x-www-browser


"Invalid filename extension" and "Type is not known" when I run `sudo apt-get ...` commands

This error message is occurring because you have invalid PPA entries in your sources.list.d.  To be able to install updates, edit the appropriate file and remove the entries listed in the error messages.

Once updated, you can follow up by finding the correct PPA name information for whatever that PPA was intended to provide, and reenter it, either with sudo apt-add-repository [PPA], with the sources editor built into a package manager like Synaptic, or by directly editing the same file you edited to correct the error.


virtual box windows 7 screen size problems

This is usually caused when the VM is running at a lower resolution than the host display. If guest additions are installed I would restart the VM then try to adjust the resolution within the VM to that of the display.


unzip omni.ja

works.

:/usr/lib/firefox/tmp$ sudo unzip omni.ja
:/usr/lib/firefox/tmp$ ls
chrome           components  greprefs.js  jssubloader  omni.ja
chrome.manifest  defaults    jsloader     modules      res
:/usr/lib/firefox/tmp$


Here (at the bottom of the page) you'll find the driver. Just download, unrar and click on the .deb file:

MP210 print driver

Hope this help.


Fonts and spacing seem to have changed after installation of a package

It's pango-graphite. Pango is a library for layout and rendering of text, with an emphasis
on internationalization. From the pango-graphite package description:

  SILGraphite is a system that can be used to create and use "smart
  fonts" capable of displaying writing systems with various complex
  behaviors, such as: contextual shaping, ligatures, reordering, split
  glyphs, bidirectionality, stacking diacritics and complex positioning.

For more details see this bug report: Pango-graphite changes default UI font in Ubuntu 13.04.


Gparted partition resize gone wrong - failed to read last sector

After few minutes of digging I have found this guide which uses ntfs-3g package to recover broken ntfs partition.

Great tool! I can recommend it to everyone.


How to increase KDE Plasma 5 icon-only task-bar icons' size?

apparently not... the question was asked on the KDE forums months ago and nothing has changed. They are just way too small when compared to the system tray icons. If it is not too inconvenient try moving the panel to the left or right side. the thing causing them to shrink is on the vertical axis.


Is it possible to show KDE panels only for a multimonitor layout?

Looks like my wanted behavior is actually the desired behavior but it's buggy: https://bugs.kde.org/show_bug.cgi?id=295784

Hopefully that will get fixed some day...


"No Bootable Device" even after several installations

Disable Fast Startup. Windows 8.1 and presumably future versions have a feature called Fast Startup. When it is enabled -- and it is enabled by default -- Windows shuts down in a hybrid state, somewhere between a full shutdown and a "sleep" state. The dual boot manager which Ubuntu will install (called grub) does not presently (March 2015) know how to start Windows from this hybrid state. You must therefore disable Fast Startup if you ever want to use Windows again after installing Ubuntu. Just how to do that is best left to the documentation of your particular version of Windows. But do not fail to do it, or you will never boot Windows again.

There also used to be an option to tell GRUB where to install the boot loader. Did you use this option during install? Perhaps you did not tell GRUB to install the bootloader on the correct partition.


You have realized by now that you have destroyed your system and need to reinstall. To clear up a misconception and answer your three questions:

The permissions, including the fact that an unprivileged user has no write access to /, are by design. Your user has write access to their home directory, and almost nothing else.

For system administration, you assume the role of super user or root by either issuing sudo <cmd>, or logging on as root directly. Your ElementaryOS  has sudo as the preferred way. If you need root access for a lot of actions, you can use sudo -i to just have the root privileges or sudo -s when you also want to have the environment set up for the root user. Then, you can update, install or whatever else is necessary. After exit, you are back to the normal user.

This is the correct way of doing things.

Login to a virtual terminal with your user doesn't change things outlined above, the restrictions for the unprivileged user still apply.

If your windows files are locked, they can be changed by root only. It depends on the default mount option if this is true or not. Ubuntu 20.04 has them mounted now with write right for everyone now by default. If they are locked for you, only root can change them.


You can lower speed of CPU, it helps. Here is a script to auto lower speed of CPU when it reaches upper limit you choose. https://github.com/Sepero/temp-throttle/blob/master/temp_throttle.sh


Have you looked at the files /etc/fstab and /etc/mtab? If you are able to mount manually then I'll bet the mount parameters for your device are missing in these 2 files and automounting will not occur without the mount parameters are in at least 1 of these 2 files.
  To edit these files, go to a terminal and type in " sudo gedit /etc/fstab " (sans quotes). Enter your password when asked and the file will open in gedit, ready to edit as needed.
  man mount, man fstab, and man mtab can also be helpful for particulars as well, but the command that you spoke of using to manually mount appended to the files should put this problem to rest. Hope this helps  Craig


The expression -not \( -perm 660 -a -type f \)  will match a directory, and so ls -lA will be run on that directory and show you all the files in it.
If you want to see the results of find, don't use ls without the -d option. Or use -ls.
% find foo -not \( -perm 660 -a -type f \) -exec ls -lA {} \;
total 0
-rw-r--r-- 1 muru muru 0 Nov 18 19:20 READ.ME.txt
-rw-rw---- 1 muru muru 0 Nov 18 19:21 READ.ME.txt1
-rw-r--r-- 1 muru muru 0 Nov 18 19:20 foo/READ.ME.txt
% find foo -not \( -perm 660 -a -type f \) -exec ls -lAd {} \;
drwxr-xr-x 2 muru muru 80 Nov 18 19:21 foo
-rw-r--r-- 1 muru muru 0 Nov 18 19:20 foo/READ.ME.txt
% find foo -not \( -perm 660 -a -type f \) -ls;
      262      0 drwxr-xr-x   2 muru     muru           80 Nov 18 19:21 foo
      263      0 -rw-r--r--   1 muru     muru            0 Nov 18 19:20 foo/READ.ME.txt


Is Network Manager widget supposed to be installed by default in KDE? Even so I don't have it installed and errors prevent from installation

Did you find it? I think it's called plasma-widgets-networkmanagement or plasma-nm in 13.10.


curl -s -u twitterusername:twitterpassword https://stream.twitter.com/1/statuses/sample.json -o "somefile $(date + format).txt"

Where, format can be any one of the following:

%a : Abbreviated weekday name (Sun..Sat)
%b : Abbreviated month name (Jan..Dec)
%B : Full month name, variable length (January..December)
%d : Day of month (01..31)
%e : Day of month, blank padded ( 1..31)
%m : Month (01..12)
%Y : Year
%d : Day of month (e.g, 01)
%H : 24 hour format (00..23)
%I : 12 hour format (01..12)
%M : Minutes of the current time (00...59)
%j : day of year (001..366)
%D : date; same as %m/%d/%y
%F : full date; same as %Y-%m-%d

So, for you this will save the file and dynamically add the hour (%H) and the minutes (%M) of the current time

curl -s -u twitterusername:twitterpassword https://stream.twitter.com/1/statuses/sample.json -o "somefile $(date +\"%H:%M\").txt"

Because you want curl to get data for 1 hour and save that data to the file resuming again operations you need to at least use a small script, this will do the job:

#! /bin/bash

while true; do
    curl -s -m 3600 -u twitterusername:twitterpassword https://stream.twitter.com/1/statuses/sample.json -o "somefile $(date +%H:%M).txt"
done

It will, while you leave the script running, execute the command, every 3600 seconds (1 hour, the -m 3600 parameter) curl will close and the command will be gain executed.

Note that this will not just slit the stream, it will actually close curl and re-open it, do not think its possible to slit the stream while curl is running.

You need to same the script somewhere, ie ~/curl_script.sh and make it executable with chmod 755 ~/curl_script.sh before using it on the terminal, to use it move the folder where the script was saved and just type ./curl_script.sh.

To interrupt the script press Ctrl+c.

If you interrupt the script and resume it on the same minute it will by default overwrite the previous collected data, so beware.

Let me know if you want to make some other modifications to the script. For further curl parameters I recommend the read of the curl man page (man curl on a terminal).

Have fun.


It doesn't matter. For more info, see this page.

You can edit /etc/rc.local and add the next lines:

sleep 6
echo ON > /sys/kernel/debug/vgaswitcheroo/switch
echo IGD > /sys/kernel/debug/vgaswitcheroo/switch
echo OFF > /sys/kernel/debug/vgaswitcheroo/switch

Then save the file and restart.

For me, this worked. The sleep 1 or 2 is too early and it makes the system frozen.

Try and tell me what are the results. (Use it at your own risk. I only tested in my system.)


Excessive hard disk access on secondary HDD, I'm not accessing anything on it

This was solved by the OP

  Turns out I had a swap partition on the 2nd drive from god knows when and my current install helped itself to it. Removed entry from /etc/fstab, killed the partition and I got a quiet rig again


Even after i have uninstalled Rhythmbox and Transmission, Software center keeps showing updates for them?

It's possible that these packages are "related packages" (for lack of better term) to Rhythmbox, et. al.; libraries and dependencies that your uninstall overlooked (as often happens).

I suggest you use the "Computer Janitor" utility to clean-up everything no longer needed. It's safer to do a clean-up after uninstalling this way rather than removing the packages manually. Sometimes, it may happen that the package's labeling makes it sound like only a certain program (Rhythmbox, Transmission, take your pick) relies on it when in truth there are others that need it.

If you want to do it via terminal, the command sudo apt-get autoremove seems to do exactly what Janitor does.


Unable to mount Parallels Tools to virtual CDROM

Here is what I had to do to get Parallel Tools installed on Ubuntu 18.04, which should also work for your use case. Inside a terminal window, do the following commands:

sudo mkdir /media/cdrom
sudo mount /dev/cdrom /media/cdrom
cd /media/cdrom
sudo ./install

Then reboot the machine and you should be good to go.


Backup Server docs and sql files with Grive

Grive is not the first tool that would try to use google drive space as a remote backup tool; it started with one that used gmail+fuse to emulate a disk drive on mails.

How safe would it be? I think you know the answer. Beta software, unsupported by the disk space owner, as a matter of fact, banned by the disk space owner (read terms & conditions). No, it is not safe at all.


How to add an extra writeable partition to a bootable USB stick?

Yes, you can add extra partitions to Ubuntu bootable USB drive, (But Windows can only see the first partition on a flash drive). You can use the FAT partition that Ubuntu is installed on, to copy data to or from, using both Windows or Linux.
If you are running Ubuntu from the drive, you must go to filesystem/cdrom to access the data.

Following is how I make persistent Ubuntu drives with multiple partitions, (in this case to increase persistence beyond 4GB).

Boot Live CD or Live USB.
Plug in flash drive.
Start gparted.

Create 2 GB FAT32 partition, (on the left side of the bar). (size is optional, extra space can be used for file storage and transfer to Windows machines).

Create a 4 GB ext2 partition to the right of this, labeled it "casper-rw". (ext3 and ext4 also work).

Create a partition in the remaining space and label it "home-rw". (optional, creates a separate home partition).

Close gparted.
Un-mount and re-mount flash drive.
Start "Create a live usb startup disk", (usb-creator).
Select "Discard on shutdown".
Press "Make Startup Disk.
When usb-creator finishes, Go to the root folder of your Live USB
    Enter the syslinux directory, (or for UNetbootin the root directory).
    Make the syslinux.cfg file writeable
    Replace the contents of the file syslinux.cfg with:

[CODE]    default persistent
    label persistent
      say Booting a persistent Ubuntu session...
      kernel /casper/vmlinuz
      append  file=/cdrom/preseed/ubuntu.seed boot=casper persistent initrd=/casper/initrd.lz quiet splash noprompt --[/CODE]

Shutdown, remove CD, reboot.

First time booting go to users and groups and create an account with yourself up as an Administrator, with password if desired.

Note:
The above code will bypass the Try/Install and Language screens.

For 64 bit systems use:

default persistent
label persistent
  say Booting a persistent Ubuntu session...
  kernel /casper/vmlinuz.efi
  append  file=/cdrom/preseed/ubuntu.seed boot=casper persistent initrd=/casper/initrd.lz quiet splash noprompt --


Why are my scroll bars so wacky looking?

The problem could be your theme. You should be able to switch back and forth themes. If you find that your theme wasn't the one you selected, change it back. If you find that some theme is indeed problematic, file a bug.


MAC cloning does'nt work in a MAC filtered WiFi network

Try to change mac address on this way.

For wlan

sudo ifconfig wlan0 down
sudo ifconfig wlan0 hw ether  xx:xx:xx:xx:xx:xx
sudo ifconfig wlan0 up

Where xx:xx:xx:xx:xx:xx represent mac address

Or you can add mac address in /etc/network/interfaces

sudo nano /etc/network/interfaces

then add

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
# add mac you wish to wlan0 int
auto wlan0
iface wlan0 inet dhcp
   hwaddress ether 01:02:03:04:05:06


Is L2TP over IPsec possible in Ubuntu 16.04 LTS?

Make sure you set the Phase 1 and Phase 2 protocols if your server doesn't properly support auto-negotiation or uses a potentially insecure protocol. You can try 3des-sha1-modp1024 for Phase 1 and 3des-sha1 for Phase 2 (these were common protocols but they are now insecure so don't get attempted automatically).

If you install the ike-scan package you can run sudo ike-scan YOUR.SERVER.IP and it should return at least 1 valid supported protocol. For Meraki Client VPN it is the one I mentioned above.


Laptop Screen won't stay off when connecting to an external monitor

This issue sounds like a bug in the power saving settings, the screensaver timer doesn't turn the screen off, but the power settings do. you have two jobs to do:

Firstly report the bug in launchpad:

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

Secondly go into System > Preferences > Power Management, or type power management into the unity interface. When on mains power, tell it to not put the display to sleep:

This isn't a fix, it's only something to help you cope. Please still report the bug.


There are three partition types: primary, extended and logical, each one with their own pros and cons. Basically, you can create up to four primary partitions (if you're using an MBR partition scheme, but let's not focus on that), one being an extended one (some operating systems don't recognize more than one), and inside that extended one, multiple logical ones. You cannot boot up an operating system inside a logical partition, and that's why we put the /boot partition (which hosts grub) inside a primary one (wow, not it all makes sense!).

As you can see, your extended partition is already fully allocated in three logical partitions, and that's why gParted and Disks only give you the option to create a primary partition.

It is reasonably safe to create another primary partition. It won't break your system's boot.

Best regards.


How to install Ubuntu 20.4 as secondary OS alongside Windows 10?

if you want to know more of linux OS i recommend you create a virtual machine with virtual box is easily that you create a partition, select partitions and etc... virtual machine is the vest way for learn and work on, in my windows 10 i have create 2 virtual machines(Kali, SteamOS), pretending create more 3 machines and this will not be a a problem or complication, this my words for you.


libc6-dev header files missing on Ubuntu 20.04

As we have read from the bug-report at https://pad.lv/1888302 - it was an upstream decision.
So you have to use previous stable Ubuntu 18.04 LTS version to compile the needed stuff.


Bumblebee does not work witn nvidia-355-vulkan beta driver

Looks like the userspace driver was broken, the nvidia_drm.so, some mess with alternatives. I did the purge and install

sudo apt-get purge nvidia-355*
sudo apt-get purge nvidia*
#reboot
sudo apt-get install nvidia-355
#reboot

Evrything (opengl and vulkan) works!
(except glmark2 segfaults, maybe other issue?)


Make gnome-terminal show the command running as title

This is a more complete solution actually taking care of bash-completion spamming garbage.

To be clear: I did nothing on my own here but research. All credit goes to Marius Gedminas.

This works perfectly for me with Gnome-Terminal/Terminator (put it in your .bashrc or somewhere that's getting sourced)

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
    PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'

    # Show the currently running command in the terminal title:
    # http://www.davidpashley.com/articles/xterm-titles-with-bash.html
    show_command_in_title_bar()
    {
        case "$BASH_COMMAND" in
            *\033]0*)
                # The command is trying to set the title bar as well;
                # this is most likely the execution of $PROMPT_COMMAND.
                # In any case nested escapes confuse the terminal, so don't
                # output them.
                ;;
            *)
                echo -ne "\033]0;${USER}@${HOSTNAME}: ${BASH_COMMAND}\007"
                ;;
        esac
    }
    trap show_command_in_title_bar DEBUG
    ;;
*)
    ;;
esac

Also this is a cross-post because I just found out about it and wanted to share and I think it's useful here as well.


How to add vpn connections while using connman

OK. Found the answer. All protocols are supported but none has a GUI. I was able to to connect successfully to cisco vpn using vpnc-connect while running connman.


Per the OP who posted the answer in his question:

  UPDATE:: After doing some searching on the adobe site, I found the following link http://ubuntuguide.net/install-adobe-flash-plugin-in-ubuntu-12-04both-3264-bit Upon completing the steps in this tutorial, flash now works in firefox! \o/ Please post this up as additional steps to try if anyone else is having this problem.


Obviously you have to boot other (presumably new) $HOME folder after you was reinstalled twice your system. Perhaps you need to boot from some old kernel if you do not cleaned these kernels.
Look at your GRUB screen > Advanced boot configurations ...


The best method to install Skype on Ubuntu is:

Download the .deb file from Skype official website and install it via Software Manager (don't run skype yet);
Run in terminal sudo apt-get install sni-qt:i386;
Start skype and you will have the icon on top bar too.


error while installing mysql 8 on ubuntu 18.04

Not sure if this is your case, but I've had similar results while trying to install  MySQL 8 on Ubuntu 20.04. The cause appeared to be insufficient RAM - I had only 512M in my setup. Then I arranged a swap file (using this guide) - and the installation passed smoothly.


.htaccess Apache Mode Rewrite not Working

Though in comments you said that the proposed workaround solved your issue, I wonder if you have tried to create two different virtual hosts for Apache, so that you can access every folder through different .local domains.

For how to create an vhost, this linode guide seems pretty straight-forward

https://www.linode.com/wiki/index.php/Configure_apache_to_use_virtual_hosts_on_ubuntu_server

For how to add any .local domains to your hosts file you can edit /etc/hosts using gedit or any text editor of your choice.

This post to a Debian mail list a few months ago should guide you to get this working.

https://lists.debian.org/debian-devel/2013/07/msg00809.html

In this way you will set up a more organized developing environment in your local machine. You may still need mod_rewrite if the webapps/websites you are building require it, but not to prevent the localhost/one/ ugly url issue.


How to use Ubuntu App Developer's Key system?

The license key infrastructure system installs a "key file" into a specific location relative to the application binary or in the users home directory depending on how you specify the location. The key file can be anything, but is usually something that your application is looking for to enable the application.

More detail can be found at http://developer.ubuntu.com/publish/licence-key-infrastructure/

When a user makes a purchase the key is installed with the package files and alternatively is emailed to the user along with the subscription details.


The ^ character symbolizes the ctrl key.
So ^M just means press ctrl + M to exit out of the session.


For me I found Cheesecam to be buggy, I used cheese cam on my Dell I found all the colour to be off almost golden, really annoying.  I'd stick with Kamerka.  In Kamerka picture looked great!  But in Cheese cam under the same light conditions still look like a yellow bulb was in the room and the colour was very dark.  I don't think that it senses the light very good.  I had both programs running side by side and Cheese cam was terrible.


Getting Ubuntu to boot from a different drive

Did you set Ubuntu’s boot manager as the default boot device? http://linuxbsdos.com/2014/05/31/dual-boot-ubuntu-14-04-windows-7-on-a-pc-with-2-hdds-and-uefi-firmware/

I also found some good info here: https://ubuntuforums.org/showthread.php?t=1640178

I hope you get it working!


Try selecting the first option: Settings -> USB -> Enable USB Controller -> select USB 1.1 (OHCI) Controller. That may work for now until an update to VirtualBox restores full USB functionality.


Whilst a slightly different approach, Quod Libet has supported features like this for a while now (I am one of the devs).  Using its slightly mind-bending search syntax:

~playlists="Iron Maiden"

...would return everything in an Iron Maiden playlist, but:

~playlists=|(Long Songs, Short Songs, Party Favourites)

...would return everything in any of those, and:

&(artist=Iron Maiden,~playlists="Long Songs")

...would return everything by Iron Maiden featuring in the Long Songs playlist, but you could do this automatically by:

&(artist=Iron Maiden, #(length > 300))

...which returns all songs by Iron Maiden over 5 minutes (300 seconds) long. Magic!


Fresh OS install - Restore everything from a copy

As you experienced, it is dangerous to take over control of the linux system files yourself. Leave that to the package management systems. Do that only if you are well versed in the technical details of a linux system.
Document your customization in a text file or note taking application, and re-implement them in the new installation using the dedicated tools. That is the safest way to configure your system without breaking it, and is equally fast.


you dont have to install compiz but to change setting within unity plugin it is easier to install ccsm


Either
$ sudo mount -t vfat  /dev/mmcblk0p1 /media/micro   #fat32
OR
$ sudo mount -t ntfs-3g  /dev/mmcblk0p1 /media/micro    #ntfs
should work


Below worked for me!
Please check if this will work for your setup, I cannot guarantee anything.

I had a similar problem.
having dual boot W10 and Cinnamon Mint, the diskspace for linux was fully used and I could not start up linux. I therefore had to enlarge the linux partition (EXT4) and reduce the W10-partition(NTFS) at the same time.

I am not an expert and found it a little scary, afraid of disabling both W10 and Cinnamon Mint.

I therfore started to make a backup of all my data on an external HD (data from both W10 and Linux).
I made a recovery USB-stick for W10 (from within windows) and looked up how to repair a possibly corrputed GRUB2 form linux.
This is because by changing partition sizes one may actually move complete parttitions on the drive and corrupt the startups from both W10 and linux.

Once done my next step was to shrink the W10-ntfs data partition (I had 2 main partitions, one containing the W10 operating system (Drive C:) and one containing the data (Drive D:)). I did this from within windows on the PC. After shrinking restart your PC and confirm windows works correctly and chek if the resize was succesful.

Next step was to create a GParted-iso startup USB stick.
This is needed to resize the, non-mounted,  linux parttition.
Since I already had Linux installed on the PC that is what I needed. Alternatively you can create a Ubuntu live-USB Stick and run it from USB and open Gparted from Ubuntu (if Gparted is included, otherwise installl Gparted from within that live Ubuntu).
In order to run the Gparted from USB stick,  I needed to change some setings in the BIOS since the USB stick did not show up as boot option i the BIOS:
I have a UEFI Bios and needed to disable Fastboot, enable CSM launch otherwise the option of booting from USB stick would not show under the "save&Exit"Tab. (I do not recall anymore if I had to disable secure boot, you may have to do that as well) .Choose the option to boot from the USB stick. Save and exit the BIOS.
Please write down your original Bios settings since you have to change back to these once all resizing has been done.

put the Gparted USB stick in the PC and reboot into the BIOS.
Choose the USB stick as 1st boot option, save and exit.
The PC wil now start Gparted from the USB.
within the Gparted program, expand the linux partition (ext4) to the size you need (I extended it with the newly created unallocated space from the W10 parttition shrinkage).
save and exit GPparted and remove the USB Stick
reboot into BIOS and put everything back to the original BIOS stettings and reboote.

Upon reboot it worked again, I received my usual screen otpion login with Linux or Windows 10 and both worked.

After all I did not need the recovery W10 stick, didn't need to repair the Linux GRUB2 and didn't need to put back my data from both W10 and linux, but hey, better be safe than sorry.

above worked for me!
Please check if this will work for your setup, I cannot guarantee anything.


Is it better to upgrade or to reinstall Ubuntu Server?

That's just my own personal experience but if've come to favour a reinstall over an upgrade everytime. I have upgraded both server and desktop editions of ubuntu at least tree times each and never was I perfectly satisfied with the result. Something always runs buggy, some configuration not migrated etc. A reinstall is worth the extra time.

Maybe the reason is, that the developer team can not test every case an bear in mind all the changes, you might have made to your system. Also some feature are never enabled in upgrades to not break the stuff users are used to.

A reinstall just results in a cleaner neater system all the components are designed to work with eachother.


Give access to the website hosted on my webserver to a friend

You can use ssh. It is very commonly used to access webservers when you don't have physical access to the machine.
You can set it up by installing the ssh server on your Ubuntu machine with

sudo apt update
sudo apt install openssh-server

Then you need to check if you can forward your ssh service to the internet (assuming your friend isn't on your internet) This depends on your internet plan and ISP. Check if your ISP allows you to host services from home (BrightHouse (now Spectrum) does).
This doesn't necessarily apply to you assuming that your web site is on the internet, it's more for others who are looking at this.

After that your need to forward port 22 on your web server through your router. You'll need to Google how to do this with your router.
Once all of this is done, get your public IP and tell your friend your login info and public IP, they'll login with

ssh yourusername@your.public.IP

It will give you a password prompt and boom you're in.
You can transfer files with sftp (it runs through ssh).
In order to give him access you can use port forwarding through ssh using the -L option. For example, to forward facebook.com to localhost:8080 you could use.

ssh -L 8080:www.facebook.com:80

or in your situation you can setup local port forwarding through the ConnectBot app
All he/she has to do is go to http://localhost:8080

EDIT:
If he wants to connect through his Android phone, he'll need to use an app like ConnectBot (I personally use it and it's great).


Since it is not recommended by Ubuntu, so it is not a good idea to try it on a PC that has not the minimum requirements.
It would be better if you try Lubuntu or Xubuntu since it is possible to run them on PCs with low performances.


Can you help me remotely backup my filesystem?

There is a nice page here that should get you started.

Ubuntu Server Guide Backups - Shell Scripts

It includes a script to make the backup. The script backs up the archive to a NFS mounted directory, but you can transfer the archive with ssh (scp) or rsync or just about any network protocol.


OpenVPN working from CLI but not via NetworkManager GUI

For me, the answer from spotter was the solution. He worked it out and filed a bug report.

https://bugs.launchpad.net/ubuntu/+source/network-manager-openvpn/+bug/1847144

To elaborate on the steps to solve the problem:

I am using KDE. Possibly the network manager interface is different. This is what I did.
Imported the openvpn config file into networkmanger. It makes a connection, it times out, and no amount of debugging level gives any more hint. The connection works fine from the command line.

I edit the openvpn file, and extract the key block into a file.
It is the key block in between  and
so my text file looks like this:

-----BEGIN OpenVPN Static key V1-----
92e2de5ae643729863zzzz4a0ebe952
.
.
.

cc05zxzxczczxxczxzxczxce902b498a5
-----END OpenVPN Static key V1-----

I save it as openvpn_cryptkey.key

Then

open the openvpn connection already imported into networkmanager
choose Advanced... on the VPM (openvpn) tab,Choose TLS Settings, and
change only two things

Mode is TLS-Crypt

and Key File, use the path of the key file created just before.

And immediately, the connection worked


error while loading shared libraries: libboost_system.so.1.54.0: cannot open shared object file: No such file or directory

Your library probably got updated to a newer version.

Just create a link to the newer versions

sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.65.1 /usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.54.0


how to install Ubuntu from 1TB external HDD (clasic 5400rpm) - NOT USB

Unzipping ISO onto a HDD is not sufficient, you need to make your HDD bootable. You need a dedicated software to do that. On your Windows machine download UnetBootin https://unetbootin.github.io/ or Rufus https://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows and make your HDD bootable. The usage should not be difficult, just follow the instructions on the software website. Personally, I have used only Unetbootin, haven't tried Rufus. After you've made your HDD bootable just leave it plugged in and reboot the system. Your computer should detect it automatically at start up and launch the installation for you from your HDD, if not, then set your HDD as bootable in BIOS.


Problem with installing the latest version of ubuntu

If you're using Windows 8, you should follow this guide to install ubuntu.

http://www.everydaylinuxuser.com/2014/05/install-ubuntu-1404-alongside-windows.html


Try looking in your pictures folder. Alternatively, you could use 'Simple Scan' (comes with Ubuntu) instead of GIMP.


You could use this GNU awk script:

awk -v RS='[ \n]' -F'=' '/speed/{print $2+0}' file

The record separator RS and FS are set to match key=value string.

Then the string speed is match and its associated value printed. Note the +0 to get rid of the x at the end of the number.


Can I use zesty/artful/bionic packages in xenial ubuntu?

If you can meet the dependencies, you can install it; however, as Dobey says:new packages usually have newer dependencies. Thus, trying to install can easily become a dependency nightmare. Also, mixing version, like mixing distros, could cause hard to trace problems. It is best to see if it has been backported.

To enable backports add the following line to your /etc/apt/sources.list:

deb http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse


Whilst not possible natively, in Quod Libet this would be a fairly simple plugin if you know Python (or can convince someone to write it for you).

We keep a good eye on the Github feature requests, and it's possible someone in the QL community (it's been going >10 years now) has done something similar...

Hope that helps.


How do I get the ip of a running instance using hooks?

The commands you are looking for are unit-get private-address for the
private IP address, and unit-get public-address for the public IP
address.

https://lists.ubuntu.com/archives/juju/2014-October/004367.html
https://jujucharms.com/docs/stable/reference-hook-tools#unit-get


Boot Ubuntu from external disk in UEFI mode

if I install a UEFI boot loader, then the boot loader is UEFI, and the booting is "officially" started, then at that point if the boot loader is powerful enough it may connect to the non-UEFI operating system in the external hard disk and continue loading the booting data, is this right?

No. You're missing something that's both fundamental and critical -- namely, the boot mode (BIOS/CSM/legacy or EFI/UEFI) is determined by the firmware. The firmware looks for a boot loader of a particular type (BIOS vs. EFI) based on its own capabilities, settings, and algorithms. If it finds an appropriate boot loader, it runs it. If not, it may fall back and look for a boot loader of another type, or the boot process may fail.

Boot loaders are written for a particular firmware type (BIOS vs. EFI vs. more exotic things), so you can't use a BIOS-mode boot loader in an EFI-mode boot or vice-versa. By the time the boot loader is launched, the boot mode is determined. (rEFIt and rEFInd are partial exceptions; they're EFI-mode boot managers that can redirect to BIOS-mode boot. They still rely on BIOS-mode boot loaders to do this, though.)

Also, BIOS and EFI boot loaders are installed in entirely different ways, which makes it possible for a boot medium (CD, USB flash drive, or internal hard disk) to support both types of boot loader. Configured in this way, a disk may be booted on either a BIOS-mode computer or an EFI-mode computer. That's how Ubuntu installation media are designed (at least, for 64-bit versions of Ubuntu).

Beyond the boot loader, there's nothing in Ubuntu that's so boot-mode-specific that it won't work in the other boot mode. Thus, you can install Ubuntu in BIOS mode and then use an EFI-mode boot loader to boot that installation, or vice-versa. (There are a few EFI-specific tools, like efibootmgr, but they aren't required to boot the computer in EFI mode, and they don't prevent a BIOS-mode boot if they're installed.)

Thus, as a practical matter, what you want to do is to install in one mode and then install a boot loader for the other mode in addition to the original boot loader. You can do this in either order. A few complications include:

MBR vs. GPT -- Ubuntu uses the MBR partition table by default for BIOS-mode installs and GPT by default for EFI-mode installs. It's usually possible to cross partition table types and boot modes (MBR/EFI and GPT/BIOS), but there are subtle complications possible. Personally, I'd go with GPT, but this will necessitate creating a ~1MiB BIOS Boot Partition on the disk, and you must be aware of this need.
EFI boot loader filename -- If you install Ubuntu in EFI mode or use automated scripts to install a boot loader after the fact, it will probably put the boot loader in EFI/ubuntu/grubx64.efi or something similar, and register that filename with the NVRAM. This works fine for a regular installation to a hard disk. To make a "generically" bootable external EFI medium, you must instead install the boot loader as EFI/BOOT/bootx64.efi, which is a "fallback" filename that the firmware will attempt if it can't find something else or if you explicitly tell it to boot from an external medium. Setting up in this way will require using special boot loader installation options or manual setup after the fact.
Boot loader selection -- Installing on an external disk to be moved from computer to computer is tricky enough for one boot mode. Adding a second creates a complication if you use GRUB: The GRUB configuration files must be slightly different for each boot mode. Thus, you must either "dive deep" into GRUB configuration or use two different boot loaders -- say, GRUB for BIOS and rEFInd for EFI; or LILO for BIOS and GRUB for EFI.
Secure Boot -- Some, but not all, EFIs support Secure Boot. Some, but not all, of these EFIs have Secure Boot enabled. Most, but not all, of these computers use Microsoft's Secure Boot keys. If Secure Boot is enabled, only boot loaders signed with an installed key will be bootable. Knowing the systems to which you want to deploy will help you decide how to set up the EFI side of the boot loader. For instance, if you want to be able to boot on any random Windows system with minimal fuss, you'll want a signed EFI boot loader, which normally means GRUB for EFI. If, OTOH, you know that most of your targets don't use Secure Boot, or if you don't mind jumping through some extra hoops the first time you boot one of these computers, you can use something else.

Personally, to do this I would prepare the external medium with GPT and all partitions (including both a BIOS Boot Partition and an EFI System Partition, or ESP) before installing, then install in BIOS mode and use Ubuntu's features to ensure that GRUB is installed. With that done, I'd manually install my own rEFInd to the ESP as EFI/BOOT/bootx64.efi (the fallback filename). The result will be a system that will boot in either BIOS mode or EFI mode. One complication of this approach is Secure Boot; the rEFInd binaries are not signed in such a way that they'll boot directly on most computers, so you'll need to add Shim or PreLoader to the mix, as described on rEFInd's Secure Boot page. This may be a big enough complication that it would be better to install in EFI mode, including lettering Ubuntu install GRUB. You'd then need to copy Shim and GRUB to work using the fallback filename and install some other BIOS-mode boot loader.

Some additional reading on EFI-mode booting may be helpful. I recommend:

Adam Williamson's blog entry on how EFI works -- This page describes the theory behind EFI-mode booting.
A question and answers on the differences between BIOS and EFI booting on Superuser.com -- This provides the basics of the preceding, but is more concise.
My page on installing Linux on EFI systems -- This page is a more practical introduction to EFI-mode booting than Adam Williamson's blog. Note, however, that for your purposes, there are additional complications not covered on this page.
My page on EFI boot loaders for Linux -- This page describes EFI boot loader choices for Linux systems.
My page on the CSM -- This page covers the CSM, including when it's useful and when it's not.
The Ubuntu community wiki entry on UEFI -- This page is a bit disjointed, but is the most Ubuntu-specific introduction to EFI and its issues.


Bootloader not found after completely removing windows and replacing with Ubuntu

The boot flag is not set on your boot partition.  I just noticed that in your fdisk listing.  Use gparted to mark that partition as bootable.  Then run update-grub again and see if that fixes it.


Why does my cpu's clockspeed keep dropping?

OK, suggest you time how long it takes to start dropping in speed.

Then, if you're somewhere frosty, take it outside. Does the speed pick back up again after a bit?  If you are not somewhere frosty (Scofield Barracks, say, or Oz), borrow a hair drier and put it on no heat/fan only, then point it at your lappie's intake vent. This could show an old, tired fan, or (more likely in 30 yrs of experience with these infernal devices) there's foreign objects within obstructing airflow. (Got cats?)

Or, install a temperature sensor: Is there a hardware temperature sensor indicator? has the details.


Ubuntu uses squid3 instead of just plain squid.

sudo apt-get install squid3


glxgears is not a benchmarking tool, so you are only seeing what is your monitor refresh ration (60Hz).

If both commands worked and produced the same output, this is and indication that the nvidia card works.


I can't get my soundcard running with Ubuntu Studio

Try gnome-alsamixer. Here is what do I do. I have integrated soundcard and Audigy.

Install Ubuntu Studio (not virtually).
Switch off the integrated soundcard in BIOS.
Launch terminal. Type "sudo apt-get install gnome-alsamixer". After the program is installed type "gnome-alsamixer".
Select "Audigy Analog/Digital Output Jack".
Enjoy)

Note: I've written Select "Audigy Analog/Digital Output Jack". You must select analog of your soundcard.


How can I determine the OS architecture (32-bit or 64-bit) from a file on a disk?

It is trivial to determine whether the host operating system has a 32-bit or 64-bit kernel by running:

uname --machine

An output of i386 means 32-bit and x86_64 means 64-bit.

It is less trivial, but still feasible to determine whether an application is compiled for the i386 or amd64 architecture but neither of these will indicate the architecture of the kernel. Even checking /sbin/init is not technically sufficient since the init program can be customized at boot time.

The only foolproof way to determine the architecture of the kernel is to actually boot it. Luckily this can easily be done using qemu.

Begin by opening a terminal and navigating to /boot on the hard drive. You will find one or more compressed kernel images in the form:

vmlinuz-[version]-[type]

For example, I have vmlinuz-3.19.0-21-generic present in /boot on my machine. Now, assuming you have the qemu-system-x86  package installed, run the following command, substituting the filename where appropriate:

qemu-system-i386 -kernel <path_to_kernel>

If you see a wall of text scroll by and eventually panic (because the root FS is missing), you have installed a 32-bit kernel. If instead you receive an error similar to the one displayed below, you have a 64-bit kernel (which will not boot on an x86 CPU).


This is a known bug: https://bugs.launchpad.net/ubuntu/+source/acpid/+bug/392948
See comments #23 and #24.

Workaround is to add acpi_osi=Linux to the kernel cmdline:

One-line solution (use at your own risk)

sudo sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT=\"\(.*\)\"/GRUB_CMDLINE_LINUX_DEFAULT=\"\1 acpi_osi=Linux\"/' /etc/default/grub && sudo update-grub

Manual method

edit /etc/default/grub file:

sudo gedit /etc/default/grub

Add acpi_osi=Linux to the GRUB_CMDLINE_LINUX_DEFAULT variable so it will look like

  GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux"

Update GRUB:

sudo update-grub


Wireless adapter is installed but cannot be up using ifup

I suggest that you edit your file to:

auto lo
iface lo inet loopback

auto wlp3s0
iface wlp3s0 inet static
address 192.168.0.100
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameservers 192.168.0.1 8.8.8.8
wpa-ssid *****
wpa-psk ******

Test:

sudo ifdown wlp3s0 && sudo ifup wlp3s0
ping -c3 www.ubuntu.com

Post any errors.


Create global shell command for LightTable

sudo ln -s LightTable /usr/bin/Lt
sudo ln -s ./LightTable /usr/bin/Lt

Neither command does what you think it will do. In both cases, Lt points to the LightTable in the current directory relative to itself.

What you should do is specify the full path of the link's target:

sudo ln -s /opt/lighttable/LightTable /usr/bin/Lt

alias light="./LightTable"

You're still running LightTable from the current directory (./). When you provide a path, absolute or relative, to a command, then the PATH isn't checked. You should have run just LightTable, or the alias should be just:

alias light=LightTable


How can I get windows properties like with X with Mir?

as far as i know, there's no api to query application window attributes and shell-specific information at the moment.

there're tons of things to do in mir and unity 8. e.g.shell logic, workspace, window management.
see https://blueprints.launchpad.net/ubuntu/+spec/client-1404-mir-converged workitems.

the EWMH is a spec for X11 which based on the X11 specific notion--Property. i don't think
it'll be reused in either Mir or Wayland.


Did you mean network-manager-applet-0.8.3.998.tar.bz2? That is a source package which needs to be extracted and compiled. Unless you really, really need the latest version, I recommend you installing the network-manager-gnome from the package manager. It integrates better and will be updated automatically.

To extract the package, you need to open a terminal and:

Change the directory to the directory containing the .tar.bz file: cd /path/to/dir
Extract the bzip2-compressed tarball: tar xjf Manager-0.8.3.998.tar.bz2
Change the directory to the newly created directory (use ls to get the directory listing). cd network-manager-applet-0.8.3.998
Run ./configure. If you need to have a package installed, you'll be informed here.
Run make to start compiling
Run sudo make install to install

Again, it's recommended to use the package from the package manager, not to compile it yourself unless you really need to.


Byobu does have such setting to be launched in automatically in virtual consoles , aka tty . You have to login to any tty , launch byobu and then press F9 to toggle launching at login

However, personally I'd opt in for a scripting method, where you create a function at the top of the .bashrc

function testTTY
{
  isTTY=$(tty | awk '{if ($0~/\/dev\/tty.*/) {print "true"}else{print "false"}}')

  if [ $isTTY == "true" ]; then
    byobu
  fi
}

And call that function somewhere at the bottom of the .bashrc

Also, examine, your .profile to remove any other automatic launching of byobu in gui terminals


Change name of folders recursively - Bash

Install the rename package:
sudo apt install rename

Then it's a shell one-liner:
[sh @ balrog] ~/tmp 27 % tree
.
├── a
│   └── Caudate_masks
├── b
│   └── Caudate_masks
└── c
    └── Caudate_masks

6 directories, 0 files

[sh @ balrog] ~/tmp 28 % rename 's/Caudate_masks/caudate_masks/' **/Caudate_masks

[sh @ balrog] ~/tmp 29 % tree
.
├── a
│   └── caudate_masks
├── b
│   └── caudate_masks
└── c
    └── caudate_masks

6 directories, 0 files

Notice that modern shells (bash, zsh) support the ** wildcard which means "somewhere in this directory tree".

The reason why your script doesn't work as expected is that in this snippet
        for cortical in "$folder/"*; do
            if [ $cortical = "$folder/Caudate_masks" ]; then
                mv $cortical caudate_masks
            fi
        done;

your old name contains the directory (from $folder), yet the new name does not. It should work if you change that line to
                mv $cortical $folder/caudate_masks


Trying to get 3 finger gestures. Geis tools shows only 2 finger support when I've used 3 on Windows 7 partition

I would recommend to try again the touchegg, by now (13.04) it is only needed to install it with no further configuration, except for the definition of the gestures you like. Please take a look in this blog post: http://task3.cc/1068/os-x-like-multitouch-gestures-for-macbook-pro-running-ubuntu-12-10/


Configure Kate(KDE) dialog window shortcuts under GNOME3?

I think that the Kate /1/, /2/ is using the kdialog's /3/ open/save /4/.

There is an open bug(/wish) report: Bug 262551 - By changing the keyboard shortcut to view hidden files in dolphin, in the window "open file" remains unchanged (Alt+.) /5/.

So it seems that the "Alt+." shortcut is not configurable with the kdialog's open/save.

Links:

http://www.kde.org/applications/utilities/kate/
http://kate-editor.org/
http://api.kde.org/4.x-api/kdelibs-apidocs/kdeui/html/classKDialog.html
http://techbase.kde.org/Development/Tutorials/Saving_and_loading
https://bugs.kde.org/show_bug.cgi?id=262551


Wireless connects to network but no internet - Edimax EW-7612 PIn

It is quite strange that you can ping the outside world; i.e. Google's DNS nameserver 8.8.8.8, but not your own router! Have you placed any settings in the Network Manager boxes? Generally, NM will handle all details for us without any intervention. Just be certain NM is set to Infrastructure and to use DHCP. Ordinarily any and all other settings should be left blank.

Is your wireless mode Managed; that is, configured for the most part by negotiation with the router?

iwconfig

What do these tell us?

route -n
traceroute 8.8.8.8

As these are likely to be lengthy, please copy and paste the results here and give us the link in your reply. http://paste.ubuntu.com/

Please try a driver parameter:

sudo modprobe -r rtl8192se
sudo modprobe rtl8192se swenc=1

If this helps, we can write a file to make it persistent.

What do the message logs have to report?

dmesg | grep -e rtl -e wlan

As it may be lengthy, use http://paste.ubuntu.com/ please.


If you have a desktop system, you can't switch to your integrated GPU using any software.

prime-select works only with mobile GPUs with Optimus technology.

The only way you can do it is to plug the monitor cable into the another HDMI, or whatever, linked to your motherboard.

You can also switch the primary GPU in your BIOS settings.


The most complete benchmarking software is probably Phoronix test suite, which is available in the repositories and can be installed with:

sudo apt-get install phoronix-test-suite

When running phoronix-test-suite for the first time in terminal, you can either answer yes or no to the questions regarding anonymous statistical reporting. If you answer yes, it says that

  This information is pooled along with the submissions from all other users to show general trends and other details on OpenBenchmarking.org.

It is up to you whether you choose yes or no, but there is nothing to be concerned with. You can still later upload results manually to openbenchmarking if you wish with the options in the program:

phoronix-test-suite upload-result <your test-result>

For more information about Phoronix test suite see this pdf and the official forum.

To list all the tests available (but not necessarily downloaded), run:

phoronix-test-suite list-tests

which gives tests such as these and many others:

pts/aio-stress               - AIO-Stress                          Disk
pts/apache                   - Apache Benchmark                    System
pts/apitrace                 - APITrace                            Graphics
pts/battery-power-usage      - Battery Power Usage                 System
pts/blogbench                - BlogBench                           Disk

To find information on any particular test, you can use:

phoronix-test-suite info povray

Many of the tests are not installed by default and you can either download an individual test and run it with, for example:

phoronix-test-suite install povray
phoronix-test-suite run povray

To find the lists of thematic test suites, run

phoronix-test-suite list-suites

which returns such things as

pts/audio-encoding               - Audio Encoding                   System
pts/chess                        - Chess Test Suite                 Processor
pts/compilation                  - Timed Code Compilation           Processor
pts/compiler                     - Compiler                         Processor
pts/compression                  - Timed File Compression           Processor

As an example, you might want to run the entire suite of audio tests (instead of just one from those listed with the list-tests command), so, in this circumstance, enter

phoronix-test-suite run audio-encoding

For this test, some more of the related audio tests are downloaded and installed by the program and then the test is run.

There are a huge amount of tests to install and options to experiment with, but this test suite is definitely the one to use if you want to get some genuine benchmarks from your Ubuntu system that you can compare online at openbenchmarking and Phoronix.com.

It is not a quick, simple benchmarking application, but one that, with its multiple tests, will satisfy most areas of interest in regard to how things perform on Ubuntu.

However, benchmarking is a topic much debated and the forums are best suited for analysing which tests give the most useful results and how the tests should be setup; the one mentioned above, povray, is quite well known and regarded for benchmarking the abilities of a CPU.


How to I install the default Grub theme for ubuntu?

The default theme is provided by plymouth-theme-ubuntu-logo. Install it:

sudo apt-get install plymouth-theme-ubuntu-logo

To set it as the default, run:

sudo update-alternatives --config default.plymouth

And select /lib/plymouth/themes/ubuntu-logo/ubuntu-logo.plymouth in the menu.


error with playing mkv files both in vlc and mplayer

Install the Gstreamer plugins for proper working of video files in VLC or in any Video player.

To install Gstreamer plugins type in the following commands.

Update your Repositories.

  sudo apt-get update

Install the Gstreamer plugins

  sudo apt-get install gstreamer1.0-libav gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly

After this you should be able to play almost all types on audio/video files on any player of your choice.

I too had the same problem and solved it by installing Gstreamer plugins.


Encrypting Files and folder through terminal

You can encrypt and decrypt files with gpg

To encrypt a file

gpg -c file.to.encrypt

To decrypt a file

gpg file.to.encrypt.gpg

But gpg will not do entire directories. For entire directories you have several options, ecryptfs is popular.

# Install if ecryptfs-utils if needed
sudo apt-get install ecryptfs-utils

# Make an encrypted directory
ecryptfs-setup-private

That will make a directory "Private". Any data you put into the directory Private will automatically be encrypted when you log out and decrypted when you log in.

If you want a different behavior or a different directory ...

mkdir ~/secret
chmod 700 ~/secret

sudo mount -t ecryptfs ~your_user/secret ~your_user/secret

Put your data into ~/secrte

To encrypt

sudo umount ~your_user/secret

To Decrypt

sudo mount ./secret ./secret -o key=passphrase,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_passthrough=no,ecryptfs_enable_filename_crypto=yes

Hint: make an alias for that second command.

See http://bodhizazen.com/Tutorials/Ecryptfs or man ecryptfs for additional details.


Ubuntu 14.04 -- 2 Monitors only acting as 1 monitor

The issue was the dual display ports. Ubuntu saw those as a single output. Switching to a DP & VGA resolved the issue.


Installing Salamander along side Windows 8

Boot gparted-live-disk,split the 914.44GB partition and try to install ubuntu on one of the splitted partitions.


pantheon-files depends on libhandy-1-0 but it is not installable on Ubuntu 20.04

Focal Fossa (20.04) has libhandy-0.0-0 instead and libhandy-1-0 is in Groovy Gorilla (20.10) which is still in development stage. However, you can download and install the deb file for libhandy-1-0 on 20.04 using
wget http://mirrors.edge.kernel.org/ubuntu/pool/main/libh/libhandy-1/libhandy-1-0_0.90.0-1_amd64.deb
sudo apt install ./libhandy-1-0_0.90.0-1_amd64.deb

Once done retry installation of Pantheon Files.


Is it possible to set Hyper as the default terminal?

you need to install hyper as update-alternatives first.. then you can select it from your command in the question..
I tried to install it and see..
I installed it with a deb package..
and ran which hyper
pratap@i7-6550U:~$ which hyper
/usr/local/bin/hyper
pratap@i7-6550U:~$

Create a script with below content and run it with root priviliges
#!/bin/bash

update-alternatives --install /usr/bin/x-terminal-emulator x-terminal-emulator /usr/local/bin/hyper 0
update-alternatives --set x-terminal-emulator /usr/local/bin/hyper

Example:
pratap@i7-6550U:~$ sudo update-alternatives --config x-terminal-emulator
[sudo] password for pratap:
There are 2 choices for the alternative x-terminal-emulator (providing /usr/bin/x-terminal-emulator).

  Selection    Path                             Priority   Status
------------------------------------------------------------
  0            /usr/bin/gnome-terminal.wrapper   40        auto mode
  1            /usr/bin/gnome-terminal.wrapper   40        manual mode
* 2            /usr/local/bin/hyper              0         manual mode

Press <enter> to keep the current choice[*], or type selection number:

After reading the comments,
By tweaking the desktop-icons extension you can somewhat achieve this.


How do I restore a snap to pristine condition

Could it be that snap was updated? Have a look at snap info remmina and you will see when it was updated and compare it with time you noticed problems.

If that was the case, you can revert to previous version  easily with snap revert remmina which will revert to previous version. Or you can play with revert  --revision= parameter


They will reappear wherever you saved them upon reboot.

The persistent drive feature saves any changes to the file system and lays them on top of the read-only file system of the LiveCD.

Edit: Be aware, that you can't easily open your added or altered files from another system. You would first have to save them on a regular disk or USB drive. The one you're already booting Ubuntu from will do, if it has enough space.

Disclaimer: I should say, I never tried this myself, just read the docs.


Why we specify system ID for a partition?

fdisk only edits the partition table, not the file system. When you edit partitions, you are really editing the MBR (Master Boot Record) or GPT (GUID Partition Table) of the drive, and boot sectors of the partitions. The MBR/GPT contains the start and end sector boundaries for each partition (just the sector numbers where the partition starts and ends, not the actual partition space itself), and the type of partition it is (like type 83). fdisk doesn't contain the necessary logic to create file systems.

When you run mkfs, you are editing the file system within the start and end partition boundaries that were set by fdisk in the MBR/GPT. For example, it creates block groups which hold things like the inode table to map file fragments on the partition to the file path.


Use

sudo dpkg --remove --force-remove-reinstreq google-chrome-stable

This might do the trick


Trying to setup dual boot. Now nothing boots :/

In my opinion, the OS has corrupted to some level, not sure where. You should first install Windows and then install Ubuntu (prefer Live USB Because of higher speed) and choose dual booting (side by side).

In my case, I couldn't boot my Ubuntu but could boot my Windows PC, so I basically go in Advanced Options and boot using systemfs or something of that sort.


Xubuntu 20.04, systemd-journald high CPU usage

Some program is constantly generating log output. To identify it, try journalctl -S -1hour and see how many line are generated by which services in the last hour. Then tell us what you found and if you can't fix it yourself, ask a new question "program xxx generates too much log output".


If you don't have wireless drivers, then you will have to figure out a way to get those first, because you obviously will not be able to use your wireless card to get those ;) you can look them up on another computer and install the binaries. More than likely, though, you do already have drivers, but you need to edit your /etc/network/interfaces (as root), which contains interface declarations. It should register your cards once you add the following lines to it:

auto eth0
iface eth0 inet dhcp

auto wlan0
iface wlan0 inet dhcp

This will should make ubuntu recognize the cards once you hit /etc/init.d/networking restart and ifup -a.

Once you have the wireless card up, you can type iwlist scan to list wireless networks in range. I have only dealt with open and WEP-secured networks, and it works perfectly for those. For those networks, you can use

iwconfig wlan0 essid "network-name" ap any key <wep-key>

I know WPA is possible, but it's a lot more configuration than just using iwconfig.


I've already found the answer. In vimrc I add:
nmap <F9> <Esc>:w<CR>:!clear;python3 %<CR>


Alt + F2 brings up "Run a Command" in the dash. You can start typing "firefox" and press Enter to launch it.


Changing language on Firefox does not apply

That not how its work in Firefox. To change your browser locale (translation) you need to do 2 things:
1) Install Language pack you need from official repo - https://addons.mozilla.org/en-US/firefox/language-tools/
2) Go to about:config special page (yes, type about:config in adressbar and hit enter) and search for intl.locale.requested preference, if none found create one yourself using right click - New - String and set its value to one which corresponds your language.
You can get right lang code on this page http://l10n.mozilla-community.org/webdashboard/

After all done - restart browser.


Can't start Qbittorrent, Dropbox after upgrade to 17.04: Mir error

I solved it by installing proprietary NVidia drivers. This of course is not a desirable solution (for instance if one does not have NVidia graphics card). The problem might have something to do with this bug:
Multiple apps fail to start, all with the same error message (QPA UbuntuClientIntegration: connection to Mir server failed.)

I say might because apps that failed me all run under Unity7.

I found Calibre and Foxit Reader also failed, but the list could be much larger.

EDIT: Actually before installing NVidia drivers I could launch qbittorrent from a terminal using gksudo qbittorrent which of course does not keep settings or torrents from the normal user. Both the gksudo and the usual qbittorrent under the proprietary NVidia drivers however do not have the native gtk appearance but Qt's Fusion Style widgets, which is weird.


How can I read image info on the command line?

You could try file
Or the more advanced command identify from the ImageMagick package.


Upgrade manager running out of space

As mentioned in comment, this is a bug. This isn't supposed to happen. Make sure you have 3GB or more before running the upgrade.

Freeing up space while the upgrade is running

You can't use apt-get since the update-manager is already holding the package locks. You also can't manually delete the package cache since it's probably got all the packages in it you've just downloaded.

All you can do is move personal data and manually delete non-essential files:

Move personal data from Documents, Pictures etc. to /host
Delete large files in Downloads e.g. ISOs
Clear your browser cache manually e.g. ~/.mozilla/firefox/Cache or ~/cache/google-chrome/Default/Cache. This can free up 1GB sometimes.
Manually remove older kernels by looking in /boot and deleting all but the latest vmlinuz-..., initrd.img-..., System.map-..., abi-... and config-... (this can free up a couple of hundred MB if you have a lot of old kernels).
Use the disk usage analyzer to look for large logfiles or hidden data that you can delete or move.

I still think this is simply a bug that must be fixed, rather than trying to find a solution. Running around deleting or moving data isn't a really great solution (and obviously carries some risk if you accidentally remove something essential or of personal value.


How to display system info except login Ubuntu?

This is called "the message if the day". It is generated by running a collection of scripts in the directory: /etc/update-motd.d.
You can re-run these scripts by typing this command in a terminal.

sudo run-parts /etc/update-motd.d/

Helpfully, this will inform you if any packages have updates available or if your system needs a re-start.


How to fix a "Read Only" hard drive issue when trying to install Ubuntu?

The problem turned out to be that my hard drive was broken. I got a new one and it is fine. Problem solved.


I believe you've upgraded many times, and you have a lot of old linux kernals filling up your grub partition.

I think you're going to have to boot from a live DVD or USB, mount the HDs boot partition, see if it is indeed full, and if that's the case, manually delete a couple of old kernals.

If you haven't got a backup, you might copy your ~/ to a safe place first.


Brasero says it won't burn the CD because the file is too big, what's going on?

I use K3B to burn ISO images.
For me, is better then brasero.

Try to burn with another CD brand (Preferably do not use CD-RW )


Accessing Ubuntu Partition from Windows 7

It is possible but not without third party software.

There are a handful of them but I think this one will do the trick Ext2Explore

Here is more detail.

Basically you are going to install the program like any other program and then browse your Ubuntu Partition.

Although the best scenario is this:

Create 3 equal partitions, Once for your windows install, one for your data (must be NTFS), and then your Linux(Ubuntu) partition. If you do this, you will be able to save/access your documents to the data partition regardless of what OS you are currently booted into.


Update Software proposes an upgrade to ubuntu 18.04 even if it is a 32bits netbook

You can turn off requests for updates in System Settings > Software and Updates > Notify me of a new Ubuntu version and select Never

This will then leave you free to make your own decisions on what version to upgrade to according to availability and your own choice.


Cantor doesn't recognize the Sage backend

So, also you should install Sage. And after that you should select menu Settings --> Configure, then the 'Sage' tab and enter the path to sage.


How can I find out which users are logged in on my computer?

The auth.log file is located in /var/log. Try this: sudo vi /var/log/auth.log
Cheers,


How do I access an external hard drive plugged into my router?

As of 10/23/2012
You need CIFS not SAMBA :

sudo apt-get install cifs-utils
Add //192.168.1.1/USB_Storage /media/public cifs guest 0 0 to your /etc/fstab

I would not have gotten this far without the original answer so thank you.


can't join ubuntu server 20.04 to active directory with samba-tool as dc

You cannot join Samba as a DC to a 2019 DC, the schema version is not yet supported, you can join as fileserver.


Here's how I got this working with Ubuntu 12.10:

First install the following

sudo apt-get install vpnc
sudo apt-get install network-manager-vpnc
sudo apt-get install network-manager-vpnc-gnome

Using the network-manager create a new VPN connection, set at least the following:

Gateway
User name
Group name

If the given group password is encrypted you can decrypt it here
(ecrypted password probably will not work):
http://www.unix-ag.uni-kl.de/~massar/bin/cisco-decode

Once these are set if you still have problems connecting try setting the IP address instead of domain name to the Gateway (this is what fixed it for me).

nslookup vpn.provider.com


How can I gain access to the contents of my password-protected RAR files?

You can browse directories using cd <directory_name>\<inside_directory_name> in terminal. Or just type cd and some initial letter (case sensitive), then press Tab to autocomplete folder name.

Try this software

http://rarcrack.sourceforge.net/

All instructions are given in page, I am writing from it for any fureture references,
Save the package to a location, say Downloads.

Open up a terminal, type cd Downloads (we are changing to Downloads directory)

execute tar -xjf rarcrack-0.2.tar.bz2 → this will extract the files.

Get into the extracted folder, execute cd rarcrack-0.2

Compile the program, execute make

Install the program by executing sudo make install

Now this program is installed.

Usage

Open a terminal, use cd to goto directory where you file is stored. say named abc.rar

run rarcrack abc.rar --threads <thread_num> --type rar

Provide a numeric value instead of thread_num. This is number of threads. If you have multicore processor use it. A simple rule like, 2x no of core in your system. Like quad core i7, provide thread number as 8. Increasing this number to a greater value may cause system hang.

Once completed, started the rar crack will create an xml file  in same directory with current password. You can stop the tool and modify the xml to define the character set to be searched next time you run the tool.

As I told earlier, it takes long time to break a password. To check for a 5 character long  alpha-numaric password (no upper case), will take around 13 days if the tool process 50 keys/sec.

More technical details if you are interested - http://anrieff.net/ucbench/technical_qna.html


Fn-keys stopped working on a Lenovo Thinkpad Edge

It's a BIOS issue with Thinkpad Edge with no known permanent solution. See this - the solutions discussed all turn out to be temporary.

Removing and reinserting the battery (as explained here) is the only fix but it only works temporary. Every once in a while the FN keys stop working again and I have to remove and reinsert the battery. Booting and rebooting seems to increase the frequency of when the bug happens so I avoid that by only suspending and hibernating my computer.


Install Ubuntu to hard disk without overwriting mbr?

To do this you will need to set up the partitions for Ubuntu manually.  I suggest you do this with Gparted after selecting "try Ubuntu".  You should then go ahead and install Ubuntu but when Ubiquity asks how you want to install select "something else" and it will take you to the advanced mode.

You then need to specify the partitions manually, and also tell it where to install grub.  Down the bottom of the advanced partitioner, you will it has probably defaulted to installing grub on /dev/sda.  Change this to the correct device name for the USB you want to install grub to.

After installation the machine will only boot into Ubuntu when you boot grub off the USB drive; the MBR on the hard drive will not be changed.


Is gnome-volume-control-applet still in your startup applications (in the System -> Preferences menu)? If it is, just disable it and you shouldn't see it in the future.


How can I restore a systemd service after editing it using "systemctl edit service"?

If you're running a version of systemd higher than of "229", then you can simply use:

systemctl revert name.service

From github commit:

  This allows dropping all user configuration and reverting back to the vendor default of a unit file.

  It basically undoes what:

  "systemctl edit"
  "systemctl set-property" and
  "systemctl mask" do.

Ubuntu 16.04 uses "systemd version 229", so you should remove override file manually:

sudo rm -r /etc/systemd/system/name.service.d

Then reload systemd daemon and restart your service:

sudo systemctl daemon-reload
sudo systemctl restart name.service

Remember that if you used --full with edit subcommand to copy the original unit instead of creating a drop-in file, then you should remove /etc/systemd/system/name.service instead of the directory.


By using the -v argument you can see (log) everything that is being deleted.
For more, like file size, you need to create a script that parses each directory and file, log the info you want and then delete them.

temp (directory)
 |- 1 (directory)
    |- 2  (directory)
       |-- 3.ge (file)

user@laptop:~$ rm -rfv temp
removed 'temp/1/2/3.ge'
removed directory 'temp/1/2'
removed directory 'temp/1'
removed directory 'temp'


Installing a partition of Windows 8 alongside Ubuntu

I would recommend reading Installing Ubuntu Alongside a Pre-Installed Windows with UEFI to give you an idea about having both together, especially the boot repair part. But the quick and easy steps, taking into consideration you already have Ubuntu installed and want Windows 8 now (Which means there is no need to worry about UEFI, Secure Boot and other issues) would be:

With the LiveUSB of Ubuntu, use gparted to shrink the Ubuntu space in order to create empty space to install Windows. I am assuming Ubuntu took the whole drive. I recommend doing it this way since the Windows 7 and 8 partition tool in their installer has had several problems messing up the Ubuntu partition. After you have the space needed for Windows 8 you can keep on reading.
Install Windows 8 like you normally would. Select the empty space and all the steps that are shown in the installer.
Since you installed Windows AFTER Ubuntu, the boot part of Ubuntu will not work. To fix this, simply plug the LiveUSB of Ubuntu again, this time as I mentioned in the link above in the troubleshooting section, open a Terminal and type the following:

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install boot-repair

Now run boot-repair

Boot Repair will mention that you have some GRUB error, just click on Apply so boot repair fixes everything. Now reboot and you should see Windows 8 and Ubuntu side by side on the same GRUB menu. I again mentioned gparted and doing the partition with the LiveUSB or LiveDVD because it is really fast, saves you some issues that could appear when using the partition manager of the Windows 7/8 installer and it is easier.


Forcing an application to use gtk 3 instead of gtk 2

No: the application needs to be ported to GTK3. This means adapting the application's source code to the new GTK API and linking against the new libraries.

If you'd like to see your favorite application ported to GTK3, you should get in touch with its developers.


Unable to set permissions for new files added to the directory

You are looking for umask. umask is a shell builin that will decide what will the default permission of a newly created file. The value of umask can vary from user to user.

To check the umask value of the current user, run umask in the terminal:

$ umask
0002

The first 0 indicates the absence of SUID/SGID/Sticky bit, it is the default first bit value so if we don't need to set any of those three bits we usually don't use this bit.

The umask value is actually deducted from 777 (in case of a directory) and from 666 (In case of a file) to get the permission of a newly created file/directory. So, if the umask is 0002 the newly created file by this user will have a permission of (666 - 002)=664 and a directory will have (777 - 002)=775.

To change the umask value for only current user permanently, put the umask value at the end of the ~/.bashrc of the user. For example:

echo "umask 022" >> ~/.bashrc

For changing temporarily, run:

$ umask 022

The global umask value can be found and changed from /etc/login.defs:

$ grep "^UMASK" /etc/login.defs
UMASK       022

****Note than you should not use chmod/chown randomly unless you are absolutely sure about the outcome.


Route 169.254.0.0/16 is called zeroroute.
It is added automatically when you reboot your system. You can disable it in network configuration.
sudo nano /etc/sysconfig/network

Add below line in network configuration file.
NOZEROCONF=yes

Restart networking service.
sudo systemctl restart networking.service


Meson is available from source on PyPi. To install it, run the following:

pip3 install meson

Make sure you're using the Python 3 version of Pip.


Place the mouse pointer on a specific monitor on startup?

It would seem like moving some cables around would be the most intuitive answer but:
I don't know what you mean by "startup", during boot??
...and I don't know what you mean by update window. I think I do, but.....
I don't know what you mean when you mention the "cursor".. again, I think I do but it conflicts with the other things i don't understand. And then I see you're clearly using the graphical Desktop.
are you referring to two different stages? Booting and then Graphical Desktop?
As far as booting:
I am thinking either way, would it not solve the problem by making the card connection connected to the monitor on the right, the card connection connecting to the monitor on the left?.... and then reorganizing the desktop via nvidia settings?
If I am understanding correctly(which i doubt), that screen designation during boot, I believe is selected in bios... and I am not sure if you can change that behavior unless you're using more than one graphics card and selecting between them...(not between connections on the same card. I could be wrong though)
As far as the Desktop:
(I'm using Mate Desktop but) under Preferences --> Look and Feel --> Windows.... On the "Placement" tab, there is one choice of "Center new windows".. it "seems" like you're saying that the window is actually supposed to be on your middle screen since you see the "taskbar button"? Perhaps this will make it visible in the center of that screen.


Why does Wifi in master mode perform worse than in managed mode

When your wireless card is in master mode it acts as an access point and it actively transmits a signal. When your wireless card is in client mode or managed mode then it listens to signals and tries to match a suitable one. Usually wireless cards built-in into devices like laptops are limited in signal strength either in the hardware or in the software and they are tiny and lack an antenna of a reasonable size. Regular consumer routers usually are not limited in signal strength or are limited in a wrong way because they're built in a different country and they do have a big antenna. All this allows consumer routers to produce a stronger signal and their range is larger. So your observation is pretty normal. Also there are certain problems regarding the wireless frequency and the type and number of other wireless networks in the area.


Can I use a custom shell with upstart script stanza?

There is no [documented] way to switch from /bin/sh as the main shell script run in. However, you could just wrap your script up in zsh. I do this with bash in various places (usually find's -exec clause):

zsh -c "do things...; more things..."

A slightly more elegant way would be:

script
zsh -- <<EOF

# do stuff here

EOF
end script


installing tp link tl-wn822n on ubuntu 18.04

I've got another answer for you which I just tested and it appears to be working on my real system. I just don't have the USB device to test it on.

Follow these steps:

git clone https://github.com/Mange/rtl8192eu-linux-driver.git
cd rtl8192eu-linux-driver
make

My compilation went smooth with no errors and I ended with 8192eu.ko

If you compilation went without any errors, you should have that file. Next, to test it (temporarily), just do this (save your work before this step).

sudo insmod 8192eu.ko
lsmod | grep 8192eu

You should see:

8192eu               1110016  0
cfg80211              622592  4 8192eu,iwlmvm,iwlwifi,mac80211

Test your device, if it works, we'll add it on start-up. As it is, it only works on-demand. If you get errors, post them here and we'll try to resolve them.


ALC892 Low sound issue fixed with changing alsa config, why does it work?

I'm not a massive expert in Linux, but here's my theory:

Inserting the command block code:

snd-hda-intel model=generic

...tells us a few things by itself. Let's break it down a little.

The "snd-hda-intel" part obviously tells Alsa that the sound device header is an Intel-based unit. No brainer. However, the "model=generic" part is the interesting one.

"model=generic," to me at least, tells Alsa that we're looking for generic drivers of sorts for this Intel audio header. It's kind of like an override command so that Alsa looks exactly for the right stuff for the right hardware.

This recently became the issue for me the other day when I had to upgrade my computer from an old AMD FM2+ computer to a shiny new i3 - Alsa didn't immediately work with the new audio headers. That tells me that Alsa has a pre-defined library for more-than-generic audio devices. Therefore, specifying that you should use "snd-hda-intel model=generic" tells me that audio devices like the ALC892 need explicitly-stated libraries to work effectively, such as "generic," for all intent and purpose.

I'm not saying I know everything there is about the topic, as this is simply estimating from my own experience. I am aware the post is a bit aged, but I think an answer of some kind should at least be explained...somehow.


Warning! This will erase EVERYTHING on your internal HDD

Inside the Windows installer, at the welcome screen (before the partitioning screen) hit Shift+F10.

At the command prompt, type diskpart

Once diskpart loads, (it will take a few seconds) type:
 list disk

Take note of the number assigned to your internal HDD

Then, run this command, replacing X with the number assigned to your internal HDD:
 select disk X

Finally, do:
 clean

Then, close both CMD Windows and proceed with the install.


Gimp-level JPEG compression with Imagemagick

I finally found a very helpful post here

The options I am using are these:

convert 100.jpg -strip -gaussian-blur 0.05 -quality 50% -resize 400x267  c_im.jpg

The strip option is really the key. From 85kB down to 16kB, just like that. Apparently it only removes comments and profiles, which I don't need.

The blur results in a slight size reduction but the loss in crispness is noticeable, so use at your discretion.

$ identify c_im.jpg
c_im.jpg JPEG 400x267 400x267+0+0 8-bit sRGB 15.7KB


How can I use three fingers to drag on the touchpad of a MacBook Pro?

If I understand correctly, 3 finger drag does not equal to 3 finger gestures. When you do a 3 finger drag the pointer moves with your fingers, but when you do a 3 finger gesture the pointer remains in the same place.

I have done some modifications to the Synaptics Xorg driver to add support for 3-finger drag in Xubuntu:
https://github.com/quadpixels/three-finger-dragging

This is a video showing how it works ...
https://www.youtube.com/watch?v=4eLSEtibfyw

And unfortunately you have to compile it from source ...

Note: this is only for my personal test, it comes without any warranty.
I have tested it only on a Magic Trackpad, but I think it should also work with MacBook's trackpad.

:)


Upgraded ubuntu to 16.04 Libreoffice shows non printable characters

I also encounter the same issue when I install Ubuntu 16.04 and use LibreOffice recently.

A temporary workaround is that you can try to click on the non printable characters, sometimes it will bring back the printable characters. However, it is not working for all these strange characters.


How to provide GUI interface to all users of Ubuntu?

So, if I understand you well, you want that the users you are going to create in Ubuntu to be able to be able to access the Ubuntu desktop from their Windows PC.

To accomplish that, you will need to have on each Windows PC of the users a running X Server. Indeed in the Cygwin tools family there is one.

Personally, I use MobaXterm which provides a SSH, FTP, ... client, a local X Server and many other features.
Once the users are defined on the Ubuntu server, you will have to create a XDMCP sessions in this application.

Remark: by default the XDMCP protocol is not enabled in Ubuntu. To enable the XDMCP server in LightDM edit /etc/lightdm/lightdm.conf and add the following section:

    [XDMCPServer]
    enabled=true

Then restart LightDM : sudo restart lightdm


How to reset Ubuntu 13.04 system to default?

There is no built-in functionality to do this -  you essentially have to reinstall the operating system from scratch.

However, if you want to ensure that you can do it in the future, you can use a virtual machine system which supports snapshots (such as VMWare or VirtualBox), meaning you can revert to previous states.

Another option is to use a file system which supports snapshots, such as LVM or ZFS.


MotoG not recognized in ubuntu 12.04, MTP mode not supported. Why?

Download this software from Google Play.

Download Filezilla from Ubuntu Software Centre.
Open the app.

Click on the settings button below.
Click on "Connection Authentication".

Type in your preferred "Username" & "Password".

Click "Save".
Now, click on "Setup Wifi-Hotspot".

Type in your preferred "Username" & "Password". Try to keep the "Username" & "Password" for both "Connection Authentication" & "Setup Wifi-Hotspot" same. Its easier that way but then again its completely your choice.

Click on "Save".
Now, go back and click on "Start Service".

Turn on your Ubuntu Desktop.
Next, launch Filezilla.
Now, beside "Host:" type - 192.168.43.1.

Next, type your Username & Password.

Beside "Port:" type - 8888 and click "Quick Connect".

You will be able to see your phone memory on the right side of the Filezilla Window.

And also you can see the successful connection message at the top.

Now, you can do whatever you want.

Hope this helps! Thank you for your patience!


Dynamic DNS advice for a home server on a .co.uk domain

Free dynamic DNS services seem to be disappearing, so be prepared to pay for the service. This is still less expensive in most cases than securing a static IP address from your ISP.

Regardless of who you choose for service from any of the dynamic DNS service providers, they should be able to provide service for a .co.uk domain. They will provide a list of nameservers that you then enter into the nameserver settings in your gandi.com domain account settings. Then follow the instructions from the dynamic DNS provider for setting up your DNS records with them. In your router, enter the account info for your dynamic DNS account. If and when your router IP address changes, it will notify your dynamic DNS provider of the change, who will in turn update your DNS A Records with the new router IP.

This is exactly the setup that I have used for my home server using dyn.com (formerly dyndns.org) and it works with no problems.


You've likely already solved this issue, or moved on, but for anyone else who lands here with the same problem as I did I'll go through the steps I took to resolve it.
The solution was to tell X.Org Server which GPU to target by setting the BusID of the GPU that isn't being used for passthrough in the xorg.conf.
Find the BusID of the GPU that is intended to be used as your primary display.
lspci | grep NVIDIA

03:00.0 VGA compatible controller: NVIDIA Corporation GK208B [GeForce GT 710] (rev a1)

Generate an xorg.config with the latest settings.
sudo nvidia-xconfig

Modify xorg.conf.
sudo nano /etc/X11/xorg.conf

Update the Device section to include a reference to the BusID of the GPU that is to be used as the display. In my case the BusID was 03:00.0 so I updated the Device section of my xorg.conf as follows.
Section "Device"
    Identifier     "nvidia"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BusID          "PCI:3@0:0:0"
EndSection

In your case your BusID is 05:00.0, so modifying your xorg.conf as below should fix your issue.
Section "Device"
        Identifier     "nvidia"
        Driver         "nvidia"
        VendorName     "NVIDIA Corporation"
        BusID          "PCI:5@0:0:0"
    EndSection

I found these useful when trying to determine how to format the BusID in the xorg.conf.
Xorg.conf Documentation
https://unix.stackexchange.com/questions/585910/setting-busid-in-xorg-conf


How to install AssaultCube in Ubuntu 20.04

AssaultCube is a first-person shooter set in a realistic-looking environment. The arcade-style gameplay is fast-paced and favors team oriented, multiplayer fun. AssaultCube can be installed in all currently supported versions of Ubuntu from Ubuntu Software or from the terminal with the following command:

sudo apt update
sudo apt install assaultcube assaultcube-data


Why is the core i7 only showing 4 cores on Ubuntu 16 with the latest Kernel?

It really depends upon exactly which i7 processor is in the computer - also see the i7 extreme with upto 10 cores.

Also, I think most utilities count the number of threads rather than the number of physical cores - most of the I7 75xx series have 2 cores, and 4 threads.


solved the problem on Linux Mint by installing the ibus package.

Note that installing only ibus-qt4 did not solve the problem.


mutt open $MAIL.
if $MAIL does not exist then mutt "complains".
what else can i do but tell you about it?

you can create $MAIL by touching it:

    $ touch $MAIL

now mutt should open that.

nothing to read?  send yourself an email!

    $ date | mutt -s test $USER

instant email - yay! :)