NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting resolution with System Exec.vi, or another way programmatically

If I open terminal I can type in "xrandr -s 1280x1024" and the resolution changes. I thought I might be able to use System Exec.vi to send the command when my application starts up. I tried waiting until completion and was getting the error "Cant Open Display", I have tried not waiting until completion also, returns no errors or codes, but doesn't work either. Am I missing some syntax?

 

I also tried:

 

 way to do this is to use the visudo command. That will open the sudoers file in a special text editor. It will check for typos when you close and prevent you from hosing the file. You can use visudo and add lvuser ALL=(ALL) NOPASSWD: ALL to the bottom of the file and save it.

 

I add sudo or sudo -- to the front of teh command  end up with "sudo:xrandr:command not found" when i wait until completion. 

 

Also tried to follow this forum post, but cant seem to access the file .bashrc file either from the gui (hidden maybe?) or Putty, likely I just don't know the syntax to get the file to open through putty.

 

Can someone help me figure out how to change the screen res from within my rt project?

 

thank you

0 Kudos
Message 1 of 2
(846 Views)

Figured out how to get to that file, and I got the stuff from the forum post to work... my monitor is "default" not DP1 and I kept getting "failed to set gama..." messages. I realized I could just disregard these and it would work. Only problem im having now, which i'm hoping is directly related to the fact that I have been experimenting on a virtual machine cRIO tonight, is that the .bashrc file seems like it doesn't run until i open putty and log in to the admin account. as soon as I log in the resolution changes xrandr doesn't show the resolution mode i made before logging in through putty, but does afterwards. 

0 Kudos
Message 2 of 2
(828 Views)