Open terminal in 'always on top' mode on startup
I want Ubuntu to open a terminal in the lower right corner when I log in, with the always on top mode enabled. I have made a script which does this when I run it from a terminal, but it does not work when I run the script by using Startup Applications. The window appears in the right spot, but always on top is not enabled. Below is my script.
#!/bin/bash
gnome-terminal --title="abvtrm" --geometry 80x10-0--255
wmctrl -a abvtrm -b add,above
exit
The idea is that I want to force the name of the window into being something I decide, so I have a name to refer to for wmctrl. I have noticed that if I run the command
wmctrl -a abvtrm -b add,above
manually in a terminal (after logging, having the window present but not in always on top mode), it has no effect, which suggests to me that for some reason I am not allowed to pick a name for the window when working through Startup Applications.
I call the script by envoking the command
bash myscriptname.sh
Bonus question: Intuition tells me that in order to have the window appear in the bottom right, I should put
gnome-terminal --title="abvtrm" --geometry 80x10-0-0
but when I do this, the window ends up somewhere in the mid-right area of my screen. Why is this?
OK here is a real fix first open a terminal
sudo gedit~/.bashrc
Find this section and add a # to the line like in the code I pasted below, this will let you chane the names of terminals and your original code is fine.
case "$TERM" in
xterm*|rxvt*)
# JEFFYEE REMOVED because it makes commands to title() not work
#PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac
Here is my source, but tested and working by me.
Use
wmctrl -r :ACTIVE: -b toggle,above
use toggle instead of add (reason : Source)
For bottom right, i am working and will update this answer.