$HOME
and ~
usually refer to the same thing. That is, they are the path to the "user's home" directory which is of the general form "/home/userName".
When, if ever, do these not refer to the same directory?
$HOME
and ~
usually refer to the same thing. That is, they are the path to the "user's home" directory which is of the general form "/home/userName".
When, if ever, do these not refer to the same directory?
It is not advisable to use sudo
with a graphical application like gedit
, as described at this link. Accordingly, I have tended to use vim
with sudo
.
Recently I noticed my ~/.viminfo
was owned by root on a fairly fresh install of Ubuntu 16.04 (Xenial Xerus), so it had me wondering if even Vim is considered to be graphical or if there is some other problem with invoking sudo vim
. After changing ownership to myself via:
sudo find $HOME -not -user $USER -exec chown $USER:$(id -g) {} +
and subsequently running sudo vim
I was unable to have ~/.viminfo
owned by root. However, I am certain that it recently was owned by root.
Is it inadvisable to invoke sudo vim
?
Rarely but very annoyingly Nautilus will stop responding from the Launcher. I have experienced this on two very different machines: a rack server (dual SSD, RAID 1, 8 real threads) as well as a notebook (single SSD, 4 thread, 8 hyperthread).
The busy icon will be displayed and Nautilus will not start. On the server, eventually Nautilus will work, perhaps 30 seconds later. On the notebook it didn't work after 30 seconds so I rebooted.
When this happens there is nothing else going on that can account for the sluggishness.
Sometimes the problem persists indefinitely, that is, until reboot.
What is the fix for this problem?
Edit: This is probably relevant: https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/1569970
Edit This problem was first noticed with 16.04 and it is still a problem with 20.04. This problem is seen on machines set with swapping disabled or swappiness set to the very lowest possible value.
Previously X.509 certificates would open properly. I do not know what changed but currently they are opening as text files and shown in gedit
. How can I revert to the original behaviour?
Edit: I was asked for more information. Previously the file opened to display human readable information about the certificate. When it opens as a text file in gedit
there are only hexadecimal numbers between a header and footer.
How do I make a bootable Flash drive (USB type) with this file:
Link to Lenovo SSD firmware update tool ISO image.
I tried this: Use gparted
to format to fat32
(on an MBR
device). This format is fast. (Edit: I also used Ubuntu's Disks
utility to do a slow format. It makes no difference.) Then I used unetbootin
(from the Ubuntu Software Center) to flash the device. When I boot the device it just shows a screen that has one option called "default" and it counts down from 10 and repeats in an infinite loop.
I suspect that the following command can tell you if this image file is meant for "cloning".
isohybrid fwss31.iso
isohybrid: fwss31.iso: unexpected boot catalogue parameters
I think this error message means that the Lenovo SSD firmware update tool file is not meant for cloning. I think that if it's not meant for cloning then unetbootin
is an appropriate tool if it would only work.
Do these have the same effect when the drive has only one big partition?
udisks --unmount /dev/sdb
udisks --unmount /dev/sdb1
What is the command line equivalent of the Nautilus feature called "Safely Remove Drive". Specifically, I am removing a USB flash drive.
Is there an encrypting text editor for ubuntu? In other words, the text editor, preferably GUI capable, should always save an encrypted file and always prompt for the password to re-open the file. The point is to combine the functionality of a text editor with an encryption tool.
How do I add LibreOffice
word processing to the options on the Nautilus
right click create new document
menu?
I'm on 12.04.
Installing the CUDA toolkit results in the following instructions being printed to the console.
Please make sure your LD_LIBRARY_PATH for 64-bit Linux distributions includes /usr/local/cuda-5.0/lib64:/usr/local/cuda-5.0/lib
OR
for 64-bit Linux distributions add /usr/local/cuda-5.0/lib64 and /usr/local/cuda-5.0/lib to /etc/ld.so.conf and run ldconfig as root
The following code in /etc/profile
had no effect.
if [ -z "$LD_LIBRARY_PATH" ]; then
LD_LIBRARY_PATH=/usr/local/cuda-5.0/lib64:/usr/local/cuda-5.0/lib
else
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-5.0/lib64:/usr/local/cuda-5.0/lib
fi
export LD_LIBRARY_PATH
That is, rebooting and issuing echo $LD_LIBRARY_PATH
showed the variable was not defined.
To try the alternative suggestion, I added the two lines to the file /etc/ld.so.conf
so my file looks like this
include /etc/ld.so.conf.d/*.conf
/usr/local/cuda-5.0/lib64
/usr/local/cuda-5.0/lib
Then I issued:
sudo ldconfig
then
echo $LD_LIBRARY_PATH
Still the environment variable was not set. How do I comply with the CUDA installation instructions shown above?
Following a periodic, in my case weekly, run of:
apt-get update
apt-get dist-upgrade
is there much benefit from rebooting?
How do I find out what format my hard drive is in?
I tried to install an nvidia driver and there was an error saying I must not be in an X terminal when doing so. So I did a Ctrl+Alt+F1.
The resulting terminal did not allow the nvidia driver to be installed and showed the same error message. How do I revert back to the Unity GUI?
Upon the first time accessing a server, how can I force SSH to give me the RSA key and automatically store it if the user approves?
Presently it is offering me the ECDSA key. Because I already know the RSA key, I would prefer to see the RSA key presented at this point.
I have tried:
ssh -o RSAAuthentication=yes user@server
Unfortunately this gives me an ECDSA key and the Are you sure you want to continue connecting (yes/no)?
message.
What is the rationale for the "unix system resources", or /usr
directory, as described here, which duplicates many of the directory names under the root directory /
?
My purpose: I'm installing Oracle JDK for the umpteenth time and decided this time to just put it under /home/user
and I'm just reading around a bit to see if it is a bad idea on a single user machine.
Is there a way to tar
extract without clobbering?
I am installing 12.04 and want to restore my data from 10.10. Anything 12.04 specific I would like to keep, that is I do not want the tar
'd 10.10 version to be extracted. If I do a general restore such files as .bashrc will be clobbered. Is there a way to avoid this?
Edit: I would note that a booted 12.04 ISO disk image allows an upgrade from 10.10 (or whatever) and it offers to keep old data. I tried this but it complained some applications might be left broken after the upgrade. I decided to just reboot and do a clean install.
How do I create a system-wide autostart file? This would be on a cloud server running the desktop version of Maverick.
I logged in as root and created an autostart file using System/Preferences/StartupApplications
but it ended up in /root/.config/autostart
and did not execute (as far as I can tell) upon rebooting. The autostart file is to invoke a bash script that invokes the VNC server.
I copied the .desktop autostart file from /root/.config/autostart
to /etc/xdg/autostart
and rebooted. This did not seem to make a difference.
Edit As mentioned in a comment, the objective is to run my bash script which starts the VNC server upon boot; not upon a login.
In System/Preferences/KeyboardShortcuts
there is a shortcut key called Mod4+D
that can be used to minimize windows. How is Mod4+D
entered on a keyboard and what is the meaning of the Mod4?
Is there a driver for a similar printer that also happens to work for the Fuji Xerox P205 b?
I have tried the generic PCL 5 driver and the generic PostScript driver but they do not work. Any other suggestions? I'm on 10.10 (Maverick).
Update The Fuji Xerox website has a Linux driver download as an .iso image. When you open the image you will see 3 drivers. One for HP UX for the PA-RISC and another for Solaris SPARC and one for RedHat x86, x86-64, etc. I picked the RedHat for my computer. It invokes RPM so install that first. The installation script crashes.
There has been much written on getting the beep sound from Ubuntu releases over the years. Example: fixing the beep
My needs are slightly different in that I do not want to ensure sound card beeps are functioning. Instead, I want PC speaker beeps, the kind produced by the original built-in speaker because I believe they will produce less CPU load. I have confirmed that my computer has the PC speaker by unplugging the external speakers and shutting down Ubuntu. At some point in the shutdown and restart process a beep is heard even though the external speakers have no power.
I have tried the following:
In /etc/modprobe.d/blacklist.conf
, turn these lines into comments:
#blacklist snd_pcsp
#blacklist pcspkr
In .bashrc
/usr/bin/xset b on
/usr/bin/xset b 100
Enable in the gnome terminal: Edit > Profile Prefs > General > Terminal Bell
Ensure no "mute" selections in: System > Prefs > Sound > various tabs (uncheck them all).
Select "Enable window and button sounds" in: System > Prefs > Sound > Sound Effects
In gconf-editor
desktop > gnome > sound, select the three sound check boxes.
In gconf-editor
apps > metacity > general select the audible bell
check box.
Still I get no PC speaker beeps when I send code 7 to the console via my Java program or use
echo -e '\a'
or equivalently
echo -e "\a"
on the bash command line. (The -e option means enable escape sequence interpretation.) What else should I try?
Update Since my goal is to minimize load on the CPU, here is a comparison of elapsed times. Each test is for 100,000 iterations. Each variant was performed three times so three results are presented for each.
printwriter.format("%c", 7);
// 1.3 seconds, 1.5 seconds, 1.5 seconds
Toolkit.getDefaultToolkit().beep();
// 0.8 seconds, 0.3 seconds, 0.5 seconds
try { Runtime.getRuntime().exec("beep"); } catch (IOException e) { }
// 10.3 seconds, 16.3 seconds, 11.4 seconds
These runs were done inside Eclipse so multiply by some value less than 1 for standalone execution. Unfortunately, Toolkit's beep is silent on my computer and so is code 7. The beep utility works but has the most cost.