Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts
Tuesday, 29 September 2020

How to disable the Caps Lock key on Ubuntu

Keyboard

I dont like Caps Lock, it's the the most unnecessary key on the keyboard in my opinion. I hardly ever write more than couple of words in capitals, but often accidently hit the key; suddenly finding myself TYPING IN ALL CAPS LIKE A SCREAMING MONKEY. Here’s an easy way to disable your Ubuntu’s Caps Lock key.

1. Install dconf

I already had this installed
$ sudo apt install dconf-tools

2. Disable caps lock (reenable by pressing both shift keys at once)

$ setxkbmap -option "caps:none"
$ setxkbmap -option "shift:both_capslock"
I did only disable for now.

-- UPDATE
This works but running this automatically is of course what was missing in this post so I added step 3 

3. Add this to your .bashrc file

vim .bashrc

Tuesday, 9 June 2015

Terminal won't launch after upgrade to Ubuntu 15.04

After upgrade to Ubuntu 15.04 there is know bug where you can't get the terminal to open with Ctrl+Alt+T
Apparently the problem has to do with custom locale. You can fix this by changing the locale /etc/default/locale
LANG="en_US.UTF-8
"LANGUAGE="en_US"
Or you can add the LANG=en_US.utf8 to your ~/.bashrc file by adding following line to it
export LANG=en_US.utf8
If you have any improvement to this or a better method, please feel free to share it here in the comments.
Monday, 3 March 2014

How to install rpm packages on ubuntu or mint

Installing rpm packages on ubuntu, mint, or debian

The suggested method to install software or deb packages on Ubuntu/Mint linux is via Synaptic, Ubuntu Software Center/ppa, or an apt-get command from the terminal.
You might sometimes need to install rpm package to your ubuntu/mint linux/debian box, there is a utility called Alien, Alien converts an RPM package file into a Debian package file or Alien can install an RPM file directly.

Install Alien
Open your terminal CTRL+T and enter this line.
sudo apt-get install alien

Installing RPM package directly
sudo alien -i package_name.rpm

Converting the RPM file to a Debian package
sudo alien package_name.rpm

Installing the converted Debian package
sudo dpkg -i package_name.deb

For additional Help, use
alien -h

Friday, 21 February 2014

Dropbox Fails To Start


Past few days Dropbox have not started on my Linux computer, I'm running Ubuntu 13.10. When I try to start Dropbox manually by command line, I get this error:
$ dropbox start

Starting Dropbox...Traceback (most recent call last):
  File "dropbox/client/main.py", line 13, in 
  File "autogen_explicit_imports.py", line 13, in 
  File "ui/common/selective_sync.py", line 6, in 
  File "arch/__init__.py", line 28, in 
  File "arch/linux/tracing.py", line 8, in 
  File "hard_trace.py", line 6, in 
  File "client_api/connection_hub.py", line 21, in 
  File "client_api/kv_connection.py", line 23, in 
  File "pylinux/__init__.py", line 71, in 
  File "cffi/api.py", line 311, in verify
  File "dropbox/overrides.py", line 398, in load_library
  File "cffi/verifier.py", line 69, in load_library
  File "cffi/verifier.py", line 154, in _load_library
  File "cffi/vengine_cpy.py", line 124, in load_library
VerificationError: importing '/home/olig/pylinux/__pycache__/_cffi__xa0c4f46bx1d95b4de.so': No module named _cffi__xa0c4f46bx1d95b4de
To fix this, open a terminal CTRL+T and run the following commands
sudo rm -rf /var/lib/dropbox/.dropbox-dist
dropbox start -i

Extra

For more Dropbox command line options
$ dropbox help

Dropbox command-line interface

commands:

Note: use dropbox help command to view usage for a specific command.

 status       get current status of the dropboxd
 help         provide help
 puburl       get public url of a file in your dropbox
 stop         stop dropboxd
 running      return whether dropbox is running
 update       download latest version of dropbox
 start        start dropboxd
 filestatus   get current sync status of one or more files
 ls           list directory contents with current sync status
 autostart    automatically start dropbox at login
 exclude      ignores/excludes a directory from syncing
 lansync      enables or disables LAN sync


Saturday, 16 November 2013

Fix Ubuntu privacy settings

Ran into interesting thing few days ago.
If you're an Ubuntu user and you're using the default settings, each time you start typing in Dash (to open an application or search for a file on your computer), your search terms get sent to a variety of third parties, some of which advertise to you.

Open a terminal Ctrl+Alt+T. Paste code, press enter. and enjoy your privacy.


V=`/usr/bin/lsb_release -rs`; if [ $V \< 12.10 ]; then echo "Good news! Your version of Ubuntu doesn't invade your privacy."; else gsettings set com.canonical.Unity.Lenses remote-content-search none; if [ $V \< 13.10 ]; then sudo apt-get remove -y unity-lens-shopping; else gsettings set com.canonical.Unity.Lenses disabled-scopes "['more_suggestions-amazon.scope', 'more_suggestions-u1ms.scope', 'more_suggestions-populartracks.scope', 'music-musicstore.scope', 'more_suggestions-ebay.scope', 'more_suggestions-ubuntushop.scope', 'more_suggestions-skimlinks.scope']"; fi; if ! grep -q productsearch.ubuntu.com /etc/hosts; then echo -e "\n127.0.0.1 productsearch.ubuntu.com" | sudo tee -a /etc/hosts >/dev/null; fi; echo "All done. Enjoy your privacy."; fi
 Source https://fixubuntu.com/

Thursday, 14 November 2013

ssh login takes too long time before prompt



I had this problem where it took way too long time for the prompt to appear when using ssh to remote server. And b.t.w. I am using my public ssh key. The GSSAPI authentication was timing out, and I'm not not relying on it.
To turn it off edit the /etc/ssh/ssh_config file with your favourite editor, I use VIM
sudo vim /etc/ssh/ssh_config
Edit this line and change from yes to no 
GSSAPIAuthentication no
Friday, 8 November 2013

Install and run a TFTP server


In some cases I need tftp server. The method to install the tftp server is very easy.

First install following packages.
$ sudo apt-get install xinetd tftpd tftp
Create /etc/xinetd.d/tftp and add code
service tftp
{
protocol        = udp
port            = 69
socket_type     = dgram
wait            = yes
user            = nobody
server          = /usr/sbin/in.tftpd
server_args     = /tftpboot
disable         = no
}
Create a folder  /tftpboot and modify privileges
$ sudo mkdir /tftpboot
$ sudo chmod -R 777 /tftpboot
$ sudo chown -R nobody /tftpboot
Restart the xinetd service.
$ sudo /etc/init.d/xinetd restart
Now the tftp server is up and running. For MAC OS X see: Run a TFTP Server on Mac OS X

Note:
My install was on Ubuntu 13.10

Edit:
Oct, 2014 installed on Mint 17