Sponsored Content
Full Discussion: Permission denied
Operating Systems Linux Ubuntu Permission denied Post 303033465 by drew77 on Friday 5th of April 2019 03:26:40 PM
Old 04-05-2019
Permission denied

Trying to get date into the txt file.

It says

Permission denied.

Code:
echo $(date +%I:%M:%S_%D) >> /tmp/systemd_suspend_test_err.txt
exec 2>> /tmp/systemd_suspend_test_err.txt

if [ "${1}" = "pre" ]; then
  # Do the thing you want before suspend here
  echo "we are suspending $(date +%I:%M:%S_%D)." 
elif [ "${1}" = "post" ]; then
  # Do the thing you want after resume here
   echo "and we are back from being suspended $(date +%I:%M:%S_%D)" 
  # gxmessage works IF xhost + is run first.
  gxmessage -timeout 5 -fg red -display :0 'Back from being suspended.'
  #ffplay /usr/share/sounds/My_Sounds/Relax_6_Seconds.mp3
  mplayer /usr/share/sounds/My_Sounds/Relax_6_Seconds.mp3
fi

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

permission denied??

i'm trying to set up my internet connection and i was told i need to edit the file /etc/ppp/pap-secrets but i get a permission denied message...why?? (6 Replies)
Discussion started by: justchillin
6 Replies

2. UNIX for Dummies Questions & Answers

./ Permission Denied.

Could someone tell me why I am getting a permission denied message when I attempt to run this on an out file? Thanks! (8 Replies)
Discussion started by: trouscaillon
8 Replies

3. UNIX for Dummies Questions & Answers

Permission Denied

I just started computer science at UW Milwaukee. When I access the university Solaris system from PuTTY, I get permission denied when I try to access the file I wrote. Now I really have no idea what I'm doing, I just don't understand why I get permission denied in my won directory. Thank You ... (0 Replies)
Discussion started by: howeezy
0 Replies

4. UNIX for Advanced & Expert Users

Permission denied

Hi, I can not execute a .env file $ . /Data/oracle/d03/mydbora/8.0.6/MYDB.env -bash: /Data/oracle/d03/mydbora/8.0.6/MYDB.env: Permission denied Even if : -rwxrwxrwx 1 oracle dba 2903 Mar 5 2007 /Data/oracle/d03/mydbora/8.0.6/MYDB.env Please help. Many thanks. (1 Reply)
Discussion started by: big123456
1 Replies

5. UNIX for Dummies Questions & Answers

Why do I keep getting .:Permission denied?

I'll start off by saying that I know very little about Unix - however, I do know that I have a .profile file in my home directory, and that I should be able to invoke it by typing . profile. However, when I do this for ANY .filename, I get ".: Permission denied". I'm pretty sure that there is... (12 Replies)
Discussion started by: bbersani
12 Replies

6. UNIX for Dummies Questions & Answers

Permission denied

I would like to copy data from local mechine to cluster. Basically, I typed scp -r DVD/ acount@cluster:/ it shows Permission denied. Could anyone please give me a clue to write permission on cluster, please? The poperty of where on cluster I'd like to put is drwxr-xr-x Any idea would... (1 Reply)
Discussion started by: su_in99
1 Replies

7. Red Hat

Permission denied

Hi guys im new to this db i have a small prob while installing websphereportal6.1i think i was installed succesfully but the error im getting is while starting server. check this out # ./serverStatus.sh -all Error loading: /usr/wps61/AppServer/java/jre/bin/classic/libjvm.so: cannot... (1 Reply)
Discussion started by: varma917989
1 Replies

8. Shell Programming and Scripting

Permission denied

I created a user so that when he logs in he will be directed to a menu /etc/passwd user1:x:115:1:Support -SysAd:/export/home/user1:/export/home/suppotrmenu/script.sh However when I logged in remotely from another server by ssh user1@1.1.1.1 , it saysexport/home/suppotrmenu/script.sh:... (4 Replies)
Discussion started by: lhareigh890
4 Replies

9. Linux

Permission denied

I am using korn shell When I type in Telnet on cmd line, I get message "cannot execute" How can I get permission to execute command ? In which dir is telnet located ? I looked in /usr/bin dir. but its not there Thanks (1 Reply)
Discussion started by: paramshamnani
1 Replies

10. UNIX for Dummies Questions & Answers

Permission denied

when i run echo "User” > /dev/tty5 why do i get permission denied? :confused: (2 Replies)
Discussion started by: chinababy
2 Replies
GXMESSAGE(1)															      GXMESSAGE(1)

NAME
gxmessage - a GTK-based xmessage clone SYNOPSIS
gxmessage [OPTIONS] message ... gxmessage [OPTIONS] -file FILENAME DESCRIPTION
gxmessage opens a window to display a message obtained from the command line, from a file, or from stdin. The window includes a row of but- tons, each of which causes the program to exit with a different return code. The GNU Info entry for gxmessage contains detailed information and examples. OPTIONS
gxmessage should accept any option xmessage would, although some (such as -bw and -xrm) are silently ignored. Options supported by gxmes- sage are as follows: -bg COLOR Sets the background color of the message to COLOR. Examples: red, "#c90", "#446a7e". -borderless Opens the gxmessage window without the usual window frame. This option is not compatible with xmessage. -buttons BUTTON_LIST Defines the buttons to be created. BUTTON_LIST is a comma-separated list of LABEL:VALUE pairs, one for each button. The LABEL is the text that appears on the button. The VALUE (0..255) is the code the program will exit with if that button is pressed. Commas and colons can be escaped using backslashes (). As well as ordinary text, the LABEL can specify a GTK "stock" button, like "GTK_STOCK_CANCEL", or it can include an underscore (_) to specify a keyboard accelerator. If VALUEs are omitted, they default to 101, 102, 103, etc., in order. If no -buttons option is given, BUTTON_LIST defaults to "okay:0". gxmessage -buttons "Foo:42,Bar:63" "Example" echo $? gxmessage -buttons "_Foo,_Bar" "Example" echo $? gxmessage "Example" echo $? gxmessage -buttons "GTK_STOCK_OK:0" "Example" echo $? gxmessage -buttons "Hello, world" "Example" -center Opens the gxmessage window in the middle of the screen. -default LABEL Opens the gxmessage window with input focused on the specified button. LABEL is one of the LABELs in BUTTON_LIST (see -buttons, above). -display DISPLAY Specifies the X display to use. -encoding CHARSET Specifies the encoding of the message text. By default, the message text is assumed to match the encoding of the current locale. This option is not compatible with xmessage. -entry Adds a text entry box to the gxmessage window. When the window closes, any text in the entry box will be copied to stdout. This option is not compatible with xmessage and can't be used at the same time as the -print option. -entrytext TEXT Same as -entry, but sets the default entry box contents to TEXT. This option is not compatible with xmessage. -fg COLOR Sets the message text color to COLOR. -file FILENAME Causes the named file to be used as the message source. If a dash (-) is used in place of FILENAME, the message will be read from stdin. -fn | -font FONT Specifies the message font, using GTK2's font specification system. For example, -font "serif italic 14". (GTK2's font system is not compatible with xmessage. See the Compatibility section, below, for a workaround.) -geometry GEOMETRY Sets the window's size (position is ignored by gxmessage). Example: -geometry 400x200 -help Displays basic usage information then exits. -iconic Opens the gxmessage window in its iconized (minimized) state. -name NAME Sets the gxmessage window's name to NAME. -nearmouse Opens the gxmessage window near the mouse pointer. -noescape Prevents the window closing if the ESC key is pressed. This option only works if a file named /usr/share/gxmessage/allow_noescape exists. This option is not compatible with xmessage. -nofocus Prevents the gxmessage window from receiving focus when it opens. This option is not compatible with xmessage. -ontop Attempts to keep the gxmessage window in front of other windows. This option is not compatible with xmessage. -print Writes the LABEL of the selected button to stdout. -sticky Causes the gxmessage window to appear on all workspaces. This option is not compatible with xmessage. -timeout SECONDS Automatically closes the gxmessage window with an exit code of 0 if no button is pressed within SECONDS seconds. (The -entry and -entrytext options cause -timeout to be ignored.) -title TITLE Sets the gxmessage window's title to TITLE. -version Displays the program's version number and Copyright details, then exits. This option is not compatible with xmessage. -wrap Causes lines to wrap rather than exceed the width of the window. This option is not compatible with xmessage. GTK DEFAULTS
The program's default appearance can be adjusted using GTK resource files. The main text display widget is named gxmessage-textview. The text entry widget is named gxmessage-entry. # Example: ~/.gtkrc-2.0 style "gxmsg" { text[NORMAL] = "#cc9900" base[NORMAL] = "#660000" text[SELECTED] = "#660000" base[SELECTED] = "#cc9900" font_name = "monospace" } widget "*.gxmessage-textview" style "gxmsg" widget "*.gxmessage-entry" style "gxmsg" EXIT STATUS
If a button is pressed, the program returns the value assigned to that button. The default "okay" button returns 0. If a timeout event occurs, the program returns 0. If an error occurs, or if the window is closed without a button-press or timeout event, the program exits with code 1. Pressing the ESC key also causes the program to exit with code 1. COMPATIBILITY WITH XMESSAGE
Fall back to xmessage if gxmessage isn't available: #! /bin/sh XMESSAGE=$(which gxmessage) || XMESSAGE=xmessage $XMESSAGE "hello, world" If you specify fonts, check which program you're using: font="monospace 14" [ "$XMESSAGE" = xmessage ] && font="fixed" $XMESSAGE ${font:+-fn "$font"} "hello, world" Don't use double-dashed command line options: $XMESSAGE "hello, world" -buttons good $XMESSAGE "hello, world" --buttons bad Don't use the gxmessage-specific options: -entry, -entrytext, -borderless, -wrap, -encoding, -nofocus, -noescape, -ontop, -sticky, -version, -h, -? BUGS
The position component of -geometry values is ignored by gxmessage. For some reason, opening the gxmessage window with no button set to be the default causes GTK to emit a "beep" sound. If you discover other bugs in the most recent version of gxmessage, please get in touch. SEE ALSO
xmessage(1), zenity(1), dialog(1) The GNU Info entry for gxmessage contains detailed information and examples. AUTHORS
Timothy Musson <trmusson@gmail.com> COPYRIGHT NOTICE
Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Timothy Richard Musson Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are pre- served. February 25th, 2012 GXMESSAGE(1)
All times are GMT -4. The time now is 09:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy