Big Brother and Window Control Placement

Several years ago I found out how to switch the window controls from the left side to the right side of an active window. Now, it appears that the developers of the Unity desktop Ubuntu Linux have eliminated this option.

“The window controls in Unity are on the left. It is not a setting, it’s where the designers chose to place them. This will not change.”

Stephen M. Webb, Canonical

The controls are designed to be in the top-left corner, and if, instead, you like the original top-right placement – well – tough! Tough that is if you use Unity with Ubuntu Linux.

The good news for Linux users is that there are many more desktops than just Unity, and many more distros than just Ubuntu. So, if Unity or Ubuntu won’t let you do what you want, all you have to do is switch desktops or distros.

Try Linux Mint, for example. The Mate version uses the top-right window control placement by default. So much for Big Brother!


You Can’t Move Window Controls to the Right on Ubuntu

Left – or right – of centre?

dconf-editor and Ubuntu 13.10

Posted in Mint, Tweaks, Ubuntu | Tagged , | Leave a comment

Running a bash script in a program launcher

I have always included a “read” command at the end of a bash script if I wanted to pause the script, and keep the terminal window open, after the pre-programmed command sequence terminated. Recently, instead of running a script by double-clicking inside the file manager, I tried to run it using a program launcher. I double-clicked on the desktop icon for the launcher, but nothing seemed to happen. The terminal window that would normally display the results of the script’s commands never opened. It turns out that one needs to take additional steps to see what is happening when using a program launcher.

The problem is that “…the terminal closes when the command run inside it has finished…” So, if the command sequence is short, the terminal will open – and immediately close – and you won’t really see anything happen. The solution is that “…you need to write a command that doesn’t terminate immediately.”

In my specific case, I was experimenting with a script to safely remove a USB drive. That other operating system has such a facility, and this gives a notification to the effect that it is “Safe to Remove Hardware”. Under Linux Mint, I right-click on the USB drive’s icon, select “Eject”, but then have to wait until the red light stops flashing, before I pull out the drive.

Some sources indicate that unmounting a USB drive is the safest way to ensure that the operating system doesn’t have any data writes pending before disconnecting the drive. My intention was to have the script issue the umount command and then provide a message that it was safe to remove the drive.

My solution, therefore, was to create a bash script with two options one to note that the USB drive (a Silicon Power 16GB USB memory stick) wasn’t mounted should the script run while this was the case, or to indicate that the USB drive could be removed under the more usual scenario. The actual code for the script is as follows:

# Check that SILICON16GB is mounted
if grep '/media/toaster/SILICON16GB' /etc/mtab > /dev/null 2>&1; 
mate-terminal -e "bash -c \"umount /media/toaster/SILICON16GB;
 echo USB drive can be removed; echo ; exec bash\""  
mate-terminal -e "bash -c \"echo SILICON16GB is not mounted; 
 echo ; exec bash\""
echo " "

The “trick” in this script is the use of two mate-terminal commands, one for each of the above-noted scenarios, and each including an “exec bash” statement in the executable argument. This final command effectively spawns a second instance of the terminal window which remains on the screen once the executable commands have been completed. This allows the user to review the specific message that is echoed to denote the status of the USB drive.

So, if running my script from the program launcher displays “USB drive can be removed”, I know that I can safely remove the memory stick.


Pausing a bash script

How to safely remove a USB external drive?

Linux Mint: Make a script/shortcut that can be clicked and run and will KEEP THE TERMINAL WINDOW OPEN afterwards [closed]

Avoid gnome-terminal close after script execution?

Posted in Bash script, Mint | Tagged , | Leave a comment

Linux at 25

Happy Birthday Linux! Today marks the 25th anniversary of the announcement of work on the Linux kernel. “I’m doing a (free) operating system (just a hobby, won’t be big and professional like gnu)…” – Linus Torvalds, 25-Aug-91.
Continue reading

Posted in General | Leave a comment

Stop application windows snapping to full screen

Do you have an issue with moving a window by dragging it across the screen and it suddenly snapping (automatically maximizing) to full screen? If so, you let the top of the window touch the top of the screen and enabled automatic “snapping”. Fortunately, in Linux Mint, it’s a really easy fix.
Continue reading

Posted in Mint, Tweaks | Tagged , | Leave a comment

Opening Local HTML Files in Firefox under Android 6.0 (Marshmallow)

I use a local HTML file on all of my computing devices which lists all my frequently-used web sites on a multi-column page, with the individual entries being organized in categories. My new smartphone runs Android 6.0 which, for some reason seems to dislike opening the local HTML file in my favourite web browser, Mozilla Firefox.
Continue reading

Posted in Android, Applications | Tagged , | Leave a comment

Xed, Gedit, and Pluma in Mint 18

The default editor in Linux Mint 18 is Xed, a package that is based on Pluma, and which, according to Mint’s web site is meant to “…use traditional user interfaces…” and “…provide the functionality users already enjoy…” At face value, this is true, but when opening a file on my system, I quickly found it not to be the case.
Continue reading

Posted in Applications, Mint | Tagged , , , | 3 Comments

Installing FreeFileSync in Linux Mint 18

My main data backup program is FreeFileSync in both Linux and Windows. However, when I attempted to install this package in Linux Mint 18 (Sarah) using the usual command to add the relevant PPA (sudo add-apt-repository ppa:freefilesync/ffs), I received the error message: Cannot add PPA: ”This PPA does not support xenial”.
Continue reading

Posted in Applications, Backup, Commands, Mint | Tagged , | Leave a comment