gedit top menu invisible when started from terminal and using x11-Forwarding

I found the answer after all:
If you're using X11 forwarding, don't forget to look at the ~/.config/ for the user actually running gedit!  Not the ~/.config/ of the user that the application is displayed in!
In this particular case, deleting the ~/.config/gedit solved this particular problem as gedit just recreates it afterwards. (dumb me: I should have renamed it and looked what the differences were, so I could have posted the perfect answer, but at the time, I was trying to solve another problem)

Original answer:
Too bad no one found any answer, so I'll post my own work-arounds as a "solution"
(I know though they're not really "solutions"; they're just "work-arounds")

Use the toolbar for the most-often used commands.
Use the Keyboard short-cuts:
As the only menu-item I'm really missing from the toolbar is "File - Save As", I just press Alt+F and the menu seems to be coming out of the system menu when using this workaround.  Then just press A for "As" and you get to the "Save As" dialog...

The same system can be used for Edit, View, Search, Tools, Documents and Help


Is it safe to save virtual machine state between host reboots if VM uses external drive?

Is it safe to save state of the guest OS when the host laptop is being rebooted?

It is not safe only if at least a program in the virtualized OS has write access and is writing the moment you save the state.
In any case, I do not recommend using a virtual machine while the host is restarting, because virtualization services depend on many components of the host operating system that could be terminated as the system moves on to the shutdown phase, making the guest less reliable even before its forced termination.

  If not, how can it be improved?

Even if virtualization software is stable, it is good practice to do all that is necessary and sacrifice a few seconds of your time to prevent data loss or corruption: if you want to guarantee the integrity of the data on the external mass storage, do the operation of unmount/expulsion from the virtualized OS before saving the state and save the state before the reboot procedure begins.


How find the current gnome version in ubuntu 14.04?

for the version of gnome

$ dpkg -l libgnome2-common

and for gnome-shell:

$ dpkg -l gnome-shell

works whether the packages are installed or not.


To prevent deleting of files from tmp after reboot in ubuntu 18.04

That's an XY problem.

In short, don't store something you want on next boot in /tmp. Store it elsewhere. Like /var/tmp. Or your $HOME.

Beware that /var/tmp is nt to be used for permanent storage either, because it might be cleaned also, like every 30 days or so.


dpkg does not manage dependencies.

So now

sudo apt-get install -f

then install again

sudo dpkg -i virtualbox-4.3_4.3.20-96996~Ubuntu~raring_i386.deb

Otherwise, I completely agree with the suggestion to use KVM (virt-manager) rather then virtualbox and if you must use virtualbox, install it from the repositories.

See: http://virt-manager.org/

The advantage of virt-manager is that it is open source and in does not require 3rd party code. Although virtualbox is in the repositories, not all the features available for virtualbox are open source.


On Intel AMD hybrid graphics you must use prime like this for discrete GPU use

DRI_PRIME=1 glxgears


Syslog file of 168.5GB, keeps filling up with "Please type y to accept, n otherwise..."

You've added a script or program to the startup process that issues the "Please type y to accept, n otherwise:" message, tries (and fails) to read a response, and prompts again. Investigate with ps -ef and pstree -a -c -l -p -u 1651. Kill the prompting process and fix your startup scripts.


LibreOffice Base missing on Ubuntu 11.10

If it is not installed, you can install it with :

sudo apt-get install libreoffice-base

Or for the entire metapackage

sudo apt-get install libreoffice libreoffice-gnome

You can add it to the launcher (on the left) by dragging the icon from your dashboard (main menu) to the launcher.

See also :

https://wiki.ubuntu.com/LibreOffice

http://www.youtube.com/watch?v=fAcdFd0MmH0


How do I install Evince 3.28 or newer on Ubuntu Xenial 16.04 LTS?

You can try Snap'ed version of Evince:

$ snap search evince
Name    Version  Publisher    Notes  Summary
evince  3.30.2   ken-vandine  -      Document viewer for popular document formats

Install it with

snap install evince

and run with /snap/bin/evince.
If you like Snapped version, then remove deb-based with

sudo apt purge evince*
sudo apt autoremove

For file association open Nautilus, go to folder with PDF file, open context menu on it with right mouse button and select Open With and select Document Viewer from here.


mount another drive to the same directory

No. with 2TB on /home you have you would use every last bit of possible space. Where would you install your OS on ?

No, you can't mount two devices on one mountpoint

But seriously, two very big partitions together mounted on /home is only possible if those partitions together form a RAID 0 device.


You don't really need all PPAs. If you install Flash player + Chromium, you can remove the Chrome PPA. By reducing the number of external repositories, your packages list will be refreshed must faster.

Mixing multiple distro versions is a bad idea. You now have both Precise and Raring enabled in your sources.list. Since Raring is end-of-life since 27 January 2014, the Raring packages will vanish from the main repos soon. You need to replace your hosts by old-releases.ubuntu.com as described in this question.


Trying to install ubuntu for nexus unable to locate package

I guess you haven't added the PPA which has the tools you're looking for. From Ubuntu wiki's instructions

Setup the Touch Developer Preview Tools PPA
The PPA has the tools and dependencies to support Precise, Quantal, and Raring. Add the Ubuntu Touch PPA by adding the following custom source list entry to your /etc/apt/sources.list file.
On your computer, press Ctrl+Alt+T to start a terminal.
sudo add-apt-repository ppa:phablet-team/tools
or if add-apt-repository is not available, append the following to your sources.list:
deb http://ppa.launchpad.net/phablet-team/tools/ubuntu [dist-codename] main
deb-src http://ppa.launchpad.net/phablet-team/tools/ubuntu [dist-codename] main
*Note: replace [dist-codename] with precise, quantal, raring or saucy.
Then do the following:
sudo apt-get update
sudo apt-get install phablet-tools android-tools-adb android-tools-fastboot

I hope this is helpful.


Sound disabled on user login (works for guest and at login screen)

Run this in your terminal:

rm -r ~/.pulse*; pulseaudio -k


Ubuntu 16.04 LTS - how is the X server started?

/etc/init.d/lightdm starts the Xserver. Lightdm gets started first then it starts the Xserver. The parent process of the Xserver (Xorg) is lightdm (PID 25600 as shown in example below). You can see this by executing:

ps -ef | grep lightdm.

root     25600     1  0 00:50 ?        00:00:00 /usr/sbin/lightdm
root     25608 25600  2 00:50 tty7     00:00:35 /usr/lib/xorg/Xorg -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
root     25686 25600  0 00:50 ?        00:00:00 lightdm --session-child 12 19

Running the following commands will stop and start lightdm and Xserver accordingly:

sudo /etc/init.d/lightdm stop
sudo /etc/init.d/lightdm start


RTL8188CU USB Network Adaptor on ubuntu 13.04

FIXED!! - Well, PATCHED!

https://code.google.com/p/realtek-8188cus-wireless-drivers-3444749-ubuntu-1304/

After 24 hours of pulling my hair out over the same problem, I found this link somewhere in a response to the topic. Bless this soul for patching Realtek's drivers to work on current kernels 3.8.x & 3.9.x - Its a DEB package, so no compiling issues, you may need to install specially if your system is not dpkg-based.

...TELL THE WORLD! No more high blood pressure from (this) device driver issue!


Ubuntu thinks it's storing the RTC time in UTC but it's in local

The problem is the same as the one on this question Why hwclock is neither UTC nor local? the file /etc/default/rcS was not set properly


How can I stop gksudo nautilus from changing the wallpaper?

Try to use gksudo -- nautilus --no-desktop instead.

The -- tells gksudo not to parse the remainder of the command line.


On Intel based systems, you can usually run the following as root

echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

If you have more then one core, which is likely the case on a contemporary machine, repeat the command for each. You can find out the number of cores with

ls /sys/devices/system/cpu/ | grep cpu[0-9].

To get back to the default poower level, run

echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor


Using awk and multiple delimiters for -F

searchfor="vodlocker"
wget -q -O- http://pastebin.com/raw/VbrXHEYd | awk -F'SRC="|"' '/SRC/ && /'"$searchfor"'/  {print $4}'

Example output:

$ searchfor="vodlocker"; wget -q -O- http://pastebin.com/raw/VbrXHEYd | awk -F'SRC="|"' '/SRC/ && /'"$searchfor"'/  {print $4}'
http://vodlocker.com/embed-wrdlm4dbigu4-850x450.html


How to use primary selection with tilda/terminal

I'm not sure I understand your question, but if you just want a more efficient way to copy and paste, you can probably use ctrl+shift+c to copy from the tilda terminal to the clipboard.


Why are partitons not automatically mounting?

You have to enter your partition information to /etc/fstab file. Then your disk will be mounted automatically!

Just go for following step:

First take back up of /etc/fstab

sudo cp /etc/fstab /etc/fstab.backup

Execute following command to get your partition UUID information that will help you to configure /etc/fstab file.

sudo blkid

Search for your partition's UUID which you want to mount automaticall. Your HDD partitions shouls be displayed like:

/dev/sda1: LABEL="Backup" UUID="00A0CE7EA0CE7A24" TYPE="ntfs"
/dev/sda5: LABEL="40GBTWO" UUID="00A0CE7EA0CE7A24" TYPE="ntfs"
/dev/sda6: UUID="7550252c-3da7-4cd9-8da3-71e9ba38e74a" TYPE="ext4"
/dev/sda7: UUID="088fd084-a011-4896-aa93-c0caaad60620" TYPE="swap"
/dev/sdb1: LABEL="SaurK" UUID="0DB6254A58CEF6F7" TYPE="ntfs"

and so on. It is just an example but format will be same.
Now copy the UUID of the partitions which you want to insert in /etc/fstab file.
Now open /etc/fstab file and insert entry for your HDD partitions on the last line of /etc/fstab file. Take help from previous entry, for format etc:

sudo gedit /etc/fstab

When opened your entry would be like this:

UUID=<your_UUID_for_Disk_partitions> /media/<location_where_you_want_to_mount>             ntfs    errors=remount-ro 0

Just an example:

UUID=00A0CE7EA0CE7A24 /media/Backup               ntfs    errors=remount-ro 0

you may have to replace ntfs to ext4 or fat32 according to the file system of your partition. It displays in blkid output.
Now create location where to mount your disk partitions. Create a folder for each partitions to mount. ((note: a directory may be already created, if so ignore this step.) For example:

sudo mkdir /media/Backup

Then execute this command once finished:

sudo mount -a

You can refer this link for further help: Auto mounting with /etc/fstab
Hope it works for you..


First try going to System Settings > Software and Updates > Additional Drivers and choosing another option.

If it didn't work, then follow the steps below:

Install CCSM:

sudo apt-get install compizconfig-settings-manager

In CCSM go to Ubuntu Unity Plugin and select No Blur option for Dash Blur.

Problem solved.


debootstrap does not extract libc6, does not create /sbin/ldconfig

Solved it.
I had not specified a complete list of packages (libc-bin and dash were missing, among many others), which prevented debootstrap from doing its job.  I ended up using an updated list of packages, which solved my problem.


How do I initialize webcams without signing in to an X session?

I was able to start the webcam remotely by using sudo. Not sure why that was required but it's good enough for my purposes.


"Turn On Wi-Fi Hotspot" greyed out in 20.04

It's a long-standing bug.
If you selected Wi-Fi Settings from the NetworkManager applet, Turn on Wi-Fi Hotspot will be greyed out in the 3-dot menu. In the Settings window that opens, just click on Network in the left pane, then click on Wi-Fi in the left pane, and the Turn On Wi-Fi Hotspot will then be available.


Why does an Ubuntu Server have graphical.target as the default systemd target?

Despite the name of the target, there is nothing graphical running on Ubuntu Server 16.04. You can run this command to check and compare it with your desktop distro if you like:

systemctl list-dependencies graphical.target

On my Ubuntu 16.04 server, I see that the targets depend on "display-manager.service", but no display manager is installed or running.

I expect Ubuntu servers are set this way for some kind of consistency, although I agree it's confusing.


If you want to install older version of packages on Ubuntu ,theortically possible this but not pratically.

$apt-get install -f <old vesrion>

But your system will have broken packages.
Thus you should rebuild the packages in this case.

The process is as following:

1) Get the repository from the Nautilus 3.4 version (you can get it from launchpad).

2) Rebuild this on 14.04.
In the sources directory.

$dpkg-source -x nautilus-3.4xxx.dsc
$cd nautilus-3.4xxx
$debian/rules build
$dpkg-build package

3) After then you can install nautilus rebuilt from the local directory.

$dpkg -i nautilus-3.4xxx.deb


How to extend partition with free space that is before it using gparted?

Option 1:

Moving /boot partition can render unbootable system. So, instead of moving the / (root) partition you can use the partition as a new /home partition. This link explains how.

Option 2:

But if you want to attempt a move, make sure you are backed up and then follow the steps below:

Start GParted in live Ubuntu session,
If you have swap partition(s), right click on it/them and select swapoff (Edit: you can skip this as your snapshot does not show any swap used),

Also unmount (if they're mounted) all the partitions that will be involved in the resize/move operation (by right clicking and selecting unmount from the context menu),
(WARNING: moving /boot partition may cause boot failure!) Now right click your extended partition /dev/sda2 (in your case) and select Resize/Move option, and drag the slider left to cover the unallocated space. Repeat the process with /dev/sda5 to cover the space created in the extended partiton.  And then click the Resize/Move button,

After specifying such move and resize options, from the menu select Edit -> Apply All Operations or click the apply button in the toolbar. The resize and particularly move option will take a long time depending on the size of the files to be moved. So wait patiently.

You should then be done! Reboot to see if every thing is fine. If something went wrong and you're unable to boot, try boot-repair to fix it.


To play mp3 files with Rhythmbox you need the gstreamer 'ugly' plugins. There are 3 good choices to getting these installed and running with Rhythmbox;

1. This should be shown when you try to open such a file:

Simply install from here and Rhythmbox will happily play your mp3s.

2.  If the menu does not appear you can install install from the commandline (on Trusty Tahr):

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

And hopefully this will be enough to get your mp3s playing.

3. If not the final choice is to get the latest and greatest Rhythmbox with the annoying 'can't see mp3s/plugins properly' bug ironed out:

sudo add-apt-repository ppa:fossfreedom/rhythmbox
sudo apt-get update
sudo apt-get install rhythmbox gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gnome-control-center rhythmbox-plugin-visualizer

And then all should be well...


List of sources can not be read Ubuntu 16.04

According to UBUNTU PACKAGES FOR R the correct deb entry for the cran repository for the xenial release is (note the trailing slash /)

deb http://cran.rstudio.com/bin/linux/ubuntu xenial/

This seems to be a rather obscure point of syntax: the general form for such entries is

deb [ option1=value1 option2=value2 ] uri suite [component1] [component2] [...]

however from man sources.list:

   The URI for the deb type must specify the base of the Debian
   distribution, from which APT will find the information it needs.  suite
   can specify an exact path, in which case the components must be omitted
   and suite must end with a slash (/). This is useful for the case when
   only a particular sub-directory of the archive denoted by the URI is of
   interest. If suite does not specify an exact path, at least one
   component must be present.

which is the case here.


If you make the panel itself wider then the clock will adjust and display the time horizontally.  To do this right click on some blank area of the panel and select 'properties', then increase the size to 75 pixels or more and it should realign your clock.


Your expression as is requires usernames to end with a dollar sign \$.  Remove the escape (backslash) to match end of line $ instead:

"^[a-z][-a-z0-9.]*$"


How to remove dconf-WARNING when running gedit over SSH?

From man gedit:

gedit - text editor for the GNOME Desktop

The remote environment doesn't have access to a "GNOME Desktop". If you're running a "GNOME Desktop" (can run gedit locally without the message), you can share your local one.

Is gedit really the right choice for editing remote files?

There are a couple of ways to fix your problem:

A) Use the "-X" option on your ssh command, to let remote gedit access your local "GNOME Desktop".

From man ssh:

 -X      Enables X11 forwarding.  This can also be specified on a per-host basis in a
         configuration file.

         X11 forwarding should be enabled with caution.  Users with the ability to bypass
         file permissions on the remote host (for the user's X authorization database) can
         access the local X11 display through the forwarded connection.  An attacker may then
         be able to perform activities such as keystroke monitoring.

         For this reason, X11 forwarding is subjected to X11 SECURITY extension restrictions
         by default.  Please refer to the ssh -Y option and the ForwardX11Trusted directive
         in ssh_config(5) for more information.

         (Debian-specific: X11 forwarding is not subjected to X11 SECURITY extension
         restrictions by default, because too many programs currently crash in this mode.
         Set the ForwardX11Trusted option to “no” to restore the upstream behaviour.  This
         may change in future depending on client-side improvements.)

OR

B) Use a different, non-GNOME editor.

There are a plethora of editors available on Ubuntu.

There are too many to list in this response, but we can count them:

walt@bat:~(0)$ apt-cache search editor | grep -w editor | wc -l
331
walt@bat:~(0)$ apt-cache search editor  | wc -l
959
walt@bat:~(0)$


if you mount the partition somewhere other than /media or /home and symlink to it, the nautilus buttons would disappear


How to get rid of whitespace around image file?

you can do simple scripting for doing that

   ls | grep " " | while read -r file_name ; do mv -v "$file_name" `echo $file_name | tr -d ' '` ; done

before doing that you need to enter into that directory then execute the script.

you can also use alias here to call it with out using whole command everytime.

in the terminal do as ,

nano ~/.bashrc

and in that text file at the last place paste the above script as

alias fixb='ls | grep " " | while read -r file_name ; do mv -v "$file_name" `echo $file_name | tr -d ' '` ; done'

then save and close with CTRL+X & Y.

now in the terminal type as

source ~/.bashrc

to reload the bashrc file. now you can simply remove all the spaces.


Verifying installation: 'apt-cache policy' vs 'which'

apt-cache is an information tool of the package manager apt/dpkg. It only has information about packages you installed through them (note that the Software Center is just a GUI front-end for them) i.e. regular .deb packages (including everything from the official repositories and PPAs).

If you install applications manually by either just copying their folders or running installation scripts or make commands, those are not regular packages and therefore not managed by the package manager. That's why apt-cache can not find any information about the packages - they simply are no packages at all.

The which command on the other hand is not related to packages, it simply shows you which executable would get run if you type a specific command by searching all directories specified in the $PATH environment variable for executable files of a matching name.


Amazon music not working in chrome (firefox works)

I also had the same problem until I found a little notification on the right side of the URL bar that plugins were blocked. Just tell it to execute all plugins and it should work. It's annoying, but I think better than installing another flash plugin version.


You can use following command to get only pid:

sudo netstat -peanut | grep 3000 | awk '{ print $9 }' | sed 's:/[^/]*$::' | grep -Eo '[0-9]{1,5}'

awk command gets the 9-th field.

sed command gets the pid before forward slash.

And grep command returns only numbers to eliminate extra lines.

Here you can simply have a loop and kill processes.


Trying to install java JDK every time I install/remove anything

Problem solved, running these commands:

Just looking for any Java installer I found it in this directory and removed it

sudo rm /var/lib/dpkg/info/oracle-java7-installer*
sudo apt-get purge oracle-java7-installer*

Run this if you have any Java repository on your sources.list, it was not my case.

sudo rm /etc/apt/sources.list.d/*java*
sudo apt-get update


Why is Canonical choosing QT over GTK for Unity's next generation?

You can find the answer on the mailing list and on Mark Shuttleworth's blog. This blog post probably answers it best:

As part of our planning for Natty+1, we’ll need to find some space on the CD for Qt libraries, and we will evaluate applications developed with Qt for inclusion on the CD and default install of Ubuntu.
Ease of use, and effective integration, are key values in our user experience. We care that the applications we choose are harmonious with one another and the system as a whole. Historically, that has meant that we’ve given very strong preference to applications written using Gtk, because a certain amount of harmony comes by default from the use of the same developer toolkit. That said, with OpenOffice and Firefox having been there from the start, Gtk is clearly not an absolute requirement. What I’m arguing now is that it’s the values which are important, and the toolkit is only a means to that end. We should evaluate apps on the basis of how well they meet the requirement, not prejudice them on the basis of technical choices made by the developer.
In evaluating an app for the Ubuntu default install, we should ask:

is it free software?
is it best-in-class?
does it integrate with the system settings and preferences?
does it integrate with other applications?
is it accessible to people who cannot use a mouse, or keyboard?
does it look and feel consistent with the rest of the system?

Of course, the developer’s choice of Qt has no influence on the first two. Qt itself has been available under the GPL for a long time, and more recently became available under the LGPL. And there’s plenty of best-in-class software written with Qt, it’s a very capable toolkit.
System settings and prefs, however, have long been a cause of friction between Qt and Gtk. Integration with system settings and preferences is critical to the sense of an application “belonging” on the system. It affects the ability to manage that application using the same tools one uses to manage all the other applications, and the sorts of settings-and-preference experience that users can have with the app. This has traditionally been a problem with Qt / KDE applications on Ubuntu, because Gtk apps all use a centrally-manageable preferences store, and KDE apps do things differently.
To address this, Canonical is driving the development of dconf bindings for Qt, so that it is possible to write a Qt app that uses the same settings framework as everything else in Ubuntu. We’ve contracted with Ryan Lortie, who obviously knows dconf very well, and he’ll work with some folks at Canonical who have been using Qt for custom development work for customers. We’re confident the result will be natural for Qt developers, and a complete expression of dconf’s semantics and style.
The Qt team have long worked well in the broader Ubuntu community – we have great Qt representation at UDS every six months, the Kubuntu team have deep experience and interest in Qt packaging and maintenance, there is lots of good technical exchange between Qt upstream and various parts of the Ubuntu community, including Canonical. For example, Qt folks are working to integrate uTouch.
I’d draw a distinction between “Qt” and “KDE” in the obvious places. A KDE app doesn’t know anything about the dconf system configuration, and can’t easily integrate with the Ubuntu desktop as a result. So we’re not going to be proposing Amarok to replace Banshee any time soon! But I think it’s entirely plausible that dconf, once it has great Qt bindings, be considered by the KDE community. There are better people to lead that conversation if they want, so I’ll not push the idea further here  . Nevertheless, should a KDE app learn to talk dconf in addition to the standard KDE mechanisms, which should be straightforward, it would be a candidate for the Ubuntu default install.
The decision to be open to Qt is in no way a criticism of GNOME. It’s a celebration of free software’s diversity and complexity. Those values of ease of use and integration remain shared values with GNOME, and a great basis for collaboration with GNOME developers and project members. Perhaps GNOME itself will embrace Qt, perhaps not, but if it does then our willingness to blaze this trail would be a contribution in leadership. It’s much easier to make a vibrant ecosystem if you accept a certain amount of divergence from the canonical way, so to speak  Our work on design is centered around GNOME, with settings and preferences the current focus as we move to GNOME 3.0 and gtk3.
Of course, this is a perfect opportunity for those who would poke fun at that relationship to do so, but in my view what matters most is the solid relationship we have with people who actually write applications under the GNOME banner. We want to be the very best way to make the hard work of those free software developers matter, by which we mean, the best way to ensure it makes a real difference in millions of lives every day, and the best way to connect them to their users.
To the good folks at Trolltech, now Nokia, who have made Qt a great toolkit – thank you. To developers who wish to use it and be part of the Ubuntu experience – welcome.


Check whether console 1 is running
Ctrl + Alt + F1
and if it is (showing prompt), then log in and type
sudo shutdown -h now


Capturing the mouse

I'm guessing you were missing some XCB dependencies so ffmpeg was unable to capture the mouse. You'll need a new ffmpeg.

If you want to compile make sure to install the XCB dependencies: libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev. See FFmpeg Wiki: Ubuntu Compile Guide for more details. Alternatively, you could probably use mc3man's PPA instead of compiling.

Example command

Your requirements:

Uncompressed output
Do not create output file (I'm assuming you want to pipe the output)

This example will output rawvideo in the mpegts format, but you may want to change it to suit your needs. See ffmpeg -formats for a list, but note that not all are suitable for piping, such as MOV and MP4.

ffmpeg -video_size 1920x1080 -framerate 30 -f x11grab -i :0.0 \
-c:v rawvideo -f mpegts -


(gedit:5596): IBUS-WARNING **: The owner of /home/user/.config/ibus/bus is not root!. How to solve this error?

If you want to not see the error, try sudo -i gedit in the future.

You are attempting to run gedit via sudo without inheriting the root user's environment settings and are instead using them from the current user.  The current user is not root and root is not running ibus, so you definitely should be seeing that error.


Use interface lo.

1) Ubuntu/Debian weirdly use 127.0.1.1 instead of 127.0.0.1 to resolve your canonical hostname.

2) By default, 127.0.0.0/8 (127.anything) goes to the loopback. You shouldn't narrow your filters to only one of the addresses in that subnet.

  steven@lat:~$ ping 127.254.254.254 -c 1
  PING 127.254.254.254 (127.254.254.254) 56(84) bytes of data.
  64 bytes from 127.254.254.254: icmp_req=1 ttl=64 time=0.052 ms

  --- 127.254.254.254 ping statistics ---
  1 packets transmitted, 1 received, 0% packet loss, time 0ms
  rtt min/avg/max/mdev = 0.052/0.052/0.052/0.000 ms
  steven@lat:~$

3) You can assign any other addresses you like to the loopback adapter.

Whatever you do, iptables -A INPUT -i lo -o lo -j ACCEPT is not a bad idea. It says packets from this machine to this machine are acceptable.


How to fix mistake specifying partition sizes during installation alongside other OS?

Wait for the installation to finish, or cancel it. Boot from the bootable USB/CD that you have made and click  "Try Ubuntu." Open the partition manager, unmount all partitions, and resize from there.

Just FYI, the reason you can't resize the partitions from Linux (after installation) is that the partition is in use and cannot be unmounted.

Similarly, this is why resizing from Disk Management in Windows Vista/7--which only works for Windows partitions, not Ubuntu partitions--causes the operation to be scheduled for shutdown rather than being able to perform it immediately.


If I format a partition in ubuntu 16.04 as Ext4 using Gparted...will it be hidden in Windows 10?

Yes, Windows cannot read ext4 at all, it won't even recognize it as connected.

Bare in mind, formatting the drive will wipe all the data on the drive.


Recommended auto-mounter for tiling window managers?

You can use udisks-glue with the following configuration.  Note that this is running Awesome which has a page for automounting where you can find other less elegant (In my not so humble opinion) solutions...

 filter disks {
        optical = false
        partition_table = false
        usage = filesystem
 }
 match disks {
        automount = true
        automount_options = sync
        post_mount_command = "notify-send \"Disks-glue mount USB\" \"mounted %device_file on %mount_point\" --icon=/path/to/ikons/usb.png"
        post_unmount_command = "notify-send \"Disks-glue umount USB\" \"umounted %device_file from %mount_point\" --icon=/path/to/ikons/usb.png"
 }


How to start a program in startup that I start in terminal

Search in the Dash:-

Startup application--> Open it--->  Add--> In pop--> name it and in command type-->sudo bin/SARndbox -fpv -evr -0.02

Restart


what are the proper values for usb device in virtual box

We can list all entries needed for creating an USB filter with the following command:

VBoxManage list usbhost

This will give us an output similar to the one below for all devices recognized in the host:

UUID:               123400c1-fc2c-44b8-202f-e5c80c133027
VendorId:           0x03f0 (03F0)
ProductId:          0xa407 (A407)
Revision:           3.33 (0333)
Port:               1
USB version/speed:  2/Full
Manufacturer:       HP
Product:            HP Link-5 micro dongle
Address:            sysfs:/sys/devices/pci0000:00/0000:00:10.0/usb6/6-2//device:/dev/vboxusb/006/002
Current State:      Busy

For creating an USB filter to always capture a USB-device when running a virtual machine we can select from any one of these entries.

We can e.g. just fill in theVendorID to let the virtual machine capture all devices from this vendor. In case we additionally give the ProductID is becomes less likely we have more than one such device attached, but stillm giving a UUID or the Serial in addition helps to only capture this single known device.

Note that most but still not all devices are supported by Virtual Box or the guest OS. Some devices may even lead to a boot failure of the guest when defined as a filter. We can not use filters on such devices then. Some USB2.0-devices will not work on an USB3.0 port.

For prerequisites when using USB in Virtual Box also see: How to set up USB for Virtualbox?


Mouse click doesn't work, but pointer works

I did something similar with another package and partially took down my desktop.  Wouldn't accept any keyboard or mouse inputs.  I had to ssh in from another computer to implement the repair (probably could have booted into text mode as well).

I found this handy line somewhere; on this site I think:

sudo apt-get install `grep Remove /var/log/apt/history.log | tail -1 | sed -e 's|Remove: ||g' -e 's|([^)]*)||g' -e 's|:[^ ]* ||g' -e 's|,||g'`

Basically creates a list of all the removed packages and reinstalls them.  Just run the grep part first to get a sense of what will be reinstalled.


How to access and use another Ubuntu over LAN?

Here are the possibilities:

VNC
VNC + SSH Tunnelling
NX Server
free edition FreeNX
NeatX
X2Go
X11 Forwarding over SSH
X11RDP
xrdp
teamviewer

etc......and many others


It turns out that I get rid of the transparency problem when I execute the following command on my laptop (I found the solution here (no. 3 in the list): http://imechanica.org/node/13804))

env XLIB_SKIP_ARGB_VISUALS=1 /home/XXXXXX/ABAQUS/6.14-1/code/bin/abq6141 cae

ABAQUS CAE succesfully opens, but I run into a new problem! I see two "floaters" on top my CAE GUI (please attached file "UpdatedScreenshot_ABAQUS_CAE.png). These "floaters" are residual graphics from the underlying terminal window (they include the text "out of range for" in the attached figure). I would like to get rid of these "residual graphics" since they are in the way and interfere with my work on the GUI.

I also see same errors on the Linux terminal window as before. I am also copying and pasting the error messages again below for clarity.

X Error: code 2 major 154 minor 3: BadValue (integer parameter out of range for operation).
X Error: code 169 major 154 minor 5: GLXBadContext.
X Error: code 0 major 154 minor 26: 0.
X Error: code 169 major 154 minor 4: GLXBadContext.

Warning: Your system need to be reconfigured to allow OpenGL
rendering to a pixmap or you will only be able to print to
raster formats.


Trash Bin in Unity launcher shows full even when empty

I had the same issue. Files that were deleted from a USB drive were causing the Trash to appear full even though it was empty. As soon as I emptied the trash with the USB drive mounted, the trash was cleared.


How to install Graphic Magick with GPU support (opencl)?

GraphicsMagick author is against GPU using in GraphicsMagick, so there is no support


In general Linux does not require specific drivers for printing. CUPS will handle this for you. The generel rule applies here: stick with compatible hardware and you will have a hassle free usage.
Regarding specifically printers:
Have a look at the Ubuntu wiki page on printers. Notable excerpt:

Manufacturer-Specific Installation
Many of these printer manufacturers require non-free drivers or plug-ins. HP has the largest selection of free software compatible printers. Some of the higher end laser machines from other manufacturers are at least partially free software compatible.

And the wiki has a link to a site that sells Linux compatible hardware

https://www.thinkpenguin.com/catalog/printer-all-one

I do not think you will go wrong when you choose any of the other printers listed on these 2 sites or even if you just buy a random HP printer.


How can I tag files and search them later based on the tag?

Contents:

Introduction
Installation
Usage
Source code

1. Introduction

This solution consists of two scripts - one for tagging, one for reading the list of files under specific tag. Both have to live in ~/.local/share/nautilus/scripts and activated via right-click in Nautilus file manager on any file, and navigating to Scripts submenu. The source code for each script is provided here as well as on GitHub

2. Installation

Both scripts have to be saved to ~/.local/share/nautilus/scripts , where ~ is user's home directory, and made executable with chmod +x filename. For easy installation, use the following bash script:

#!/bin/bash

N_SCRIPTS="$HOME/.local/share/nautilus/scripts"
cd /tmp
rm master.zip*
rm -rf nautilus_scripts-master
wget https://github.com/SergKolo/nautilus_scripts/archive/master.zip
unzip master.zip
install nautilus_scripts-master/tag_file.py "$N_SCRIPTS/tag_file.py"
install nautilus_scripts-master/read_tags.py "$N_SCRIPTS/read_tags.py"

3. Usage:

Tagging files:

Select files in Nautilus file manager, right click on them, and navigate to Scripts submenu. Select  tag_file.py. Hit Enter

First time you run this script, there will be no configuration file, so you will see this:

Next time, when you already have some files tagged, you will see a popup that allows you to select a tag and/or add new one ( this way you can record files under multiple tags). Hit OK to add files to this tag. Note:Avoid having "|" symbol in the tag name.

The script records everything in ~/.tagged_files. That file is essentially a json dictionary ( which is not something regular users should care about, but it's convenient for programmers :) ). The format of that file is as so:

{
    "Important Screenshots": [
        "/home/xieerqi/\u56fe\u7247/Screenshot from 2016-10-01 09-15-46.png",
        "/home/xieerqi/\u56fe\u7247/Screenshot from 2016-09-30 18-47-12.png",
        "/home/xieerqi/\u56fe\u7247/Screenshot from 2016-09-30 18-46-46.png",
        "/home/xieerqi/\u56fe\u7247/Screenshot from 2016-09-30 17-35-32.png"
    ],
    "Translation Docs": [
        "/home/xieerqi/Downloads/908173 - \u7ffb\u8bd1.doc",
        "/home/xieerqi/Downloads/911683\u7ffb\u8bd1.docx",
        "/home/xieerqi/Downloads/914549 -\u7ffb\u8bd1.txt"
    ]
}

If you ever want to "untag" some file, just delete an entry from that list. Mind the format and commas.

Searching by tag:

Now that you have a nice ~/.tagged_files database of files, you can either read that file, or use read_tags.py script.

Right click on any file in Nautilus ( really doesn't matter which ).Select read_tags.py. Hit Enter

You will see a popup asking you what tag you want to search:

Select one, click OK. You will see a list dialog showing you want files are there for the tag you selected. You can select any single file and it will open with a default program assigned to that file type.

4. Source code:

tag_file.py:

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# Author: Serg Kolo
# Date: Oct 1st, 2016
# Description: tag_file.py, script for
#    recording paths to files under
#    specific , user-defined tag
#    in ~/.tagged_files
# Written for: http://askubuntu.com/q/827701/295286
# Tested on : Ubuntu ( Unity ) 16.04

from __future__ import print_function
import subprocess
import json
import os
import sys

def show_error(string):
    subprocess.call(['zenity','--error',
                     '--title',__file__,
                     '--text',string
    ])
    sys.exit(1)

def run_cmd(cmdlist):
    """ Reusable function for running external commands """
    new_env = dict(os.environ)
    new_env['LC_ALL'] = 'C'
    try:
        stdout = subprocess.check_output(cmdlist, env=new_env)
    except subprocess.CalledProcessError:
        pass
    else:
        if stdout:
            return stdout

def write_to_file(conf_file,tag,path_list):

    # if config file exists , read it
    data = {}
    if os.path.exists(conf_file):
        with open(conf_file) as f:
            data = json.load(f)

    if tag in data:
        for path in path_list:
            if path in data[tag]:
               continue
            data[tag].append(path)
    else:
        data[tag] = path_list

    with open(conf_file,'w') as f:
        json.dump(data,f,indent=4,sort_keys=True)

def get_tags(conf_file):

    if os.path.exists(conf_file):
       with open(conf_file) as f:
            data = json.load(f)
            return '|'.join(data.keys())

def main():

    user_home = os.path.expanduser('~')
    config = '.tagged_files'
    conf_path = os.path.join(user_home,config)
    file_paths = [ os.path.abspath(f) for f in sys.argv[1:] ]
    tags = None

    try:
        tags = get_tags(conf_path)
    except Exception as e:
        show_error(e)

    command = [ 'zenity','--forms','--title',
                'Tag the File'
    ]

    if tags:
       combo = ['--add-combo','Existing Tags',
                '--combo-values',tags
       ]

       command = command + combo

    command = command + ['--add-entry','New Tag']

    result = run_cmd(command)
    if not result: sys.exit(1)
    result = result.decode().strip().split('|')
    for tag in result:
        if tag == '':
           continue
        write_to_file(conf_path,tag,file_paths)

if __name__ == '__main__':
     main()

read_tags.py:

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# Author: Serg Kolo
# Date: Oct 1st, 2016
# Description: read_tags.py, script for
#    reading  paths to files under
#    specific , user-defined tag
#    in ~/.tagged_files
# Written for: http://askubuntu.com/q/827701/295286
# Tested on : Ubuntu ( Unity ) 16.04

import subprocess
import json
import sys
import os

def run_cmd(cmdlist):
    """ Reusable function for running external commands """
    new_env = dict(os.environ)
    new_env['LC_ALL'] = 'C'
    try:
        stdout = subprocess.check_output(cmdlist, env=new_env)
    except subprocess.CalledProcessError as e:
        print(str(e))
    else:
        if stdout:
            return stdout

def show_error(string):
    subprocess.call(['zenity','--error',
                     '--title',__file__,
                     '--text',string
    ])
    sys.exit(1)

def read_tags_file(file,tag):

    if os.path.exists(file):
       with open(file) as f:
            data = json.load(f)
            if tag in data.keys():
                return data[tag]
            else:
                show_error('No such tag')
    else:
       show_error('Config file doesnt exist')

def get_tags(conf_file):
    """ read the tags file, return
        a string joined with | for
        further processing """
    if os.path.exists(conf_file):
       with open(conf_file) as f:
            data = json.load(f)
            return '|'.join(data.keys())

def main():

    user_home = os.path.expanduser('~')
    config = '.tagged_files'
    conf_path = os.path.join(user_home,config)

    tags = get_tags(conf_path)
    command = ['zenity','--forms','--add-combo',
               'Which tag ?', '--combo-values',tags
    ]

    tag = run_cmd(command)

    if not tag:
       sys.exit(0)

    tag = tag.decode().strip()
    file_list = read_tags_file(conf_path,tag)
    command = ['zenity', '--list',
               '--text','Select a file to open',
               '--column', 'File paths'
    ]
    selected = run_cmd(command + file_list)
    if selected:
       selected = selected.decode().strip()
       run_cmd(['xdg-open',selected])

if __name__ == '__main__':
    try:
        main()
    except Exception as e:
        show_error(str(e))


You can compile and install whatever you want to from source, but to integrate it into the package management system you need to use an additional tool such as checkinstall instead of make install.

./configure
make
sudo checkinstall --pkgname=my-compiled-package --pkgversion="99:$(date +%Y%m%d%H%M)-git" --default


While removing atom following error are shown

Open that file using nano text editor and add a space like so:

sudo nano /etc/apt/sources.list.d/sublime-text.list

deb https://download.sublimetext.com/ apt/dev/

Then run sudo apt update, and try again.


Problems with VBox Guest Additions on Kubuntu

The Problem with non shown windows and Taskbar is related to a a VirtualBox Setting Guest Setting. If you enable 3D-Acceleration under Virtualbox Display Settings you have this problem.

Just a remark of installing the guest additions. You can easily install them over the additional driver installer under kde settings.
So you don't need to install all the make gcc etc. and install it manually over the iso.


I messed up my Ubuntu 17.04 (Unity) UI - presumably due to removing some Gnome apps and using autoremove. How do I fix this?

As Wilf pointed out in the comments - it seems this was a theme issue, not one caused by missing packages.

I changed from arc-dark-solid to arc-theme and now it looks okay.


Frequent peaks of CPU, caused by unknown java process

In top, you can press c to show the whole command, then use → to see more about the command, which will probably include the name of the Java class that's being executed.

Results are sorted by their CPU use (%CPU). If you want to sort results otherwise, you can run top -o <name of the colum> (e.g. top -o PID to sort by process ID, or top -o %MEM to sort processes by the amount of memory used).

You can alternatively run ps aux | fgrep java to see all running java processes.


Issue with Updating in Ubuntu 12.04 Running on Flash Drive

From experiencing a similar problem in the past it be could be lack of space on the flash drive. It processes then gives that error at the end. Do you have enough space on your flash drive?.


You are right, rkhunter wants a mail transport agent and it tries to install the large and complicated postfix to get one.

To avoid this, you can install the tiny nullmailer instead and that will satisfy the mail transport agent dependency. Once that's done, install rkhunter.

However, first you need to fix your dpkg problems. Please [edit] your question and give details about what's gone wrong there: error messages, etc.


Snap apps broken with Ubuntu, KDE Wayland, and ZSH

Okay, so no solutions actually worked for me. I had everything everyone else stated (adding to /etc/environment, the emulate command, everything).
I'm running Kubuntu 20.04 with ZSH. My solution is to synchronize your local applications folder with the snap folder.
As a script
Add this file to any folder that is part of your "bin" path. For me, I have ~/.local/bin, but you may have something else. Make sure what ever directory you use is part of your path variable. I added this file as ~/.local/bin/sync-snap-apps to my system.
#! /bin/zsh

shareApps="$HOME/.local/share/applications"
snapApps="/var/lib/snapd/desktop/applications"

# Detect all installed applications by snap
for file in $snapApps/*.desktop
do
  # Get a not-ugly version of the .desktop
  # Example: todoist_todoist.desktop -> todoist.desktop
  link="$shareApps/$(echo $file | cut -d '_' -f2)"

  # Create new link if none exists
  [[ -f $link ]] || ln -s $file $link
done

# NOTE: Remove this if you do NOT want automatic broken symbolic link cleanup
for link in $shareApps/*.desktop; do
  # Remove any broken *.desktop symbolic links
  [[ -e $link ]] || rm $link
done

Now that this file is added to your system, append sync-snap-apps to the end of your ~/.zshrc and start up a new terminal. It will automatically sync up your snap applications.
As a zshrc addition
Put this at the bottom of your ~/.zshrc file
shareApps="$HOME/.local/share/applications"
snapApps="/var/lib/snapd/desktop/applications"

# Detect all installed applications by snap
for file in $snapApps/*.desktop
do
  # Get a not-ugly version of the .desktop
  # Example: todoist_todoist.desktop -> todoist.desktop
  link="$shareApps/$(echo $file | cut -d '_' -f2)"

  # Create new link if none exists
  [[ -f $link ]] || ln -s $file $link
done

# NOTE: Remove this if you do NOT want automatic broken symbolic link cleanup
for link in $shareApps/*.desktop; do
  # Remove any broken *.desktop symbolic links
  [[ -e $link ]] || rm $link
done

Final Notes
Note, this solved the following issues for me:

Error KIO Client, I could not use Google Auth redirects to Snap applications, similar to this question and this github issue.
Apps are not in launcher, similar to this reddit post and this question.  Related to this forum post on SnapCraft.

The solution came from this answer, and is easier to understand than this answer on the same thread.


Can not graphically log into any user account - tty1 works

What do you mean you can't do a graphically login? Is there a GUI at all? What happens?

If you still have the /.Xauthority instead of deleting have you tried to sudo chown yourusername:yourusername .Xauthority and logging in/restarting?


Why does Nautilus use a separate icon rather than the one already docked from the default install?

What you should do is open your custom .desktop (nautilus-home.desktop file in ~/.local/share/applications

Inside you'll likely find a line  -

OnlyShowIn=GNOME;Unity;

Remove that line & you can again use your custom .desktop, all nautilus windows will be launched & controlled from the single "Home" icon. A log out/in may be good to do

You may also wish to return the .desktop in /usr to orig. state

A 'bug' report on, though i'm not sure the use of copied .desktops is a bug
https://bugs.launchpad.net/ubuntu/+source/unity/+bug/881235


In the terminal I chose directory and did: "sudo apt-get intall *.deb"

Here there are two problems:

intall is misspelled, it should be install
apt-get do not install local packages. It only installs packages that comes from the repositories.

So, you are using a screwdriver when you need a hammer, and that hammer is called dpkg. With dpkg you can install packages manually only using:

sudo dpkg -i *.deb

Of course, this could leave some dependencies with problems. For that I use GDebi instead:

sudo apt-get install gdebi-core
sudo gdebi *.deb

This will install the packages and any dependency needed.


Is it possible to install office 365 on ubuntu 20.04.2 LTS? If yes, Kindly guide me

I had this same problem.  You can just go the the Github site of the person who made it and download the source code there: https://github.com/sirredbeard/unofficial-webapp-office


How do I change the permision on a external HDD

If nobody except you is using the drive, you can explicitly mount the drive in your home directory.  I am assuming you are currently simply connecting the drive, and allowing the system to mount it automatically, which it does in the /media directory, one which is owned by root.  If it were a permanent directory, then you could change the permissions, but it's dynamic, so you can't.  Therefore, mounting it explicitly in /etc/fstab is the best way, I think.

For my instruction, I will assume a directory named "extern"; change this if you wish, but make sure to do so everywhere.  I will also assume your login name is Andrew, just for the example.

Create a directory in your home directory (/usr/andrew) named extern.

Using the bash terminal, enter a command sudo blkid.  Find your external drive in the list, and copy the UUID, hich is in the form of "########-####-####-############".  To copy, highlight with the mouse, and press shift-ctrl-C.

Next, you need to edit a system file using a text editor such as gedit.  To do this, enter the commmand gksudo gedit /etc/fstab.  At the end of this file add one line like this, substituting the UUID from the clipboard for the "####..." field (one single line, not two!):
   UUID=########-####-####-############ /home/andrew/extern  ext3    rw,suid,dev,exec,noauto,async,nofail,user 0   0

Save the file, but don't close it yet.

Unmount the external drive using either sudo umount /dev/sda2, or whatever number the drive is, or use Nautilus to unmount it.

In the bash terminal, enter the command sudo mount -a; this will mount the drives specified in the file.  If there are no errors, check the drive in ~/extern to see if it is present.  If so, you can close the /etc/fstab file.  If there are errors, insert a '#' in the first space of the added line, to disable it, and report back here.

I think you should now be able to use the drive, when it is present.


Ubuntu 16.10 + Displaylink + External monitor is slow on intel HD graphics

I myself am not a Linux Guru like most other people here, but I found something that at least worked for me:

Go to /etc/X11/xorg.conf.d/ (or create said folder)
Search if you already have a *-intel.conf file
If yes, add this line before EndSection: Option "VSync" "false"
If no, create the file 20-intel.confand write this:

Section "Device"
    Identifier  "Intel"
    Driver      "intel"
    Option      "VSync" "false"
EndSection

Reboot

This should force the Intel driver to stop VSyncing the DisplayLink monitor to 1fps.

Again I think I am not competent enough to assess the situation as to why this is an issue in the first place and so this workaround may break other stuff. So take everything here with care!


Allow user to upgrade installed packages

Another option might be to just turn on unattended upgrades, then the users won't even see the prompts:

How do I enable automatic updates?


Start the service after the user logs off

You could go several routes to start a script after user logout. There may be more but here are the two I am aware of

use gdm to start a script (placed in /etc/gdm/PostSession) after
logout. More on this
here.
Use two new separate systemd services. The second one should be started by the first one at the time the first one stops. Set up the first service to stop at user logout by binding it to the already existing user session service (user@.service).

I am not familiar with the details or merits of the first route, so I will only describe the second route.

In a quick test I logged in as a different user on a different tty and checked that my process (a simple echo message) was successfully started/executed upon logout (cmd logout) of this user. It worked fine on a debian-based system with systemd v232.

My example contains three elements:

Modify the existing user@.service to make it start an instance of a service
(helperunit@.service) which binds to user@.service. This way two
things are achieved:

you get instantiated services which can easily be linked to users (for logging, etc)
the helper service is stopped when the user logs out

# /lib/systemd/system/user@.service

[Unit]
Description=User Manager for UID %i
After=systemd-user-sessions.service

[Service]
User=%i
PAMName=systemd-user
Type=notify
ExecStart=-/lib/systemd/systemd --user
Slice=user-%i.slice
KillMode=mixed
Delegate=yes
TasksMax=infinity
TimeoutStopSec=120s

# /etc/systemd/system/user@.service.d/afterlogout.conf
[Service]
Environment="USERUID=%i"
ExecStartPost=+/bin/systemctl start helperunit@${USERUID}.service

Create the helperunit service file (bound to user@.service), which is used to start a second service (afterlogout@.service) at the time it is stopped (i.e. upon user logout)

# /etc/systemd/system/helperunit@.service

[Unit]
Description=helper-to-start-afterlogout-service Service
BindsTo=user@%i.service

[Service]
Environment="USERUID=%i"
RemainAfterExit=yes
Type=oneshot
ExecStart=/bin/true
ExecStopPost=/bin/systemctl start afterlogout@${USERUID}.service

[Install]

Create a second service unit file which runs your script after user logout

# /etc/systemd/system/afterlogout@.service

[Unit]
Description=trigger-script-after-user-logout Service
Before=reboot.target shutdown.target

[Service]
Environment="USERUID=%i"
Type=oneshot
ExecStart=/bin/echo "user UID=${USERUID} has logged out"

[Install]

The way this is set up the service instances will have the user UID in their name (for example, afterlogout@1000.service)


Okay, part of the the reason is that uinput is compiled into the kernel - so of course lsmod won't show anything!  On the other hand though, this still doesn't explain why key presses from the remote control aren't being detected.  If I learn anything new I'll be sure to pass it on.


What is GNOME?

GNOME is a lot of things. Usually, GNOME refers to GNOME Desktop Environment. Quoting the Arch Wiki:

  A desktop environment bundles together a variety of X clients to provide common graphical user interface elements such as icons, toolbars, wallpapers, and desktop widgets. Additionally, most desktop environments include a set of integrated applications and utilities.

It is created and maintained by the GNOME foundation. They are the driving force behind a large number of popular applications, as well as the providers of a set of libraries such as GTK, GObject and even a language called Vala, which are used to build the applications in the GNOME DE, and are part of the GNOME project as a whole.

There are two relatively well known versions of GNOME: GNOME2, long since obsolete and dead, and GNOME3, the current version. Ubuntu have tracked GNOME (whichever version was current) for as long as I can remember. You can see GNOME2 in action in Ubuntu 10.04, for example. Once GNOME2 went away, a classic mode variously called GNOME Classic, GNOME Flashback (and possibly other names), with nowhere near the flexibility or customizability of GNOME2 was introduced. It just sort-of looked like GNOME2.

GNOME2 was forked to become MATE. MATE is the closest experience to GNOME2 you can get now, but with feature updates. Ubuntu MATE is now an official flavour.

GNOME3 is what you see when you look at the GNOME website, or when you install Ubuntu GNOME, and is underneath many applications in Ubuntu, and Cinnamon. MATE is adding support for GTK3, the library underneath GNOME3. Typically when end-users speak of GNOME3, they mean GNOME Shell (since that is what you see).

How does it relate to Unity?

You can think of GNOME as the parent of the Ubuntu default Desktop Environment (DE) (or an uncle, at least). It is the upstream project of many Ubuntu applications.

Ubuntu's default desktop environment uses most of the GNOME applications with a few changes:

Unity instead of GNOME Shell (up to Ubuntu 17.04)
Firefox instead of Web (once called Epiphany)
Thunderbird instead of Evolution
LibreOffice Write instead of Abiword
some patches to GNOME Terminal and Nautilus, I think.
Ambiance GTK theme instead of Adwaita
and perhaps a few more

Unity and GNOME Shell have a few similarities:

A top panel
A dock
A searchable replacement for the menu system for listing applications.

However, I think the similarities end there.

The Ubuntu GNOME distribution uses GNOME except the few cases where applications have been patched (like GNOME Terminal).

Relevant reading:

What is the relationship between Unity, Gnome, Gnome 3, Compiz, Metacity, and LightDM?
What kinds of desktop environments and shells are available?
When installing packages (particularly those with graphical UIs) how do you determine which is fitting for your distribution?
What is the default desktop environment for Ubuntu 13.10?
What is a desktop environment, session and shell?


SSHFS connects works with command but not fstab

Have you had a look at systemd mounts?
# /etc/systemd/system/media.mount (Naming is important)
[Unit]
Description=Mount remote /media with sshfs
Before=cron.service

[Install]
WantedBy=multi-user.target

[Mount]
What=ssh@home.local:/media/
Where=/media
Type=fuse.sshfs
Options=_netdev,allow_other,IdentityFile=/root/.ssh/ssh@home.mount,reconnect,ServerAliveInterval=30,ServerAliveCountMax=5,x-systemd.automount,uid=1000,gid=1000
TimeoutSec=60

[Install]
WantedBy=multi-user.target


Can no longer log into graphical desktop

First of all, i know that this isn't really an "Answer" and should be written as a comment, but i don't have enough reputation for comments and would like to help to narrow down the reason for this behavior.

You could check the current target of systemd:

Run systemctl get-default
If the output is not graphical.target change it to graphical:

sudo systemctl set-default graphical.target

You could try to manually start the display manager:

Run sudo systemctl start gdm

You could check the Xserver log files for any error messages:

cat /var/log/Xorg.0.log | less
cat /var/log/Xorg.1.log | less
etc.

It would also be helpful to know if you have made any changes to the system the last time Ubuntu booted successfully.

Lastly, i would rather suggest you to backup all the files you want to keep and then do a clean installation of Ubuntu 20.04 since you're going to upgrade to it anyway. Also, you may want to use something like Timeshift in the future, which allows you to roll your machine back to a known working configuration when something like this happens.


I ran into this problem with my Haupauge quad tuner pci card. Solved it by upgrading to the latest Linux kernel.


The most files (if not all) from /usr/bin are binary executable files. Now, a binary file is a computer file that is not a text file; it may contain any type of data, encoded in binary form for computer storage and processing purposes (more about: Binary file).

So, if a binary file is not a text file, you can't use nano (or another text editor) to edit it (well, you can, but for sure you will not know what you are doing).

In Ubuntu (and Linux like operating systems in general) there are some applications called hexeditors, like GHex which can be used to view and edit files in two ways, hex or ascii:

Furthermore, you can transform vim in a hexeditor by typing :%!xxd inside of it (:%!xxd -r to go back to normal mode).


Unable to uninstall mysql-connector-python in Ubuntu 19.04

Normally,  sudo apt autoremove should have worked but in this case, I used this command to the solved same issue:

sudo mv /var/lib/dpkg/info/mysql-connector-python* /tmp

After using the above command, use sudo apt autoremove again and that will solve everything.

For more details about this issue, visit this site.


Fresh installation without losing /home directory?

While installing , install Ubuntu in "/" partition as usual and dont format /home partition. It will remain as it is (By the way I made the assumption that by "/home" you mean your home directory)

And one more thing that you need to do is it should be indicated to the installer that you want to mount that particular partition under /home.


Delete user password and have them set a new one on first login?

From man passwd

   -e, --expire
       Immediately expire an account's password. This in effect can force
       a user to change his/her password at the user's next login.

so

 passwd -e user

On the next login the user will see :

Password:
You are required to change your password immediately (administrator enforced)
Changing password for <user>.
Current password:

The user must then enter their current password to create a new password that conforms with the password rules of the host.


How to reinstall the default desktop environment LXDE in LUBUNTU?

To get back all the parts LXDE/Lubuntu you had removed, you can perform a reinstall with this command

sudo apt install --reinstall lubuntu-desktop

This will reinstall all the parts of the default Lubuntu desktop.


How to delete/modify the recovery key from the Ubuntu 21.04 encrypted disk install?

You should be able to delete it in the same way that you delete any LUKS key.
After you know the device ID of the encrypted partition (if you don't you can use the "lsblk" command) you can manage keys via the terminal with the following commands where /dev/sdXN should be replaced with the correct path to your encrypted partition on your device.
List existing key slots:
sudo cryptsetup luksDump /dev/sdXN

Delete a keyslot by password (if you know the recovery key):
sudo cryptsetup luksRemoveKey /dev/sdXN

This will prompt you for the password of the key slot you want to remove. If you didn't save the recovery key you can delete it by it's keyslot ID.
Delete a keyslot by ID (when you don't know the recovery key):
First determine the keyslot of the password you don't want to delete:
sudo cryptsetup --verbose open --test-passphrase /dev/sdXN

Entering a password with this command will return the keyslot of that password. On my installation of Ubuntu 21.04 my password was in keyslot 0 and the system generated recovery key was in keyslot 1, but you should double-check it's the same on your system.
Then to delete the unneeded keyslot:
sudo cryptsetup luksKillSlot /dev/sdXN 1

Where you can replace 1 with the keyslot you want to delete.
This will prompt you to enter a remaining good password before actually deleting the keyslot to verify that you don't accidentally delete the wrong one.
Add new luks password:
sudo cryptsetup luksAddKey /dev/sdXN

This will prompt you for an existing password and then the new one you want to add. You can have up to 8 keyslots total.


you can run following command for installing KDE desktop:

sudo apt-get install kde-plasma-desktop

after next login select KDE from "session" on the Login Prompt to start Desktop Environment (KDE).

See this link for more detail.


ubuntu 12.04 installation problem on windows 7 64bit

You have alternatives to wubi:
a. If you want to try ubuntu without installing it, you can burn it on a cd/dvd or on a usb.
There are info on how to burn a live cd or create a live usb at the ubuntu download page:

http://www.ubuntu.com/download/desktop

http://www.ubuntu.com/download/help/burn-a-cd-on-windows

http://www.ubuntu.com/download/help/create-a-usb-stick-on-windows
Then you can boot using that cd/usb. (Note: You might have to set the cd device or usb as the boot device from BIOS setup.)

b. If you want to install ubuntu, you can use the live cd and select "Install ubuntu"
Wubi is not recommended for a number of reasons, see: https://en.wikipedia.org/wiki/Wubi_%28Ubuntu_installer%29#Limitations


Thunderbird: Lightning calendar extension not translated

The package xul-ext-lightning in the Ubuntu repository does not support the German language.

To add German language support:

Remove the package

sudo apt-get remove xul-ext-lightning

Use the Add-Ons page to install the add-on.


Instead of using system monitor, use some utility specially designed to monitor memory usages; Things like free or vmstat.

If you run a command like free -h, you'll get an output similar to:

             total     used     free      shared  buff/cache  available
Mem:         6G        1G       5G        65M     3G          4G
Swap:        4G        0B       4G

As you said:

  What is odd is that the system ram is almost completely used up.

It's actually not true, a lot of your memory is being used for buffering and caching stuff, that means they are available for use in case of any need. Linux just uses them to efficiently use all available memory. Pay attention to the “available” column.

The “used” column is the actual amount of memory is being used by your programs.

And about the swap, it will only be used when you are out of memory, say your “used” columns is almost close to your “total” or in any other similar situation. E. g. I've got 8G of swap and it's almost always not being used.

When your cache is being used heavily, it's a sign that something is wrong with memory; Maybe we don't have enough memory etc. And it will slow down the system cause you are using a part of your hard drive instead of a RAM memory which is pretty slow in comparison of a RAM.

So I don't think your problem is related to swap NOT being used, it might be swap being used because you are out of memory.

Check how much free memory you actually have and what processes are using it, that might be helpful to solve your problem.

I guess it's enough to guide your question. ;)


These instructions will allow you to invert the colors on your screen by pressing Ctrl+m. This should increase contrast and allow you to more easily see things when they are most difficult to read.

Install CompizConfigSettingsManager
Open it
Go under Accessibility
Check the box next to "Negative"
Click on "Negative" to open it's options
Change the "Toggle Screen Negative" key to Ctrl+m


How do I make a terminal quicklist to open a terminal window with a new profile?

What I think you should try is this -

Open your custom gnome-terminal.desktop in a text editor

Remove this line & it's space entirely, then save. You may want to then do a log out/in & try again

OnlyShowIn=GNOME;Unity;


"configure: error: could not find Python headers" and syntax error when running "make" to install deskbar-applet-2.32.0

The last line of the configure script is giving you an error:

checking whether usr/local/lib/python2.0 version >= 2.4... configure: error: too old

First, you seem to be giving usr/local/lib/python2.0, which means "use the python found in the directory usr which is inside the current directory". I think you probably meant /usr, not usr.

In any case, if you have both python2 and 2.4 installed, you will need to point the configure script to the 2.4 version since that's what it needs. So try running this (assuming you have python 2.4 in /usr/local/lib/python2.4):

./configure PYTHON=/usr/local/lib/python2.4

If that works, try make again.


How to exit Ctrl+R search history command?

You can use the combination Ctrl+G.

Excerpt of man readline:

  SEARCHING Readline  provides  commands  for searching through the
  command history for lines containing a specified string.  There are
  two search modes: incremental and non-incremental.

  Incremental searches begin before the user has finished typing the
  search string.  As each character of the search string is  typed,
  readline  displays  the next  entry  from the history matching the
  string typed so far.  An incremental search requires only as many
  characters as needed to find the desired history entry.  To search
  backward in the history for a particular string, type C-r.  Typing C-s
  searches forward through the history.  The characters present in the
  value  of  the  isearch-terminators  variable are used to terminate an
  incremental search.  If that variable has not been assigned a value
  the Escape and C-J characters will terminate an incremental search.
  C-G will abort an incremental search  and restore the original line.
  When the  search  is  terminated,  the history entry containing the
  search string becomes the current line.

  To  find  other  matching entries in the history list, type C-s or C-r
  as appropriate.  This will search backward or forward in the history
  for the next line matching the search string typed so far.  Any other
  key sequence bound to a readline command will  terminate  the  search
  and  execute  that  command.   For instance,  a  newline  will
  terminate the search and accept the line, thereby executing the
  command from the history list.  A movement command will terminate the
  search, make the last line found the current line, and begin editing.

  Non-incremental searches read the entire search string before starting
  to search for matching history lines.  The search string may be typed
  by the  user  or be part of the contents of the current line.


I don't have prime profile at nvidia xserver settings

Use nvidia-prime instead of bumblebee and to make sure that everything works as expected, remove all NVIDIA software and the bumblebee packages as well. Because you have quite new graphics hardware, it might be a good idea to install the latest official stable NVIDIA drivers.

Open a terminal and execute these commands :

sudo apt-get purge nvidia* '^bumblebee.*'
sudo reboot

Select the Ubuntu menu entry from the GRUB menu and  press the E key.
Add nouveau.modeset=0 at the end of the linux line and press F10 to boot.
Note : Put a Space between the last character of the line and nouveau.modeset=0.

Open a terminal and execute these commands :

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-361 nvidia-prime
sudo reboot

You can choose which graphics you want to use from NVIDIA X Server Settings (PRIME Profiles).


Can I use old code by myself to build on for my entry in the Ubuntu App Showdown contest?

You can start your app already, but you should wait with submitting it at least until the 18th June when the contest starts.

You can reuse old code bits, but you shouldn't just submit an application you already created in the past. It must have been created from scratch for the contest.


See if you have a specific dependency in command line

The dpkg -l command lists packages matching a given pattern. If the package is installed, the first column of the output should be ii, for example:

$ dpkg -l libc6
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name             Version       Architecture  Description
+++-================-=============-=============-======================================
ii  libc6:amd64      2.19-0ubuntu6 amd64         Embedded GNU C Library: Shared librari
ii  libc6:i386       2.19-0ubuntu6 i386          Embedded GNU C Library: Shared librari


Nvidia 555M driver installation problem with a Lenovo Y570

This is a bug in somewhere in the kernel or BIOS and not the driver. Have a look at these for a workaround:

You'll need to remove the drivers and xorg.conf file (look at the link in step 3 below)
Then install the hack for working around a kernel/BIOS issue.
Then proceed with installing Bumblebee


Free space preceding is used if you are moving the partition to make space for a new partition to the left of the current partition.

Free space following is used to create space for new partition that follows (right side of) the current partition.

For eg: In the following, I've re-sized my current partition to create 501MB space for a new partition on left and another for a 323MB partition on right of my current partition.

You have to be careful when moving the start sector of partition because if you move the Linux partition containing /boot, or if you move the Windows system partition C: your computer might not boot.


MenuLibre is a menu editor for the FreeDesktop.org Desktop Entry and Menu. A menu editor does not provide menu configuration by itself, so reinstalling MenuLibre will not reset the menu.

Where is the menu

Open a terminal and run MenuLibre with verbose option.

menulibre -v

The command will show debug messages in the terminal.

** (menulibre:2801): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-5v4S1677tg: Connection refused
DEBUG:menulibre: set_up_logging() 'logging enabled'
DEBUG:menulibre: __init__() 'Using menu: $HOME/.config/menus/xfce-applications.menu'
DEBUG:menulibre: block() 'Blocking history updates'
DEBUG:menulibre: unblock() 'Unblocking history updates'

MenuLibre apparently reads from a configuration file that is found at $HOME/.config/menus/xfce-applications.menu and $HOME is actually the path to home directory of current user.

How to reset the menu

First, quit MenuLibre. Then in the terminal, run the following command.

rm -i $HOME/.config/menus/xfce-applications.menu

User will be asked to confirm the action for removing the file. Press Y and Enter to proceed.

Finally, run MenuLibre again. The menu will be restored to default configuration.

Additional notes

MenuLibre will always look for configuration file in $HOME/.config/menus directory, regardless the file exist or not. If the configuration file is missing, MenuLibre will either recreate the configuration file or read from the default (or possibly last known) configuration file.

If MenuLibre didn't recreate the file for any reason, user can manually restore the default configuration file for Xubuntu by copying from XDG directory.

cp /etc/xdg/xdg-xubuntu/menus/xfce-applications.menu $HOME/.config/menus/xfce-applications.menu

Again, $HOME is the path to home directory of current user.

The following situation or limitation may apply:

The reset procedure will work, assuming that the existing shortcuts are all valid and the default .menu file in /etc/xdg directory has not been edited.
Usually, the package manager will automatically remove shortcuts of uninstalled applications and rebuild the application menu automatically.
If uninstallation was done manually and improperly, the shortcuts of uninstalled applications might be left in the file system directories; These may have to be removed manually from /usr/share directory, or depending on how the shortcuts were added.
Also, running sudo apt-get remove [package] command will not remove the configuration files (may include shortcuts); run sudo apt-get purge [package] for otherwise.
If the original default menu was heavily modified, consider reinstall the package that provides the menu. For example, /etc/xdg/xdg-xubuntu/menus/xfce-applications.menu is provided by xubuntu-default-settings.

Tested in Xubuntu 14.04.

TL;DR Delete the config file, then run MenuLibre again. Back to default. This will not fix invalid or unwanted shortcuts, as a result of improperly removed applications.


I had a similar issue and restarting docker with the command below solved it for me.

sudo systemctl restart docker.service

Note: You can consider making docker start at runtime.


How to allow user to define custom filename in BASH?

The correct syntax is

read file

without a dollar sign (you should probably also add the -r option unless you specifically require backslashes to be parsed).

Your quoting is also off; you should definitely make sure $file is always inside double quotes, whereas static text which doesn't contain shell metacharacters can safely remain unquoted (so /path/to/"$file".txt or equivalently "/path/to/$file.txt".

A better design altogether is to read the user choice as a command-line parameter; then this script is easy to call from another script, and the user gets to use shell conveniences like command-line history and variable substitution.


Non useable icons appearing in the unity dash?

Those application icons (together with general applications info) are stored in .desktop files in this directory:

~/.local/share/applications

All you need to do is go to that directory and remove *.desktop file(s) manually. eg:

cd ~/.local/share/applications
rm program1.desktop program2.desktop program3.desktop

and so on.


NVIDIA driver not loaded on Ubuntu 18.04

I am not sure you found a solution but only Nvidia 304 works for older cards
but installing 304 gives you dependency issues

So you follow the instructions on this AskUbuntu question
Can't install Nvidia drivers on Ubuntu 18.04

and patch up the installer from Nvidia and run it. It worked for me.


how can one combine a series of grep statements piped together into one grep statement?

You cannot transform the filter grep a | grep c | grep -v d to a single simple grep. There are only complicated and ineffective ways. The result has slow performance and the meaning of the expression is obscured.

Single command combination of the three greps

If you just want to run a single command you can use awk which works with regular expressions too and can combine them with logical operators. Here is the equivalent of your filter:

awk '/a/ && /c/ && $0 !~ /d/'

I think in most cases there is no reason for simplifying a pipe to a single command except when the combination results in a realatively simple grep expression which could be faster (see results below).

Unix-like systems are designed to use pipes and to connect various utilities together. Though the pipe communication is not the most effective possible but in most cases it is sufficient. Because nowadays most of new computers have multiple CPU cores you can "naturally" utilize CPU parallelization just by using a pipe!

Your original filter works very well and I think that in many cases the awk solution would be a little bit slower even on a single core.

Performance comparison

Using a simple program I have generated a random testing file with 200 000 000 lines, each with 4 characters as a random combination from characters a, b, c and d. The file has 1 GB. During the tests it was completely loaded in the cache so no disk operations affected the performance measurement. The tests were run on Intel dual core.

Single grep

$ time ( grep -E '^[^d]*a[^d]*c[^d]*$|^[^d]*c[^d]*a[^d]*$' testfile >/dev/null )
real    3m2.752s
user    3m2.411s
sys 0m0.252s

Single awk

$ time ( awk '/a/ && /c/ && $0 !~ /d/' testfile >/dev/null )
real    0m54.088s
user    0m53.755s
sys 0m0.304s

The original three greps piped

$ time ( grep a testfile | grep c | grep -v d >/dev/null )
real    0m28.794s
user    0m52.715s
sys 0m1.072s

Hybrid - positive greps combined, negative piped

$ time ( grep -E 'a.*c|c.*a' testfile | grep -v d >/dev/null )
real    0m15.838s
user    0m24.998s
sys 0m0.676s

Here you see that the single grep is very slow because of the complex expression. The original pipe of three greps is pretty fast because of a good parallelization. Without parallelization - on a single core - the original pipe runs just slightly faster than awk which as a single process is not parallelized. Awk and grep probably use the same regular expressions code and the logic of the two solutions is similar.

The clear winner is the hybring combining two positive greps and leaving the negative one in the pipe. It seems that the regular expression with | has no performance penalty.


Ubuntu 15.10 - no login screen after installing/removing packages

Use the live boot mode from an installation disk or USB flash drive.  then mount the root partition and block devices.  thereafter, chroot to the mounted location and you can run apt-get install ubuntu-desktop and other missing packages.

if you have lvm volumes instead of plain old partitions (this isn't necessary on newer Ubuntu distributions. I think 14.04+):

apt-get install lvm2
vgchange -a y

Mount the Ubuntu root partition (lvm partitions are under /dev/mapper, otherwise they are /dev/sda[1-9])

mkdir /mnt/system
mount /dev/mapper/ubuntu--vg-root /mnt/system
mount /dev/sda1 /mnt/system/boot
for i in /dev/pts /dev /proc /sys; do mount -B $i /mnt/system$i; done
chroot /mnt/system

first, make sure dependencies and broken packages are fixed:

apt-get -f install

Try to figure out what is missing or corrupt and (re)install it.

apt-get install ubuntu-desktop
apt-get install linux-image-generic linux-headers-generic


From what it's printing it sounds like it's listening on port 6060. Try visiting http://localhost:6060 and see what happens.

Note that you know it doesn't require unity7 by looking at the interfaces it's using:

$ snap interfaces
<snip>
:network             -
:network-bind        pen
:network-control     -
<snip>


Chromium asks for password for Default Keyring upon every start

While it's true you're likely running XFCE on Xubuntu, that doesn't mean you can't run Gnome applications, especially Gnome Services.

Gnome Services helps enable commonly used applications, such as Gnome Keyring, and if it was running properly, should unlock when you login instead of asking for your password a second time.

You will want to keep Gnome Keyring, and be thankful that Chromium uses Gnome Keyring.  Instead of saving your bank password in cleartext, Chromium is able to store your credentials more securely by encrypting them with your password.

Have you disabled Gnome Services?  Can you make sure that they are enabled?

  Applications Menu Settings > Session and Startup > Advanced

You may have to type the password into Chromium one final time, but you should be able to unlock the keyring on login, if you type your password to login.

Yes, it's annoying to have to type your password in multiple times, so enable Gnome Services, which will start the keyring when you log in.  Even if you can't figure it out, it's worth typing in your password twice.


How to fix native python/pandas problem: TypeError: descriptor '__subclasses__' of 'type' object needs an argument

Turns out the solution is to install from apt.

sudo apt install python3-pandas python3-numpy python3-seaborn

After which there may be problems with pip3, which can be solved like this.


Ubuntu 20.04 Windows 10 not detected in dual boot

This is probably because you installed Ubuntu in a different mode than Windows.
If your device came pre-installed with Windows, I will assume it was installed using EFI mode, with fast startup enabled.
You will need to first make your Windows installation work (i.e. boot) again, then re-install Ubuntu using the same installation mode as Windows.
To do that, boot into your BIOS and change boot order, so "Windows Boot Loader" is the first. If you changed from EFI boot to legacy, change it back. If you disabled fast startup you may need to re-enable it (not necessarily, some installations will work regardless).
Once Windows is working, remove Ubuntu completely, by deleting the partition completely, and then remove grub from Windows boot loader.
When you are done with that, re-install Ubuntu using the same installation mode as Windows.
Note: you will need to use partition editing techniques and other methods that require some understanding and experience. Only follow the above suggestion if you know how to use these tools.


Knowing the interface of ubuntu and editing them

Well, after some diggin', it's all basically written in C, C++ and Vala.

This link will provide you informations about Unity Development. This one is for Gnome project (Unity is based on Gnome).

You can check the source code of Unity on Launchpad. You can use the source code to edit your interface, it's under GNU GPL v3 licence.

Most of the end-user files are editable with a text-editor (such as gedit, nano), but don't expect much, it isn't as easy to modify as XFCE, for example.

Some strings are stored in dconf, which you can check and modify using dconf-tools or gsettings


I'm sure it is a little late, but I thought I'd post a comment to help those browsing.  I am running the NVidia driver, and when I plug in HDMI I first have to make sure the secondary display is enabled, thus activating the entire HDMI setup (including audio).  Once the video is enabled and working, the sound settings includes the additional HDMI/DisplayPort audio output option.

Good luck!


How to install Ubuntu without losing data?

Yes, when you reinstall Ubuntu over itself by default unless you explicitly select to format your partitions Ubuntu will keep your data.


Download a whole website with wget (or other) including all its downloadable content

You may need to mirror the website completely, but be aware that some links may really dead. You can use HTTrack or wget:

wget -r http://winapp.com # or whatever

With HTTrack, first install it:

sudo apt-get install httrack

now run it just 1 external link:

httrack --ext-depth=1 http://winapp.com

This will download the winapp CDN files, but not the files in the files in the files in the whole internet.


Cannot search for packages to install using muon or synaptic

This may have been a problem with both the package managers not indexing the packages for searching.

I did a few reloads from synaptic package manager and it solved the problem.


That sounds like a similar problem I had when I updated my kernel.

Try this fix.

As a result, my problem was solved and the "Sleep Mode" works without problems.


I seem to have found the cause of the problem, as well as the solution; apparently,there was some strange power management package installed.

I noticed a few weeks ago that the hard drive was powering down after three or four seconds (literally) of inactivity. So, after attempting to remedy the hard drive issue using the software from THIS page, I get a message telling me that tlp can't start because of a package called laptop-mode-tools, as well as a recommendation to remove it.

So, I powered up another Ubuntu laptop, which hasn't given me any real problems, and checked to see if it had that same package (using sudo apt-get purge laptop-mode-tools -s), and found that said package didn't exist, which made me assume it probably isn't particularly necessary. After removing both packages (that is, tlp and laptop-mode-tools), and rebooting the system, the both hard drive spin-down, and the dimming screen issues were solved.


swap area provided during installation then converted it to ntfs, any problem?

Swap partition considerations

Swap area is necessary only to supplement RAM. Simplifying a bit: When your computer is running short of Ram it uses Swap as virtual RAM.

In my experience, Ubuntu uses very little RAM when compared to other OS's. SO if you have, say 4 Gb of RAM, it is unlikely you'll ever need it unless you run programs that require a lot of RAM (photo and video editing are examples).

In any case it is good to have a Swap area just in case. 3 to 4 Gb should be enough.

How to add a swap partition

To create a Swap partition you'll need to modify your partitions using gparted. If you want to reduce the Ubuntu partition by 4gb to make space for Swap you'll have to boot from a liveDVD or live USB because you cannot modify a partition that is mounted.

How to create a swap partition depends on your current partition table. You can only have 4 primary partitions. So if you do not have an extended partition (which can contain many logical partitions) and you already have 4 primary partitions, you'll have to delete one partition, create a new extended one and then recreate two new partitions or whatever is needed.
Make sure you keep a backup of anything important on the drive, because partitioning is a low-level operation and a mistake or a power failure at the wrong moment might cause data loss.

So boot from a liveDVD or liveUSB Ubuntu, run gparted, reduce the Ubuntu partition by 4 Gb or so. create a new partition setting it as swap.

Update Grub

After you do this you might need to update grub by typing sudo update-grub in a terminal before restarting your computer.

If you require more specific information, specify how your disk is partitioned.


Install PyCharm IDE from repo (without wget)

There is a third-party packaged .DEB:
Here

But the simplest way would be to use Ubuntu Make utility. It is in the repos in recent versions. Then just run

umake ide pycharm

It will ask a few questions and install recent ide for you. Will not manage autoupdates.


failed to download package files check internet connection

This looks like a problem I used to get.

In terminal, enter the following command:

software-properties-gtk --open-tab=1

Un-select all the tick boxes and try again. the one that's not working can be isolated by re-enabling them one at a time and doing an update after each change.


Sometimes there are 'confusing' data written to the USB drive. Then it helps to wipe the first megabyte (overwrite with zeros). After that it is possible to create a new partition table and one or more partitions with file systems (alias 'format'). You can do this with mkusb via the wipe menu.

If this does not work, you can try in another USB port and in some other computer. If it is still impossible to format the USB drive, I am afraid that it is severely damaged. See this link: pendrive lifetime.


Boot time on fresh install is very slow, maybe due to incorrect fstab? not sure what to do next

According to http://www.itechlounge.net/2013/07/linux-ata-failed-command-read-fpdma-queued/ if you are getting messages like this

ata2.00: failed command: READ FPDMA QUEUED

mean that you need to disable NCQ (Native Command Queuing). According to the article, you can do this with the following command

echo 1 > /sys/block/sdX/device/queue_depth

in which you need to replace sdX with your actual drive (eg sda).

As @gordatron mentioned, if /sys/block/sdX/device/queue_depth is missing you can try to disable NCQ globally for all drives by adding the libata.force=noncq option in GRUB_CMDLINE_LINUX:

GRUB_CMDLINE_LINUX="libata.force=noncq"


How can one run a shell script just before the desktop session begins?

Rather than executing the script before session begins, you can execute it as soon as session begins. For an end user, this does not make difference as scripts would have started executing when you see your session.The steps are as follows.

Create a shell script and provide it necessary permissions.
Open startup applications by searching in dash or your menu, depending on your OS.
Click on Add.

Give a name and add the command, which would be location of your script.You may also add a optional comment.

Click on add, ensure that script is selected and then close the window.

Next time the script would be executed on startup.


How can I get a list of all apps in the Ubuntu Software Center?

On local system

Using your local package management caches a simple use of some shell scripting:

apt-cache dumpavail | grep ^Package | cut -d " " -f 2 | sort | uniq

This just lists package names, so it's not the same as using the Software Centre API, but it will list all package names you can use later to query the API with, I guess. This lists 38820 packages on my system. Be aware that it may contain non-Ubuntu repository backed packages, so not all of them might be available in the SC.

Note: on amd64 systems with Multiarch enabled apt-cache will list many double ones, so that's why the uniq tool is used.

Online

Go to packages.ubuntu.com, see the section Browse through the lists of packages:, follow the link of the distribution (version), then click the link at the bottom of the page (All packages), e.g. packages.ubuntu.com/quantal/allpackages.


Locate your trash.desktop file, and change the icon that way.  If you don't have a trash.desktop file, you can create one.  Open gedit, and include the following:

[Desktop Entry]
Type=Application
Icon=user-trash
Name=Trash
GenericName=Trash
Comment=open trash in PCManFM
Categories=FileManager;Utility;Core;GTK;
Exec=pcmanfm trash:///
StartupNotify=true
Terminal=false
MimeType=x-directory/normal;inode/directory;

Change the line Icon=user-trash with the location of your image.  Save as trash.desktop and exit.

Also you can look into ~/.icons and /usr/share/icons,and change the icon that way.


Try something like sudo hdparm -B 127 -Y /dev/sdb, assuming /dev/sdb is the HDD.

If that works, you can experiment with the /etc/hdparm.conf settings to enable aggressive power management on the HDD, put it to sleep/standby quickly, and turn the power off.

The file is well commented, and has a few examples. Also check out man hdparm for better understanding of the options.

Something like the following should quickly put the HDD to sleep:

/dev/disk/by-id/...{
    apm = 127
    sleep
}

To properly identify the HDD in /dev/disk/by-id/ look at the output of sudo hdparm /dev/sdb | head


I finally got this figured out. At first I thought it was bad hardware so I RMA'd the machine. The same exact thing was happening on the replacement. So I spent a few hours fiddling with grub settings. This is what ended up working for this machine:

in /etc/default/grub:

Comment out GRUB_CMDLINE_LINUX_DEFAULT="splash quiet" entirely.
Uncomment GRUB_TERMINAL=console

Uncomment GRUB_GFXMODE=640x480 I set it to GRUB_GFXMODE=1280x800 because that's the monitor I'm using's default.

Save it then sudo update-grub and reboot and it is showing as expected. Only the combination of those three changes seem to make it work for me, but YMMV.


Updated to Ubuntu 14.04 LTS. screen resolution stuck at 640x480 on Dell Dimension C521

Check that you have the restricted driver installed for your system. Go to settings and click on Restricted drivers and select one of the options for your Nvidia card. I have a similar card and found the recommended and tested driver (nvidia-331 I belive) worked well.


LibreOffice blank menu bar after launch until reload LibreOffice GUI

LibreOffice 5.2 uses the newer LibreOffice-GTK2, so you’ll need to manually remove the
old version before LibreOffice can be upgraded.
Try

sudo apt remove libreoffice-gtk
sudo apt install libreoffice-gtk2 libreoffice-gnome

and check out if this helps.

Found this hint here

I didn't try it myself, I still use LO 5.1.2.4 from Ubuntu-repositories.


How do I change the "unsaved" colour in Geany's open document tab?

If you want to change the color of the text in the "unsaved" tab which seems to be "startup.sh", you don't need to know the current text color.

Geany is still a gtk2 app. Your home folder should have a hidden file called .gtkrc-2.0. Open it and check if it has a line like this:

include "/home/your_login_name/.gtkrc-2.0.mine"

If it does, just close ~/.gtkrc-2.0. If it doesn't, add that line at the very end, making sure you use the correct full path. Save and exit.

If you don't have a file called ~/.gtkrc-2.0, open a terminal, make sure you're in your home folder and run

echo "include \"/home/your_login_name/.gtkrc-2.0.mine\"" > .gtkrc-2.0

But make sure you change your_login_name to whatever is appropriate.

Now, see if you also have a hidden file called ~/.gtkrc-2.0.mine. If you don't have the file, just create it using a plain text editor. If it already exists, back it up for safety and then add the following lines:

# CUSTOM STYLES

# *******GEANY*******
#Styling text (fg) in Geany's tabs
#Note that styling bg is done in the theme's gtkrc, not here, because we want that effect across other programs with tabs as well
# document status colors
style "geany-document-status-changed-style" {
    fg[NORMAL] = "magenta" #tab text when changes are made but not saved and tab is active
    fg[ACTIVE] = "#ff0746" #tab text when changes are made but not saved and tab is not in focus
}
widget "*.geany-document-status-changed"
style "geany-document-status-changed-style"
# font style and size in Geany's tabs
style "geany" = "geany-tabs" {
    font_name = "Ubuntu Mono 14"
}
widget "GeanyMainWindow.GtkVBox.GtkVPaned.GtkHPaned.GtkNotebook.*"
style "geany"

I've also included code to allow you to specify a font just for Geany's UI. You can delete or comment out those lines!

Save the edited file (as plain text). Close all instances of Geany. Then, open Geany and check the effect of what you've done. Obviously, you'll want colors suited to your taste.

Here's what I see.

All the best.


Install kdesudo if it's not installed by running

sudo  apt install kdesudo

Then you'll be able to run GUI applications as root, for example

kdesudo kate /path/to/file.text


Ubuntu 12.4 not listed while in boot menu

It sounds like something went wrong with the configuration of your boot loader and that should be fairly easy to fix. I'd suggest you boot from the live CD and install and run boot-repair to try fixing the issue. You can find installation instructions and a guide to using boot repair here.

If that doesn't do it, I'd suggest you post the URL boot-repair gives you here, so we can further analyse the problem. Good luck!