I'm speaking about this screen (the picture is random, it's the first I've googled):

The answer depends on BIOS and actual kernel. First, try the simplest solution:

Select /dev/sd[spinning] for boot loader;
Create /dev/sd[SSD]1 partition and mount it as /;
Create /dev/sd[spinning]1 partition and mount it as /boot.

If this system fails to boot, you can try a more reliable solution:

Select /dev/sd[spinning] for boot loader;
Create /dev/sd[spinning]1 partition and mount it as /;
Create /dev/sd[SSD]1 partition and mount it as /usr;
Create /dev/sd[SSD]2 partition and mount it as /home;
Create /tmp, swap etc. partition the same way, as needed.

It'll not put literally everything on your SSD but most essential parts will be there.

But if initrd does not see the SSD, the boot will fail. It'll be another big question about tweaking the initrd.


Unable to Connect to Internet, make Command Not Found, and cannot install my drivers

In this case I'd suggest that you use the following command on the machine without internet:

apt-get --print-uris --yes install build-essential | grep ^\' | cut -d\' -f2 >downloads.list

This will produce an output file in the current directory called downloads.list containing the download URL for all the packages apt needs to install the build-essential package.

Then you can copy this file to your USB drive for your internet connected machine to download them, if your internet connected machine is running linux you could easily download all the dependencies in one go with the following command:

wget -i downloads.list

Which will read the downloads.list file and download each URL listed in it, if not then you would need to go to each listed URL and download the file yourself.

You could then just take the USB drive to your other machine and simply run the following command from the directory containing the downloaded .deb files:

dpkg -i *.deb

Note I have suggested using the build-essential package as this package includes the other packages that you will need for compiling a piece of software such as the compiler itself (gcc) which will save you some time or you would end up needing to repeat this process over and over to get everything you will need.


You don't need to hand-delete Mac software first. Backup all the files you want to keep (and be sure Linux can read them), boot from a Linux install medium (USB Key, CD, ...), choose "Install to disk" and it will overwrite (destroy) all the Macness.


Why is there an "update-grub" and a "update-grub2" command?

Many years ago, GRUB1 was still a thing. When GRUB2 came along, it needed various commands but because GRUB1 was still the main system in use, there needed to be a way to differentiate the utilities, meaning a load of ...2-style commands were created.

After the transition, people were still using both commands (for the same jobs), therefore to stop people's scripts breaking, they were just linked together. You can see that:

$ file $(which update-grub{,2})
/usr/sbin/update-grub:  POSIX shell script, ASCII text executable
/usr/sbin/update-grub2: symbolic link to `update-grub'

Note that symlinking commands together doesn't always mean something does the same thing (an application can read what command was run) but if you look at the source of update-grub, you can see this isn't the case here. They do exactly the same thing.


how to uninstall "./tweaks.sh" firefox gtk customization

Close Firefox Browser, Then
Delete the code inside the file ~/.mozilla/firefox/firefox-themes/userChrome.css
Restart Firefox.
You will see the default look of Firefox


How to fix the following SQL Server error instalation on ubuntu 14.04 LTS?

The SQL Server on Linux Release Notes from 16-Nov-2016 state clearly that the supported platforms are:

Red Hat Enterprise Linux 7.2 Workstation, Server, and Desktop with Ext4 or XFS filesystems;
Ubuntu 16.04 LTS with Ext4 filesystem, and
Docker Engine 1.8+ on Windows, Mac, or Linux.

Ubuntu 14.04 is not supported.


How to use animations as window effects in Compiz?

After you enable the animation add-ons, logout and login again. That's how they appeared for me.


Distorted audio over headphones in Ubuntu 17.04 dual booted with Windows 10

I had the same issue. Give this a shot it ended up working for me

sudo apt-get remove --purge alsa-base pulseaudio
sudo apt-get install alsa-base pulseaudio
sudo alsa force-reload


How to add foreign languages to wine under Ubuntu 18.04

I found something online, I think will be of help to you.

In order to solve the issue, go to:

Applications -> System Tools -> System Settings and under the tab "Personal" choose "Language Support". Then change the -keyboard input method system- from IBUS to none.

It would be nice to restart your Ubuntu box.

NB: Take a look at the distro before the restart in case it seems not to work, please.

You could visit here for more if need be.

Regards!


How to try Ubuntu on a hp pavilion g7-1246ef computer that has no Linux suport for video card? (12.04)

It seems(from your image) that you have a Radeon graphics card...
This may be the problem

When you reach to try Ubuntu page, press F6 and select
nomodeset option and then select Try Ubuntu and hit enter...
Ubuntu will run the setup with basic Graphics.
Then you'll be able to try/install Ubuntu...

While using a live USB boot, the try ubuntu page may have other options (e.g.use tab to edit): you have to edit so as to add   nomodeset there: it has to look like that: quiet splash nomodeset

Then, continue to try ubuntu or install.

Hope that works :)

Cheers!


requirements and settings to be able to stream a larger video(20 minutes over 200 meg, mp4) on a ubuntu server running apache2, php5.4 and fastcgi?

Ref http://ubuntuforums.org/showthread.php?t=2292901&p=13360326#post13360326

Re: Streaming Mp4 videos without having to download the whole file
I've gone full turn on this but I have an answer for apache2.
History >>> I installed the xsendfile module and couldn't get it to work. I ended up dumping apache2 and going over to lighttpd with all the various mods to get it going. It would work for androids and windows but due to the headers not sending correctly it wouldn't work at all with IOS. Owncloud didn't like Lighttpd and spat out a heap of errors. I persevered but came to an end and went back to a snapshot I had with Apache2. I checked my error logs again and the issue was firmly pointed at xsendfile. I modified my settings for Xsendfile and got it working.

To get it working this is assuming you have a setup running with php and the fastcgi modules installed, etc. If you can get a video to play after it downloads the whole video first then this is for you!

Code:
apt-get install libapache2-mod-xsendfile
inside your server ssl file add the code
Code:

    ...
    SetEnv MOD_X_SENDFILE_ENABLED 1
    XSendFile On
    XSendFilePath /

Bear in mind to test it start with this >>>> XsendFilePath / <<<<<<<
When it works lock it down a little better say where the webserver data directory is. I messed around with this and I ended exposing the data directory where my files that would be served are kept. If someone has a better suggestion please update me!

I am able to stream video to all platforms now (IOS, Android and windows) but Windows XP setups don't work but that's the least of my worries.
You have to process each video with MMPEG - I tried a tonne of programs but ffmpeg seems to be the best.
Now I import my videos to my cloud and wrote a bash script to convert and send the converted to another directory on the cloud.
Run the ffmpeg line as suggested here - that does most videos, I ended up finding a different way of doing it for android mp4's.
Kind regards

Michael


Why isn't Ubuntu Tweak's Janitor working?

As Donarsson pointed out in his comment, I think you just need to update. Ubuntu Tweak works fine for me in 13.04.

In a terminal, type these commands:

sudo add-apt-repository ppa:tualatrix/ppa
sudo apt-get update && sudo apt-get upgrade


Ubuntu (and any other linux os) not booting from cd or usb

Thanks for all the help . I fixed it by booting up the live cd with the onboard graphics plugged into the monitor. There was something going wrong when booting my ZOTAC graphic card. After running on the onboard I switched the VGA cable to the ZOTAC Graphic card and guess what, it worked!

Thanks again to AskUbuntu for the quick support.


How to convert all .xlsm of particular folder to .xlsx using Bash scripting on windows

first install the libreoffice:

sudo apt install libreoffice unoconv

then use the unoconv tool that comes with libreoffice to do the conversion:

cd /folder/containing/.xlsmfiles
unoconv -f xlsx *

the -f tells of the expected output format and the * is the input files

make sure that all the files in the folder are xlms files else unoconv would throw an error

UPDATE: a basic script to work on only the xlsm files in the mixture of other file formats

#!/bin/bash
for f in /path/to/folder/*.xlsm; do unoconv -f xlsx "$f"; done

replace  with the absolute path to the folder containing the files. save the file. remember to make the script executable.


This was a very rare case. I just did a clean installation via ppa. And is a good chance to try ST3.

sudo add-apt-repository ppa:webupd8team/sublime-text-3
sudo apt-get update
sudo apt-get install sublime-text-installer

Fixed.

UPDATE: The issue seems to be in some corrupt file inside ~/.config/sublime-text-3/Packages/User


Transparent see-through terminal and windows key

There are three questions here, it helps if you separate these into three different questions.

For your transparency issues, please see this question.

I'm not sure if the Super key is being ignored, or if that keyboard shortcut just isn't working. In the latest version of Ubuntu it was changed from Super+D to Ctrl + Alt + D. You can change it back in the keyboard preferences.

Thirdly, what you're talking about, I think, is the Dash. This is specific to Unity, which is not part of Gnome Classic. If you want to use the dash, you'll need to use the regular window manager.

There are other applications that do similar things though. Try Gnome-Do, for example.


How can I make Windows boot first and Ubuntu second?

(When I searched "make windows boot first" in the askubuntu search box, I had trouble finding a post that answered this question, so I'll answer it here).

I'm going to presume that you are using grub (if you don't know what it is, you are probably using it).

You can change the boot order by editing the menu.lst file located in /boot/grub/.

When you look into menu.lst, you want to scroll down to blocks of text that look something like the following:

title        ....
root         ....
kernel       ....
...
initrd       ....

The block that begins with

title        Windows ...
...

Is the windows entry that shows up on boot.
If you want this to be both the first and default entry,
you can copy the entire block of text, and paste it just right before the first "title ..." block.

You will have to do this as root (so try gksudo gedit /boot/grub/menu.lst and make the edits). When you reboot, by default you will boot into windows. Note that because reading Linux filesystems from Windows requires more setup, it is probably best to do this in Linux.

Edit:

Actually after a little more searching, I think the suggestion in this post is probably a lot safer.


LAPACK installation along with lapack-devel and lapack-dev

lapack 3.5.0-2ubuntu1 source package has been built into many binaries thus installing these binaries will install lapack, execute following in terminal

sudo apt-get install liblapack-dev liblapack-doc-man liblapack-doc liblapack-pic liblapack3 liblapack-test liblapack3gf liblapacke liblapacke-dev

Click here for more details and downloading source package


Python dependency problem after Ubuntu 16.04 upgrade

I'm also on 16.04 and use python

patfla@patfla-N550JV:~$ python
Python 2.7.12 (default, Jul  1 2016, 15:12:24)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from _struct import *
>>>

You might look into how to upgrade your python 2.7.11 to 2.7.12.


udev rules.d - hot plug HDMI monitor - script not running

opera? Oh no! RUN is only for short running tasks,  udev run the command in a confined environment.

No GUI supported, daemon will be killed just after finishing the event processing.

If you want just to test if the rule is triggered, try this:

#!/bin/bash
date >> /root/myrule.log

Reference: man udev

  RUN{type}

  This can only be used for very short-running foreground tasks.
  Running an event process for a long period of time may block all
  further events for this or a dependent device.

  Starting daemons or other long-running processes is not appropriate
  for udev; the forked processes, detached or not, will be
  unconditionally killed after the event handling has finished.


Unattended Installation Ubuntu 20.04 Server via VirtualBox

There's a whole section of http://ubuntu.com/server/docs/install/autoinstall on this topic.
The short answer:

The DESKTOP installer (ubiquity) is based upon debian-installer, and you use a preseed file
The SERVER installer (subiquity) is no longer based upon d-i, and you use a subsection of the existing cloud-config file. Different format: It uses YAML.

Here's the important bit:

Differences from debian-installer preseeding
preseeds are the way to automate an installer based on debian-installer (aka d-i).
autoinstalls for the new server installer differ from preseeds in the following main ways:

the format is completely different (cloud-init config, usually yaml, vs debconf-set-selections format)
when the answer to a question is not present in a preseed, d-i stops and asks the user for input. autoinstalls are not like this: by default, if there is any autoinstall config at all, the installer takes the default for any unanswered question (and fails if there is no default).

You can designate particular sections in the config as “interactive”, which means the installer will still stop and ask about those.


Elantech multitouch breaks after sleep and unknown events

It could be a driver problem. I have a similar kind of problem with my samsung SS7. What i did was to downgrade the driver to the earlier version. Somehow, Windows 7 installed an elan-tech driver version when I am supposed to be using Samsung's version.

My issue was whenever my notebook starts from hibernation mode, though it's stated that touchpad is working and active, I cant seem to use it.


Ubuntu in VMware 11 and Cooler Master LED keyboard

found on http://forums.fedoraforum.org/showthread.php?t=296728
I had the same problem, and found a couple solutions, but this is the shortest command.

for the lazy:

xset led 3
(that turns it on)
xset -led 3
(that turns it off)


Why `dpkg -S /var/lib/dpkg` shows "base-files, dpkg"?

You are searching for a directory, not a specific file/binary, so any package can install files inside a directory:

➜  ~  dpkg -L dpkg | grep '/var/lib/dpkg'
/var/lib/dpkg
/var/lib/dpkg/info
/var/lib/dpkg/updates
/var/lib/dpkg/parts
/var/lib/dpkg/alternatives
➜  ~  dpkg -L base-files | grep '/var/lib/dpkg'
/var/lib/dpkg
➜  ~

As you can see, base-files also creates the /var/lib/dpkg directory (exact reason why, I ignore it, maybe there were some files now deleted, but the changelog doesn't give any obvious hint) and the dpkg package which apart of being owner of the /var/lib/dpkg directory, installed files inside it.


Why Firefox always gets upgraded and Chromium web browser don't?

The given problem was addressed in a similar post. Here is the link:

Why is Chromium not updated automatically as Firefox is?

Hope this helps.


What helped me was to disable CSM (Compatibility Support Module) in BIOS (exact steps to do that depend on the installed motherboard). I was able to successfully use Ubuntu after doing that.


"Unable to install GRUB in /dev/sda" when installing GRUB

I just had this problem installing Ubuntu 14.04 from a USB stick to a hard drive.

The problem was the USB stick was /dev/sda, installing to the hard drive /dev/sdb

Even though the installer knew to install to /dev/sdb, it then tried to install grub to the MBR on /dev/sda, and failed.  The workaround was to go back to the menu, try again, say NO to automatically install to MBR of first hard drive and manually tell it /dev/sdb.

Then everything worked.


The package bash is installed by default on every Ubuntu version and flavour and contains the file /etc/skel/.bashrc, which is copied into every new user's home directory, so you should definitely have a file ~/.bashrc. If you accidentally removed it you can restore it by copying it again:

cp /etc/skel/.bashrc ~/

The file already by default contains these lines:

# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'

Your alias is available when you source the bashrc with . ~/.bashrc or just open a new session.


Install Network Time Protocol daemon and utility programs (ntp).

sudo apt install ntp fake-hwclock

NTP, the Network Time Protocol, is used to keep computer clocks  accurate by synchronizing them over the internet or a local network.

To set the hardware clock to the current system time by syncing the hardware clock with the system clock:

sudo hwclock -w


According to your logfile there are several things wrong. It is important to tackle them one by one. There are a lot of messages concerning AH01630, meaning the client has no access. This has usually to do with a difference between Apache 2.2 and 2.4.
The directive of importance is Require:

In 2.2 configuration you should have:

Order allow,deny
Allow from all
In 2.4 configuration you should have:
Require all granted.Please make the correct change and check if these errormessages disappear from the log.

Take a look at for example line 130 of the logfile on your pastebin. It mentions it can't find index.php. Make sure the reference to that file is correct and also for files that are mentioned in similar entries too. Then please make a new dump of your logfile and we'll continue.


How to execute Macros Libreoffice Impress v.5?

AFAIK, you can't execute a macro directly from a .bas source file. Instead, you need to create a new library or a new module in an existing library, and copy/paste the Basic code into that new module.

Generally, there's a per-user macro repository and a system-wide repository. Additionally, you can put macros directly into LO Impress / Writer / Calc files, but they will only be available if that file is currently loaded.

So, the exact solution depends on the scope of your macro - do you use it only together with a certain impress file, or should other users use it, too?

For more Information regarding how to organize macros in LO, see the LO Wiki.

Assuming you need it only combined with a certain impress file:

Open that impress file in LO; open the .bas file in a text editor;
In Impress: Menu Tools -> Macros -> Organize Macros -> LibreOffice Basic;
In the Macro from window, select your impress file; hit New; enter a module name;
Now, the LO Basic IDE opens, with a Sub Main - End Sub macro stub.
Copy the basic code from the .bas file, and paste it into the LO Basic IDE.

That's it. Now, you can start editing / debugging the macro code using the LO Basic IDE. Saving your Impress document will save the macro code, too. You can run the macro from Menu Tools -> Macros -> Run Macro -> Select your Impress file, Library ("Standard") and Module - select Main -> hit Run.


How can I reduce the CPU usage of X/LightDM?

/usr/bin/X :0 -auth /var/run/lightdm/root/:0...

That isn't lightdm, but the X server which is essential to having a GUI on any Linux.

It shouldn't constantly use 12% of CPU, but CPU use should go up and down depending on the amount of "activity" that you are performing on your desktop.

To try the options suggested by @drake01's eHow Link, you must create a new file in /usr/share/X11/xorg.conf.d. For example:

sudo nano /usr/share/X11/xorg.conf.d/99-mycputweaks.conf
Insert:

Section "Screen"
Option "RenderAccel" "True"
Option "DisableGLXRootClipping" "True"
Option "DamageEvents" "True"
Option "UseEvents" "True"
EndSection

Save, exit and reboot (or restart X from a virtual terminal).

You may also want to try Jupiter, a power-management applet designed specially for netbooks to try to improve your battery life. (available from PPA).


To open with VSCode from Nautilus, create a .desktop file, open it in gedit, and paste in the following:

[Desktop Entry]
Name=VSCode
Comment=Edit code files
Exec=code %f
Terminal=false
Type=Application
Icon=code
Categories=TextEditor;
StartupNotify=true
MimeType=text/x-text;

Save the file, then move it to /.local/share/applications (you may need to open Nautilus via sudo Nautilus to be able to move it there). It should now appear in the "open with" dialogue when right-clicking on a file. Set VSCode as the default program for that file by right-clicking on the file, Properties, 'Open With' tab. The downside to this method is that it just opens the file, but not the folder in VSCode's 'Explorer' pane.

To open a file with VSCode from the terminal, follow the directions here (Linux section about 1/3 the way down), making sure the paths you use are absolute, not relative. Once that's working, if you cd to the directory you want and enter code . it'll open that folder in the VSCode's 'Explorer' pane.


I think you can retrieve the server and client time_zone settings:

SELECT @@global.time_zone, @@session.time_zone;

You can also change the client timezone, or the timezone for the entire MySQL instance.

If you have server time_zone set at MySQL instance startup, you can modify the /etc/my.cnf file (or wherever your mysql instance initialization parameters are read from), under the [mysqld] section:

[mysqld]
default-time-zone='+00:00'

-- or --

add the --default_time_zone='+00:00' option to mysqld_safe

WIth Each client session can change the timezone setting for their own session:

mysql> SET GLOBAL time_zone = 'Asia/Tokyo';

(Or whatever time zone GMT+1 is.: http://www.php.net/manual/en/timezones.php)

This is the command to set the MySQL timezone for an individual client, assuming that your clients are spread accross multiple time zones.


Wireless adapter Broadcom [14e4:43a3] does not work in Ubuntu

This adapter is not supported by Ubuntu stable kernels.

A way to get it work is to install a 4.4 kernel from Ubuntu 16.04 branch.

Connect to internet by wire and run in terminal

mkdir linux-4.4
cd linux-4.4
wget http://mirrors.kernel.org/ubuntu/pool/main/l/linux/linux-image-4.4.0-8-generic_4.4.0-8.23_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/l/linux/linux-image-extra-4.4.0-8-generic_4.4.0-8.23_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/l/linux/linux-headers-4.4.0-8-generic_4.4.0-8.23_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/l/linux/linux-headers-4.4.0-8_4.4.0-8.23_all.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/l/linux-firmware/linux-firmware_1.156_all.deb
sudo dpkg -i *.deb

Then reboot and test the wifi.

The kernel files are a subject of updates. The links will need to be updated. Ubuntu packages search can be used to get the correct links

Update: For Ubuntu 14.04 users the 4.4 kernel can be installed by

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

But dkms packages will not build with this kenel, if gcc 4.9+ is not installed.


How do I change back /etc folder owner to root:root?

Try this command

pkexec chown root:root /etc/sudoers /etc/sudoers.d -R


xfce4-terminal Color Settings for 'ls' in NTFS Partition Mounted by fstab

The default highlighting of ls usually marks folders writable by others with that green background. Therefore you can:

Change the fmask, dmask or umask values of the mount point to deny write access to others (should be at least 0002).
See What do the different colors mean in ls? to know what the colors mean and how to set them. For example:

LS_COLORS="$LS_COLORS:ow="; export LS_COLORS

This should make folders writable by others look the same as others. I wouldn't recommend this, of course.


Install ubuntu packages to other machine?

https://superuser.com/questions/378686/when-you-do-apt-get-install-where-are-the-deb-files-stored. This question tells you where the package files are stored. Copy them across and install from them. Or clone your hard drive. This is a guide http://www.makeuseof.com/tag/2-methods-to-clone-your-linux-hard-drive/  but moving the packages may be best over network


You can also select different mouse pointer color scheme with following command:

sudo update-alternatives --config x-cursor-theme

You should log out and log in again for the change to take effect.


The Ubuntu 20.04 LTS does not have Python 2 GTK binding. So you have to get it first from the 19.10 repository by
sudo apt install python2
cd ~/Downloads
wget http://old-releases.ubuntu.com/ubuntu/pool/universe/p/pygtk/python-gtk2_2.24.0-6_amd64.deb
sudo apt-get install ./python-gtk2_2.24.0-6_amd64.deb

and then install the software

from binary package
cd ~/Downloads
wget http://archive.ubuntu.com/ubuntu/pool/universe/d/driconf/driconf_0.9.1-4_all.deb
sudo apt-get install ./driconf_0.9.1-4_all.deb

from source by
cd ~/Downloads
wget http://people.freedesktop.org/~fxkuehl/driconf/driconf-0.9.1.tar.gz
tar -xf driconf-0.9.1.tar.gz
sudo python2 setup.py install


Is it possible to setup Ubuntu Minimal on a device without Ethernet?

I have tried many distribution on my laptop and I run into the same problem. I really dont like gnome but ubuntu-server doesnt work with wifi install. So I use a regular ubuntu desktop version. dd it to a usb and boot from it. Open a terminal and start type the following. Make sure you change your device. (as yours may not sda)

# create gpt table
sudo fdisk /dev/sda
sudo mkfs.fat -F32 /dev/sda1
sudo mkfs.ext4 /dev/sda2
sudo mkfs.ext4 /dev/sda3

cd /tmp && wget http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/debootstrap_1.0.114ubuntu1_all.deb
cd /tmp && dpkg -i debootstrap*.deb

sudo mkdir -p /mnt/usb
sudo mount /dev/sda2 /mnt/usb
sudo mkdir /mnt/usb/boot
sudo mount /dev/sda1 /mnt/usb/boot
sudo debootstrap bionic /mnt/usb http://hk.archive.ubuntu.com/ubuntu/

sudo mount -o bind /dev /mnt/usb/dev
sudo mount -o bind /dev/pts /mnt/usb/dev/pts
sudo mount -t sysfs /sys /mnt/usb/sys
sudo mount -t proc /proc /mnt/usb/proc

sudo cp /etc/apt/sources.list /mnt/usb/etc/apt/
sudo chroot /mnt/usb apt-get update

sudo chroot /mnt/usb apt-get -y install grub-efi-amd64 sudo make git ssh linux-firmware linux-image-generic nano intel-microcode curl software-properties-common unzip network-manager net-tools wpasupplicant

# add your packages here, Install your driver here
# sudo chroot /mnt/usb apt-get -y install papirus-icon-theme cpanminus gexec libcpan-distnameinfo-perl libcpan-meta-check-perl libfile-pushd-perl liblocal-lib-p$
# sudo chroot /mnt/usb apt-get -y install xorg openbox obconf lxterminal conky tint2 feh pcmanfm xarchiver chromium-browser gmrun
# sudo chroot /mnt/usb apt-get -y install viewnior ttf-wqy-microhei
# sudo chroot /mnt/usb apt-get -y install transmission-gtk rar unrar zip evince scrot
# sudo chroot /mnt/usb apt-get -y install alsa-utils pulseaudio bluez

sudo chroot /mnt/usb passwd

sudo echo -e "/dev/sda1  /boot       vfat    umask=0077      0       1" | sudo tee -a /mnt/usb/etc/fstab
sudo echo -e "/dev/sda2 /               ext4    errors=remount-ro 0       1"  | sudo tee -a /mnt/usb/etc/fstab
sudo echo -e "/dev/sda3 /home               ext4    defaults        0       2"  | sudo tee -a /mnt/usb/etc/fstab

sudo chroot /mnt/usb
# Following in chroot environment
apt-get install grub-efi-amd64
grub-mkdevicemap
grub-mkconfig -o /boot/grub/grub.cfg
update-grub
grub-install --target=x86_64-efi  --bootloader-id=grub_uefi --efi-directory=/boot

sudo shutdown -r now

After reboot get online with

nmtui


What is Ubuntu's equivalent of Windows shell:startup?

open Dash
search for start-up

The start-up applications looks like

To add an application to the start-up press add button

Give it a name and write the command of your application and that's it


How to Create Server from my Local Machine with Internet Connection?

"Server" installations are normally installations geared towards primarily just packages for lighter-weight UI's and less "Workstation/Client" packages. In the end you can really take any installation and add/remove the packages you want to create your machine.

The underlying rule to move towards performance is less=more. Meaning only install the packages/binaries you require to get your "server" online for whatever "service" you plan on hosting.

When it comes to cost or licensing you are looking at what your support contract will be for Ubuntu and the cost of power for your machine.


Press Ctrl+Alt+T on keyboard to open the terminal. When it opens, run the command below to open the configuration file via gedit editor:

sudo gedit /etc/systemd/logind.conf
Replace gedit with vi or other text editor if you’re on Server edition.

Find out the line #HandleLidSwitch=suspend, remove the # and change it to:

  HandleLidSwitch=poweroff to shutdown computer when lid is closed
  HandleLidSwitch=hibernate to hibernate computer when lid is closed
  HandleLidSwitch=ignore to do nothing

Save the file and restart the service or just restart your laptop to apply changes.

  sudo restart systemd-logind


resolvconf Error when running dhclient in recovery mode

Open your terminal and type as

sudo dpkg-reconfigure resolvconf

And try again.


I just figured it out. I usually use [Ctrl]+Z to exit nano and it works just fine for everything I usually use, like: sudo nano /etc/sources.list or sudo /etc/apache2/sites-available/mysite.com.conf.

However for some reason when setting a crontab you must exit with [Ctrl]+X or the job will not be saved.


Hopeless with mounting windows harddisk on ubuntu

Try this, I just did this on the weekend for my father in law and it worked like a charm. Hopefully it will work for you as well.
https://help.ubuntu.com/community/MountingWindowsPartitions


I'm assuming you're running NetworkManager here, you've already set up your wireless connection using DHCP and you're talking about IPv4 here.

While you can't configure the static addresses in NetworkManager GUI, there's a hack possible.

Find the connection UUID of the connection configured

$ nmcli con

Add a script in /etc/NetworkManager/dispatcher.d/, containing this starting point:

#!/bin/bash

WLAN_DEV=wlan0
MYCON_UUID=31c48409-e77a-46e0-8cdc-f4c04b978901

if [ "$CONNECTION_UUID" == "$MYCON_UUID" ]; then
    # add alias for Network 1: 192.168.0.123/24
    ifconfig $WLAN_DEV:0 192.168.0.123 netmask 255.255.255.0 up
    # add alias for Network 2: 192.168.1.123/24
    ifconfig $WLAN_DEV:1 192.168.1.123 netmask 255.255.255.0 up
fi

Make sure it has the right permissions (chmod +x /path/to/script.sh) and restart NetworkManager:

$ sudo service network-manager restart

Now when you connect to your wireless connection, it should add the two aliases (check with ifconfig.


Activities dual monitor issue with Ubuntu 18.04

After playing around with Coverflow Alt-Tab extention for a while I think it is exactly a solution to my question!

You may find the usage instructions here.


Hibernate doesn't work properly in Ubuntu 16.10!

Assuming that you are talking about creating (not modifying) the file /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla, what you did is not sufficient. Please see this page in the Ubuntu Desktop Guide about what the contents should look like.


Dell inspiron 14R has no network after kubuntu installation

Are your drivers for the network cards loading? A quick check might be to mouse over your network  notification area or try to manually connect to a network (I'm not terribly familiar with KDE). Running lspci -vv might net you some information about the cards and what driver they are using , if they are using one.


why am i unable to dual boot windows 10 with ubuntu 18.04?

I had a similar issue trying to install Ubuntu 18.04 alongside Windows 10: the Ubuntu installation page did miss the "Install Ubuntu alongside Windows 10" option.

In my case, the cause of the missing option was:

my Windows 10 is set up in BIOS / CSM mode (WIN+R -> msinfo32 -> open System Information -> right pane: BIOS Mode shows Legacy), presumably because I had upgraded from Win7
in my Mainboard BIOS / Firmware setup, UEFI is not disabled (only "UEFI" or "UEFI+Legacy" options are available, I have set this to "UEFI+Legacy")
to install Ubuntu, I had booted an out-of-the-box Ubuntu 18.04 USB stick which (by default) has both GPT/UEFI + MBR/BIOS/LEGACY capabilities, but...
here comes the issue: ... since the Mainboard boot device priority was set to boot UEFI USB drives before booting into BIOS USB drives ...
...as a consequence, the Ubuntu USB stick would always boot into GPT / UEFI mode (you can tell by checking e.g. if the /sys/firmware/efi directory exists, see the various hints on the net)
and thus the Ubuntu installation does not find a Windows 10 boot record (apparently looks only for UEFI... what do the experts say?)

I did fix the issue simply by:

changing the Mainboard boot device priority to boot NON-UEFI devices first (or: you can enter the manual boot menu -> and pick the NON-UEFI USB stick to boot from)
and then boot the Ubuntu USB stick successfully into BIOS / MBR mode (no /sys/firmware/efi directory)
et voila: the "Install Ubuntu alongside Windows 10" option appears, and installing Ubuntu parallel to Win10 automatically yielded the desired boot menu with Ubuntu and Windows10 to choose.

Converting Windows 10 to UEFI mode was therefore not neccessary for me.

Maybe this helps also in your case...


Macbook Pro 2011(early) BCM4331 Wifi not working on kernel 4.4.0-108 and 4.4.0-109

SOLVED

I booted into the working 4.4.0-104 kernel and reinstalled bcmwl-kernel-source and dkms. That reinstalled the wl.ko module for all kernels, since the wl.ko module was missing from the newer kernels and was not loaded at boot.

$sudo apt remove bcmwl-kernel-source dkms --purge

$sudo apt install bcmwl-kernel-source dkms


Problem with Symbolic toolbox of MATLAB 2010b, 32bit, installed in UBUNTU 12.04 LTS, 64-bit

sudo ln -s /usr/local/MATLAB/R2010b/toolbox/symbolic/mupad/glnx86 /usr/local/MATLAB/R2010b/toolbox/symbolic/mupad/glnxa64

in terminal will solve it. A similar problem is reported here: http://www.mathworks.co.jp/support/solutions/en/data/1-O7POO/


You can boot from live CD/USB and use boot-repair


if you are trying to recover boot loader then follow this link
http://www.webupd8.org/2009/12/how-to-recover-grub2-linux.html


The [ version of the command requires ] as the mandatory last parameter (so it must be preceded by a space). It’s just a formal, syntactic thing to force users to close the bracketed “block”, so commands look this way:

if [ $1 -eq 2 ]; then

instead of

if [ $1 -eq 2; then

See help [:

$ help [
[: [ arg... ]
    Evaluate conditional expression.

    This is a synonym for the "test" builtin, but the last argument must
    be a literal `]', to match the opening `['.

Notes

The test version does not require nor accept the final ].
You don’t need the builtin there. Builtins take priority over external commands, so just [ would execute the builtin. The builtin command is more useful when you have a function or alias masking [.


help! W: Possible missing firmware /lib/firmware/i915/kbl_guc_ver9_14.bin for module i915

Just get the file from the kernel git:

git clone https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git

sudo cp ./linux-firmware/i915/icl_dmc_ver1_07.bin /lib/firmware/i915/icl_dmc_ver1_07.bin


How to solve permission denied (publickey) error when using SSH

You should copy your public key from machine you are connecting from to the server. On the server put it into ~/.ssh/authorized_keys. Make sure this file has permissions '-rw-------'.


Aptana and Titanium menu bar problem with Ubuntu 13.10

Here is what worked for me:

sudo -H gedit /usr/share/applications/eclipse.desktop

update it to:

[Desktop Entry]
Version=1.0
Name=Eclipse
Exec=env UBUNTU_MENUPROXY= eclipse
Terminal=false
Icon=/opt/eclipse/icon.xpm
Type=Application
Categories=IDE;Development
X-Ayatana-Desktop-Shortcuts=NewWindow
[NewWindow Shortcut Group]
Name=New Window
Exec=env UBUNTU_MENUPROXY= eclipse
TargetEnvironment=Unity


Opening a terminal by default when USB is inserted

An edited version of this script does the job.
When a (any) usb device is being connected, a gnome-terminal is opened in its (root) directory.

In the example, when a 14.04 usb startup flash drive is connected:

The script

#!/usr/bin/env python3
import os
import subprocess
import time

def get_mountedlist():
    return [(item.split()[0].replace("├─", "").replace("└─", ""),
             item[item.find("/"):]) for item in subprocess.check_output(
            ["lsblk"]).decode("utf-8").split("\n") if "/" in item]

def identify(disk):
    command = "find /dev/disk -ls | grep /"+disk
    output = subprocess.check_output(["/bin/bash", "-c", command]).decode("utf-8")
    if "usb" in output:
        return True
    else:
        return False

done = []
while True:
    mounted = get_mountedlist()
    new_paths = [dev for dev in mounted if not dev in done and not dev[1] == "/"]
    valid = [dev for dev in new_paths if identify(dev[0]) == True]
    for item in valid:
        os.chdir(item[1])
        subprocess.Popen(["gnome-terminal"])
    done = mounted
    time.sleep(4)

How to use

Copy the script into an empty file, save it as open_usb.py
Test- run the script. with the command:

python3 /path/to/open_usb.py

If all works fine, add it to Startup Applications: Dash > Startup Applications > Add the command:

python3 /path/to/open_usb.py

Notes

I tested it on Unity (14.04), but it is unlikely it would break on any Ubuntu version, as long as it has the default configuration (including python3)
The script only runs a very simple and lightweight check, every four seconds. In my tests, I could not determine any additional processor load.

EDIT

As mentioned in a comment, although the script works as it should, one issue occurs when you safely remove the usb device: a warning is given that the volume is "occupied" by the script.

The cause is that the script cd -s into the directory of the volume, before opening the terminal in the root directory of the volume.

The solution

The solution is quite simple; make the script leave the directory again after having opened the terminal in the usb device's root directory. In the version below, the issue is fixed:

#!/usr/bin/env python3
import os
import subprocess
import time
home = os.environ["HOME"]

def get_mountedlist():
    return [(item.split()[0].replace("├─", "").replace("└─", ""),
             item[item.find("/"):]) for item in subprocess.check_output(
            ["lsblk"]).decode("utf-8").split("\n") if "/" in item]

def identify(disk):
    command = "find /dev/disk -ls | grep /"+disk
    output = subprocess.check_output(["/bin/bash", "-c", command]).decode("utf-8")
    if "usb" in output:
        return True
    else:
        return False

done = []
while True:
    mounted = get_mountedlist()
    new_paths = [dev for dev in mounted if not dev in done and not dev[1] == "/"]
    valid = [dev for dev in new_paths if identify(dev[0]) == True]
    for item in valid:
        os.chdir(item[1])
        subprocess.call(["gnome-terminal"])
        os.chdir(home)
    done = mounted
    time.sleep(4)


How to move the mouse cursor between monitors with keys in Gnome3?

The script below can be run with two arguments: left and right.

In a two monitor- setup (left/right, in any configuration), the script will move the mouse to the center of either the left- or right monitor, depending on the argument.

The script

#!/usr/bin/env python3
import subprocess
import sys

arg = sys.argv[1]

screeninfo = [
    s for s in subprocess.check_output("xrandr").decode("utf-8").split()\
    if s.count("+") == 2
    ]

if arg == "left":
    match = [s for s in screeninfo if s.endswith("+0+0")][0]
elif arg == "right":
    match = [s for s in screeninfo if not s.endswith("+0+0")][0]

data = [item.split("x") for item in match.split("+")]
numbers = [int(n) for n in [item for sublist in data for item in sublist]]
coord = [str(int(n)) for n in [(numbers[0]/2)+numbers[2], (numbers[1]/2)+numbers[3]]]

subprocess.Popen(["xdotool", "mousemove", coord[0], coord[1]])

How to use

The script needs xdotool:

sudo apt-get install xdotool

Copy the script into an empty file, save it as move_mouse.py
Test-run the script. Run from a terminal the commands:

python3 /path/to/move_mouse.py left

and

python3 /path/to/move_mouse.py right

If all works fine, add the commands to two available shortcuts:  Choose: System Settings > "Keyboard" > "Shortcuts" > "Custom Shortcuts". Click the "+" and add the commands above.

Note

The script is not gnome -specific; it should run fine on all Ubuntu distro's.

Explanation

We can move the mouse to specific position by the command (e.g.):

xdotool mousemove 300 500

To calculate the targeted positions (centered) in both screens, we need to understand connected screens are positioned in an arbitrary layout, e.g.

In the output of xrandr, we can find information on both screens, their resolutions and their positions in the spanning layout, like:

1280x1024+1680+128

To get the targeted position per screen (center), all we need to do is divide the first and second number (1280x1024, the resolution) by 2, subsequently add the two calculated positions to the offset per screen (+1680+128 in this case). That is exactltly what the script does.

Subsequently, the found numbers are used as arguments to run the xdotool mousemove-command.


You have most likely set up a new machine and encrypted your system.

Press ALT and F2 together.
Type--> software-properties-gtk and select it.
Select the other sources tab.
Make sure the boxes that say "canonical partners" and "canonical partners (source code)" are both checked.
Agree to the requested update.

You should now be able to install vlc.


Wireless driver fails to activate on an hp pavilion dv4 w/vista home premium

You may need a program called ndiswrapper to get your wireless working. This is how I got mine working. I installed ndiswrapper, then used it to install the .inf driver file from a CD. Then I installed gnome network admin and used it to connect.

The terminal command to start the ndiswrapper install should be:

sudo apt-get install ndisgtk

And for network admin:

sudo apt-get install gnome-network-admin

In the network settings, enter the SSID for your network, then restart the computer and it will auto connect. These instructions require a hardline (such as Ethernet) network connection to work.


Cmake has not updated, what I am doing wrong?

The output of which cmake says that your cmake is located in /usr/local/bin/cmake and that is the problem.

Remove it with sudo rm /usr/local/bin/cmake and try again.


Import your .ics file into Evolution first. It will then show up in both GNOME Calendar and GOME California as well as Maya. (All these calendars rely on Evolution for the backend.)


How to make Hyper and Super keys not do the same thing?

For some reason Ubuntu currently assigns both Super and Hyper to Mod4. You can see this in /usr/share/X11/xkb/symbols/pc:

 key <SUPR> {   [ NoSymbol, Super_L ]   };
 modifier_map Mod4   { <SUPR> };

 key <HYPR> {   [ NoSymbol, Hyper_L ]   };
 modifier_map Mod4   { <HYPR> };

I was able to change this to put super and hyper on separate modifiers without needing to be root or modify any system files. I'm not sure if this is the best way as I am definitely not an xkb expert, but it's a way that has been reliable for me.

First, create a local symbols file.  I have mine in ${HOME}/.config/xkb/symbols/local.  This assigns Super to Mod3 and Hyper to Mod4.

default  partial modifier_keys
xkb_symbols "superhyper" {

    modifier_map Mod3 { Super_L, Super_R };

    key <SUPR> {    [ NoSymbol, Super_L ]   };
    modifier_map Mod3   { <SUPR> };

    key <HYPR> {    [ NoSymbol, Hyper_L ]   };
    modifier_map Mod4   { <HYPR> };
};

Then recompile the existing map to add a "local":

setxkbmap -print | sed -e '/xkb_symbols/s/"[[:space:]]/+local&/' | xkbcomp -I${HOME}/.config/xkb - ${DISPLAY}

Put this in a script to be run when you log in.  You can run it as an ordinary user.


can you please unplug the internet cable and make sure you run wubi installer as administrator


Which programs on Ubuntu support 8 processor cores?

One of the great tests is to use FFmpeg for h.264 encoding. I am running an 8 core AMD chip and conky shows that this hits all 8 cores pretty comprehensively.

A sample commandline:

ffmpeg -i test.avi -c:v libx264 -preset slow -crf 22 -c:a copy test.mkv

And below is a screenshot using conky to demonstrate all 8 cores running to the max:

If you are interested I also include the ~/.conkyrc snippet for the cores:

${color grey}${execi 5000 uname -p | cut -c 1-16}
1:  ${cpu cpu1}%  ${cpubar cpu1}
2:  ${cpu cpu2}%  ${cpubar cpu2}
3:  ${cpu cpu3}%  ${cpubar cpu3}
4:  ${cpu cpu4}%  ${cpubar cpu4}
5:  ${cpu cpu1}%  ${cpubar cpu5}
6:  ${cpu cpu2}%  ${cpubar cpu6}
7:  ${cpu cpu3}%  ${cpubar cpu7}
8:  ${cpu cpu4}%  ${cpubar cpu8}


Bridging hardware interfaces in KVM on Ubuntu 20.04

I advantageously found it through the mac address in my netplan file
ip a | grep 00:FF

This method didn't work with net-tools/if config, no clear reason why.
The config issue was in netpan, I made a mistake that in my syntax. My qemu config was fine.


How to supervise and automatically restart a process?

This answer applies to Ubuntu versions with Upstart (<= 14.10). Use another approach for versions with Systemd (>= 15.04).

It seems you're looking for a functionality already provided in Ubuntu with Upstart. The respawn stanza in the configuration will do exactly what you need. I would recommend against the use of a less standard way of dealing with this.

Without more details about the process you're trying to manage with it, it's hard to say what the configuration should look like. It depends on whether it forks and puts itself in the background for example. The Upstart documentation on the respawn stanza should give you more information.

Unfortunately, it's not yet possible to run User Jobs properly: cannot get upstart to run user job

Example

Let's assume we want to keep the Calculator app running, even when it's being killed with fire (signal 9).

Create a configuration file in /etc/init/calculator.conf (based on this article):

#!upstart
description "Calculator"

# Start job via the daemon control script. Replace "gert" with your username.
exec su -l gert -c 'export DISPLAY=:0; /usr/bin/gnome-calculator'

# Restart the process if it dies with a signal
# or exit code not given by the 'normal exit' stanza.
respawn

# Give up if restart occurs 10 times in 90 seconds.
respawn limit 10 90

Start it by running

sudo start calculator

It opens on your current display (:0) and enjoy the awesomeness by seeing it restarting after closing it.

Identify the process ID, e.g. by doing ps aux | grep calculator:

gert  13695 0.2 0.4 349744 16460 ?   Sl   13:38   0:00 /usr/bin/gnome-calculator

Kill it with fire.

sudo kill -9 13695

Watch it reappearing:

gert  16059 4.6 0.4 349736 16448 ?   Sl   13:40   0:00 /usr/bin/gnome-calculator

Note that this will be more elegant with the plans for the Ubuntu 13.04 plans with proper User Job support.


We need to know a bit more about your situation.  Specifically, which version of Ubuntu?  Is your network connection Wireless or Wired? Do you have DHCP or a static address? Certain versions of Ubuntu around the 2008-2009 timeframe could not handle static addresses within the GUI Network configuration tool.

I'll take a stab at it, though. I'll assume you are using the Desktop and not Server variant, with the appropriate GUI config tools.

1) Log into your GUI account, at the dash type Network.  Click on the icon that looks like a folder with an Ethernet jack in it.

2) Click on the default connection, click on options button.  On the new page click the General tab, and make sure both those two top boxes are checked.  Then logout and verify from VT1 that the redirection happens for that user.


mount.cifs ignores `user` and `username`

o.k. found it.
I should use either:

sudo mount.cifs '\\nas1.local\sharename' '/mnt/nas1_sharename` -o domain=mydomain -o username=useronnas1

or

sudo mount.cifs '\\nas1.local\sharename' '/mnt/nas1_sharename` -o domain=mydomain,username=useronnas1

both seem to get the user properly.

Now however I get:

mount error(95): operation not supported

but this is a new and another issue.


UFW 'default deny incoming' doesn't work

Citting the UFW introduction from Ubuntu Community...

The information bellow can be used to handle UFW from terminal using sudo for each command and providing root's password.

How can i enable UFW?

sudo ufw enable

this will enalbe UFW with default rules

Note that by default, deny is being applied to incoming.

How can i check UFW's status?

sudo ufw status verbose

How can i check any  exceptions in rules? <-- with this you can check of what is blocked

sudo ufw show raw

You can also read the rules files in /etc/ufw (the files whose names end with .rules)

Examples:

To deny incoming tcp packets on port 53

sudo ufw deny 53/tcp

To deny incoming udp packets on port 53 <-- this is what are yiu looking for

sudo ufw deny 53/udp

Delete Existing Rule

To delete a rule, simply prefix the original rule with delete. For example, if the original rule was:

ufw deny 80/tcp

Use this to delete it:

sudo ufw delete deny 80/tcp

Full reference: https://help.ubuntu.com/community/UFW


Ubuntu and Windows 10 Dual Boot Grub Issues

It looks like I found a working solution.

Installing boot-repair(https://help.ubuntu.com/community/Boot-Repair) and running recommended repair adds a working boot entry for Windows in grub. Selecting this entry does not break grub, allowing to boot into Linux afterwards.


Graphical glitches after updating 14.10 to 15.04

Install fglrx-updates from additional driver menu.
Start AMD Catalyst Control Center as administrator from Ubuntu menu.

Go into Display manager -> Glitch remover function (look screen) and turn it on. I stooped seeing glitches when I did that.


Where does Nautilus store its bookmarks?

The bookmarks are stored in the file $HOME/.gtk-bookmarks (Ubuntu 12.04) or $HOME/.config/gtk-3.0/bookmarks (Ubuntu 14.04)

In Linux you can't create hard links but only soft links (symlinks) for directories.


How do I launch a remote firefox window via SSH?

besides firefox -no-remote  another parameter is firefox -no-xshm which reveals the technique used to make it work.

X11 shared memory is an interprocess communication technique which can be used by all applications connected to a given x server session. It can be used to perform drag & drop, and other kind of desktop interaction.

It can be (and is) used also to implement "open once" applications, in order to reduce the footprint (or the number of windows).

Since the X11 protocol is network transparent the "shared memory" is extended also to remote X11 clients.


Screen flicker present in all operating systems after error in Ubuntu Touch [Nexus 7 2012 wifi]

No, that's a hardware problem for sure, unfourtunately.
There is just no way the Ubuntu install could have caused that.
When another OS is running, Ubuntu can not influence anything, even if it would be still installed.


DualShock 4 Bluetooth on Ubuntu 18.04: only touchpad works

The answer is given here: PS4 controller is not recognised by Steam - 18.04

It worked for me:

  sudo apt install steam-devices


@CL. gave me the idea of running a single command through ssh, triggered by a keyboard shortcut.

On the RPi, I have a script softer.sh like this:

#!/bin/bash
# Turn the volume down 10%
amixer -c0 set PCM -- $[$(amixer -c0 get PCM|grep -o [0-9]*%|sed 's/%//')-10]% > /dev/null 2>&1

This gets the current volume from amixer (which is a percentage), subtracts 10, sticks the "%" symbol to the end, and sets the volume to the result. Same for louder.sh which adds 10%.

On my laptop I set CTRL + F7 to execute:

ssh pi@igor softer.sh

and of course CTRL + F8 to

ssh pi@igor louder.sh


Submit merged Debian package for inclusion in Ubuntu

You can read more about the sponsorship process on the wiki.

There's also more to merging than resolving conflicts. One should look at the differences between the Debian and Ubuntu packages, and figure out if each one is still needed and make sure that the ones that have, have been forwarded upstream.

Personally, I don't like reviewing merges done with bzr, it's really hard to figure out what's going on. So, I suggest generating a debdiff between autogen_5.17.1-1.dsc and autogen_5.17.1-1ubuntu1.dsc, and attaching that to the bug.

Stick your nose into #ubuntu-motu or #ubuntu-devel on IRC, people will be only to happy to guide you.


Making a webapp startup at specific workspace

In chrome, open up tweetdeck. On the right-hand side of chrome, click the Menu button, then choose Settings.
In the settings tab, under "On Startup" choose "Continue where I left off"
You can close chrome, and re-open it to test. Now everytime chrome is started, it should have tweetdeck open, unless you close tweetdeck. Feel free to add other tabs or apps and it will open all those too.

From Dash Home start typing "Startup Applications" and click to open it.
Click on 'Add'.
Name it, browse for the command you want to open, add a comment if you wish.
In your case, browse to /usr/bin/ then click on "google-chrome", and hit the Open button

Now each time you startup, chrome will open, and when chrome opens, tweetdeck should be running.

I am not familiar with opening specific windows in specific workspaces, but I believe that is already answered here:
How can I get a startup application to run in another workspace other than #1?
That describes a program called devilspie as well as the Compiz method

Script to run the shortcut:

#!/bin/bash
/opt/google/chrome/google-chrome --app-id=hbdpomandigafcibbmofojjchbcdagbl --profile-directory=Default
exit 0


How to properly quote piped command for "watch"?

One option would be to escape the $ in your awk expression

watch "ls -hal ./file |awk '{print \$5}'"

Alternatively, you could avoid the issue altogether by using stat instead of parsing the output of ls

watch stat -c '%s' ./file


How do I remove the Donki extension from Chrome?

In order to remove or disable any extension in Chrome, you must first visit the settings page for your installed extensions at chrome://extensions which can be accessed by typing the same into your search/URL box.

This is a local settings page within your Chrome browser and you do not need to be connected to a network to access it.

The list of installed extensions on your browser and an enable/disable option for each extension will be displayed.

There will be a bin icon alongside the extension which you wish to uninstall (in this case the Donki extension) which will allow you to completely remove that extension from your browser.


The package you want is ubuntu-terminal-app, but it's been installed by default in the device images for weeks now.  Try going to the Apps lens and using the search (upper-left corner) to find it.


Why does ubuntu have a separate package for unison version 2.27.57?

Unison  insists on having exactly the same version at both ends of the connection. Each version depends on a particular version of the system C libraries. So if ONE of the machines on which you work happens to have an old version of these libraries, you have to use the corresponding old version of Unison on ALL of the machines that you use.


Different /bin/bash shells for admin and non-admin users?

I fixed my both my problems.

All that's needed is to source path/to/user/.bashrc

I get a proper prefix:

appmanager@Nebulous-Linux:/$

and my aliases also work.

appmanager@Nebulous-Linux:/$ helloworld
Hello, World!

I also apologize for misuse of the AskUbuntu Q&A site. Thanks for the tip @Fabby


Windows refused installing due unexistant ntfs partition

I've seen similar reports elsewhere. Apparently Windows, or at least the Windows installer, sometimes misdetects a Linux-created ESP as being NTFS. My suggestion is to back up the ESP, create a fresh FAT32 filesystem on it, restore its contents, and try again. (Be sure it's FAT32, not FAT16. Depending on the filesystem size, you may need to set this explicitly with the -F option to mkdosfs.) You'll need to edit /etc/fstab to adjust the "UUID" (really a serial number) associated with /boot/efi to get it to mount properly in Ubuntu when this is done.

If this fails, try this one more time, but this time, create the filesystem on the ESP using a Windows emergency disk. This may require jumping through some extra hoops, but I don't know the details of what you'd need to do, since I'm not familiar enough with the Windows tools.


Access terminal from login screen on Ubuntu 18.04

chvt [n]

Source: http://manpages.ubuntu.com/manpages/trusty/man1/chvt.1.html

And while in a tty, shift + {left,right} arrow key to change screens.

This can also be an issue with your login manager preventing the process. For example, some Ubuntu based distributions use SDDM as the default manager and there is a bug that can prevent changing ttys. A solution would be to disable your login manager and either starting Xorg with startx (with the appropriate commands in ~/.xinitrc) or systemctl start your-login-manager.

# systemctl disable sddm
# shutdown -hr now
...
login:
password:
$ startx
    or
$ sudo systemctl start sddm


How to run crontabs with sudo R CMD BATCH?

Try following Rscript filePath.R

I mean your cron entry get modified as

00 12 * * * sudo Rscript /home/.../test.R

Let me know if any issues.


When you have Empathy open, press F4 to open the account manager. Click the + button in the lower left corner. Select "Jabber" as account type. Jabber and XMPP is the same thing. XMPP is just a new name.


How to prevent Firefox updates per app version (preferences outside of profile folder)?

Ok, here is a workaround, until a proper answer arrives; the concept is:

Create a folder for a "specific" profile inside the application folder
Create a bash script that will run firefox from the application folder, with the "specific" profile created earlier (in 46, both firefox and firefox-bin files are binary)
Once this "specific" profile folder is initialized, create a user.js inside with the required preferences

Here is all of that in a bash script:

wget https://ftp.mozilla.org/pub/firefox/releases/46.0.1/linux-i686/en-US/firefox-46.0.1.tar.bz2
tar xjvf firefox-46.0.1.tar.bz2
mv firefox firefox-46.0.1

# create a new, "specific" profile folder
mkdir firefox-46.0.1/profile-46

# create a new bash script to run firefox:
cat > firefox-46.0.1/firefox46.sh <<'EOF'
#!/usr/bin/env bash
# set -x
# SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # nowork 4 symlink
SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
cd ${SCRIPT_DIR} # just in case
# -no-remote implies --new-instance.
exec "${PWD}/firefox" -profile "${PWD}/profile-46" -new-instance
EOF

# make bash script executable:
chmod +x firefox-46.0.1/firefox46.sh

# run once, just to init the profile-46 directory, then exit manually:
./firefox-46.0.1/firefox46.sh

# create user.js to override; firefox-46.0.1/profile-46/prefs.js should not be edited manually
# (https://developer.mozilla.org/en-US/docs/Mozilla/Preferences/A_brief_guide_to_Mozilla_preferences)
# (http://practical-admin.com/blog/firefox-customization-file/)
cat > firefox-46.0.1/profile-46/user.js << 'EOF'
pref("app.update.auto", false);
pref("app.update.enabled", false);
pref("app.update.silent", false);
EOF

# finally, symlink to /usr/bin:
sudo ln -s $PWD/firefox-46.0.1/firefox46.sh /usr/bin/firefox46

Now, whenever I start firefox46 from the terminal, Firefox 46 starts with the right profile, and does not want to update anymore, which is what I wanted...


Locked black screen after upgrading from 14.04 to 14.10

You should hit Shift during boot and get to the terminal and update everything:

sudo apt-get update
sudo apt-get upgrade


How to install aircrack-ng latest version

Since you are on the 16.04, this version already comes (As of the 13th of August 2016) with the latest version of aircrack-ng. So the only needed way would be a simple:

sudo apt install aircrack-ng

The version right now is 1.2-0~beta3-4 which corresponds to the latest one on the official Aircrack page.


Why does my apache still do nothing after a complete purge and reinstall?

fixed by simply restarting apache.

sudo /etc/init.d/apache2 restart


I had the same problem, Ubuntu showed all printers in my job(about 50). I tried to disable dbus as suggested in this post, but i found out that when I tried to print something it took a considerable time to show any printers or preview. So I actually removed the avahi-daemon by
sudo apt remove avahi-daemon

It did the trick and at this point i haven't found any problems or faulty services/devices.


This is a problem with the theme https://github.com/vinceliuice/Qogir-theme/issues/17


Unable to resize Win partition under Ubuntu

Before you continue with any other experimental changes, you should make a complete backup of your Windows Installation.


How do I install pygame in a pyenv virtualenv for Python 2.7 on Ubuntu 12.04?

This assumes you have pyenv installed for your project (~/my-project-dir) and your virtualenv (my-pyenv-virtualenv) is set up.

To get latest Pygame source, see: http://www.pygame.org/download.shtml

sudo apt-get build-dep python-pygame
sudo apt-get install libv4l-dev
cd /usr/include/linux/
sudo ln -s ../libv4l1-videodev.h videodev.h
cd ~/my-project-dir
~/.pyenv/versions/my-pyenv-virtualenv/bin/pip install http://www.pygame.org/ftp/pygame-1.9.1release.tar.gz

To test

~/.pyenv/versions/my-pyenv-virtualenv/bin/python -c "import pygame; print(pygame.vernum)"


Does the iPod Shuffle 4th Gen work well with Rhythmbox?

I had issues initially getting both my shuffle 2nd generation and later my 4th generation to work under 12.04 with Rhythmbox.  I wish I could tell you exactly what steps worked for me but from the sequence of things I tried I really can't pinpoint pit.  I can offer some things to try that worked for me though.

First, go into Rhythmbox Preferences -> Plugins and disable the iPod and MTP support.  Close Rhythmbox and attach your iPod shuffle.  It should recognize and not prompt you to initialize it.  If it still does, try re-enabling the plugins and then connecting your iPod.  Or, maybe even try a combination of doing this while disconnecting and reconnecting the iPod.  Eventually Rhythmbox will be able to access the iPod.  Those plugins just have strange behavior.

Next, add a couple songs to your music folder and sync the iPod.  Eject it.  Close Rhythmbox and try to play the iPod through headphones.  If the 2nd generation just blinks the orange light or the 4th generation tells you sync with iTunes, then connect it again.  Open up Rhythmbox, don't add more songs, just sync it again.  Disconnect it.  Try to play it through headphones.  Rinse, lather, repeat.  If at this point things are still not playing, try fiddling with the plugins again, disabling and re-enabling them and disconnecting and reconnecting the iPod while between disabling and re-enabling the plugins.

Seriously, I did this for both my 2nd generation and 4th generation iPod shuffles and eventually they actually played.  From there on out I had no problems adding music and syncing it ever again with Rhythmbox.

Note, not once did I have to connect either device to the actual iTunes Windows software.

Further note, iPod Shuffle 4th generation sometimes shows the voiceover .wav files in the list of iPod contents in Rhythmbox.  I deleted these a couple times in Rhythmbox without knowing what they were but the iPod seemed to keep putting them back -- it won't hurt if you do delete them in Rhythmbox.  Eventually once the iPod starting playing these no longer showed up in the list of music on the device in Rhythmbox.

I know this all sounds a bit crazy but it really works.


vgaswitcheroo: client 101 refused switch (Radeon HD5650/Intel Hybrid), can't use discrete graphics card

OP's own answer:

I think I've found a solution. It's just a sequence of steps that I tried and seems to work -- my discrete graphics card is powered on.

While you are logged in:

Go to terminal
enter sudo su
cd /
echo DDIS > sys/kernel/debug/vgaswitcheroo/switch
logout from your session.

You should be at the login screen now (when I did it, it came to an empty login screen with the ubuntu logo in the middle). Open up the terminal (Ctrl-Alt-F1).

sudo su
cd /
service lightdm stop

After I inputted the last command, it outputted

client 1 refused switch
client 101 refused switch

So it must still not want to switch over to the discrete card. BUT.....

input echo DIS > /sys/kernel/debug/vgaswitcheroo/switch

and it says that my integrated graphics card is switched off!!!!

input service lightdm start

and you're taken to the login page! cat sys/kernel/debug/vgaswitcheroo/switch now says:

0:IGD: :Pwr:0000:00:02.0
1:DIS:+:DynPwr:0000:01:00.0
2:DIS-Audio: :Pwr:0000:01:00.1

and my discrete card is turned on!

I don't know if it will revert back to the integrated card if I power off my computer, but at least this is a method that seems to work -- I don't mind doing it every time if I have to.


Using fonts with older apps (ctwm, ical), and finding more fonts to use

They use different systems and point to different directories, I refer you to this discussion on linux.com for more explanations.

Coming back to your problem, what you want to do is that the X font system management indexes also the other folder, like the new system does.

Unfortunately this is not straight-forward.
The X system uses bitmap font formats (according to this), so in principle you cannot use .ttf files straight away.

First you have to convert them to any of the formats stated above and then you can follow that guide to add them all to the underlying X system.

Please not that I did not try it, but also this other source seems pertinent here. You probably just have to pay attention that ttmkfdir does not exists anymore and it has been replaced (a long time ago, according to this) by mkfontdir and mkfontscale.


1.You can use live CD/DVD/USB to try Ubuntu on your Samsung series 5 A6 Ultrabook without installing it, so that you can be sure whether Ubuntu is working properly on your system or not and are drivers available or not.
2. And if you love Gnome 3, you can use it on Ubuntu instead of default Unity Desktop, you just have to download and install it.
3. Yes there are differences in performance, installing Ubuntu as separate OS is good in performance as compared to if you install Ubuntu as an application in windows 7 through wubi installer.


The obvious answer would be the roll-back the changes you made, if you must keep the current driver version, then probably researching the issue with the current version would be the best of course. From what I know, this is actually an issue where the boot process does not recognize the display manager to default to, and so it halts on the splash screen. This is either because the install is somehow either not correct anymore or the hook to which display manager it should launch is missing/broken.
proceed like this:
sudo apt purge linux-image-$VERSION-generic linux-headers-$VERSION\*
sudo apt-get purge gdm3
sudo apt-get install gdm3 ubuntu-desktop
sudo dpkg-reconfigure gdm3
reboot

Hope that works. And ofc replace the $VERSION for your current linux image version. uname –r


How do I change the bad action I selected as default on USB stick insertion?

You didn't mention what version of Ubuntu you are using.

See if the system menu/indicator (button in the top-right corner) has an About this computer item (or something like that).
If yes, press it. That's where you can do what you are asking.

If not, then you'll have to search in the System Preferences for those option (I don't remember where they were in older Ubuntu versions).


Problems with Dropbox and Nautilus in 16.04

You installed regular dropbox, and it works, yes?

If memory serves me correctly, nautilus-dropbox is broken. Uninstall it using Synaptic, and you should be fine.

Let us know if that solves your problem, or if you have further questions.

edit: as per our discussion in the comments...

Using Synaptic, enter dropbox into the search area, and you should see dropbox, and nautilus-dropbox. Right-click on nautilus-dropbox and select Mark for complete removal. Left-click on dropbox and select Mark for installation.

Then go back to the search box and enter g15daemon, right-click and select Mark for re-installation.

Then click the APPLY icon. After it's done, exit Synaptic. Dropbox may ask you to restart Nautilus by clicking the OK button. Confirm that dropbox is working normally, as expected. See if your problem with Chrome/etc is resolved. If not, start a new question thread.


What is the difference between "chmod +x" and "chmod 755"?

Short version:

To be able to compare them, we should look at them from the same perspective, so:

chmod +x is equal to chmod ugo+x (Based on umask value)
chmod 755 is equal to chmod u=rwx,go=rx

Explanation:

Firstly you should know that:

+ means add this permission to the other permissions that the file already has.
= means ignore all permissions, set them exactly as I provide.

So all of the "read, write, execute, sticky bit, suid and guid" will be ignored and only the ones provided will be set.

read = 4, write = 2, execute = 1

Here is the binary logic behind it (if you're interested):

Symbolic:  r-- -w- --x  |  421
Binary:    100 010 001  |  -------
Decimal:    4   2   1   |  000 = 0
                        |  001 = 1
Symbolic:  rwx r-x r-x  |  010 = 2
Binary:    111 101 101  |  011 = 3
Decimal:    7   5   5   |  100 = 4
           /   /   /    |  101 = 5
Owner  ---/   /   /     |  110 = 6
Group  ------/   /      |  111 = 7
Others ---------/       |  Binary to Octal chart

Using +x you are telling to add (+) the executable bit (x) to the owner, group and others.

it's equal to ugo+x or u+x,g+x,o+x
When you don't specify which one of the owner, group or others is your target, in case of x it will considers all of them. And as @Rinzwind pointed out, it's based on umask value, it adds the bit to the ones umask allows. remember if you specify the target like o+r then umask doesn't have any effect anymore.
It doesn't touch the other mods (permissions).
You could also use u+x to only add executable bit to the owner.

Using 755 you are specifying:

7 --> u=rwx (4+2+1 for owner)
5 --> g=rx (4+1 for group)
5 --> o=rx (4+1 for others)

So chmod 755 is like: chmod u=rwx,g=rx,o=rx or chmod u=rwx,go=rx.


Apt unmet dependencies while installing R on Ubuntu 16.04

My problem is solved.

I had put the wrong source in my sources.list to download the latest version of R. Following the instructions given in https://cloud.r-project.org/, I had put deb https://cloud.r-project.org/bin/linux/ubuntu cosmic-cran35/ instead of deb https://cloud.r-project.org/bin/linux/ubuntu xenial-cran35/.

By modifying the source, everything works fine now.


How do I set networking enabled by default?

From the network-manager applet menu (right click), select edit connections. Edit the connection you wish to automatically connect and select the connect automatically checkbox.

If you wish to start a connection before you log in, select the available to all users checkbox. This is most useful with wireless connections which usually are available only after login.


What is the easiest way to reinstall 14.04 LTS?

Note: If you already have Ubuntu installed, then you should follow this guide on how to reinstall in Ubuntu.

Download Unetbootin from here.
Run Unetbootin.
From the drop down menu under Type: select Hard Disk
Next select the Diskimage. Browse to the directory where you downloaded the iso file.

Press OK.
Now restart your computer. Select Unetbootin when the menu appears where it shows your operating system. It should look something like this:

Afterwards, simply proceed with the installation as normally.
Now you should be able to install Ubuntu without a USB or a CD.

Another alternative that you can do is use your Android phone. There is an application on the Google Play Store titled DriveDroid that you can get here. The interface will assist you to get Ubuntu on your machine. You will need to have root to use this application.


The command alsactl store saves the mixer settings into /var/lib/alsa/asound.state; the command alsactl restore reloads them.

In theory, these commands should be executed automatically when the computer is started up and shut down.
Check whether that file exists, and if the saved mixer controls have the correct value.
If not, you might need to execute these commands manually.


How do I change the title bar buttons on Kubuntu?

In KDE GUI apps do most of the things you need. Just open systemsettings app and move into Workspace Apperance. In section Window Decorations there is a button called Configure Buttons click on it there is all you need.


How to configure ccsm from the command line or a script?

Go to a machine where you have set up a working configuration, and copy the file ~/.config/dconf/user to a USB stick or whatever.

Now go to the client machine.  Rename ~/.config/dconf/user to ~/.config/dconf/user-2016-06-16, and paste the config file from your computer that's set up the way you want it into the same place on the new machine.

If it doesn't work or messes something up, just copy the backed up file back to it's original place, over-writing the new config file.


After a while integrated webcam is disconnected

I think the webcam is actually dead! It just happened to me too for no reason on my Compaq CQ100 notebook, didn't do any updates or anything! Found this thread googling for the same problem..

Whenever i try to initialize the camera the LED next to it briefly lights up then goes out.. No video. Trying again the application (guvcview) tells me there is no camera detected. Looking at the dmesg output i can see that the camera just disconnects as soon as i try to start it.

sudo rmmod uvcvideo && sudo modprobe uvcvideo

brings /dev/video0 back but it keeps failing...

[   74.525794] usb 1-4: USB disconnect, device number 3
[   74.526429] uvcvideo: Failed to resubmit video URB (-19).
[   74.724449] hub 1-0:1.0: unable to enumerate USB device on port 4
[   74.996089] usb 1-4: new high-speed USB device number 5 using ehci-pci
[   75.160048] usb 1-4: New USB device found, idVendor=10f1, idProduct=1a13
[   75.160063] usb 1-4: New USB device strings: Mfr=2, Product=1, SerialNumber=0
[   75.160074] usb 1-4: Product: HP Webcam-50
[   75.160084] usb 1-4: Manufacturer: importek
[   75.162549] uvcvideo: Found UVC 1.00 device HP Webcam-50 (10f1:1a13)
[   75.200842] input: HP Webcam-50 as /devices/pci0000:00/0000:00:1d.7/usb1/1-4/1-4:1.0/input/input11
[  144.715843] usbcore: deregistering interface driver uvcvideo
[  150.517385] uvcvideo: Found UVC 1.00 device HP Webcam-50 (10f1:1a13)
[  150.555981] input: HP Webcam-50 as /devices/pci0000:00/0000:00:1d.7/usb1/1-4/1-4:1.0/input/input12
[  150.561353] usbcore: registered new interface driver uvcvideo
[  150.561364] USB Video Class driver (1.1.1)


updating latop to 13.04 raring / no gui but only terminal is present

If you haven't tried Ctrl+Alt+F7 yet, try that. It switches between terminals and GUI (sometimes).


why is the directory not found from my dragged and downloaded file?

You must use the / symbol to separate directories.
You've used \ which resulted in a syntax error.


Could sensors-detect have done anything bad to my machine

It appears running the last part of sensors-detect can overwrite values in an EPROM controlling the LCD display on some laptops. If your display looks fine there is no damage.

See Archwiki sensors-detect discussion for more details.


It is quite common for people to have a good mixture of different video file formats they would like to manage, the problem with this is that often some of these formats are not easy to tag, for instance .flv files, the format I find most easly taggable both from the command line and with gui applications is the .mp4 format with H.264 video and aac audio.

The .mp4 format videos can be tagged with itunes compatible metadata quite easily with mp4tags from mpeg4ip-utils, mp4tags is command line based, a good GUI application that can batch tag these files is  Easytag-aac, you can also use the VLC media player to do .mp4 tagging but without the batch feature.

It is not always a good thing to convert one compressed video to another, for instance when one container does not support the codec from another container a simple lossless demux and remuxing will not work the video or audio or both will have to be transcoded which is time consuming and will result in even more loss.

Since there are so many different formats around it may get unweildly to have to convert all your files to one format I believe the best option is to use something that will keep information about the files that can not be tagged or which are not easy to tag in an external database. while still reading the tags of those that can be easily tagged.

For this I would recommend the media player called Banshee. Banshee will read the metadata embedded in the video files much the same way it reads the metadata in audio files. If no metadata is embedded in some videos Just import them  into the program then you can enter the necessary information about these videos in the banshee interface, much the same way you do your music, the only thing is that this information will be stored in the Banshee sqlite database, and not the file itself, not a big broblem in some cases.

If banshee is not an option for you for any reason at all and you would like all videos to be  tagged I would recommend that you convert the ones that are difficult to tag to the ones that are easy. See below for some tools you can use for tagging different formats.

SUMMARY

TAGGING

FOR MP4

install mpeg4ip-utils this provides mp4tags, a commandline based tagging tool for .mp4 files.

Install Easytag-aac good GUI tool for tagging .mp4 and some other formats. useful when you need to update many files at once

Install VLC media player for a GUI based one at a time metadata editing.

use mp4tags like this:

mp4tags -a "Author Name" -s "The Video Title" -g "The Genre" -A "The Album" "file.mp4"

file.mp4 will be updated with the metadata.

FOR OGG THEORA

Install oggz-tools, provides oggz-comment, this is command line based tool for tagging ogg vorbis and ogg theora files.

use oggz-comment like this:

oggz-comment input.ogv TITLE="The Title" ARTIST="The Artist" ALBUM="The Series" LICENSE="None" DATE="2011" ORGANIZATION="Big Org." LOCATION="Somewhere" COMMENT="This is a test" -o output.ogv

input.ogv is the file to tag, output.ogv is the tagged file.

FOR AVI

Install ffmpeg, commandline based tool for working with audio and video.

use ffmpeg like this to add metadata to some .avi files:

ffmpeg -metadata title="Video Title" -metadata artist="Video Artist" -metadata genre="Video Genre" -metadata comment="Video Comment" -acodec copy -vcodec copy -i "inputfile.avi" new.avi

inputfile.avi is the file to be tagged and new.avi is the tagged file.

Tested with .avi container having; DivX MPEG-4 Version 5, XVID MPEG-4 and Flash Video 1.all with .mp3 audio.

FOR MATROSKA MKV

Install mkvtoolnix,a Set of command-line tools to work with Matroska files

Install mkvtoolnix-gui,a Set of tools to work with Matroska files - GUI frontend

The metadata in the matroska container does not seem to be well understood by some media players.

Read more about mkvmerge and its gui here:

http://www.bunkus.org/videotools/mkvtoolnix/doc/mkvmerge.html

http://www.bunkus.org/videotools/mkvtoolnix/doc/mkvmerge-gui.html

Read more about the matroska official tags specifications:

http://www.matroska.org/technical/specs/tagging/example-video.html

http://www.matroska.org/technical/specs/tagging/index.html

MANAGEMENT

Install banshee Media Management and Playback application. Import tagged files, enter manually the information for files that could not be tagged with the above tools, always remember to backup banshee's database, before you import give your videos good file names so you will not have to change them afterwards. Decide on a good location for your video storage.

If you do not want to use banshee as a media manager my next suggestion would be the VLC media player from VIdeo Lan, do not let the simple interface fool you, this is a very useful media player outside of just playing media, the playlist button is quite misleading, one would believe that all you have there is something to view or create playlists but this brings up a handy tool that can be used as an interface to the open .xspf playlist format, vlc does a fairly good job of using this playlist format as a flat database it creates a file called ml.xspf in ~/.local/share/vlc so you can back this up, the interface to this file once you get used to the tree view nature is quite handy for searching organizing and playing your videos.
Ironically the Media library aspect of this interface works much better than the Playlist aspect.

You can right click on an empty area in the media library window to create folders and drag other folders to them, the folders created in the Media Library window will only exist in the .xspf xml file, whenever you import a folder all the subfolder structure will be imported, this is good if you have a folder system that organizes your files already and you want the same structure in your media library, if this is not desired you can drag out any folder and place them under any other folder or in the root of the tree structure, individual folders can also be imported and placed anywhere in the tree.

You can view the Playlist interface by clicking view in the menu and then click the Playlist item.

More on VLC playlist usage here; http://wiki.videolan.org/Documentation:Play_HowTo/Basic_Use/Playlist

All the software recommended are available in the repositories, just search in synaptic or software center.


HDA Intel ALC269VB internal mic only records a high-pitched whine

David Henningsson suggested simply changing the input connector to "Internal Mic". That fixed it!

See launchpad issue 799058 for details.


Low resolution icons in the application switcher


Left click not working, right click sporadic

A stuck CTL, ALT, Windows or Menu key (assuming a Windows marked keyboard) can cause click activity to change meaning (often seeming to do nothing), regardless of hardware source.  Try cleaning the keyboard (method varies on laptops; some have removable keycaps, most don't) to see if that improves the situation.


How do I view pictures using links2 browser IN terminal?

Links2 will generally start up with a blank page. The text in the menu bar also doesn't show up, which can be confusing, since it looks like an almost completely blank window

To work with the blank page, you can press G and enter a URL to visit. You can also click the lighter-colored menu bar at the very top to display the menus.

To avoid the blank page, run links2 -g https://www.google.com (or some other site), which initially loads that web page rather than a blank page.


How can I activate MySQL Database Server?

Try to start mysql server through command line.

sudo service mysql start

or

sudo /etc/init.d/mysql start


Sign into MyApps.
Click on the package name.
At the very top of the Package Overview page, under the MyApps header bar, you should see:

Your package icon
Your package name
A rubbish bin (trash can) icon

Click the icon, click Yes on the confirmation page, and the package is gone.


Minitube and smtube not able to connect to youtube, but youtube works fine in browser

I have found the solution, at least for me:
I only wanted a youtube client. mps-youtube works quite well for me.


Some windows, like save dialog boxes and even worse, some preferences windows have a fixed size determined by the program so there is no universal setting.

There is a workaround. Although it not a very nice solution, you could move the window by pressing Alt and drag the window to show the hidden part of it.


${string%.*} will remove the shortest trailing portion matching .*

See for example Parameter Expansion in the excellent BashGuide


nmcli problem after the installation of network-manager

As you can see by the netplan .yaml file, your ethernet connection is currently being managed directly by netplan. There is nothing inherently wrong with this. I assume that the ethernet works properly as is. However, if you wish for Network Manager to manage the ethernet connection, please amend the .yaml file:

sudo rm /etc/netplan/*.yaml
sudo nano /etc/netplan/01-network-manager-all.yaml

Write a new file:

# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager

Indentation and spacing are crucial; proofread twice. Save (Ctrl+o) and close (Ctrl+x) the text editor. Follow with:

sudo netplan generate
sudo netplan apply
sudo service network-manager restart

You should be all set.


How can I safely remove (unmount) an external hard drive from the Desktop?

The script presented below must be placed into ~/.local/share/nautilus/scripts and changed permissions to executable (via command-line with chmod +x or via right-click in Nautilus). The script performs unmounting and powering-off of a drive for safe ejecting.

Also available on GitHub.

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import os
import subprocess
import urllib.parse
import dbus

def get_dbus( bus_type, obj, path, interface, method, arg):
    """ utility: executes dbus method on specific interface"""
    if bus_type == "session":
        bus = dbus.SessionBus()
    if bus_type == "system":
        bus = dbus.SystemBus()
    proxy = bus.get_object(obj, path)
    method = proxy.get_dbus_method(method, interface)
    if arg:
        return method(arg)
    else:
        return method()

def get_dbus_property( bus_type, obj, path, iface, prop):
    """ utility:reads properties defined on specific dbus interface"""
    if bus_type == "session":
        bus = dbus.SessionBus()
    if bus_type == "system":
        bus = dbus.SystemBus()
    proxy = bus.get_object(obj, path)
    aux = 'org.freedesktop.DBus.Properties'
    props_iface = dbus.Interface(proxy, aux)
    try:
        props = props_iface.Get(iface, prop)
        return props
    except:
        return None

def get_mountpoint(dev_path):
    try:
        contents = [
            'system', 'org.freedesktop.UDisks2', dev_path,
            'org.freedesktop.UDisks2.Filesystem', 'MountPoints'
        ]
        data = get_dbus_property(*contents)[0]

    except:
        return None
    else:
        if len(data) > 0:
            return ''.join([chr(byte) for byte in data])

def find_partition(selected):

    contents = [
        'system', 'org.freedesktop.UDisks2', '/org/freedesktop/UDisks2',
        'org.freedesktop.DBus.ObjectManager', 'GetManagedObjects', None
    ]
    objects = get_dbus(*contents)
    for item in objects:
        try:
            if 'block_devices' in str(item):
                mountpoint = get_mountpoint(item)
                if not mountpoint:
                    continue
                mountpoint = mountpoint.replace('\x00', '')
                mp = str(type(mountpoint))
                if selected == mountpoint:
                    return  '/dev/' + item.split('/')[-1]

        except Exception as e:
            sys.stderr.write(e.__repr__())
            subprocess.call(['zenity','--error','--text',str(e)])

def main():

    uri = os.getenv("NAUTILUS_SCRIPT_SELECTED_URIS")
    uri_decoded = urllib.parse.unquote(uri)
    mountpath = uri_decoded.replace('file://','').strip()

    part = find_partition(mountpath)

    try:
        unmount = ['udisksctl', 'unmount', '-b', part ]
        subprocess.check_output(unmount, stderr=subprocess.STDOUT)
    except subprocess.CalledProcessError as e:
        subprocess.call([ 'zenity', '--error','--text', e.output.decode()])

    # Try to power off the drive ( this is for ejecting USBs)
    # If it's a hard-drive with more than one partition in use, disk
    # won't power-off
    try:
        poweroff = ['udisksctl', 'power-off', '-b',part]
        subprocess.check_output(poweroff, stderr=subprocess.STDOUT)
    except subprocess.CalledProcessError as e:
        pass

if __name__ == '__main__' :
    try:
        main()
    except Exception as e:
        sys.stderr.write(e)
        subprocess.call(['zenity','--error','--text',str(e)])


sizing unity window issue when running as VM under virtualbox

Start your Virtual Machine

Select 'View' in menu bar

Select 'Auto resize guest display' option

Install Guest Additions and Extension Pack.

Also, if you installed Virtualbox from the software center, uninstall it and get the latest version from here: virtualbox.org/wiki/Downloads


Wayland freezes while playing video on 18.04 using VLC

Looks like it a VLC bug than a Wayland bug. I tried playing the video using the default Video player and Kodi. Both worked fine.


How do I get my machine to boot with a Grub: out of disk error?

At last a solution.

The solution suggested Jacques Botha did not work -- the Live CD ignores the added instruction to align the disk.

However, buried in the base of the launchpad bug trail is a suggestion to use partitioning software to generate the partition and align it manually before doing the installation. So my solution was to boot the Live CD and use gparted to make the partition and set it to be ext3.

This done, I booted from the CD and used text based installation but did not allow it to repartition the disk. Thus it has now installed Ubuntu 10.04 into an ext3 (not ext4) disk system. Thus I am not certain if the problem was ext4 or the disk partitioning but the system is up and running.

A point for the Ubuntu dev team: I think the Live CD has now gotten so heavy that a “lightweight graphical system” or a “textual live boot” is required for older machines and some servers. Even eliminating the eye candy would make such a difference as machines like mine only just run the full eye watering system.


How can I mount an Amiga (FFS) formatted hardrive?

To mount a drive with a special filesystem we may need to tell the mount command what type of filesystem we have. Supported filesystems are:

  adfs,  affs,  autofs,  cifs,  coda,  coherent,  cramfs, debugfs, devpts, efs, ext, ext2, ext3, ext4, hfs, hfsplus, hpfs, iso9660, jfs, minix, msdos, ncpfs, nfs, nfs4, ntfs, proc,  qnx4, ramfs,  reiserfs,  romfs,  squashfs,  smbfs, sysv, tmpfs, ubifs,udf, ufs, umsdos, usbfs, vfat, xenix,  xfs,  xiafs.Manpage mount

Before we can mount the drive we need to define a mountpoint e.g. like this:

sudo mkdir /mnt/amigadrive

After that we can mount an amiga filesystem on drive /sdx (replace X by the letter given to your drive, e.g. /sdc) to this mountpoint by this command

sudo mount -t affs /dev/sdx /mnt/amigadrive

A prerequisite is that the drive was recognized by the BIOS (which may be an issue for a very old drive).


This is merely a tip: Open synaptic, and search for r-cran or just r-, there's a r-recommended GNU R collection of recommended packages [metapackage] I believe this is the one you're looking for.


Pressure sensitivity Huion 220 GT Ubuntu 16.04

Per https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1675473 , it works on 17.04 out of the box.


killing the master process spawned by an at command

The at command will terminate as soon you create the "at" job. The job is initiated by the at daemon (atd), which you dont want to kill or it wont spawn anything else.

You actually want to kill the bash process running $thisFile (search for bash $thisFile in the ps output)

You could also modify the script to include its PID in the message it sends: notify-send "$$: word", so you know which process to kill straight away


how to set a PATH of ProofPower in Ubuntu 12.04

Pretty easy: the line you need is simply

export VARIABLE=VALUE

in your case

export PATH=$PATH::/home/username/pp/bin/

the meaning should be straightforward: you're adding an entry to your PATH.
you may want to add it to your shell configuration file .bashrc (or .zshrc) if you want to change just one user's PATH, and otherwise you may want to have a look at general configuration files such as /etc/profile.


The service is probably still present. If so these files will be on your system:

/etc/mediatomb.conf
/etc/init.d/mediatomb

The software should be installed in:

/etc/mediatomb/

If still present remove that too.

apt-get remove will not remove everything; apt-get --purge remove removes config files too. But manually added upstart scripts you need to remove yourself.


Where is TexLive2012 after installing it via ISO?

which tex should give you an answer, if it does not, you may have skipped the Post-install: setting PATH step from http://tug.org/texlive/quickinstall.html, which basically reuires you to add binaries path to your path environment. In my ~/.bashrc I have

PATH=/usr/local/texlive/2012/bin/i386-linux:$PATH


According to the pgrep man page (emphasis mine):

Notes
The process name used for matching is limited to the 15 characters present in the output of /proc/pid/stat. Use the -f option to match against the complete command line, /proc/pid/cmdline.

The reason is that process names are limited to 16 bytes including the NULL termination byte. From the prctl manpage:

PR_SET_NAME (since Linux 2.6.9)
Set the name of the calling thread, using the value in the location pointed to by (char *) arg2. The name can be up to 16 bytes long, including the terminating null byte. (If the length of the string, including the terminating null byte, exceeds 16 bytes, the string is silently truncated.)

See What is the maximum allowed limit on the length of a process name?


Try to reinstall grub by following these steps:
https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows


Especially Suspend-and-Resume work better with a later kernel.
Installing a newer kernel is easy and even if it doesn't work, you can choose your old kernel in the grub menu when booting.

To install a kernel, please have a look at the wiki-page

I'd recommend 3.1.2 from here because it's the latest stable version.

You need to download 3 files, the linux-headers-generic, linux-headers-all and linux-image file.

Install the 3 files with

sudo dpkg -i linux-*.deb

If your computer complains about a missing module-init-tools package, you can download that here.

Install it with sudo dpkg -i module-init-tools*.deband repeat the install of the 3 kernel files.

After the installation is complete, simply reboot and you will boot with your new kernel.
To make sure you are running your new kernel, open a terminal and type

uname -r

the output should be your new kernel.


Is there a dock, that works as a gnome panel applet?

I think DockbarX is what you are looking for. It is an icon based dock that works as a panel applet. You can install it from a ppa.


Vagrant fails to load because grub2 waits for kernel selection after ungraceful shutdown

First, get the machine id

# Before v1.1
# MACHINE_ID=$(awk -F\" '{print $6}' .vagrant)
# After v1.1
MACHINE_ID=$(cat .vagrant/machines/default/virtualbox/id)

Power off the VM

VBoxManage controlvm ${MACHINE_ID} poweroff

Then boot the machine with a GUI console

VBoxManage startvm ${MACHINE_ID}

Wait for it to boot, login, run:

sudo update-grub

When successful, shut it down

VBoxManage controlvm ${MACHINE_ID} poweroff

And after this, vagrant up will just boot your VM normally

Source


Probably. The CPU is not that useful to know - all modern CPU's work just fine with whatever you throw at them. For a server the following is important:

Supported disk controller.
Supported network cards.
Supported chip set.

HP has an affinity for Broadcom NIC's. I'm not terribly fond of BCM, but they tend to work just fine. Anyway, a gigabit Intel NIC costs you ~20-30$, and will work flawlessly. So this is not much of a worry in my opinion.

The real kicker here is the disk controller. HP lists the following options:

Integrated SATA 6.0 Gb/s;
LSI MegaRAID® 9270-8i SAS 6.0 Gb/s ROC RAID Card and iBBU09 Battery Backup Unit (optional);  LSI 9217-4i4e
8-port SAS 6.0 Gb/s RAID (optional);
Factory integrated RAID available for SATA/SAS drives (RAID 0, 0 Data, 1, and 10);
Factory integrated RAID available for PCIe SSDs (RAID 0 Data)

The Integrated SATA is probably a standard Intel chipset SATA port, and will probably work just fine, and can be used with Linux Software raid for multiple drives.

The Megaraid 9270 appears to be fairly well supported as well.

Regarding the three last options, they are not specific, and may or may not be fake-raid / software raid. In this case - use the builtin Intel SATA ports and Linux software raid if you desire redundancy options.

So overall: Yes, it will probably run Linux. The easiest way to figure out how well is probably to install Ubuntu. Note what's not working properly, and find a solution for the problems that arise.


Libreoffice file locking issues in 19.04, no problems in 18.10

I had issues too with Libre Office not starting after the 19.04 upgrade. I fully uninstalled Libre Office, restarted and reinstalled and it seems to be working again:

sudo apt-get remove --purge libreoffice*
sudo apt-get clean
sudo apt-get autorermove

reboot

sudo apt-get install libreoffice