You are not logged in.
Hello, dear xfce users!
I have an alias for alarm on 10 o'clock:
alias w
alias w='while [ ! `date -d +3sec +%H` -eq "10" ]; do date; sleep 1; clear; done; mpg123 "/home/user/music/titiyo-come-along.mp3" volume=40'
I wish to start this alias with 'audio mute button': clicking on 'aufio mute button' should run xfce-terminal window, where I see current time, and it starts music at 10 o'clock.
I cannot figure out which command should be. These dont work:
xfce4-terminal -x w
xfce4-terminal -x 'bash -i "w"'
xfce4-terminal -x 'while [ ! `date -d +3sec +%H` -eq "10" ]; do date; sleep 1; clear; done; mpg123 "/home/user/music/titiyo-come-along.mp3" volume=40'
Please, can you advise, how to run xfce4-terminal and run alias there?
Offline
I found that need to use 'bash -c'
This is my command for Keyboard shortcut:
xfce4-terminal -x bash -c 'while [ ! `date -d +3sec +%H` -eq "10" ]; do date; sleep 1; clear; done; mpg123 "/home/user/music/titiyo-come-along.mp3" volume=40'
This command runs window of xfce4-terminal, and run my alarm command.
But also it would be great if i learn how to use aliases here. This way to load alises does not work:
xfce4-terminal -x bash -c 'source /home/user/.bashrc; w'
-- this only run a window for 0.0001 sec and closes it straight away.
Offline
Bash aliases only work in interactive mode. Try something like this:
xfce4-terminal -x bash -i -c w
Note, you might want to use something other than "w", as it is already a valid command.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
yes, this works. yes, changed alias to 'z'.
Offline
[ Generated in 0.010 seconds, 7 queries executed - Memory usage: 524.99 KiB (Peak: 532.43 KiB) ]